/* Generated by Cython 3.0.10 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [
            "cython/inline.h",
            "cython/warnings.h"
        ],
        "include_dirs": [
            "cython"
        ],
        "name": "SnapPy",
        "sources": [
            "cython/SnapPy.pyx"
        ]
    },
    "module_name": "SnapPy"
}
END: Cython Metadata */

#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_10" __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 0x03000AF0
#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
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
#elif defined(PYPY_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_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
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
#elif defined(CYTHON_LIMITED_API)
  #ifdef Py_LIMITED_API
    #undef __PYX_LIMITED_VERSION_HEX
    #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
  #endif
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_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
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
#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
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #ifndef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #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
  #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_GIL
  #define CYTHON_FAST_GIL 0
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL 1
  #endif
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #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
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
  #ifndef CYTHON_USE_FREELISTS
    #define CYTHON_USE_FREELISTS 0
  #endif
#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
  #ifndef CYTHON_USE_FREELISTS
    #define CYTHON_USE_FREELISTS 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
  #if PY_VERSION_HEX >= 0x030d00A4
  #  define __Pyx_PyCFunctionFast PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
  #else
  #  define __Pyx_PyCFunctionFast _PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  #endif
#endif
#if CYTHON_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
#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 __PYX_LIMITED_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__SnapPy
#define __PYX_HAVE_API__SnapPy
/* Early includes */
#include "warnings.h"
#include "stdlib.h"
#include "string.h"
#include "SnapPea.h"
#include "kernel_typedefs.h"
#include "positioned_tet.h"
#include "triangulation.h"
#include "winged_edge.h"
#include "link_projection.h"
#include "terse_triangulation.h"
#include "tersest_triangulation.h"
#include "unix_file_io.h"
#include "unix_cusped_census.h"
#include "unix_kit.h"
#include "kernel_prototypes.h"
#include "Dirichlet.h"
#include "addl_code.h"
#include "isomorphism_signature.h"
#include "ptolemy_types.h"
#include "change_peripheral_curves_nonorientable.h"
#include "gluing_equations_pgl.h"
#include "ptolemy_equations.h"
#include "inline.h"
#include "double_SnapPy.h"
#include <math.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)
#define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
#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[] = {
  "cython/core/basic.pyx",
  "cython/core/manifold.pyx",
  "cython/core/tail.pyx",
  "cython/core/triangulation.pyx",
  "cython/core/abelian_group.pyx",
  "cython/numbers/double.pyx",
  "cython/SnapPy.pyx",
  "<stringsource>",
  "cython/core/fundamental_group.pyx",
  "cython/core/symmetry_group.pyx",
  "cython/core/dirichlet.pyx",
  "cython/core/cusp_neighborhoods.pyx",
  "cython/core/pickle.pyx",
};
/* #### 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 ### */

/* "SnapPy.pyx":3
 * # cython: language_level=3str
 * 
 * ctypedef double Real             # <<<<<<<<<<<<<<
 * 
 * include "SnapPy.pxi"
 */
typedef double __pyx_t_6SnapPy_Real;
/* #### Code section: complex_type_declarations ### */
/* 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_6SnapPy_Triangulation;
struct __pyx_obj_6SnapPy_Manifold;
struct __pyx_obj_6SnapPy_AbelianGroup;
struct __pyx_obj_6SnapPy_PresentationMatrix;
struct __pyx_obj_6SnapPy_CFundamentalGroup;
struct __pyx_obj_6SnapPy_CHolonomyGroup;
struct __pyx_obj_6SnapPy_SymmetryGroup;
struct __pyx_obj_6SnapPy_CDirichletDomain;
struct __pyx_obj_6SnapPy_CCuspNeighborhood;
struct __pyx_obj_6SnapPy___pyx_scope_struct__genexpr;
struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation;
struct __pyx_obj_6SnapPy___pyx_scope_struct_2_genexpr;
struct __pyx_obj_6SnapPy___pyx_scope_struct_3_genexpr;
struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word;
struct __pyx_obj_6SnapPy___pyx_scope_struct_5_genexpr;
struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list;
struct __pyx_obj_6SnapPy___pyx_scope_struct_7_genexpr;
struct __pyx_obj_6SnapPy___pyx_scope_struct_8_genexpr;
struct CuspNeighborhoods;
struct __pyx_opt_args_6SnapPy_13Triangulation_get_from_new_plink;
struct __pyx_opt_args_6SnapPy_13Triangulation_get_triangulation;
struct __pyx_opt_args_6SnapPy_13Triangulation_get_from_file;
struct __pyx_ctuple_WEPolyhedron__ptr__and_int;
typedef struct __pyx_ctuple_WEPolyhedron__ptr__and_int __pyx_ctuple_WEPolyhedron__ptr__and_int;
struct __pyx_opt_args_6SnapPy_listlike_to_triangulation;
struct __pyx_opt_args_6SnapPy_get_triangulation_from_PythonKLP;
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;
struct __pyx_defaults1;
typedef struct __pyx_defaults1 __pyx_defaults1;
struct __pyx_defaults2;
typedef struct __pyx_defaults2 __pyx_defaults2;
struct __pyx_defaults3;
typedef struct __pyx_defaults3 __pyx_defaults3;
struct __pyx_defaults4;
typedef struct __pyx_defaults4 __pyx_defaults4;

/* "cython/SnapPy.pxi":211
 *         c_TetrahedronData *tetrahedron_data
 * 
 * cdef struct c_CuspNeighborhoods "CuspNeighborhoods":             # <<<<<<<<<<<<<<
 *     c_Triangulation *its_triangulation
 * 
 */
struct CuspNeighborhoods {
  Triangulation *its_triangulation;
};

/* "cython/core/basic.pyx":405
 * 
 * # C type for a function of Real returning an object
 * ctypedef object (*func_real_to_obj)(Real)             # <<<<<<<<<<<<<<
 * 
 * # Convert Real to gen in an appropriate manner for this environment
 */
typedef PyObject *(*__pyx_t_6SnapPy_func_real_to_obj)(__pyx_t_6SnapPy_Real);

/* "cython/core/triangulation.pyx":110
 *             remove_hyperbolic_structures(self.c_triangulation)
 * 
 *     cdef get_from_new_plink(self, file_name=None):             # <<<<<<<<<<<<<<
 *         if LinkEditor is None:
 *             raise RuntimeError('PLink was not imported.')
 */
struct __pyx_opt_args_6SnapPy_13Triangulation_get_from_new_plink {
  int __pyx_n;
  PyObject *file_name;
};

/* "cython/core/triangulation.pyx":122
 *               'link complement.')
 * 
 *     cdef get_triangulation(self, spec, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         # Step -1 Check for an entire-triangulation-file-in-a-string
 *         if isinstance(spec, bytes) and spec.startswith(b'pickle:'):
 */
struct __pyx_opt_args_6SnapPy_13Triangulation_get_triangulation {
  int __pyx_n;
  PyObject *remove_finite_vertices;
};

/* "cython/core/triangulation.pyx":260
 *         self.c_triangulation = get_triangulation_from_PythonKLP(data, remove_finite_vertices)
 * 
 *     cdef get_from_file(self, name, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         try:
 *             locations = [os.curdir, os.environ['SNAPPEA_MANIFOLD_DIRECTORY']]
 */
struct __pyx_opt_args_6SnapPy_13Triangulation_get_from_file {
  int __pyx_n;
  PyObject *remove_finite_vertices;
};

/* "cython/core/dirichlet.pyx":3
 * # Dirichlet Domains
 * 
 * cdef (WEPolyhedron*, int) get_generators_from_bytes(data_bytes,             # <<<<<<<<<<<<<<
 *                                                     double vertex_epsilon,
 *                                                     displacement,
 */
struct __pyx_ctuple_WEPolyhedron__ptr__and_int {
  WEPolyhedron *f0;
  int f1;
};

/* "cython/core/pickle.pyx":312
 * 
 * 
 * cdef c_Triangulation* listlike_to_triangulation(listlike,             # <<<<<<<<<<<<<<
 *                                                 num_or_cusps=0,
 *                                                 num_nonor_cusps=0,
 */
struct __pyx_opt_args_6SnapPy_listlike_to_triangulation {
  int __pyx_n;
  PyObject *num_or_cusps;
  PyObject *num_nonor_cusps;
  PyObject *cusp_indices;
  PyObject *peripheral_curves;
};

/* "cython/core/tail.pyx":756
 * signtype = {'R': KLPHalfTwistCL, 'L': KLPHalfTwistCCL}
 * 
 * cdef c_Triangulation* get_triangulation_from_PythonKLP(pythonklp, remove_finite_vertices=True) except *:             # <<<<<<<<<<<<<<
 *     cdef KLPProjection P
 *     cdef c_Triangulation *c_triangulation
 */
struct __pyx_opt_args_6SnapPy_get_triangulation_from_PythonKLP {
  int __pyx_n;
  PyObject *remove_finite_vertices;
};
struct __pyx_defaults {
  PyObject *__pyx_arg_indices;
};
struct __pyx_defaults1 {
  PyObject *__pyx_arg_indices;
};
struct __pyx_defaults2 {
  PyObject *__pyx_arg_indices;
};
struct __pyx_defaults3 {
  PyObject *__pyx_arg_indices;
};
struct __pyx_defaults4 {
  PyObject *__pyx_arg_indices;
};

/* "cython/core/triangulation.pyx":6
 * _low_index_version = [int(n) for n in low_index.version().split('.')]
 * 
 * cdef class Triangulation():             # <<<<<<<<<<<<<<
 *     """
 *     A Triangulation object represents a compact 3-manifold with torus
 */
struct __pyx_obj_6SnapPy_Triangulation {
  PyObject_HEAD
  struct __pyx_vtabstruct_6SnapPy_Triangulation *__pyx_vtab;
  Triangulation *c_triangulation;
  PyObject *_DTcode;
  PyObject *_PDcode;
  PyObject *_cover_info;
  PyObject *_cache;
  PyObject *LE;
  PyObject *_link_file_full_path;
  PyObject *hyperbolic_structure_initialized;
};


/* "cython/core/manifold.pyx":3
 * # Manifolds
 * 
 * cdef class Manifold(Triangulation):             # <<<<<<<<<<<<<<
 *     """
 *     A Manifold is a Triangulation together with a geometric structure.
 */
struct __pyx_obj_6SnapPy_Manifold {
  struct __pyx_obj_6SnapPy_Triangulation __pyx_base;
};


/* "cython/core/abelian_group.pyx":3
 * # Abelian Groups
 * 
 * cdef class AbelianGroup():             # <<<<<<<<<<<<<<
 *     """
 *     An AbelianGroup object represents a finitely generated abelian group,
 */
struct __pyx_obj_6SnapPy_AbelianGroup {
  PyObject_HEAD
  PyObject *divisors;
  PyObject *coefficients;
};


/* "cython/core/abelian_group.pyx":140
 * 
 * 
 * cdef class PresentationMatrix():             # <<<<<<<<<<<<<<
 *     """
 *     A sparse representation of the presentation matrix of an abelian group.
 */
struct __pyx_obj_6SnapPy_PresentationMatrix {
  PyObject_HEAD
  struct __pyx_vtabstruct_6SnapPy_PresentationMatrix *__pyx_vtab;
  int rows;
  int cols;
  PyObject *_row_support;
  PyObject *_col_support;
  PyObject *_entries;
  PyObject *_units;
  PyObject *dead_columns;
};


/* "cython/core/fundamental_group.pyx":103
 *         for g in int_list)
 * 
 * cdef class CFundamentalGroup():             # <<<<<<<<<<<<<<
 *     cdef c_GroupPresentation *c_group_presentation
 *     cdef c_Triangulation *c_triangulation
 */
struct __pyx_obj_6SnapPy_CFundamentalGroup {
  PyObject_HEAD
  GroupPresentation *c_group_presentation;
  Triangulation *c_triangulation;
  PyObject *num_cusps;
};


/* "cython/core/fundamental_group.pyx":484
 * 
 * # Holonomy Groups
 * cdef class CHolonomyGroup(CFundamentalGroup):             # <<<<<<<<<<<<<<
 *     def _matrices(self, word):
 *         """
 */
struct __pyx_obj_6SnapPy_CHolonomyGroup {
  struct __pyx_obj_6SnapPy_CFundamentalGroup __pyx_base;
};


/* "cython/core/symmetry_group.pyx":3
 * #  Symmetry_group
 * 
 * cdef class SymmetryGroup():             # <<<<<<<<<<<<<<
 *     """
 *     A SymmetryGroup is a group of self-isometries of hyperbolic
 */
struct __pyx_obj_6SnapPy_SymmetryGroup {
  PyObject_HEAD
  struct __pyx_vtabstruct_6SnapPy_SymmetryGroup *__pyx_vtab;
  SymmetryGroup *c_symmetry_group;
  PyObject *_is_full_group;
  PyObject *_owns_c_symmetry_group;
};


/* "cython/core/dirichlet.pyx":97
 * 
 * 
 * cdef class CDirichletDomain():             # <<<<<<<<<<<<<<
 *     cdef WEPolyhedron *c_dirichlet_domain
 *     cdef c_Triangulation *c_triangulation
 */
struct __pyx_obj_6SnapPy_CDirichletDomain {
  PyObject_HEAD
  struct __pyx_vtabstruct_6SnapPy_CDirichletDomain *__pyx_vtab;
  WEPolyhedron *c_dirichlet_domain;
  Triangulation *c_triangulation;
  int c_num_generators;
};


/* "cython/core/cusp_neighborhoods.pyx":3
 * # Cusp Neighborhoods
 * 
 * cdef class CCuspNeighborhood():             # <<<<<<<<<<<<<<
 *     cdef c_CuspNeighborhoods *c_cusp_neighborhood
 *     cdef c_Triangulation *c_triangulation
 */
struct __pyx_obj_6SnapPy_CCuspNeighborhood {
  PyObject_HEAD
  struct CuspNeighborhoods *c_cusp_neighborhood;
  Triangulation *c_triangulation;
  int _num_cusps;
  PyObject *original_indices;
};


/* "cython/core/basic.pyx":551
 * 
 * def _StrLongestLen(l):
 *     return str(max(len(e) for e in l))             # <<<<<<<<<<<<<<
 * 
 * 
 */
struct __pyx_obj_6SnapPy___pyx_scope_struct__genexpr {
  PyObject_HEAD
  PyObject *__pyx_genexpr_arg_0;
  PyObject *__pyx_v_e;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "cython/core/triangulation.pyx":1320
 *         return filled_tri
 * 
 *     def _unsimplified_filled_triangulation(self, method='fold'):             # <<<<<<<<<<<<<<
 *         """
 *         For a Triangulation that describes a closed manifold, returns
 */
struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation {
  PyObject_HEAD
  struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self;
};


/* "cython/core/triangulation.pyx":1360
 *             raise ValueError('The Triangulation is empty.')
 *         n = self.num_cusps()
 *         if not all(cusp_is_fillable(self.c_triangulation, c) for c in range(n)):             # <<<<<<<<<<<<<<
 *             raise IndexError('All cusps must be fillable.')
 *         cdef c_Triangulation* c_new_tri = NULL
 */
struct __pyx_obj_6SnapPy___pyx_scope_struct_2_genexpr {
  PyObject_HEAD
  struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation *__pyx_outer_scope;
  PyObject *__pyx_genexpr_arg_0;
  PyObject *__pyx_v_c;
};


/* "cython/core/triangulation.pyx":2429
 * 
 *             # Not a useful GAP or MAGMA object, so let's try.
 *             elif all(is_PermutationGroupElement(p) for p in permutation_rep):             # <<<<<<<<<<<<<<
 *                 permutation_rep = [[x - 1 for x in perm.domain()]
 *                                    for perm in permutation_rep]
 */
struct __pyx_obj_6SnapPy___pyx_scope_struct_3_genexpr {
  PyObject_HEAD
  PyObject *__pyx_genexpr_arg_0;
  PyObject *__pyx_v_p;
};


/* "cython/core/fundamental_group.pyx":98
 *     return word_list
 * 
 * def list_as_word(int_list, int num_generators, verbose_form):             # <<<<<<<<<<<<<<
 *     return _letter_seperator(verbose_form).join(
 *         int_to_gen_string(g, num_generators, verbose_form)
 */
struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word {
  PyObject_HEAD
  int __pyx_v_num_generators;
  PyObject *__pyx_v_verbose_form;
};


/* "cython/core/fundamental_group.pyx":100
 * def list_as_word(int_list, int num_generators, verbose_form):
 *     return _letter_seperator(verbose_form).join(
 *         int_to_gen_string(g, num_generators, verbose_form)             # <<<<<<<<<<<<<<
 *         for g in int_list)
 * 
 */
struct __pyx_obj_6SnapPy___pyx_scope_struct_5_genexpr {
  PyObject_HEAD
  struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word *__pyx_outer_scope;
  PyObject *__pyx_genexpr_arg_0;
  PyObject *__pyx_v_g;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};


/* "cython/core/dirichlet.pyx":380
 *         return result
 * 
 *     def face_list(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of faces, each represented as a dictionary with
 */
struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list {
  PyObject_HEAD
  struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self;
  WEVertex *__pyx_v_vertex;
};


/* "cython/core/dirichlet.pyx":434
 *                 vertex = edge.v[end]
 *                 vertices.append(tuple(
 *                     self._number_(Real2Number(<Real>vertex.x[i]))             # <<<<<<<<<<<<<<
 *                     for i in range(1,4) ))
 *                 vertex_indices.append(
 */
struct __pyx_obj_6SnapPy___pyx_scope_struct_7_genexpr {
  PyObject_HEAD
  struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list *__pyx_outer_scope;
  long __pyx_v_i;
  long __pyx_t_0;
};


/* "cython/core/dirichlet.pyx":636
 *         for matrix in matrices:
 *             for row in matrix:
 *                 result += ' %s\n' % ' '.join(str(x) for x in row)             # <<<<<<<<<<<<<<
 *             result += '\n'
 *         return result
 */
struct __pyx_obj_6SnapPy___pyx_scope_struct_8_genexpr {
  PyObject_HEAD
  PyObject *__pyx_genexpr_arg_0;
  PyObject *__pyx_v_x;
  PyObject *__pyx_t_0;
  Py_ssize_t __pyx_t_1;
  PyObject *(*__pyx_t_2)(PyObject *);
};



/* "cython/core/triangulation.pyx":6
 * _low_index_version = [int(n) for n in low_index.version().split('.')]
 * 
 * cdef class Triangulation():             # <<<<<<<<<<<<<<
 *     """
 *     A Triangulation object represents a compact 3-manifold with torus
 */

struct __pyx_vtabstruct_6SnapPy_Triangulation {
  PyObject *(*get_from_new_plink)(struct __pyx_obj_6SnapPy_Triangulation *, struct __pyx_opt_args_6SnapPy_13Triangulation_get_from_new_plink *__pyx_optional_args);
  PyObject *(*get_triangulation)(struct __pyx_obj_6SnapPy_Triangulation *, PyObject *, struct __pyx_opt_args_6SnapPy_13Triangulation_get_triangulation *__pyx_optional_args);
  PyObject *(*get_HT_knot)(struct __pyx_obj_6SnapPy_Triangulation *, PyObject *, PyObject *, PyObject *, PyObject *);
  PyObject *(*get_punctured_torus_bundle)(struct __pyx_obj_6SnapPy_Triangulation *, PyObject *);
  PyObject *(*get_from_file)(struct __pyx_obj_6SnapPy_Triangulation *, PyObject *, struct __pyx_opt_args_6SnapPy_13Triangulation_get_from_file *__pyx_optional_args);
  PyObject *(*set_c_triangulation)(struct __pyx_obj_6SnapPy_Triangulation *, Triangulation *);
  PyObject *(*big_homology)(struct __pyx_obj_6SnapPy_Triangulation *);
  PyObject *(*c_presentation_matrix)(struct __pyx_obj_6SnapPy_Triangulation *);
  PyObject *(*csmall_homology)(struct __pyx_obj_6SnapPy_Triangulation *);
  RepresentationIntoSn *(*build_rep_into_Sn)(struct __pyx_obj_6SnapPy_Triangulation *, PyObject *);
};
static struct __pyx_vtabstruct_6SnapPy_Triangulation *__pyx_vtabptr_6SnapPy_Triangulation;


/* "cython/core/manifold.pyx":3
 * # Manifolds
 * 
 * cdef class Manifold(Triangulation):             # <<<<<<<<<<<<<<
 *     """
 *     A Manifold is a Triangulation together with a geometric structure.
 */

struct __pyx_vtabstruct_6SnapPy_Manifold {
  struct __pyx_vtabstruct_6SnapPy_Triangulation __pyx_base;
  PyObject *(*_real_volume)(struct __pyx_obj_6SnapPy_Manifold *);
  PyObject *(*_cusped_complex_volume)(struct __pyx_obj_6SnapPy_Manifold *, Complex *, int *);
  PyObject *(*_old_chern_simons)(struct __pyx_obj_6SnapPy_Manifold *);
  PyObject *(*_chern_simons)(struct __pyx_obj_6SnapPy_Manifold *);
};
static struct __pyx_vtabstruct_6SnapPy_Manifold *__pyx_vtabptr_6SnapPy_Manifold;


/* "cython/core/abelian_group.pyx":140
 * 
 * 
 * cdef class PresentationMatrix():             # <<<<<<<<<<<<<<
 *     """
 *     A sparse representation of the presentation matrix of an abelian group.
 */

struct __pyx_vtabstruct_6SnapPy_PresentationMatrix {
  PyObject *(*_set)(struct __pyx_obj_6SnapPy_PresentationMatrix *, PyObject *, PyObject *);
};
static struct __pyx_vtabstruct_6SnapPy_PresentationMatrix *__pyx_vtabptr_6SnapPy_PresentationMatrix;


/* "cython/core/symmetry_group.pyx":3
 * #  Symmetry_group
 * 
 * cdef class SymmetryGroup():             # <<<<<<<<<<<<<<
 *     """
 *     A SymmetryGroup is a group of self-isometries of hyperbolic
 */

struct __pyx_vtabstruct_6SnapPy_SymmetryGroup {
  PyObject *(*_set_c_symmetry_group)(struct __pyx_obj_6SnapPy_SymmetryGroup *, SymmetryGroup *);
};
static struct __pyx_vtabstruct_6SnapPy_SymmetryGroup *__pyx_vtabptr_6SnapPy_SymmetryGroup;


/* "cython/core/dirichlet.pyx":97
 * 
 * 
 * cdef class CDirichletDomain():             # <<<<<<<<<<<<<<
 *     cdef WEPolyhedron *c_dirichlet_domain
 *     cdef c_Triangulation *c_triangulation
 */

struct __pyx_vtabstruct_6SnapPy_CDirichletDomain {
  PyObject *(*triangulate)(struct __pyx_obj_6SnapPy_CDirichletDomain *, PyObject *);
};
static struct __pyx_vtabstruct_6SnapPy_CDirichletDomain *__pyx_vtabptr_6SnapPy_CDirichletDomain;
/* #### 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);

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

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

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

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

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

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

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

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

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

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

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

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

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

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

/* PyIntCompare.proto */
static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* PyIntCompare.proto */
static CYTHON_INLINE int __Pyx_PyInt_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

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

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

/* SliceObject.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

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

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

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

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

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

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

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

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

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

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

/* py_abs.proto */
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *num);
#define __Pyx_PyNumber_Absolute(x)\
    ((likely(PyLong_CheckExact(x))) ?\
         (likely(__Pyx_PyLong_IsNonNeg(x)) ? (Py_INCREF(x), (x)) : __Pyx_PyLong_AbsNeg(x)) :\
         PyNumber_Absolute(x))
#else
#define __Pyx_PyNumber_Absolute(x)  PyNumber_Absolute(x)
#endif

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

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

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

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

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

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

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_RemainderObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_RemainderObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceRemainder(op1, op2) : PyNumber_Remainder(op1, op2))
#endif

/* ByteArrayAppend.proto */
static CYTHON_INLINE int __Pyx_PyByteArray_Append(PyObject* bytearray, int value);

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

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

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* RaiseClosureNameError.proto */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_MultiplyCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_MultiplyCObj(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2))
#endif

/* DivInt[Py_ssize_t].proto */
static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);

/* ModInt[Py_ssize_t].proto */
static CYTHON_INLINE Py_ssize_t __Pyx_mod_Py_ssize_t(Py_ssize_t, Py_ssize_t);

/* append.proto */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);

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

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

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

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

/* py_set_remove.proto */
static CYTHON_INLINE int __Pyx_PySet_Remove(PyObject *set, PyObject *key);

/* py_dict_pop.proto */
static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value);

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

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

/* set_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set,
                                                  Py_ssize_t* p_orig_length, int* p_source_is_set);
static CYTHON_INLINE int __Pyx_set_iter_next(
        PyObject* iter_obj, Py_ssize_t orig_length,
        Py_ssize_t* ppos, PyObject **value,
        int source_is_set);

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

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

/* pop.proto */
static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L);
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L);
#define __Pyx_PyObject_Pop(L) (likely(PyList_CheckExact(L)) ?\
    __Pyx_PyList_Pop(L) : __Pyx__PyObject_Pop(L))
#else
#define __Pyx_PyList_Pop(L)  __Pyx__PyObject_Pop(L)
#define __Pyx_PyObject_Pop(L)  __Pyx__PyObject_Pop(L)
#endif

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

/* UnicodeAsUCS4.proto */
static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*);

/* object_ord.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyObject_Ord(c)\
    (likely(PyUnicode_Check(c)) ? (long)__Pyx_PyUnicode_AsPy_UCS4(c) : __Pyx__PyObject_Ord(c))
#else
#define __Pyx_PyObject_Ord(c) __Pyx__PyObject_Ord(c)
#endif
static long __Pyx__PyObject_Ord(PyObject* c);

/* pop_index.proto */
static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix);
static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix);
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix);
#define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
    (likely(PyList_CheckExact(L) && __Pyx_fits_Py_ssize_t(ix, type, is_signed))) ?\
        __Pyx__PyList_PopIndex(L, py_ix, ix) : (\
        (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
            __Pyx__PyObject_PopIndex(L, py_ix)))
#define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
    __Pyx_fits_Py_ssize_t(ix, type, is_signed) ?\
        __Pyx__PyList_PopIndex(L, py_ix, ix) : (\
        (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
            __Pyx__PyObject_PopIndex(L, py_ix)))
#else
#define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func)\
    __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func)
#define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
    (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
        __Pyx__PyObject_PopIndex(L, py_ix))
#endif

/* SliceTupleAndList.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop);
#else
#define __Pyx_PyList_GetSlice(seq, start, stop)   PySequence_GetSlice(seq, start, stop)
#define __Pyx_PyTuple_GetSlice(seq, start, stop)  PySequence_GetSlice(seq, start, stop)
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AddCObj(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_FloorDivideObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceFloorDivide(op1, op2) : PyNumber_FloorDivide(op1, op2))
#endif

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

/* PyObjectFormatSimple.proto */
#if CYTHON_COMPILING_IN_PYPY
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#elif PY_MAJOR_VERSION < 3
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
        PyObject_Format(s, f))
#elif CYTHON_USE_TYPE_SLOTS
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
        likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
        PyObject_Format(s, f))
#else
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#endif

/* GetItemIntByteArray.proto */
#define __Pyx_GetItemInt_ByteArray(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_ByteArray_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "bytearray index out of range"), -1))
static CYTHON_INLINE int __Pyx_GetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i,
                                                         int wraparound, int boundscheck);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_RshiftObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_RshiftObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceRshift(op1, op2) : PyNumber_Rshift(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AndObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAnd(op1, op2) : PyNumber_And(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_LshiftObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_LshiftObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceLshift(op1, op2) : PyNumber_Lshift(op1, op2))
#endif

/* PySequenceMultiply.proto */
#define __Pyx_PySequence_Multiply_Left(mul, seq)  __Pyx_PySequence_Multiply(seq, mul)
static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul);

/* UnicodeConcatInPlace.proto */
# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
    #if CYTHON_REFNANNY
        #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, __pyx_refnanny)
    #else
        #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right)
    #endif
    static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    );
#else
#define __Pyx_PyUnicode_ConcatInPlace __Pyx_PyUnicode_Concat
#endif
#define __Pyx_PyUnicode_ConcatInPlaceSafe(left, right) ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_ConcatInPlace(left, right))

/* StrConcatInPlace.proto */
#if PY_MAJOR_VERSION >= 3
    #define __Pyx_PyStr_Concat __Pyx_PyUnicode_Concat
    #define __Pyx_PyStr_ConcatInPlace __Pyx_PyUnicode_ConcatInPlace
#else
    #define __Pyx_PyStr_Concat PyNumber_Add
    #define __Pyx_PyStr_ConcatInPlace PyNumber_InPlaceAdd
#endif
#define __Pyx_PyStr_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
    PyNumber_Add(a, b) : __Pyx_PyStr_Concat(a, b))
#define __Pyx_PyStr_ConcatInPlaceSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
    PyNumber_InPlaceAdd(a, b) : __Pyx_PyStr_ConcatInPlace(a, b))

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

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

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

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

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

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

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

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

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

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

/* GetNameInClass.proto */
#define __Pyx_GetNameInClass(var, nmspace, name)  (var) = __Pyx__GetNameInClass(nmspace, name)
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name);

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

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

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

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

/* FromPy.proto */
static __pyx_t_double_complex __Pyx_PyComplex_As___pyx_t_double_complex(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_long(long value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_KLPStrandType(KLPStrandType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_KLPCrossingType(KLPCrossingType value);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Boolean(Boolean value);

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Orientability(Orientability value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_FuncResult(FuncResult value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Permutation(Permutation value);

/* CIntFromPy.proto */
static CYTHON_INLINE Boolean __Pyx_PyInt_As_Boolean(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CuspTopology(CuspTopology value);

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

/* CIntFromPy.proto */
static CYTHON_INLINE VertexIndex __Pyx_PyInt_As_VertexIndex(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE FaceIndex __Pyx_PyInt_As_FaceIndex(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Orientation(Orientation value);

/* CIntFromPy.proto */
static CYTHON_INLINE Orientation __Pyx_PyInt_As_Orientation(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_MatrixEntry(MatrixEntry value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CoveringType(CoveringType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SolutionType(SolutionType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_MatrixParity(MatrixParity value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Orbifold1(Orbifold1 value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char value);

/* CIntFromPy.proto */
static CYTHON_INLINE Permutation __Pyx_PyInt_As_Permutation(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE Orientability __Pyx_PyInt_As_Orientability(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE KLPStrandType __Pyx_PyInt_As_KLPStrandType(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE KLPCrossingType __Pyx_PyInt_As_KLPCrossingType(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *);

/* Globals.proto */
static PyObject* __Pyx_Globals(void);

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

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

/* 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 PyObject *__pyx_f_6SnapPy_13Triangulation_get_from_new_plink(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, struct __pyx_opt_args_6SnapPy_13Triangulation_get_from_new_plink *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6SnapPy_13Triangulation_get_triangulation(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_spec, struct __pyx_opt_args_6SnapPy_13Triangulation_get_triangulation *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6SnapPy_13Triangulation_get_HT_knot(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_crossings, PyObject *__pyx_v_alternation, PyObject *__pyx_v_index, PyObject *__pyx_v_remove_finite_vertices); /* proto*/
static PyObject *__pyx_f_6SnapPy_13Triangulation_get_punctured_torus_bundle(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_match); /* proto*/
static PyObject *__pyx_f_6SnapPy_13Triangulation_get_from_file(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_name, struct __pyx_opt_args_6SnapPy_13Triangulation_get_from_file *__pyx_optional_args); /* proto*/
static PyObject *__pyx_f_6SnapPy_13Triangulation_set_c_triangulation(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, Triangulation *__pyx_v_c_triangulation); /* proto*/
static PyObject *__pyx_f_6SnapPy_13Triangulation_big_homology(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6SnapPy_13Triangulation_c_presentation_matrix(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6SnapPy_13Triangulation_csmall_homology(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto*/
static RepresentationIntoSn *__pyx_f_6SnapPy_13Triangulation_build_rep_into_Sn(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_perm_list); /* proto*/
static PyObject *__pyx_f_6SnapPy_8Manifold__real_volume(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6SnapPy_8Manifold__cusped_complex_volume(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, Complex *__pyx_v_volume, int *__pyx_v_accuracy); /* proto*/
static PyObject *__pyx_f_6SnapPy_8Manifold__old_chern_simons(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6SnapPy_8Manifold__chern_simons(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_6SnapPy_18PresentationMatrix__set(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self, PyObject *__pyx_v_ij, PyObject *__pyx_v_value); /* proto*/
static PyObject *__pyx_f_6SnapPy_13SymmetryGroup__set_c_symmetry_group(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self, SymmetryGroup *__pyx_v_c_symmetry_group); /* proto*/
static PyObject *__pyx_f_6SnapPy_16CDirichletDomain_triangulate(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self, PyObject *__pyx_v_return_class); /* proto*/

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

/* Module declarations from "SnapPy" */
__PYX_EXTERN_C DL_EXPORT(int) SnapPy_test_flag;
__PYX_EXTERN_C DL_EXPORT(Boolean) gLongComputationInProgress;
__PYX_EXTERN_C DL_EXPORT(Boolean) gLongComputationCancelled;
__PYX_EXTERN_C DL_EXPORT(PyObject) *gLongComputationTicker;
static __pyx_t_6SnapPy_func_real_to_obj __pyx_v_6SnapPy_Real2gen;
static PyObject *__pyx_v_6SnapPy_IS_HUGE = 0;
static PyObject *__pyx_v_6SnapPy_IS_BIG = 0;
static PyObject *__pyx_v_6SnapPy_IS_COMPLETE = 0;
static PyObject *__pyx_9genexpr10__pyx_v_6SnapPy_n;
static PyObject *__pyx_f_6SnapPy_real_to_string(__pyx_t_6SnapPy_Real); /*proto*/
static PyObject *__pyx_f_6SnapPy_Real2gen_direct(__pyx_t_6SnapPy_Real); /*proto*/
static PyObject *__pyx_f_6SnapPy_Real2gen_string(__pyx_t_6SnapPy_Real); /*proto*/
static PyObject *__pyx_f_6SnapPy_Real2Number(__pyx_t_6SnapPy_Real); /*proto*/
static PyObject *__pyx_f_6SnapPy_Complex2Number(Complex); /*proto*/
__PYX_EXTERN_C PyObject *UCS2_hack(char *, Py_ssize_t, char *); /*proto*/
__PYX_EXTERN_C void uFatalError(const char*, const char*); /*proto*/
__PYX_EXTERN_C void uLongComputationBegins(const char*, Boolean); /*proto*/
__PYX_EXTERN_C FuncResult uLongComputationContinues(void); /*proto*/
__PYX_EXTERN_C void uLongComputationEnds(void); /*proto*/
__PYX_EXTERN_C void uAcknowledge(const char*); /*proto*/
__PYX_EXTERN_C void uAbortMemoryFull(void); /*proto*/
__PYX_EXTERN_C int uQuery(const char*, const int, const char* *, const int); /*proto*/
static PyObject *__pyx_f_6SnapPy_convert_and_free_identification_of_variables(Identification_of_variables); /*proto*/
static PyObject *__pyx_f_6SnapPy_convert_and_free_integer_matrix(Integer_matrix_with_explanations); /*proto*/
static PyObject *__pyx_f_6SnapPy_Complex2gen(Complex); /*proto*/
static PyObject *__pyx_f_6SnapPy_RealImag2gen(__pyx_t_6SnapPy_Real, __pyx_t_6SnapPy_Real); /*proto*/
static PyObject *__pyx_f_6SnapPy_Complex2complex(Complex); /*proto*/
static PyObject *__pyx_f_6SnapPy_Real2float(__pyx_t_6SnapPy_Real); /*proto*/
static Complex __pyx_f_6SnapPy_complex2Complex(__pyx_t_double_complex); /*proto*/
static __pyx_t_6SnapPy_Real __pyx_f_6SnapPy_Object2Real(PyObject *); /*proto*/
static Complex __pyx_f_6SnapPy_Object2Complex(PyObject *); /*proto*/
static double __pyx_f_6SnapPy_Real2double(__pyx_t_6SnapPy_Real); /*proto*/
static PyObject *__pyx_f_6SnapPy_B2B(Boolean); /*proto*/
static PyObject *__pyx_f_6SnapPy_IsometryListToIsometries(IsometryList *); /*proto*/
static PyObject *__pyx_f_6SnapPy_c_word_as_int_list(int *); /*proto*/
static int *__pyx_f_6SnapPy_c_word_from_list(PyObject *); /*proto*/
static PyObject *__pyx_f_6SnapPy_int_to_gen_string(int, int, PyObject *); /*proto*/
static PyObject *__pyx_f_6SnapPy_c_word_as_string(int *, int, PyObject *); /*proto*/
static __pyx_ctuple_WEPolyhedron__ptr__and_int __pyx_f_6SnapPy_get_generators_from_bytes(PyObject *, double, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
static WEPolyhedron *__pyx_f_6SnapPy_dirichlet_from_O31_matrix_list(PyObject *, double, PyObject *, PyObject *, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_6SnapPy_pickle_triangulation(Triangulation *); /*proto*/
static PyObject *__pyx_f_6SnapPy_pickle_tetrahedron_data(TetrahedronData *, int); /*proto*/
static Triangulation *__pyx_f_6SnapPy_unpickle_triangulation(PyObject *); /*proto*/
static int __pyx_f_6SnapPy_unpickle_tetrahedron_data(TetrahedronData *, PyObject *, int, int); /*proto*/
static Triangulation *__pyx_f_6SnapPy_listlike_to_triangulation(PyObject *, struct __pyx_opt_args_6SnapPy_listlike_to_triangulation *__pyx_optional_args); /*proto*/
static Triangulation *__pyx_f_6SnapPy_triangulation_from_bytes(PyObject *); /*proto*/
static int __pyx_f_6SnapPy_set_cusps(Triangulation *, PyObject *); /*proto*/
static Triangulation *__pyx_f_6SnapPy_get_fibered_manifold_associated_to_braid(PyObject *, PyObject *); /*proto*/
static Triangulation *__pyx_f_6SnapPy_get_triangulation_from_PythonKLP(PyObject *, struct __pyx_opt_args_6SnapPy_get_triangulation_from_PythonKLP *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_6SnapPy___pyx_unpickle_PresentationMatrix__set_state(struct __pyx_obj_6SnapPy_PresentationMatrix *, PyObject *); /*proto*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "SnapPy"
extern int __pyx_module_is_main_SnapPy;
int __pyx_module_is_main_SnapPy = 0;

/* Implementation of "SnapPy" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_staticmethod;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_sum;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_eval;
static PyObject *__pyx_builtin_map;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_max;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_print;
static PyObject *__pyx_builtin_open;
static PyObject *__pyx_builtin_IOError;
static PyObject *__pyx_builtin_NotImplemented;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_all;
static PyObject *__pyx_builtin_sorted;
static PyObject *__pyx_builtin_round;
static PyObject *__pyx_builtin_AssertionError;
static PyObject *__pyx_builtin_NotImplementedError;
static PyObject *__pyx_builtin_StopIteration;
/* #### Code section: string_decls ### */
static const char __pyx_k_[] = "\n";
static const char __pyx_k_0[] = "0";
static const char __pyx_k_1[] = "^-1";
static const char __pyx_k_A[] = "A";
static const char __pyx_k_B[] = "B";
static const char __pyx_k_D[] = "D";
static const char __pyx_k_F[] = "F";
static const char __pyx_k_G[] = "G";
static const char __pyx_k_H[] = "H";
static const char __pyx_k_I[] = "I";
static const char __pyx_k_L[] = "L";
static const char __pyx_k_M[] = "M";
static const char __pyx_k_N[] = "N";
static const char __pyx_k_O[] = "O";
static const char __pyx_k_Q[] = "Q";
static const char __pyx_k_R[] = "R";
static const char __pyx_k_T[] = "T";
static const char __pyx_k_X[] = "X";
static const char __pyx_k_Y[] = "Y";
static const char __pyx_k_Z[] = "Z";
static const char __pyx_k_a[] = ".a";
static const char __pyx_k_b[] = ".b";
static const char __pyx_k_c[] = "c";
static const char __pyx_k_d[] = "%d";
static const char __pyx_k_e[] = "e";
static const char __pyx_k_f[] = "f";
static const char __pyx_k_g[] = "g";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_j[] = "j";
static const char __pyx_k_k[] = "k";
static const char __pyx_k_l[] = "l";
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_q[] = "q";
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_u[] = "u";
static const char __pyx_k_v[] = "v";
static const char __pyx_k_w[] = "w";
static const char __pyx_k_x[] = "x";
static const char __pyx_k_y[] = "y";
static const char __pyx_k_z[] = "z";
static const char __pyx_k_DT[] = "DT:";
static const char __pyx_k_GG[] = "GG";
static const char __pyx_k_LE[] = "LE";
static const char __pyx_k_M0[] = "M0";
static const char __pyx_k_M1[] = "M1";
static const char __pyx_k_S5[] = "S5";
static const char __pyx_k_SC[] = "SC";
static const char __pyx_k__2[] = ", ";
static const char __pyx_k__7[] = "\n  ";
static const char __pyx_k__8[] = " ";
static const char __pyx_k__9[] = "";
static const char __pyx_k_c0[] = "c0";
static const char __pyx_k_c1[] = "c1";
static const char __pyx_k_c2[] = "c2";
static const char __pyx_k_c3[] = "c3";
static const char __pyx_k_cs[] = "cs";
static const char __pyx_k_dB[] = "%dB";
static const char __pyx_k_gc[] = "gc";
static const char __pyx_k_kl[] = "kl";
static const char __pyx_k_l0[] = "l0";
static const char __pyx_k_l1[] = "l1";
static const char __pyx_k_l2[] = "l2";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_rb[] = "rb";
static const char __pyx_k_re[] = "re";
static const char __pyx_k_w0[] = "w0";
static const char __pyx_k_w1[] = "w1";
static const char __pyx_k_wb[] = "wb";
static const char __pyx_k_0_0[] = "(0,0)";
static const char __pyx_k_18f[] = "%.18f";
static const char __pyx_k_6_1[] = "6_1";
static const char __pyx_k_D_d[] = "D%d";
static const char __pyx_k_O31[] = "O31";
static const char __pyx_k_Z_d[] = "Z/%d";
static const char __pyx_k__12[] = " + ";
static const char __pyx_k__13[] = " - ";
static const char __pyx_k__16[] = "[";
static const char __pyx_k__17[] = ",\n ";
static const char __pyx_k__18[] = "]";
static const char __pyx_k__23[] = "  ";
static const char __pyx_k__29[] = ")(";
static const char __pyx_k__30[] = "),(";
static const char __pyx_k__32[] = "-";
static const char __pyx_k__33[] = "+";
static const char __pyx_k__38[] = "~";
static const char __pyx_k_a_2[] = "a";
static const char __pyx_k_add[] = "add";
static const char __pyx_k_all[] = "all";
static const char __pyx_k_ans[] = "ans";
static const char __pyx_k_b_2[] = "b";
static const char __pyx_k_bit[] = "bit";
static const char __pyx_k_cls[] = "cls";
static const char __pyx_k_d_2[] = "~%d";
static const char __pyx_k_d_3[] = "-%d";
static const char __pyx_k_d_4[] = "d";
static const char __pyx_k_d_d[] = "%d -> %d";
static const char __pyx_k_det[] = "det";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_elt[] = "elt";
static const char __pyx_k_end[] = "end";
static const char __pyx_k_eqn[] = "eqn";
static const char __pyx_k_g_g[] = "(%g,%g)";
static const char __pyx_k_gap[] = "gap";
static const char __pyx_k_gen[] = "gen";
static const char __pyx_k_get[] = "get";
static const char __pyx_k_gui[] = "gui";
static const char __pyx_k_hue[] = "hue";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_klp[] = "klp";
static const char __pyx_k_len[] = "len";
static const char __pyx_k_log[] = "log";
static const char __pyx_k_map[] = "map";
static const char __pyx_k_mat[] = "mat";
static const char __pyx_k_max[] = "max";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_num[] = "num";
static const char __pyx_k_o31[] = "o31";
static const char __pyx_k_old[] = "old";
static const char __pyx_k_pad[] = "pad";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_r_2[] = "r:*";
static const char __pyx_k_rel[] = "rel";
static const char __pyx_k_rep[] = "rep";
static const char __pyx_k_row[] = "row";
static const char __pyx_k_s_2[] = " %s\n";
static const char __pyx_k_s_3[] = "s ";
static const char __pyx_k_s_4[] = "%s";
static const char __pyx_k_s_s[] = "[ %s, ..., %s]";
static const char __pyx_k_sep[] = "sep";
static const char __pyx_k_sl2[] = "sl2";
static const char __pyx_k_stl[] = "stl";
static const char __pyx_k_str[] = "str";
static const char __pyx_k_sum[] = "sum";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_tet[] = "tet";
static const char __pyx_k_tip[] = "tip";
static const char __pyx_k_tri[] = ".tri";
static const char __pyx_k_vol[] = "vol";
static const char __pyx_k_6s_s[] = "%-6s %s";
static const char __pyx_k_DT_2[] = "DT[";
static const char __pyx_k_DT_3[] = "DT";
static const char __pyx_k_DT_s[] = "DT:%s";
static const char __pyx_k_Info[] = "Info";
static const char __pyx_k_K7_1[] = "K7_1";
static const char __pyx_k_Link[] = "Link";
static const char __pyx_k_SL2C[] = "SL2C";
static const char __pyx_k_TEXT[] = "TEXT";
static const char __pyx_k_Type[] = "Type";
static const char __pyx_k__111[] = "*";
static const char __pyx_k__114[] = ",";
static const char __pyx_k__115[] = "\n   ";
static const char __pyx_k__116[] = "|";
static const char __pyx_k__117[] = ">";
static const char __pyx_k__118[] = "\"";
static const char __pyx_k__144[] = ":";
static const char __pyx_k__150[] = "_";
static const char __pyx_k__170[] = ".";
static const char __pyx_k__653[] = "\\)";
static const char __pyx_k__726[] = "?";
static const char __pyx_k_a_il[] = "a_il";
static const char __pyx_k_args[] = "args";
static const char __pyx_k_b_RL[] = "b++RL";
static const char __pyx_k_ball[] = "ball";
static const char __pyx_k_base[] = "base";
static const char __pyx_k_byte[] = "byte";
static const char __pyx_k_cobs[] = "cobs";
static const char __pyx_k_code[] = "code";
static const char __pyx_k_cols[] = "cols";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_d__d[] = "%d_%d";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_desc[] = "desc";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_disp[] = "disp";
static const char __pyx_k_edge[] = "edge";
static const char __pyx_k_enum[] = "enum";
static const char __pyx_k_eqns[] = "eqns";
static const char __pyx_k_eval[] = "eval";
static const char __pyx_k_exit[] = "exit";
static const char __pyx_k_face[] = "face";
static const char __pyx_k_file[] = "file";
static const char __pyx_k_fill[] = "fill";
static const char __pyx_k_find[] = "find";
static const char __pyx_k_fold[] = "fold";
static const char __pyx_k_form[] = "form";
static const char __pyx_k_func[] = "func";
static const char __pyx_k_gens[] = "gens";
static const char __pyx_k_gzip[] = "gzip";
static const char __pyx_k_imag[] = "imag";
static const char __pyx_k_info[] = "info";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_item[] = "item";
static const char __pyx_k_iter[] = "__iter__";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_keys[] = "keys";
static const char __pyx_k_lazy[] = "lazy";
static const char __pyx_k_left[] = "left";
static const char __pyx_k_line[] = "line";
static const char __pyx_k_link[] = "link";
static const char __pyx_k_m003[] = "m003";
static const char __pyx_k_m004[] = "m004";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_maps[] = "maps";
static const char __pyx_k_mask[] = "mask";
static const char __pyx_k_math[] = "math";
static const char __pyx_k_mode[] = "mode";
static const char __pyx_k_mult[] = "mult";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_next[] = "next";
static const char __pyx_k_open[] = "open";
static const char __pyx_k_pair[] = "pair";
static const char __pyx_k_pari[] = "pari";
static const char __pyx_k_part[] = "part";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_perm[] = "perm";
static const char __pyx_k_rank[] = "rank";
static const char __pyx_k_read[] = "read";
static const char __pyx_k_real[] = "real";
static const char __pyx_k_rect[] = "rect";
static const char __pyx_k_rels[] = "rels";
static const char __pyx_k_repr[] = "repr";
static const char __pyx_k_reps[] = "reps";
static const char __pyx_k_rows[] = "rows";
static const char __pyx_k_sage[] = "sage";
static const char __pyx_k_save[] = "save";
static const char __pyx_k_seed[] = "seed";
static const char __pyx_k_seek[] = "seek";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_send[] = "send";
static const char __pyx_k_side[] = "side";
static const char __pyx_k_sign[] = "sign";
static const char __pyx_k_size[] = "size";
static const char __pyx_k_snap[] = "snap";
static const char __pyx_k_soln[] = "soln";
static const char __pyx_k_spec[] = "spec";
static const char __pyx_k_step[] = "step";
static const char __pyx_k_stop[] = "stop";
static const char __pyx_k_tail[] = "tail";
static const char __pyx_k_temp[] = "temp";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_type[] = "type";
static const char __pyx_k_unit[] = "unit";
static const char __pyx_k_view[] = "view";
static const char __pyx_k_word[] = "word";
static const char __pyx_k_x012[] = "x012";
static const char __pyx_k_xX_d[] = "([xX])(\\d+)";
static const char __pyx_k_y123[] = "y123";
static const char __pyx_k_8_3_3[] = "8_3^3";
static const char __pyx_k_Braid[] = "Braid:";
static const char __pyx_k_Group[] = "Group<";
static const char __pyx_k_GrpFP[] = "GrpFP";
static const char __pyx_k_Image[] = "Image";
static const char __pyx_k_Index[] = "Index";
static const char __pyx_k_Klein[] = "Klein";
static const char __pyx_k_MsgIO[] = "MsgIO";
static const char __pyx_k_alpha[] = "alpha";
static const char __pyx_k_ascii[] = "ascii";
static const char __pyx_k_b_RRL[] = "b-+RRL";
static const char __pyx_k_bases[] = "__bases__";
static const char __pyx_k_basis[] = "basis";
static const char __pyx_k_cache[] = "cache";
static const char __pyx_k_class[] = "__class__";
static const char __pyx_k_clear[] = "clear";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_codec[] = "codec";
static const char __pyx_k_cover[] = "cover";
static const char __pyx_k_cusps[] = "cusps";
static const char __pyx_k_d_d_2[] = "<%d, %d>";
static const char __pyx_k_drill[] = "drill";
static const char __pyx_k_edges[] = "edges";
static const char __pyx_k_empty[] = "empty";
static const char __pyx_k_enter[] = "__enter__";
static const char __pyx_k_euler[] = "euler";
static const char __pyx_k_faces[] = "faces";
static const char __pyx_k_files[] = "files";
static const char __pyx_k_flips[] = "flips";
static const char __pyx_k_flush[] = "flush";
static const char __pyx_k_group[] = "group";
static const char __pyx_k_ideal[] = "ideal";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_is_S5[] = "is_S5";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_klein[] = "klein";
static const char __pyx_k_len_2[] = "__len__";
static const char __pyx_k_line0[] = "line0";
static const char __pyx_k_line1[] = "line1";
static const char __pyx_k_line2[] = "line2";
static const char __pyx_k_line3[] = "line3";
static const char __pyx_k_ljust[] = "ljust";
static const char __pyx_k_lower[] = "lower";
static const char __pyx_k_magma[] = "magma";
static const char __pyx_k_major[] = "major";
static const char __pyx_k_match[] = "match";
static const char __pyx_k_model[] = "model";
static const char __pyx_k_moves[] = "moves";
static const char __pyx_k_ncols[] = "ncols";
static const char __pyx_k_new_2[] = "new";
static const char __pyx_k_nrows[] = "nrows";
static const char __pyx_k_omega[] = "omega";
static const char __pyx_k_order[] = "order";
static const char __pyx_k_other[] = "other";
static const char __pyx_k_parts[] = "parts";
static const char __pyx_k_perm0[] = "perm0";
static const char __pyx_k_perm1[] = "perm1";
static const char __pyx_k_perm2[] = "perm2";
static const char __pyx_k_perm3[] = "perm3";
static const char __pyx_k_perms[] = "perms";
static const char __pyx_k_plink[] = "plink";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_reach[] = "reach";
static const char __pyx_k_right[] = "right";
static const char __pyx_k_rings[] = "rings";
static const char __pyx_k_rjust[] = "rjust";
static const char __pyx_k_round[] = "round";
static const char __pyx_k_s_F_d[] = "%s := F.%d; ";
static const char __pyx_k_s_x_s[] = "%s x %s";
static const char __pyx_k_shape[] = "shape";
static const char __pyx_k_sided[] = "sided";
static const char __pyx_k_signs[] = "signs";
static const char __pyx_k_specs[] = "specs";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_start[] = "start";
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_table[] = "table";
static const char __pyx_k_throw[] = "throw";
static const char __pyx_k_tilts[] = "tilts";
static const char __pyx_k_title[] = "title";
static const char __pyx_k_to_do[] = "to_do";
static const char __pyx_k_total[] = "total";
static const char __pyx_k_types[] = "types";
static const char __pyx_k_upper[] = "upper";
static const char __pyx_k_utf_8[] = "utf-8";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_words[] = "words";
static const char __pyx_k_write[] = "write";
static const char __pyx_k_x_d_1[] = "x%d^-1";
static const char __pyx_k_zeros[] = "zeros";
static const char __pyx_k_12n123[] = "12n123";
static const char __pyx_k_17_14f[] = "%17.14f";
static const char __pyx_k_4s_40s[] = "%-4s %-40s %-";
static const char __pyx_k_Census[] = "Census";
static const char __pyx_k_HomGrp[] = "HomGrp";
static const char __pyx_k_K_s__s[] = "K%s_%s";
static const char __pyx_k_Number[] = "Number";
static const char __pyx_k_SnapPy[] = "SnapPy";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_atexit[] = "atexit";
static const char __pyx_k_b_RL_2[] = "b+-RL";
static const char __pyx_k_binary[] = "binary ";
static const char __pyx_k_browse[] = "browse";
static const char __pyx_k_bundle[] = "bundle";
static const char __pyx_k_c_eqns[] = "c_eqns";
static const char __pyx_k_c_vars[] = "c_vars";
static const char __pyx_k_c_word[] = "c_word";
static const char __pyx_k_center[] = "center";
static const char __pyx_k_circle[] = "circle";
static const char __pyx_k_coeffs[] = "coeffs";
static const char __pyx_k_covers[] = "covers";
static const char __pyx_k_curdir[] = "curdir";
static const char __pyx_k_cutoff[] = "cutoff";
static const char __pyx_k_cutout[] = "cutout";
static const char __pyx_k_cyclic[] = "cyclic";
static const char __pyx_k_d_d__d[] = "%d^%d_%d";
static const char __pyx_k_decode[] = "decode";
static const char __pyx_k_degree[] = "degree";
static const char __pyx_k_dict_2[] = "_dict";
static const char __pyx_k_dict_3[] = "dict";
static const char __pyx_k_domain[] = "domain";
static const char __pyx_k_enable[] = "enable";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_engine[] = "engine";
static const char __pyx_k_exit_2[] = "__exit__";
static const char __pyx_k_filled[] = "_filled";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_g_eqns[] = "g_eqns";
static const char __pyx_k_gluing[] = "gluing";
static const char __pyx_k_groups[] = "groups";
static const char __pyx_k_header[] = "header";
static const char __pyx_k_images[] = "images";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_isfile[] = "isfile";
static const char __pyx_k_isosig[] = "isosig";
static const char __pyx_k_kwargs[] = "kwargs";
static const char __pyx_k_lenStr[] = "lenStr";
static const char __pyx_k_length[] = "length";
static const char __pyx_k_letter[] = "letter";
static const char __pyx_k_log_im[] = "log_im";
static const char __pyx_k_log_re[] = "log_re";
static const char __pyx_k_lookup[] = "lookup";
static const char __pyx_k_marked[] = "marked";
static const char __pyx_k_matrix[] = "matrix";
static const char __pyx_k_matsnf[] = "matsnf";
static const char __pyx_k_method[] = "method";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_next_2[] = "__next__";
static const char __pyx_k_number[] = "number";
static const char __pyx_k_offset[] = "offset";
static const char __pyx_k_orient[] = "orient";
static const char __pyx_k_output[] = "output";
static const char __pyx_k_parity[] = "parity";
static const char __pyx_k_path_2[] = "__path__";
static const char __pyx_k_pickle[] = "pickle:";
static const char __pyx_k_pieces[] = "pieces";
static const char __pyx_k_prefix[] = "prefix";
static const char __pyx_k_radius[] = "radius";
static const char __pyx_k_record[] = "record";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_remove[] = "remove";
static const char __pyx_k_reopen[] = "reopen";
static const char __pyx_k_repr_2[] = "__repr__";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_retval[] = "retval";
static const char __pyx_k_row_op[] = "row_op";
static const char __pyx_k_shapes[] = "shapes";
static const char __pyx_k_snappy[] = "__snappy__";
static const char __pyx_k_so_far[] = "so_far";
static const char __pyx_k_sorted[] = "sorted";
static const char __pyx_k_spec_2[] = "__spec__";
static const char __pyx_k_stderr[] = "stderr";
static const char __pyx_k_stdout[] = "stdout";
static const char __pyx_k_string[] = "string";
static const char __pyx_k_struct[] = "struct";
static const char __pyx_k_target[] = "target";
static const char __pyx_k_to_str[] = "to_str";
static const char __pyx_k_unpack[] = "unpack";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_values[] = "values";
static const char __pyx_k_verify[] = "verify";
static const char __pyx_k_vertex[] = "vertex";
static const char __pyx_k_volume[] = "volume";
static const char __pyx_k_0_9_0_9[] = "(.*?)((?:\\([0-9 .+-]+,[0-9 .+-]+\\))*$)";
static const char __pyx_k_16n1235[] = "16n1235";
static const char __pyx_k_Browser[] = "Browser";
static const char __pyx_k_DT_code[] = "DT_code";
static const char __pyx_k_DTcodec[] = "DTcodec";
static const char __pyx_k_GrpPerm[] = "GrpPerm";
static const char __pyx_k_IOError[] = "IOError";
static const char __pyx_k_Integer[] = "Integer";
static const char __pyx_k_L104001[] = "L104001";
static const char __pyx_k_MTLinks[] = "MTLinks";
static const char __pyx_k_PD_code[] = "PD_code";
static const char __pyx_k_Q_s_A_s[] = "Q: %s\nA:  %s\n";
static const char __pyx_k_Surface[] = "Surface";
static const char __pyx_k_absImag[] = "absImag";
static const char __pyx_k_abspath[] = "abspath";
static const char __pyx_k_b_RRL_2[] = "b--RRL";
static const char __pyx_k_browser[] = "browser";
static const char __pyx_k_byteseq[] = "byteseq";
static const char __pyx_k_c_moves[] = "c_moves";
static const char __pyx_k_c_terse[] = "c_terse";
static const char __pyx_k_cb_menu[] = "cb_menu";
static const char __pyx_k_closest[] = "closest";
static const char __pyx_k_columns[] = "columns";
static const char __pyx_k_compile[] = "compile";
static const char __pyx_k_complex[] = "complex";
static const char __pyx_k_content[] = "content";
static const char __pyx_k_corners[] = "corners";
static const char __pyx_k_cy_eval[] = "cy_eval";
static const char __pyx_k_delattr[] = "__delattr__";
static const char __pyx_k_delitem[] = "__delitem__";
static const char __pyx_k_details[] = "details";
static const char __pyx_k_disable[] = "disable";
static const char __pyx_k_entries[] = "entries";
static const char __pyx_k_environ[] = "environ";
static const char __pyx_k_explode[] = "explode";
static const char __pyx_k_filling[] = "filling";
static const char __pyx_k_findall[] = "findall";
static const char __pyx_k_func_OK[] = "func_OK";
static const char __pyx_k_genexpr[] = "genexpr";
static const char __pyx_k_get_tie[] = "get_tie";
static const char __pyx_k_getitem[] = "__getitem__";
static const char __pyx_k_gluings[] = "gluings";
static const char __pyx_k_grouped[] = "grouped";
static const char __pyx_k_handles[] = "handles";
static const char __pyx_k_indices[] = "indices";
static const char __pyx_k_integer[] = "integer";
static const char __pyx_k_islower[] = "islower";
static const char __pyx_k_layered[] = "layered";
static const char __pyx_k_message[] = "message";
static const char __pyx_k_modulus[] = "modulus";
static const char __pyx_k_morwen8[] = "morwen8/";
static const char __pyx_k_myslice[] = "myslice";
static const char __pyx_k_new_tie[] = "new_tie";
static const char __pyx_k_new_tri[] = "new_tri";
static const char __pyx_k_no_arcs[] = "no_arcs";
static const char __pyx_k_num_gen[] = "num_gen";
static const char __pyx_k_num_tet[] = "num_tet";
static const char __pyx_k_of_link[] = "of_link";
static const char __pyx_k_popitem[] = "popitem";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_ptolemy[] = "ptolemy";
static const char __pyx_k_rect_im[] = "rect_im";
static const char __pyx_k_rect_re[] = "rect_re";
static const char __pyx_k_regular[] = "regular";
static const char __pyx_k_replace[] = "replace";
static const char __pyx_k_segment[] = "segment";
static const char __pyx_k_set_tie[] = "set_tie";
static const char __pyx_k_setattr[] = "__setattr__";
static const char __pyx_k_setitem[] = "__setitem__";
static const char __pyx_k_snapPea[] = "snapPea";
static const char __pyx_k_snappea[] = "snappea";
static const char __pyx_k_stopper[] = "stopper";
static const char __pyx_k_strline[] = "strline";
static const char __pyx_k_surface[] = "surface";
static const char __pyx_k_tarfile[] = "tarfile";
static const char __pyx_k_tarpath[] = "tarpath";
static const char __pyx_k_tet_num[] = "tet_num";
static const char __pyx_k_tri_txt[] = "*.tri *.txt";
static const char __pyx_k_twister[] = "twister";
static const char __pyx_k_unknown[] = "unknown";
static const char __pyx_k_unnamed[] = "unnamed";
static const char __pyx_k_version[] = "version";
static const char __pyx_k_16_14f_I[] = "%16.14f*I";
static const char __pyx_k_2_3_move[] = "2-3 move";
static const char __pyx_k_3_2_move[] = "3-2 move";
static const char __pyx_k_Alphabet[] = "Alphabet";
static const char __pyx_k_CuspInfo[] = "CuspInfo";
static const char __pyx_k_DT_4_6_2[] = "DT[4,6,2]";
static const char __pyx_k_DT_codes[] = "DT_codes";
static const char __pyx_k_HTWKnots[] = "HTWKnots";
static const char __pyx_k_Isometry[] = "Isometry";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_L13n9331[] = "L13n9331";
static const char __pyx_k_Manifold[] = "Manifold";
static const char __pyx_k_Obsolete[] = "\n    Obsolete.\n    ";
static const char __pyx_k_PreImage[] = "PreImage";
static const char __pyx_k_accuracy[] = "accuracy";
static const char __pyx_k_add_rows[] = "add_rows";
static const char __pyx_k_as_ideal[] = "as_ideal";
static const char __pyx_k_at_least[] = "at least ";
static const char __pyx_k_b_string[] = "b_string";
static const char __pyx_k_c_center[] = "c_center";
static const char __pyx_k_c_matrix[] = "c_matrix";
static const char __pyx_k_c_string[] = "c_string";
static const char __pyx_k_c_target[] = "c_target";
static const char __pyx_k_callback[] = "callback";
static const char __pyx_k_canonize[] = "canonize";
static const char __pyx_k_complete[] = "complete";
static const char __pyx_k_contains[] = "__contains__";
static const char __pyx_k_data_ijk[] = "data_ijk";
static const char __pyx_k_database[] = "database";
static const char __pyx_k_datafile[] = "datafile";
static const char __pyx_k_dec_prec[] = "dec_prec";
static const char __pyx_k_distance[] = "distance";
static const char __pyx_k_factor_0[] = "factor_0";
static const char __pyx_k_factor_1[] = "factor_1";
static const char __pyx_k_filedata[] = "filedata";
static const char __pyx_k_filename[] = "filename";
static const char __pyx_k_fill_all[] = "fill_all";
static const char __pyx_k_filled_2[] = "filled";
static const char __pyx_k_fillings[] = "fillings";
static const char __pyx_k_gap_init[] = "_gap_init_";
static const char __pyx_k_get_data[] = "get_data";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_homology[] = "homology";
static const char __pyx_k_identify[] = "identify";
static const char __pyx_k_infinite[] = "infinite";
static const char __pyx_k_int_list[] = "int_list";
static const char __pyx_k_internal[] = "internal";
static const char __pyx_k_length_2[] = " length";
static const char __pyx_k_manifold[] = "manifold";
static const char __pyx_k_matrices[] = "_matrices";
static const char __pyx_k_meridian[] = "meridian";
static const char __pyx_k_neighbor[] = "neighbor";
static const char __pyx_k_new_name[] = "new_name";
static const char __pyx_k_nonzeros[] = "nonzeros";
static const char __pyx_k_num_cols[] = "num_cols";
static const char __pyx_k_num_gens[] = "num_gens";
static const char __pyx_k_num_rows[] = "num_rows";
static const char __pyx_k_number_2[] = "_number_";
static const char __pyx_k_obsolete[] = "_obsolete";
static const char __pyx_k_operator[] = "operator";
static const char __pyx_k_pickle_2[] = "pickle";
static const char __pyx_k_position[] = "position";
static const char __pyx_k_protocol[] = "protocol";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_raw_form[] = "raw_form";
static const char __pyx_k_readline[] = "readline";
static const char __pyx_k_relation[] = "relation";
static const char __pyx_k_relators[] = "relators";
static const char __pyx_k_sage_all[] = "sage.all";
static const char __pyx_k_savefile[] = "savefile";
static const char __pyx_k_set_name[] = "set_name";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_shortest[] = "shortest";
static const char __pyx_k_signtype[] = "signtype";
static const char __pyx_k_simplify[] = "simplify";
static const char __pyx_k_spectrum[] = "spectrum";
static const char __pyx_k_strategy[] = "strategy";
static const char __pyx_k_subgroup[] = "subgroup";
static const char __pyx_k_surfaces[] = "surfaces";
static const char __pyx_k_tempfile[] = "tempfile";
static const char __pyx_k_to_bytes[] = "_to_bytes";
static const char __pyx_k_topology[] = "topology";
static const char __pyx_k_type_str[] = "_type_str";
static const char __pyx_k_verified[] = "verified";
static const char __pyx_k_vertices[] = "vertices";
static const char __pyx_k_All_files[] = "All files";
static const char __pyx_k_DT_0_9_01[] = "DT[:]? *(\\[[0-9, \\-\\(\\)]+\\](?: *, *\\[[01, ]+\\])?)$";
static const char __pyx_k_FreeGroup[] = "FreeGroup";
static const char __pyx_k_Info_keys[] = "Info.keys";
static const char __pyx_k_L_d_2d_3d[] = "L%d%.2d%.3d";
static const char __pyx_k_Orbifold1[] = "Orbifold1";
static const char __pyx_k_RawNumber[] = "RawNumber";
static const char __pyx_k_ShapeInfo[] = "ShapeInfo";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_a_zA_Z0_9[] = "([a-zA-Z0-9\\+\\-]+)$";
static const char __pyx_k_algorithm[] = "algorithm";
static const char __pyx_k_as_string[] = "as_string";
static const char __pyx_k_b_no_lLrR[] = "b([+-no])([+-])([lLrR]+)$";
static const char __pyx_k_bits_prec[] = "bits_prec";
static const char __pyx_k_c_new_tri[] = "c_new_tri";
static const char __pyx_k_canonical[] = "_canonical";
static const char __pyx_k_crossings[] = "crossings";
static const char __pyx_k_cusp_info[] = "cusp_info";
static const char __pyx_k_cusp_maps[] = "cusp_maps";
static const char __pyx_k_cusp_type[] = "cusp_type";
static const char __pyx_k_data_spec[] = "data_spec";
static const char __pyx_k_decorated[] = "decorated";
static const char __pyx_k_dehn_fill[] = "dehn_fill";
static const char __pyx_k_dual_rows[] = "dual_rows";
static const char __pyx_k_edge_list[] = "edge_list";
static const char __pyx_k_endpoints[] = "endpoints";
static const char __pyx_k_enumerate[] = "enumerate";
static const char __pyx_k_equations[] = "equations";
static const char __pyx_k_face0_gen[] = "face0_gen";
static const char __pyx_k_face1_gen[] = "face1_gen";
static const char __pyx_k_face2_gen[] = "face2_gen";
static const char __pyx_k_face3_gen[] = "face3_gen";
static const char __pyx_k_face_list[] = "face_list";
static const char __pyx_k_facedicts[] = "facedicts";
static const char __pyx_k_file_name[] = "file_name";
static const char __pyx_k_filetypes[] = "filetypes";
static const char __pyx_k_from_data[] = "from_data";
static const char __pyx_k_full_list[] = "full_list";
static const char __pyx_k_gen_names[] = "gen_names";
static const char __pyx_k_geodesics[] = "geodesics";
static const char __pyx_k_horoballs[] = "horoballs";
static const char __pyx_k_immutable[] = "_immutable";
static const char __pyx_k_in_radius[] = "in_radius";
static const char __pyx_k_intervals[] = "intervals";
static const char __pyx_k_irregular[] = "irregular";
static const char __pyx_k_is_isosig[] = "is_isosig";
static const char __pyx_k_isenabled[] = "isenabled";
static const char __pyx_k_log_shape[] = "log_shape";
static const char __pyx_k_longitude[] = "longitude";
static const char __pyx_k_low_index[] = "low_index";
static const char __pyx_k_manifolds[] = "manifolds";
static const char __pyx_k_max_reach[] = "max_reach";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_monodromy[] = "monodromy";
static const char __pyx_k_neighbors[] = "neighbors";
static const char __pyx_k_num_cusps[] = "num_cusps";
static const char __pyx_k_num_edges[] = "num_edges";
static const char __pyx_k_num_faces[] = "num_faces";
static const char __pyx_k_num_links[] = "num_links";
static const char __pyx_k_one_sided[] = "one-sided";
static const char __pyx_k_opacities[] = "opacities";
static const char __pyx_k_orig_gens[] = "orig_gens";
static const char __pyx_k_precision[] = "precision";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_randomize[] = "randomize";
static const char __pyx_k_readlines[] = "readlines";
static const char __pyx_k_recompute[] = "recompute";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_splitting[] = "splitting";
static const char __pyx_k_structure[] = "structure";
static const char __pyx_k_to_string[] = "_to_string";
static const char __pyx_k_two_sided[] = "two_sided";
static const char __pyx_k_v1205_2_3[] = "v1205(2,3)";
static const char __pyx_k_word_list[] = "word_list";
static const char __pyx_k_FuncResult[] = "FuncResult";
static const char __pyx_k_GapElement[] = "GapElement";
static const char __pyx_k_Generators[] = "% Generators";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_LinkEditor[] = "LinkEditor";
static const char __pyx_k_Obsolete_2[] = "\n    Obsolete\n    ";
static const char __pyx_k_Orientable[] = "Orientable";
static const char __pyx_k_SageObject[] = "SageObject";
static const char __pyx_k_Stabilizer[] = "Stabilizer";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_Xcomponent[] = "Xcomponent";
static const char __pyx_k_Ycomponent[] = "Ycomponent";
static const char __pyx_k_acc_log_im[] = "acc_log_im";
static const char __pyx_k_acc_log_re[] = "acc_log_re";
static const char __pyx_k_acc_rec_im[] = "acc_rec_im";
static const char __pyx_k_acc_rec_re[] = "acc_rec_re";
static const char __pyx_k_accuracies[] = "accuracies";
static const char __pyx_k_all_tables[] = "__all_tables__";
static const char __pyx_k_b_new_name[] = "b_new_name";
static const char __pyx_k_bytestring[] = "bytestring";
static const char __pyx_k_c_factor_0[] = "c_factor_0";
static const char __pyx_k_c_factor_1[] = "c_factor_1";
static const char __pyx_k_c_meridian[] = "c_meridian";
static const char __pyx_k_c_new_name[] = "c_new_name";
static const char __pyx_k_complete_2[] = "complete?";
static const char __pyx_k_components[] = "components";
static const char __pyx_k_cover_info[] = "cover_info";
static const char __pyx_k_cover_type[] = "cover_type";
static const char __pyx_k_covers_gap[] = "_covers_gap";
static const char __pyx_k_curve_list[] = "curve_list";
static const char __pyx_k_cusp_index[] = "cusp_index";
static const char __pyx_k_decoration[] = "decoration";
static const char __pyx_k_edge_class[] = "edge_class";
static const char __pyx_k_edge_index[] = "edge_index";
static const char __pyx_k_empty_save[] = "_empty_save";
static const char __pyx_k_exceptions[] = "exceptions";
static const char __pyx_k_export_stl[] = "export_stl";
static const char __pyx_k_face_index[] = "face_index";
static const char __pyx_k_filedialog[] = "filedialog";
static const char __pyx_k_filled_tri[] = "filled_tri";
static const char __pyx_k_format_str[] = "format_str";
static const char __pyx_k_from_bytes[] = "_from_bytes";
static const char __pyx_k_full_rigor[] = "full_rigor";
static const char __pyx_k_gap_string[] = "gap_string";
static const char __pyx_k_generators[] = "generators";
static const char __pyx_k_holonomies[] = "holonomies";
static const char __pyx_k_horoviewer[] = "horoviewer";
static const char __pyx_k_identify_2[] = "_identify";
static const char __pyx_k_input_type[] = "input_type";
static const char __pyx_k_is_HT_knot[] = "is_HT_knot";
static const char __pyx_k_is_abelian[] = "is_abelian";
static const char __pyx_k_isometries[] = "isometries";
static const char __pyx_k_its_matrix[] = "its_matrix";
static const char __pyx_k_magma_init[] = "_magma_init_";
static const char __pyx_k_matrices_2[] = "matrices";
static const char __pyx_k_msg_stream[] = "msg_stream";
static const char __pyx_k_num_curves[] = "num_curves";
static const char __pyx_k_orientable[] = "orientable";
static const char __pyx_k_out_radius[] = "out_radius";
static const char __pyx_k_peripheral[] = "peripheral";
static const char __pyx_k_polyviewer[] = "polyviewer";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_rect_shape[] = "rect_shape";
static const char __pyx_k_set_DTcode[] = "_set_DTcode";
static const char __pyx_k_set_PDcode[] = "_set_PDcode";
static const char __pyx_k_set_name_2[] = "__set_name__";
static const char __pyx_k_six_length[] = "six_length";
static const char __pyx_k_smith_form[] = "smith_form";
static const char __pyx_k_spherogram[] = "spherogram";
static const char __pyx_k_spin_short[] = "spin_short";
static const char __pyx_k_startswith[] = "startswith";
static const char __pyx_k_strandtype[] = "strandtype";
static const char __pyx_k_torus_cusp[] = "torus cusp";
static const char __pyx_k_which_cusp[] = "which_cusp";
static const char __pyx_k_word_moves[] = "_word_moves";
static const char __pyx_k_Bb_raid_0_9[] = "[Bb]raid[:]?(\\[[0-9, \\-]+\\])$";
static const char __pyx_k_Census_next[] = "Census.next";
static const char __pyx_k_CosetAction[] = "CosetAction";
static const char __pyx_k_Ford_domain[] = "Ford_domain";
static const char __pyx_k_ImportError[] = "ImportError";
static const char __pyx_k_Info___init[] = "Info.__init__";
static const char __pyx_k_LinkManager[] = "LinkManager";
static const char __pyx_k_MorwenLinks[] = "MorwenLinks";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_SnapPyCache[] = "SnapPyCache";
static const char __pyx_k_UI_callback[] = "UI_callback";
static const char __pyx_k_alternation[] = "alternation";
static const char __pyx_k_as_int_list[] = "as_int_list";
static const char __pyx_k_assignments[] = "assignments";
static const char __pyx_k_b_file_name[] = "b_file_name";
static const char __pyx_k_c_longitude[] = "c_longitude";
static const char __pyx_k_c_opacities[] = "c_opacities";
static const char __pyx_k_check_index[] = "check_index";
static const char __pyx_k_clear_marks[] = "clear_marks";
static const char __pyx_k_col_support[] = "col_support";
static const char __pyx_k_core_length[] = "core_length";
static const char __pyx_k_cover_count[] = "cover_count";
static const char __pyx_k_cover_types[] = "cover_types";
static const char __pyx_k_cusp_images[] = "cusp_images";
static const char __pyx_k_cusp_maps_2[] = "_cusp_maps";
static const char __pyx_k_dLQbcccdxwb[] = "dLQbcccdxwb";
static const char __pyx_k_dual_curves[] = "dual_curves";
static const char __pyx_k_extractfile[] = "extractfile";
static const char __pyx_k_five_length[] = "five_length";
static const char __pyx_k_from_isosig[] = "_from_isosig";
static const char __pyx_k_from_pickle[] = "_from_pickle";
static const char __pyx_k_from_string[] = "_from_string";
static const char __pyx_k_func_failed[] = "func_failed";
static const char __pyx_k_interrupted[] = "interrupted";
static const char __pyx_k_is_complete[] = "is_complete";
static const char __pyx_k_is_dihedral[] = "is_dihedral";
static const char __pyx_k_morwen8_tgz[] = "morwen8.tgz";
static const char __pyx_k_mro_entries[] = "__mro_entries__";
static const char __pyx_k_num_lengths[] = "num_lengths";
static const char __pyx_k_num_threads[] = "num_threads";
static const char __pyx_k_output_file[] = "output_file";
static const char __pyx_k_permutation[] = "permutation";
static const char __pyx_k_return_type[] = "return_type";
static const char __pyx_k_row_entries[] = "row_entries";
static const char __pyx_k_sage_helper[] = "sage_helper";
static const char __pyx_k_sage_matrix[] = "sage_matrix";
static const char __pyx_k_sage_object[] = "sage_object";
static const char __pyx_k_second_char[] = "second_char";
static const char __pyx_k_to_byte_str[] = "to_byte_str";
static const char __pyx_k_two_sided_2[] = "two-sided";
static const char __pyx_k_user_radius[] = "user_radius";
static const char __pyx_k_valid_index[] = "valid_index";
static const char __pyx_k_vertex_list[] = "_vertex_list";
static const char __pyx_k_which_curve[] = "which_curve";
static const char __pyx_k_within_sage[] = "_within_sage";
static const char __pyx_k_AbelianGroup[] = "AbelianGroup";
static const char __pyx_k_Census_Knots[] = "Census_Knots";
static const char __pyx_k_Census___len[] = "Census.__len__";
static const char __pyx_k_ChristyLinks[] = "ChristyLinks";
static const char __pyx_k_CuspTopology[] = "CuspTopology";
static const char __pyx_k_CuspedCensus[] = "CuspedCensus";
static const char __pyx_k_DT_a_zA_Z_01[] = "DT[:\\[] *([a-zA-Z]+(?:\\.[01]+)?)[\\]]?$";
static const char __pyx_k_Generators_s[] = "%% Generators\n%s\n";
static const char __pyx_k_MagmaElement[] = "MagmaElement";
static const char __pyx_k_MatrixParity[] = "MatrixParity";
static const char __pyx_k_MsgIO___init[] = "MsgIO.__init__";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_SolutionType[] = "SolutionType";
static const char __pyx_k_ViewerWindow[] = "ViewerWindow";
static const char __pyx_k_betti_number[] = "betti_number";
static const char __pyx_k_c_cover_type[] = "c_cover_type";
static const char __pyx_k_c_filled_tri[] = "c_filled_tri";
static const char __pyx_k_census_index[] = "census_index";
static const char __pyx_k_chern_simons[] = "chern_simons";
static const char __pyx_k_coset_action[] = "coset_action";
static const char __pyx_k_covers_magma[] = "_covers_magma";
static const char __pyx_k_cusp_indices[] = "cusp_indices";
static const char __pyx_k_displacement[] = "displacement";
static const char __pyx_k_edge_indices[] = "edge_indices";
static const char __pyx_k_eight_length[] = "eight_length";
static const char __pyx_k_explain_cols[] = "explain_cols";
static const char __pyx_k_explain_rows[] = "explain_rows";
static const char __pyx_k_fill_by_fold[] = "fill_by_fold";
static const char __pyx_k_filling_data[] = "filling_data";
static const char __pyx_k_first_nybble[] = "first_nybble";
static const char __pyx_k_initializing[] = "_initializing";
static const char __pyx_k_is_coroutine[] = "_is_coroutine";
static const char __pyx_k_is_geometric[] = "is_geometric";
static const char __pyx_k_link_archive[] = "link_archive";
static const char __pyx_k_list_as_word[] = "list_as_word";
static const char __pyx_k_magma_string[] = "magma_string";
static const char __pyx_k_max_segments[] = "max_segments";
static const char __pyx_k_mirrored_arc[] = "mirrored arc";
static const char __pyx_k_multiplicity[] = "multiplicity";
static const char __pyx_k_neighbor_end[] = "neighbor_end";
static const char __pyx_k_num_or_cusps[] = "num_or_cusps";
static const char __pyx_k_num_relators[] = "num_relators";
static const char __pyx_k_num_surfaces[] = "num_surfaces";
static const char __pyx_k_num_vertices[] = "num_vertices";
static const char __pyx_k_one_manifold[] = "_one_manifold";
static const char __pyx_k_presentation[] = "presentation";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_segment_list[] = "segment_list";
static const char __pyx_k_seven_length[] = "seven_length";
static const char __pyx_k_side_lengths[] = "side_lengths";
static const char __pyx_k_spine_radius[] = "spine_radius";
static const char __pyx_k_staticmethod[] = "staticmethod";
static const char __pyx_k_stringsource[] = "<stringsource>";
static const char __pyx_k_three_to_two[] = "_three_to_two";
static const char __pyx_k_translations[] = "translations";
static const char __pyx_k_twister_word[] = "twister_word";
static const char __pyx_k_two_to_three[] = "_two_to_three";
static const char __pyx_k_unnamed_link[] = "unnamed link";
static const char __pyx_k_use_setstate[] = "use_setstate";
static const char __pyx_k_verbose_form[] = "verbose_form";
static const char __pyx_k_version_info[] = "version_info";
static const char __pyx_k_vertex_class[] = "vertex_class";
static const char __pyx_k_word_as_list[] = "word_as_list";
static const char __pyx_k_5_2_1_3_4_1_2[] = "5^2_1(3,4)(1,-2)";
static const char __pyx_k_Braid_1_2_1_2[] = "Braid[1,2,-1,-2]";
static const char __pyx_k_Bundle_S__d_d[] = "Bundle\\(S_\\{(\\d+),(\\d+)\\},";
static const char __pyx_k_CensusKnots_s[] = "CensusKnots/%s";
static const char __pyx_k_Census___init[] = "Census.__init__";
static const char __pyx_k_Census___iter[] = "Census.__iter__";
static const char __pyx_k_Christy_links[] = "Christy_links";
static const char __pyx_k_DualCurveInfo[] = "DualCurveInfo";
static const char __pyx_k_HolonomyGroup[] = "HolonomyGroup";
static const char __pyx_k_KLPProjection[] = "KLPProjection";
static const char __pyx_k_KnotExteriors[] = "KnotExteriors";
static const char __pyx_k_LinkExteriors[] = "LinkExteriors";
static const char __pyx_k_Manifold_copy[] = "Manifold.copy";
static const char __pyx_k_Orientability[] = "Orientability";
static const char __pyx_k_Out_of_memory[] = "Out of memory.\n";
static const char __pyx_k_StopIteration[] = "StopIteration";
static const char __pyx_k_StrLongestLen[] = "_StrLongestLen";
static const char __pyx_k_SymmetryGroup[] = "SymmetryGroup";
static const char __pyx_k_Triangulation[] = "% Triangulation";
static const char __pyx_k_are_isometric[] = "are_isometric";
static const char __pyx_k_asksaveasfile[] = "asksaveasfile";
static const char __pyx_k_c_core_length[] = "c_core_length";
static const char __pyx_k_class_getitem[] = "__class_getitem__";
static const char __pyx_k_combinatorial[] = "combinatorial";
static const char __pyx_k_comm_subgroup[] = "comm_subgroup";
static const char __pyx_k_current_shape[] = "current_shape";
static const char __pyx_k_cusp_images_2[] = "_cusp_images";
static const char __pyx_k_cusps_to_fill[] = "cusps_to_fill";
static const char __pyx_k_cutoff_length[] = "cutoff_length";
static const char __pyx_k_cutoff_radius[] = "cutoff_radius";
static const char __pyx_k_edge_to_index[] = "edge_to_index";
static const char __pyx_k_edge_valences[] = "edge_valences";
static const char __pyx_k_equation_type[] = "equation_type";
static const char __pyx_k_filled_length[] = "filled_length";
static const char __pyx_k_filled_shapes[] = "filled_shapes";
static const char __pyx_k_filling__d__d[] = "filling_%d_%d";
static const char __pyx_k_horoball_list[] = "horoball_list";
static const char __pyx_k_include_words[] = "include_words";
static const char __pyx_k_init_subclass[] = "__init_subclass__";
static const char __pyx_k_initial_shape[] = "initial_shape";
static const char __pyx_k_is_GapElement[] = "is_GapElement";
static const char __pyx_k_is_full_group[] = "is_full_group";
static const char __pyx_k_is_orientable[] = "is_orientable";
static const char __pyx_k_is_polyhedral[] = "is_polyhedral";
static const char __pyx_k_is_symplectic[] = "_is_symplectic";
static const char __pyx_k_is_two_bridge[] = "is_two_bridge";
static const char __pyx_k_long_relators[] = "long_relators";
static const char __pyx_k_manifold_name[] = "manifold_name";
static const char __pyx_k_manifold_path[] = "manifold_path";
static const char __pyx_k_max_crossings[] = "max_crossings";
static const char __pyx_k_neighbor0_idx[] = "neighbor0_idx";
static const char __pyx_k_neighbor1_idx[] = "neighbor1_idx";
static const char __pyx_k_neighbor2_idx[] = "neighbor2_idx";
static const char __pyx_k_neighbor3_idx[] = "neighbor3_idx";
static const char __pyx_k_nonorientable[] = "nonorientable";
static const char __pyx_k_not_attempted[] = "not attempted";
static const char __pyx_k_num_crossings[] = "num_crossings";
static const char __pyx_k_num_orig_gens[] = "num_orig_gens";
static const char __pyx_k_num_relations[] = "num_relations";
static const char __pyx_k_one_tet_tilts[] = "one_tet_tilts";
static const char __pyx_k_orientability[] = "orientability";
static const char __pyx_k_pairing_words[] = "pairing_words";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_reindex_cusps[] = "_reindex_cusps";
static const char __pyx_k_relation_list[] = "relation_list";
static const char __pyx_k_result_curves[] = "result_curves";
static const char __pyx_k_rev_spec_dict[] = "rev_spec_dict";
static const char __pyx_k_second_nybble[] = "second_nybble";
static const char __pyx_k_set_rand_seed[] = "set_rand_seed";
static const char __pyx_k_set_test_flag[] = "set_test_flag";
static const char __pyx_k_shrink_factor[] = "shrink_factor";
static const char __pyx_k_solution_type[] = "solution_type";
static const char __pyx_k_triangulation[] = "triangulation";
static const char __pyx_k_vertex_list_2[] = "vertex_list";
static const char __pyx_k_which_surface[] = "which_surface";
static const char __pyx_k_All_text_files[] = "All text files";
static const char __pyx_k_AssertionError[] = "AssertionError";
static const char __pyx_k_AttributeError[] = "AttributeError";
static const char __pyx_k_CHolonomyGroup[] = "CHolonomyGroup";
static const char __pyx_k_Census_Morwen8[] = "Census_Morwen8";
static const char __pyx_k_ChristyLinks_s[] = "ChristyLinks/%s";
static const char __pyx_k_HoroballViewer[] = "HoroballViewer";
static const char __pyx_k_LengthSpectrum[] = "LengthSpectrum";
static const char __pyx_k_ListOnePerLine[] = "ListOnePerLine";
static const char __pyx_k_Manifold_cover[] = "Manifold.cover";
static const char __pyx_k_Manifold_drill[] = "Manifold.drill";
static const char __pyx_k_Manifold_split[] = "Manifold.split";
static const char __pyx_k_Non_orientable[] = "Non-orientable";
static const char __pyx_k_NotImplemented[] = "NotImplemented";
static const char __pyx_k_O31_generators[] = "O31_generators";
static const char __pyx_k_ObsCensusKnots[] = "ObsCensusKnots";
static const char __pyx_k_ObsMorwenLinks[] = "ObsMorwenLinks";
static const char __pyx_k_Send_to_SnapPy[] = "Send to SnapPy";
static const char __pyx_k_abelianization[] = "abelianization";
static const char __pyx_k_alternating_gz[] = "alternating.gz";
static const char __pyx_k_complex_length[] = "complex_length";
static const char __pyx_k_complex_volume[] = "complex_volume";
static const char __pyx_k_compute_volume[] = "compute_volume";
static const char __pyx_k_covers_snappea[] = "_covers_snappea";
static const char __pyx_k_fill_cusp_spec[] = "fill_cusp_spec";
static const char __pyx_k_func_bad_input[] = "func_bad_input";
static const char __pyx_k_func_cancelled[] = "func_cancelled";
static const char __pyx_k_gap_image_gens[] = "gap_image_gens";
static const char __pyx_k_generator_file[] = "generator_file";
static const char __pyx_k_generator_path[] = "generator_path";
static const char __pyx_k_get_HT_knot_DT[] = "get_HT_knot_DT";
static const char __pyx_k_high_precision[] = "high_precision";
static const char __pyx_k_isosig_pattern[] = "isosig_pattern";
static const char __pyx_k_link_directory[] = "link_directory";
static const char __pyx_k_manifold_class[] = "_manifold_class";
static const char __pyx_k_manifold_paths[] = "manifold_paths";
static const char __pyx_k_meridian__d__d[] = "meridian_%d_%d";
static const char __pyx_k_multiplicities[] = "multiplicities";
static const char __pyx_k_non_peripheral[] = "non_peripheral";
static const char __pyx_k_num_components[] = "num_components";
static const char __pyx_k_num_fake_cusps[] = "_num_fake_cusps";
static const char __pyx_k_num_generators[] = "num_generators";
static const char __pyx_k_num_tetrahedra[] = "num_tetrahedra";
static const char __pyx_k_original_index[] = "original_index";
static const char __pyx_k_plink_callback[] = "plink_callback";
static const char __pyx_k_shape_accuracy[] = "shape_accuracy";
static const char __pyx_k_short_relators[] = "short_relators";
static const char __pyx_k_symmetry_group[] = "symmetry_group";
static const char __pyx_k_vertex_epsilon[] = "vertex_epsilon";
static const char __pyx_k_vertex_indices[] = "vertex_indices";
static const char __pyx_k_which_solution[] = "which_solution";
static const char __pyx_k_CensusKnots_tgz[] = "CensusKnots.tgz";
static const char __pyx_k_CuspInfo___repr[] = "CuspInfo.__repr__";
static const char __pyx_k_DirichletDomain[] = "DirichletDomain";
static const char __pyx_k_Extends_to_link[] = "Extends to link";
static const char __pyx_k_HTLinkExteriors[] = "HTLinkExteriors";
static const char __pyx_k_Info__immutable[] = "Info._immutable";
static const char __pyx_k_Isometry___init[] = "Isometry.__init__";
static const char __pyx_k_Isometry___repr[] = "Isometry.__repr__";
static const char __pyx_k_Link_Projection[] = "% Link Projection";
static const char __pyx_k_Manifold_browse[] = "Manifold.browse";
static const char __pyx_k_Manifold_covers[] = "Manifold.covers";
static const char __pyx_k_Manifold_volume[] = "Manifold.volume";
static const char __pyx_k_Not_within_Sage[] = "Not within Sage";
static const char __pyx_k_Num_Alternating[] = "Num_Alternating";
static const char __pyx_k_Triangulation_2[] = "Triangulation";
static const char __pyx_k_Xforward_strand[] = "Xforward_strand";
static const char __pyx_k_Yforward_strand[] = "Yforward_strand";
static const char __pyx_k_ascii_lowercase[] = "ascii_lowercase";
static const char __pyx_k_blowup_multiple[] = "blowup_multiple";
static const char __pyx_k_c_comm_subgroup[] = "c_comm_subgroup";
static const char __pyx_k_c_triangulation[] = "c_triangulation";
static const char __pyx_k_complete_length[] = "complete_length";
static const char __pyx_k_complete_shapes[] = "complete_shapes";
static const char __pyx_k_compute_corners[] = "compute_corners";
static const char __pyx_k_current_modulus[] = "current_modulus";
static const char __pyx_k_explain_columns[] = "explain_columns";
static const char __pyx_k_extends_to_link[] = "extends_to_link";
static const char __pyx_k_extract_HT_knot[] = "extract_HT_knot";
static const char __pyx_k_filled_length_2[] = "filled length";
static const char __pyx_k_fixed_alignment[] = "fixed_alignment";
static const char __pyx_k_force_recompute[] = "force_recompute";
static const char __pyx_k_generator_bytes[] = "generator_bytes";
static const char __pyx_k_initial_modulus[] = "initial_modulus";
static const char __pyx_k_is_MagmaElement[] = "is_MagmaElement";
static const char __pyx_k_is_amphicheiral[] = "is_amphicheiral";
static const char __pyx_k_is_binary_group[] = "is_binary_group";
static const char __pyx_k_is_isometric_to[] = "is_isometric_to";
static const char __pyx_k_is_torus_bundle[] = "is_torus_bundle";
static const char __pyx_k_isomorphisms_to[] = "isomorphisms_to";
static const char __pyx_k_left_pad_string[] = "left_pad_string";
static const char __pyx_k_length_spectrum[] = "length_spectrum";
static const char __pyx_k_longitude__d__d[] = "longitude_%d_%d";
static const char __pyx_k_manifoldMethods[] = "manifoldMethods";
static const char __pyx_k_mark_solid_tori[] = "mark_solid_tori";
static const char __pyx_k_num_nonor_cusps[] = "num_nonor_cusps";
static const char __pyx_k_one_tet_lengths[] = "one_tet_lengths";
static const char __pyx_k_passes_at_fours[] = "passes_at_fours";
static const char __pyx_k_peripheral_data[] = "peripheral_data";
static const char __pyx_k_permutation_rep[] = "permutation_rep";
static const char __pyx_k_ptolemy_variety[] = "ptolemy_variety";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_return_matrices[] = "return_matrices";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_shape_precision[] = "shape precision";
static const char __pyx_k_symplectic_form[] = "_symplectic_form";
static const char __pyx_k_table_directory[] = "table_directory";
static const char __pyx_k_tetrahedra_data[] = "tetrahedra_data";
static const char __pyx_k_vertex_to_index[] = "vertex_to_index";
static const char __pyx_k_where_to_resume[] = "where_to_resume";
static const char __pyx_k_CDirichletDomain[] = "CDirichletDomain";
static const char __pyx_k_Census___getitem[] = "Census.__getitem__";
static const char __pyx_k_ChristyLinks_tgz[] = "ChristyLinks.tgz";
static const char __pyx_k_ClosedCensusData[] = "ClosedCensusData";
static const char __pyx_k_CuspNeighborhood[] = "CuspNeighborhood";
static const char __pyx_k_FundamentalGroup[] = "FundamentalGroup";
static const char __pyx_k_Manifold__number[] = "Manifold._number_";
static const char __pyx_k_N_has_to_be_2_15[] = "N has to be 2...15";
static const char __pyx_k_ObsLinkExteriors[] = "ObsLinkExteriors";
static const char __pyx_k_PermutationGroup[] = "PermutationGroup";
static const char __pyx_k_PolyhedronViewer[] = "PolyhedronViewer";
static const char __pyx_k_SageNotAvailable[] = "SageNotAvailable";
static const char __pyx_k_ShapeInfo___repr[] = "ShapeInfo.__repr__";
static const char __pyx_k_Splitting_S__d_d[] = "Splitting\\(S_\\{(\\d+),(\\d+)\\},";
static const char __pyx_k_Xbackward_strand[] = "Xbackward_strand";
static const char __pyx_k_Ybackward_strand[] = "Ybackward_strand";
static const char __pyx_k_c_abelianization[] = "c_abelianization";
static const char __pyx_k_c_representation[] = "c_representation";
static const char __pyx_k_certified_shapes[] = "certified_shapes";
static const char __pyx_k_coefficient_list[] = "coefficient_list";
static const char __pyx_k_complex_volume_2[] = "_complex_volume";
static const char __pyx_k_covers_low_index[] = "_covers_low_index";
static const char __pyx_k_decorated_isosig[] = "decorated_isosig";
static const char __pyx_k_defaultextension[] = "defaultextension";
static const char __pyx_k_dirichlet_domain[] = "dirichlet_domain";
static const char __pyx_k_get_displacement[] = "get_displacement";
static const char __pyx_k_gluing_equations[] = "gluing_equations";
static const char __pyx_k_letter_seperator[] = "_letter_seperator";
static const char __pyx_k_manifold_class_2[] = "manifold_class";
static const char __pyx_k_new_displacement[] = "new_displacement";
static const char __pyx_k_num_subdivisions[] = "num_subdivisions";
static const char __pyx_k_octahedral_group[] = "octahedral group";
static const char __pyx_k_pairing_matrices[] = "pairing_matrices";
static const char __pyx_k_permutation_reps[] = "permutation_reps";
static const char __pyx_k_plink_callback_2[] = "_plink_callback";
static const char __pyx_k_reduce_list_word[] = "reduce_list_word";
static const char __pyx_k_s_s_with_euler_s[] = "%s %s with euler = %s";
static const char __pyx_k_set_displacement[] = "set_displacement";
static const char __pyx_k_symplectic_basis[] = "symplectic_basis";
static const char __pyx_k_tip_vertex_index[] = "tip_vertex_index";
static const char __pyx_k_vertex_data_list[] = "_vertex_data_list";
static const char __pyx_k_AbelianGroup_rank[] = "AbelianGroup.rank";
static const char __pyx_k_Alternating_table[] = "Alternating_table";
static const char __pyx_k_CCuspNeighborhood[] = "CCuspNeighborhood";
static const char __pyx_k_CFundamentalGroup[] = "CFundamentalGroup";
static const char __pyx_k_Census___contains[] = "Census.__contains__";
static const char __pyx_k_FactorCosetAction[] = "FactorCosetAction";
static const char __pyx_k_GeneratorsOfGroup[] = "GeneratorsOfGroup";
static const char __pyx_k_IsSubgroupFpGroup[] = "IsSubgroupFpGroup";
static const char __pyx_k_Klein_bottle_cusp[] = "Klein bottle cusp";
static const char __pyx_k_LowIndexSubgroups[] = "LowIndexSubgroups";
static const char __pyx_k_Manifold_canonize[] = "Manifold.canonize";
static const char __pyx_k_NormalSurfaceInfo[] = "NormalSurfaceInfo";
static const char __pyx_k_ShortMatrixParity[] = "ShortMatrixParity";
static const char __pyx_k_SnapPeaFatalError[] = "SnapPeaFatalError";
static const char __pyx_k_SnapPea_interrupt[] = "SnapPea_interrupt";
static const char __pyx_k_Xforward_neighbor[] = "Xforward_neighbor";
static const char __pyx_k_Yforward_neighbor[] = "Yforward_neighbor";
static const char __pyx_k_character_variety[] = "character_variety";
static const char __pyx_k_choose_generators[] = "_choose_generators";
static const char __pyx_k_closed_orientable[] = "closed_orientable";
static const char __pyx_k_complete_length_2[] = "complete length";
static const char __pyx_k_cusp_neighborhood[] = "cusp_neighborhood";
static const char __pyx_k_default_precision[] = "_default_precision";
static const char __pyx_k_edge_orientations[] = "edge_orientations";
static const char __pyx_k_extends_to_link_2[] = "_extends_to_link";
static const char __pyx_k_format_two_by_two[] = "format_two_by_two";
static const char __pyx_k_fundamental_group[] = "fundamental_group";
static const char __pyx_k_holonomy_accuracy[] = "holonomy_accuracy";
static const char __pyx_k_icosohedral_group[] = "icosohedral group";
static const char __pyx_k_inverse_list_word[] = "inverse_list_word";
static const char __pyx_k_is_direct_product[] = "is_direct_product";
static const char __pyx_k_is_twister_bundle[] = "is_twister_bundle";
static const char __pyx_k_low_index_version[] = "_low_index_version";
static const char __pyx_k_marked_tetrahedra[] = "_marked_tetrahedra";
static const char __pyx_k_meridian_accuracy[] = "meridian_accuracy";
static const char __pyx_k_multiply_elements[] = "multiply_elements";
static const char __pyx_k_no_solution_found[] = "no solution found";
static const char __pyx_k_nonalternating_gz[] = "nonalternating.gz";
static const char __pyx_k_obstruction_class[] = "obstruction_class";
static const char __pyx_k_orientation_cover[] = "orientation_cover";
static const char __pyx_k_peripheral_curves[] = "peripheral_curves";
static const char __pyx_k_return_isometries[] = "return_isometries";
static const char __pyx_k_show_uAcknowledge[] = "show_uAcknowledge";
static const char __pyx_k_simplified_matrix[] = "simplified_matrix";
static const char __pyx_k_singularity_index[] = "singularity_index";
static const char __pyx_k_tail_vertex_index[] = "tail_vertex_index";
static const char __pyx_k_tetrahedra_shapes[] = "tetrahedra_shapes";
static const char __pyx_k_tetrahedral_group[] = "tetrahedral group";
static const char __pyx_k_AbelianGroup_order[] = "AbelianGroup.order";
static const char __pyx_k_CHolonomyGroup_O31[] = "CHolonomyGroup.O31";
static const char __pyx_k_Isometry_cusp_maps[] = "Isometry.cusp_maps";
static const char __pyx_k_Isometry_num_cusps[] = "Isometry.num_cusps";
static const char __pyx_k_LengthSpectrumInfo[] = "LengthSpectrumInfo";
static const char __pyx_k_Manifold__identify[] = "Manifold._identify";
static const char __pyx_k_Manifold_cusp_info[] = "Manifold.cusp_info";
static const char __pyx_k_Manifold_dehn_fill[] = "Manifold.dehn_fill";
static const char __pyx_k_MorwenLinks___init[] = "MorwenLinks.__init__";
static const char __pyx_k_Num_Nonalternating[] = "Num_Nonalternating";
static const char __pyx_k_Orientable_lengths[] = "Orientable_lengths";
static const char __pyx_k_PresentationMatrix[] = "PresentationMatrix";
static const char __pyx_k_Save_Triangulation[] = "Save Triangulation";
static const char __pyx_k_Solution_type_is_s[] = "Solution type is: %s";
static const char __pyx_k_Triangulation_copy[] = "Triangulation.copy";
static const char __pyx_k_Triangulation_link[] = "Triangulation.link";
static const char __pyx_k_Triangulation_name[] = "Triangulation.name";
static const char __pyx_k_Triangulation_save[] = "Triangulation.save";
static const char __pyx_k_Xbackward_neighbor[] = "Xbackward_neighbor";
static const char __pyx_k_Ybackward_neighbor[] = "Ybackward_neighbor";
static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
static const char __pyx_k_bundle_from_string[] = "bundle_from_string";
static const char __pyx_k_bytearray_to_bytes[] = "bytearray_to_bytes";
static const char __pyx_k_centroid_at_origin[] = "centroid_at_origin";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_edge_image_indices[] = "edge_image_indices";
static const char __pyx_k_edge_to_index_dict[] = "_edge_to_index_dict";
static const char __pyx_k_filled_shape_array[] = "filled_shape_array";
static const char __pyx_k_get_from_link_data[] = "_get_from_link_data";
static const char __pyx_k_holonomy_precision[] = "holonomy precision";
static const char __pyx_k_ignore_orientation[] = "ignore_orientation";
static const char __pyx_k_is_int_DT_exterior[] = "is_int_DT_exterior";
static const char __pyx_k_is_invertible_knot[] = "is_invertible_knot";
static const char __pyx_k_layered_and_marked[] = "layered_and_marked";
static const char __pyx_k_longitude_accuracy[] = "longitude_accuracy";
static const char __pyx_k_num_ideal_vertices[] = "num_ideal_vertices";
static const char __pyx_k_one_vertex_lengths[] = "one_vertex_lengths";
static const char __pyx_k_shortest_meridians[] = "shortest_meridians";
static const char __pyx_k_split_filling_info[] = "split_filling_info";
static const char __pyx_k_splitting_surfaces[] = "splitting_surfaces";
static const char __pyx_k_symmetries_of_link[] = "symmetries_of_link";
static const char __pyx_k_triangulation_help[] = "triangulation_help";
static const char __pyx_k_Alternating_numbers[] = "Alternating_numbers";
static const char __pyx_k_Alternating_offsets[] = "Alternating_offsets";
static const char __pyx_k_Bundle_S__1_1_a0_B1[] = "Bundle(S_{1,1}, [a0, B1])";
static const char __pyx_k_CHolonomyGroup_SL2C[] = "CHolonomyGroup.SL2C";
static const char __pyx_k_CuspedCensus___init[] = "CuspedCensus.__init__";
static const char __pyx_k_CuspedCensus_lookup[] = "CuspedCensus.lookup";
static const char __pyx_k_Dirichlet_Domain_of[] = "Dirichlet Domain of ";
static const char __pyx_k_Empty_Triangulation[] = "Empty Triangulation";
static const char __pyx_k_FormatHomForSnapPea[] = "FormatHomForSnapPea";
static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
static const char __pyx_k_SymmetryGroup_is_S5[] = "SymmetryGroup.is_S5";
static const char __pyx_k_SymmetryGroup_order[] = "SymmetryGroup.order";
static const char __pyx_k_Triangulation_cover[] = "Triangulation.cover";
static const char __pyx_k_Triangulation_plink[] = "Triangulation.plink";
static const char __pyx_k_Wrong_equation_type[] = "Wrong equation_type";
static const char __pyx_k_abcABC__d_abcABC__d[] = "\\[*([abcABC_\\d!*]*|[abcABC_\\d!,]*)\\]*";
static const char __pyx_k_abelian_description[] = "abelian_description";
static const char __pyx_k_c_obstruction_class[] = "c_obstruction_class";
static const char __pyx_k_census_knot_archive[] = "census_knot_archive";
static const char __pyx_k_census_knot_numbers[] = "census_knot_numbers";
static const char __pyx_k_commutator_subgroup[] = "commutator_subgroup";
static const char __pyx_k_compute_cusp_shapes[] = "compute_cusp_shapes";
static const char __pyx_k_elementary_divisors[] = "elementary_divisors";
static const char __pyx_k_five_tet_orientable[] = "five_tet_orientable";
static const char __pyx_k_format_explain_list[] = "format_explain_list";
static const char __pyx_k_get_ptolemy_variety[] = "get_ptolemy_variety";
static const char __pyx_k_has_finite_vertices[] = "has_finite_vertices";
static const char __pyx_k_is_braid_complement[] = "is_braid_complement";
static const char __pyx_k_is_decorated_isosig[] = "is_decorated_isosig";
static const char __pyx_k_is_link_complement1[] = "is_link_complement1";
static const char __pyx_k_is_link_complement2[] = "is_link_complement2";
static const char __pyx_k_is_link_complement3[] = "is_link_complement3";
static const char __pyx_k_num_finite_vertices[] = "num_finite_vertices";
static const char __pyx_k_original_generators[] = "original_generators";
static const char __pyx_k_presentation_matrix[] = "_presentation_matrix";
static const char __pyx_k_result_cusp_indices[] = "result_cusp_indices";
static const char __pyx_k_reverse_orientation[] = "reverse_orientation";
static const char __pyx_k_rolfsen_link_regexs[] = "rolfsen_link_regexs";
static const char __pyx_k_sage_interfaces_abc[] = "sage.interfaces.abc";
static const char __pyx_k_sage_interfaces_gap[] = "sage.interfaces.gap";
static const char __pyx_k_set_target_holonomy[] = "set_target_holonomy";
static const char __pyx_k_shortest_longitudes[] = "shortest_longitudes";
static const char __pyx_k_triangulation_class[] = "_triangulation_class";
static const char __pyx_k_Cusp_2d_s_not_filled[] = "Cusp %-2d: %s, not filled";
static const char __pyx_k_DualCurveInfo___repr[] = "DualCurveInfo.__repr__";
static const char __pyx_k_Isometry_cusp_images[] = "Isometry.cusp_images";
static const char __pyx_k_KnotExteriors___init[] = "KnotExteriors.__init__";
static const char __pyx_k_L13n9331_3_4_2_3_2_1[] = "L13n9331(3,4)(2,3)(2,1)";
static const char __pyx_k_Manifold__from_bytes[] = "Manifold._from_bytes";
static const char __pyx_k_Manifold_dual_curves[] = "Manifold.dual_curves";
static const char __pyx_k_Nonalternating_table[] = "Nonalternating_table";
static const char __pyx_k_SymmetryGroup_center[] = "SymmetryGroup.center";
static const char __pyx_k_Triangulation_covers[] = "Triangulation.covers";
static const char __pyx_k_Triangulation_pickle[] = "Triangulation.pickle";
static const char __pyx_k_check_SnapPea_memory[] = "check_SnapPea_memory";
static const char __pyx_k_closed_nonorientable[] = "closed_nonorientable";
static const char __pyx_k_complete_shape_array[] = "complete_shape_array";
static const char __pyx_k_copy_c_triangulation[] = "copy_c_triangulation";
static const char __pyx_k_cover_locals_genexpr[] = "cover.<locals>.genexpr";
static const char __pyx_k_cython_core_tail_pyx[] = "cython/core/tail.pyx";
static const char __pyx_k_filled_triangulation[] = "filled_triangulation";
static const char __pyx_k_get_HT_knot_by_index[] = "get_HT_knot_by_index";
static const char __pyx_k_gluing_equations_pgl[] = "gluing_equations_pgl";
static const char __pyx_k_ignore_cusp_ordering[] = "ignore_cusp_ordering";
static const char __pyx_k_ignore_solution_type[] = "ignore_solution_type";
static const char __pyx_k_initialize_structure[] = "initialize_structure";
static const char __pyx_k_is_alpha_DT_exterior[] = "is_alpha_DT_exterior";
static const char __pyx_k_is_twister_splitting[] = "is_twister_splitting";
static const char __pyx_k_python_major_version[] = "python_major_version";
static const char __pyx_k_triangulation_isosig[] = "triangulation_isosig";
static const char __pyx_k_use_field_conversion[] = "use_field_conversion";
static const char __pyx_k_vertex_image_indices[] = "vertex_image_indices";
static const char __pyx_k_vertex_to_index_dict[] = "_vertex_to_index_dict";
static const char __pyx_k_AbelianGroup___reduce[] = "AbelianGroup.__reduce__";
static const char __pyx_k_CDirichletDomain_save[] = "CDirichletDomain.save";
static const char __pyx_k_CDirichletDomain_view[] = "CDirichletDomain.view";
static const char __pyx_k_CertifiedShapesEngine[] = "CertifiedShapesEngine";
static const char __pyx_k_HolonomyGroup__number[] = "HolonomyGroup._number_";
static const char __pyx_k_Index_is_out_of_range[] = "Index is out of range.";
static const char __pyx_k_LengthSpectrum___repr[] = "LengthSpectrum.__repr__";
static const char __pyx_k_ListOnePerLine___repr[] = "ListOnePerLine.__repr__";
static const char __pyx_k_Manifold__from_isosig[] = "Manifold._from_isosig";
static const char __pyx_k_Manifold__from_string[] = "Manifold._from_string";
static const char __pyx_k_Manifold_chern_simons[] = "Manifold.chern_simons";
static const char __pyx_k_Nonorientable_lengths[] = "Nonorientable_lengths";
static const char __pyx_k_ObsCensusKnots___init[] = "ObsCensusKnots.__init__";
static const char __pyx_k_ObsCensusKnots___repr[] = "ObsCensusKnots.__repr__";
static const char __pyx_k_ObsMorwenLinks___init[] = "ObsMorwenLinks.__init__";
static const char __pyx_k_SnapPea_KLPProjection[] = "SnapPea_KLPProjection";
static const char __pyx_k_Triangulation_DT_code[] = "Triangulation.DT_code";
static const char __pyx_k_cover_c_triangulation[] = "cover_c_triangulation";
static const char __pyx_k_cython_core_basic_pyx[] = "cython/core/basic.pyx";
static const char __pyx_k_get_tetrahedra_shapes[] = "_get_tetrahedra_shapes";
static const char __pyx_k_length_spectrum_dicts[] = "length_spectrum_dicts";
static const char __pyx_k_morwen_link_directory[] = "morwen_link_directory";
static const char __pyx_k_orientation_reversing[] = "orientation-reversing";
static const char __pyx_k_owns_c_symmetry_group[] = "owns_c_symmetry_group";
static const char __pyx_k_sage_interfaces_magma[] = "sage.interfaces.magma";
static const char __pyx_k_set_peripheral_curves[] = "set_peripheral_curves";
static const char __pyx_k_set_tetrahedra_shapes[] = "set_tetrahedra_shapes";
static const char __pyx_k_simplify_presentation[] = "simplify_presentation";
static const char __pyx_k_splitting_from_string[] = "splitting_from_string";
static const char __pyx_k_stopping_displacement[] = "stopping_displacement";
static const char __pyx_k_verify_complex_volume[] = "verify_complex_volume";
static const char __pyx_k_3d_s_curve_of_length_s[] = "%3d: %s curve of length %s";
static const char __pyx_k_CCuspNeighborhood_view[] = "CCuspNeighborhood.view";
static const char __pyx_k_CFundamentalGroup_sage[] = "CFundamentalGroup.sage";
static const char __pyx_k_CuspedCensus___getitem[] = "CuspedCensus.__getitem__";
static const char __pyx_k_Manifold_copy_line_297[] = "Manifold.copy (line 297)";
static const char __pyx_k_Manifold_is_two_bridge[] = "Manifold.is_two_bridge";
static const char __pyx_k_Manifold_solution_type[] = "Manifold.solution_type";
static const char __pyx_k_MatrixWithExplanations[] = "MatrixWithExplanations";
static const char __pyx_k_Nonalternating_numbers[] = "Nonalternating_numbers";
static const char __pyx_k_Nonalternating_offsets[] = "Nonalternating_offsets";
static const char __pyx_k_PLink_was_not_imported[] = "PLink was not imported.";
static const char __pyx_k_The_solution_type_is_s[] = "The solution type is: %s";
static const char __pyx_k_Triangulation___reduce[] = "Triangulation.__reduce__";
static const char __pyx_k_Triangulation_homology[] = "Triangulation.homology";
static const char __pyx_k_Triangulation_set_name[] = "Triangulation.set_name";
static const char __pyx_k_Triangulation_simplify[] = "Triangulation.simplify";
static const char __pyx_k_choose_generators_info[] = "_choose_generators_info";
static const char __pyx_k_current_shape_accuracy[] = "current_shape_accuracy";
static const char __pyx_k_expand_until_certified[] = "expand_until_certified";
static const char __pyx_k_five_tet_nonorientable[] = "five_tet_nonorientable";
static const char __pyx_k_hyperbolic_data__sa_gz[] = "hyperbolic_data_%sa.gz";
static const char __pyx_k_hyperbolic_data__sn_gz[] = "hyperbolic_data_%sn.gz";
static const char __pyx_k_index_within_crossings[] = "index_within_crossings";
static const char __pyx_k_initial_shape_accuracy[] = "initial_shape_accuracy";
static const char __pyx_k_orientation_preserving[] = "orientation-preserving";
static const char __pyx_k_polyhedral_description[] = "polyhedral_description";
static const char __pyx_k_ptolemyManifoldMethods[] = "ptolemyManifoldMethods";
static const char __pyx_k_remove_finite_vertices[] = "remove_finite_vertices";
static const char __pyx_k_sage_groups_free_group[] = "sage.groups.free_group";
static const char __pyx_k_symmetries_of_manifold[] = "symmetries_of_manifold";
static const char __pyx_k_CCuspNeighborhood_reach[] = "CCuspNeighborhood.reach";
static const char __pyx_k_CDirichletDomain_volume[] = "CDirichletDomain.volume";
static const char __pyx_k_Does_not_extend_to_link[] = "Does not extend to link";
static const char __pyx_k_Generators_s_Relators_s[] = "Generators:\n   %s\nRelators:\n   %s";
static const char __pyx_k_KnotExteriors___getitem[] = "KnotExteriors.__getitem__";
static const char __pyx_k_Manifold_cover_line_535[] = "Manifold.cover (line 535)";
static const char __pyx_k_Manifold_symmetry_group[] = "Manifold.symmetry_group";
static const char __pyx_k_Not_a_valid_permutation[] = "Not a valid permutation";
static const char __pyx_k_ObsLinkExteriors___init[] = "ObsLinkExteriors.__init__";
static const char __pyx_k_ObsLinkExteriors___repr[] = "ObsLinkExteriors.__repr__";
static const char __pyx_k_Triangulation__to_bytes[] = "Triangulation._to_bytes";
static const char __pyx_k_Triangulation_cusp_info[] = "Triangulation.cusp_info";
static const char __pyx_k_Triangulation_dehn_fill[] = "Triangulation.dehn_fill";
static const char __pyx_k_Triangulation_num_cusps[] = "Triangulation.num_cusps";
static const char __pyx_k_Triangulation_randomize[] = "Triangulation.randomize";
static const char __pyx_k_character_variety_ideal[] = "character_variety_ideal";
static const char __pyx_k_closed_census_directory[] = "closed_census_directory";
static const char __pyx_k_cusp_cross_section_info[] = "_cusp_cross_section_info";
static const char __pyx_k_generators_in_originals[] = "generators_in_originals";
static const char __pyx_k_is_link_complement1_pat[] = "is_link_complement1_pat";
static const char __pyx_k_is_link_complement2_pat[] = "is_link_complement2_pat";
static const char __pyx_k_is_link_complement3_pat[] = "is_link_complement3_pat";
static const char __pyx_k_num_original_generators[] = "num_original_generators";
static const char __pyx_k_number_to_native_number[] = "number_to_native_number";
static const char __pyx_k_sage_matrix_constructor[] = "sage.matrix.constructor";
static const char __pyx_k_symmetric_triangulation[] = "symmetric_triangulation";
static const char __pyx_k_AlternatingKnotExteriors[] = "AlternatingKnotExteriors";
static const char __pyx_k_CCuspNeighborhood_volume[] = "CCuspNeighborhood.volume";
static const char __pyx_k_CDirichletDomain__number[] = "CDirichletDomain._number_";
static const char __pyx_k_CHolonomyGroup__matrices[] = "CHolonomyGroup._matrices";
static const char __pyx_k_Cusp_neighborhood_s_of_s[] = "Cusp neighborhood%s of %s";
static const char __pyx_k_Invalid_generator_status[] = "Invalid generator status";
static const char __pyx_k_Invalid_permutation_data[] = "Invalid permutation data.";
static const char __pyx_k_Isometry_extends_to_link[] = "Isometry.extends_to_link";
static const char __pyx_k_LowIndexSubgroupsFpGroup[] = "LowIndexSubgroupsFpGroup";
static const char __pyx_k_Manifold__complex_volume[] = "Manifold._complex_volume";
static const char __pyx_k_Manifold_browse_line_375[] = "Manifold.browse (line 375)";
static const char __pyx_k_Manifold_covers_line_607[] = "Manifold.covers (line 607)";
static const char __pyx_k_Manifold_drill_line_1485[] = "Manifold.drill (line 1485)";
static const char __pyx_k_Manifold_is_isometric_to[] = "Manifold.is_isometric_to";
static const char __pyx_k_Manifold_length_spectrum[] = "Manifold.length_spectrum";
static const char __pyx_k_Manifold_split_line_1736[] = "Manifold.split (line 1736)";
static const char __pyx_k_Manifold_volume_line_714[] = "Manifold.volume (line 714)";
static const char __pyx_k_No_associated_link_known[] = "No associated link known.";
static const char __pyx_k_NormalSurfaceInfo___repr[] = "NormalSurfaceInfo.__repr__";
static const char __pyx_k_ObsCensusKnots___getitem[] = "ObsCensusKnots.__getitem__";
static const char __pyx_k_ObsMorwenLinks___getitem[] = "ObsMorwenLinks.__getitem__";
static const char __pyx_k_SymmetryGroup_is_abelian[] = "SymmetryGroup.is_abelian";
static const char __pyx_k_SymmetryGroup_isometries[] = "SymmetryGroup.isometries";
static const char __pyx_k_Triangulation__to_string[] = "Triangulation._to_string";
static const char __pyx_k_Triangulation_cover_info[] = "Triangulation.cover_info";
static const char __pyx_k_contains_flat_tetrahedra[] = "contains flat tetrahedra";
static const char __pyx_k_cython_core_manifold_pyx[] = "cython/core/manifold.pyx";
static const char __pyx_k_eliminate_fixed_ptolemys[] = "eliminate_fixed_ptolemys";
static const char __pyx_k_face_list_locals_genexpr[] = "face_list.<locals>.genexpr";
static const char __pyx_k_get_triangulation_tester[] = "get_triangulation_tester";
static const char __pyx_k_remove_finite_vertices_2[] = "_remove_finite_vertices";
static const char __pyx_k_to_string_locals_genexpr[] = "_to_string.<locals>.genexpr";
static const char __pyx_k_AbelianGroup_betti_number[] = "AbelianGroup.betti_number";
static const char __pyx_k_CCuspNeighborhood__number[] = "CCuspNeighborhood._number_";
static const char __pyx_k_CCuspNeighborhood_get_tie[] = "CCuspNeighborhood.get_tie";
static const char __pyx_k_CCuspNeighborhood_set_tie[] = "CCuspNeighborhood.set_tie";
static const char __pyx_k_CCuspNeighborhood_stopper[] = "CCuspNeighborhood.stopper";
static const char __pyx_k_CDirichletDomain_manifold[] = "CDirichletDomain.manifold";
static const char __pyx_k_LengthSpectrumInfo___repr[] = "LengthSpectrumInfo.__repr__";
static const char __pyx_k_Manifold_dirichlet_domain[] = "Manifold.dirichlet_domain";
static const char __pyx_k_ObsOrientableClosedCensus[] = "ObsOrientableClosedCensus";
static const char __pyx_k_ObsOrientableCuspedCensus[] = "ObsOrientableCuspedCensus";
static const char __pyx_k_PresentationMatrix_row_op[] = "PresentationMatrix.row_op";
static const char __pyx_k_SymmetryGroup_is_dihedral[] = "SymmetryGroup.is_dihedral";
static const char __pyx_k_The_braid_word_is_invalid[] = "The braid word is invalid.";
static const char __pyx_k_Triangulation__covers_gap[] = "Triangulation._covers_gap";
static const char __pyx_k_Triangulation__empty_save[] = "Triangulation._empty_save";
static const char __pyx_k_Triangulation__from_bytes[] = "Triangulation._from_bytes";
static const char __pyx_k_Triangulation__set_DTcode[] = "Triangulation._set_DTcode";
static const char __pyx_k_Triangulation__set_PDcode[] = "Triangulation._set_PDcode";
static const char __pyx_k_Triangulation_or_Manifold[] = "Triangulation or Manifold";
static const char __pyx_k_c_canonized_triangulation[] = "c_canonized_triangulation";
static const char __pyx_k_c_symmetric_triangulation[] = "c_symmetric_triangulation";
static const char __pyx_k_canonical_retriangulation[] = "_canonical_retriangulation";
static const char __pyx_k_cython_core_dirichlet_pyx[] = "cython/core/dirichlet.pyx";
static const char __pyx_k_ignore_curve_orientations[] = "ignore_curve_orientations";
static const char __pyx_k_init_hyperbolic_structure[] = "init_hyperbolic_structure";
static const char __pyx_k_real_coerced_to_bits_prec[] = "_real_coerced_to_bits_prec";
static const char __pyx_k_unpickle_dirichlet_domain[] = "_unpickle_dirichlet_domain";
static const char __pyx_k_with_hyperbolic_structure[] = "with_hyperbolic_structure";
static const char __pyx_k_All_cusps_must_be_fillable[] = "All cusps must be fillable.";
static const char __pyx_k_CCuspNeighborhood_manifold[] = "CCuspNeighborhood.manifold";
static const char __pyx_k_CCuspNeighborhood_topology[] = "CCuspNeighborhood.topology";
static const char __pyx_k_CDirichletDomain_edge_list[] = "CDirichletDomain.edge_list";
static const char __pyx_k_CDirichletDomain_face_list[] = "CDirichletDomain.face_list";
static const char __pyx_k_CDirichletDomain_in_radius[] = "CDirichletDomain.in_radius";
static const char __pyx_k_CDirichletDomain_num_edges[] = "CDirichletDomain.num_edges";
static const char __pyx_k_CDirichletDomain_num_faces[] = "CDirichletDomain.num_faces";
static const char __pyx_k_CFundamentalGroup_meridian[] = "CFundamentalGroup.meridian";
static const char __pyx_k_CFundamentalGroup_relators[] = "CFundamentalGroup.relators";
static const char __pyx_k_Cannot_convert_s_to_a_Real[] = "Cannot convert %s to a Real.";
static const char __pyx_k_Info_objects_are_immutable[] = "Info objects are immutable.";
static const char __pyx_k_LengthSpectrumFormatString[] = "LengthSpectrumFormatString";
static const char __pyx_k_Manifold_canonize_line_145[] = "Manifold.canonize (line 145)";
static const char __pyx_k_Manifold_cusp_neighborhood[] = "Manifold.cusp_neighborhood";
static const char __pyx_k_Manifold_fundamental_group[] = "Manifold.fundamental_group";
static const char __pyx_k_Manifold_tetrahedra_shapes[] = "Manifold.tetrahedra_shapes";
static const char __pyx_k_NeumannZagierTypeEquations[] = "NeumannZagierTypeEquations";
static const char __pyx_k_ObsLinkExteriors___getitem[] = "ObsLinkExteriors.__getitem__";
static const char __pyx_k_Please_specify_a_file_name[] = "Please specify a file name.";
static const char __pyx_k_PresentationMatrix_explode[] = "PresentationMatrix.explode";
static const char __pyx_k_SNAPPEA_MANIFOLD_DIRECTORY[] = "SNAPPEA_MANIFOLD_DIRECTORY";
static const char __pyx_k_The_Triangulation_is_empty[] = "The Triangulation is empty.";
static const char __pyx_k_Triangulation__from_isosig[] = "Triangulation._from_isosig";
static const char __pyx_k_Triangulation__from_pickle[] = "Triangulation._from_pickle";
static const char __pyx_k_Triangulation__from_string[] = "Triangulation._from_string";
static const char __pyx_k_direct_product_description[] = "direct_product_description";
static const char __pyx_k_get_tetrahedra_gluing_data[] = "_get_tetrahedra_gluing_data";
static const char __pyx_k_is_PermutationGroupElement[] = "is_PermutationGroupElement";
static const char __pyx_k_polished_tetrahedra_shapes[] = "polished_tetrahedra_shapes";
static const char __pyx_k_sage_structure_sage_object[] = "sage.structure.sage_object";
static const char __pyx_k_unrecognized_solution_type[] = "unrecognized solution type";
static const char __pyx_k_CCuspNeighborhood_horoballs[] = "CCuspNeighborhood.horoballs";
static const char __pyx_k_CCuspNeighborhood_max_reach[] = "CCuspNeighborhood.max_reach";
static const char __pyx_k_CCuspNeighborhood_num_cusps[] = "CCuspNeighborhood.num_cusps";
static const char __pyx_k_CDirichletDomain__to_string[] = "CDirichletDomain._to_string";
static const char __pyx_k_CDirichletDomain_export_stl[] = "CDirichletDomain.export_stl";
static const char __pyx_k_CDirichletDomain_out_radius[] = "CDirichletDomain.out_radius";
static const char __pyx_k_CFundamentalGroup__gap_init[] = "CFundamentalGroup._gap_init_";
static const char __pyx_k_CFundamentalGroup_longitude[] = "CFundamentalGroup.longitude";
static const char __pyx_k_Manifold__choose_generators[] = "Manifold._choose_generators";
static const char __pyx_k_Manifold_from_Triangulation[] = "Manifold_from_Triangulation";
static const char __pyx_k_Manifold_splitting_surfaces[] = "Manifold.splitting_surfaces";
static const char __pyx_k_Manifolds_must_be_non_empty[] = "Manifolds must be non-empty.";
static const char __pyx_k_No_tetrahedra_data_provided[] = "No tetrahedra data provided";
static const char __pyx_k_NonalternatingKnotExteriors[] = "NonalternatingKnotExteriors";
static const char __pyx_k_PresentationMatrix_add_rows[] = "PresentationMatrix.add_rows";
static const char __pyx_k_PresentationMatrix_get_data[] = "PresentationMatrix.get_data";
static const char __pyx_k_PresentationMatrix_simplify[] = "PresentationMatrix.simplify";
static const char __pyx_k_SymmetryGroup_is_full_group[] = "SymmetryGroup.is_full_group";
static const char __pyx_k_SymmetryGroup_is_polyhedral[] = "SymmetryGroup.is_polyhedral";
static const char __pyx_k_SymmetryGroup_order_line_62[] = "SymmetryGroup.order (line 62)";
static const char __pyx_k_Triangulation__covers_magma[] = "Triangulation._covers_magma";
static const char __pyx_k_Triangulation__three_to_two[] = "Triangulation._three_to_two";
static const char __pyx_k_Triangulation__two_to_three[] = "Triangulation._two_to_three";
static const char __pyx_k_Triangulation_copy_line_442[] = "Triangulation.copy (line 442)";
static const char __pyx_k_Triangulation_edge_valences[] = "Triangulation.edge_valences";
static const char __pyx_k_Triangulation_from_Manifold[] = "Triangulation_from_Manifold";
static const char __pyx_k_Triangulation_is_orientable[] = "Triangulation.is_orientable";
static const char __pyx_k_Triangulation_save_line_629[] = "Triangulation.save (line 629)";
static const char __pyx_k_binary_dihedral_group_2_2_d[] = "binary dihedral group <2,2,%d>";
static const char __pyx_k_from_tetrahedra_gluing_data[] = "_from_tetrahedra_gluing_data";
static const char __pyx_k_list_as_word_locals_genexpr[] = "list_as_word.<locals>.genexpr";
static const char __pyx_k_maximize_injectivity_radius[] = "maximize_injectivity_radius";
static const char __pyx_k_nonabelian_group_of_order_d[] = "nonabelian group of order %d";
static const char __pyx_k_ptolemy_obstruction_classes[] = "ptolemy_obstruction_classes";
static const char __pyx_k_CDirichletDomain___reduce_ex[] = "CDirichletDomain.__reduce_ex__";
static const char __pyx_k_CDirichletDomain_vertex_list[] = "CDirichletDomain.vertex_list";
static const char __pyx_k_CFundamentalGroup_gap_string[] = "CFundamentalGroup.gap_string";
static const char __pyx_k_CFundamentalGroup_generators[] = "CFundamentalGroup.generators";
static const char __pyx_k_ClosedOrientableDistinct_txt[] = "ClosedOrientableDistinct.txt";
static const char __pyx_k_Invalid_pickle_byte_sequence[] = "Invalid pickle byte sequence";
static const char __pyx_k_Manifold_cusp_info_line_1108[] = "Manifold.cusp_info (line 1108)";
static const char __pyx_k_Manifold_dehn_fill_line_1231[] = "Manifold.dehn_fill (line 1231)";
static const char __pyx_k_Manifold_set_target_holonomy[] = "Manifold.set_target_holonomy";
static const char __pyx_k_ObsNonorientableClosedCensus[] = "ObsNonorientableClosedCensus";
static const char __pyx_k_ObsNonorientableCuspedCensus[] = "ObsNonorientableCuspedCensus";
static const char __pyx_k_Splitting_S__1_0_b1_A0_a0_B1[] = "Splitting(S_{1,0}, [b1, A0], [a0,B1])";
static const char __pyx_k_StrLongestLen_locals_genexpr[] = "_StrLongestLen.<locals>.genexpr";
static const char __pyx_k_SymmetryGroup_abelianization[] = "SymmetryGroup.abelianization";
static const char __pyx_k_The_Triangulation_is_empty_2[] = "The Triangulation is empty";
static const char __pyx_k_Triangulation__is_symplectic[] = "Triangulation._is_symplectic";
static const char __pyx_k_Triangulation__reindex_cusps[] = "Triangulation._reindex_cusps";
static const char __pyx_k_Triangulation_and_text_files[] = "Triangulation and text files";
static const char __pyx_k_Triangulation_name_line_1049[] = "Triangulation.name (line 1049)";
static const char __pyx_k_Triangulation_num_tetrahedra[] = "Triangulation.num_tetrahedra";
static const char __pyx_k_Triangulation_plink_line_319[] = "Triangulation.plink (line 319)";
static const char __pyx_k_polish_hyperbolic_structures[] = "_polish_hyperbolic_structures";
static const char __pyx_k_try_hard_to_shorten_relators[] = "try_hard_to_shorten_relators";
static const char __pyx_k_without_hyperbolic_structure[] = "without_hyperbolic_structure";
static const char __pyx_k_CCuspNeighborhood_Ford_domain[] = "CCuspNeighborhood.Ford_domain";
static const char __pyx_k_CCuspNeighborhood_check_index[] = "CCuspNeighborhood.check_index";
static const char __pyx_k_CDirichletDomain__vertex_list[] = "CDirichletDomain._vertex_list";
static const char __pyx_k_CDirichletDomain_num_vertices[] = "CDirichletDomain.num_vertices";
static const char __pyx_k_CDirichletDomain_spine_radius[] = "CDirichletDomain.spine_radius";
static const char __pyx_k_CFundamentalGroup__magma_init[] = "CFundamentalGroup._magma_init_";
static const char __pyx_k_CFundamentalGroup__word_moves[] = "CFundamentalGroup._word_moves";
static const char __pyx_k_CHolonomyGroup_complex_length[] = "CHolonomyGroup.complex_length";
static const char __pyx_k_Cusp_2d_complete_s_of_shape_s[] = "Cusp %-2d: complete %s of shape %s";
static const char __pyx_k_Manifold__from_bytes_line_272[] = "Manifold._from_bytes (line 272)";
static const char __pyx_k_Manifold_filled_triangulation[] = "Manifold.filled_triangulation";
static const char __pyx_k_Manifold_use_field_conversion[] = "Manifold.use_field_conversion";
static const char __pyx_k_MatrixWithExplanations___init[] = "MatrixWithExplanations.__init__";
static const char __pyx_k_MatrixWithExplanations___repr[] = "MatrixWithExplanations.__repr__.<locals>.format_explain_list";
static const char __pyx_k_SymmetryGroup___reduce_cython[] = "SymmetryGroup.__reduce_cython__";
static const char __pyx_k_SymmetryGroup_center_line_256[] = "SymmetryGroup.center (line 256)";
static const char __pyx_k_SymmetryGroup_is_amphicheiral[] = "SymmetryGroup.is_amphicheiral";
static const char __pyx_k_Triangulation__covers_snappea[] = "Triangulation._covers_snappea";
static const char __pyx_k_Triangulation__num_fake_cusps[] = "Triangulation._num_fake_cusps";
static const char __pyx_k_Triangulation_cover_line_2360[] = "Triangulation.cover (line 2360)";
static const char __pyx_k_Triangulation_isomorphisms_to[] = "Triangulation.isomorphisms_to";
static const char __pyx_k_Triangulation_ptolemy_variety[] = "Triangulation.ptolemy_variety";
static const char __pyx_k_covers_low_index_locals_index[] = "_covers_low_index.<locals>.index";
static const char __pyx_k_cython_core_abelian_group_pyx[] = "cython/core/abelian_group.pyx";
static const char __pyx_k_cython_core_triangulation_pyx[] = "cython/core/triangulation.pyx";
static const char __pyx_k_minimize_number_of_generators[] = "minimize_number_of_generators";
static const char __pyx_k_Brings_up_a_link_editor_window[] = "\n        Brings up a link editor window if the manifold is stored\n        as a link complement in your current session.\n\n        >>> M = Manifold('4_1') # stored as a triangulation with a link\n        >>> M.link()\n        <Link: 1 comp; 4 cross>\n        >>> N = Manifold('m004') # stored as a triangulation without a link\n        >>> N.link() #doctest: +ELLIPSIS\n        Traceback (most recent call last):\n        ...\n        ValueError: No associated link known.\n\n        ";
static const char __pyx_k_CCuspNeighborhood_translations[] = "CCuspNeighborhood.translations";
static const char __pyx_k_CDirichletDomain_pairing_words[] = "CDirichletDomain.pairing_words";
static const char __pyx_k_CDirichletDomain_save_line_643[] = "CDirichletDomain.save (line 643)";
static const char __pyx_k_CDirichletDomain_triangulation[] = "CDirichletDomain.triangulation";
static const char __pyx_k_CFundamentalGroup_magma_string[] = "CFundamentalGroup.magma_string";
static const char __pyx_k_CFundamentalGroup_num_relators[] = "CFundamentalGroup.num_relators";
static const char __pyx_k_CHolonomyGroup___reduce_cython[] = "CHolonomyGroup.__reduce_cython__";
static const char __pyx_k_Change_the_triangulation_to_an[] = "\n        Change the triangulation to an arbitrary retriangulation of\n        the canonical cell decomposition.\n\n        >>> M = Manifold('m007')\n        >>> M.num_tetrahedra()\n        3\n        >>> M.canonize()\n        >>> M.num_tetrahedra()\n        4\n\n        Note: due to rounding error, it is possible that this is not\n        actually the canonical triangulation.\n        ";
static const char __pyx_k_Export_the_Dirichlet_domain_as[] = "\n        Export the Dirichlet domain as an stl file suitable for 3d printing.\n\n        Arguments can be given to modify the model produced:\n\n        * model='klein' - (alt. 'poincare') the model of HH^3 to use.\n\n        * cutout=False - remove the interior of each face\n\n        * shrink_factor=0.9 - the fraction to cut out of each face\n\n        * cuttoff_radius=0.9 - maximum rescaling for projection into Poincare model\n\n        * num_subdivision=3 - number of times to subdivide for the Poincare model\n\n        For printing domains in the Poincare model, cutoff_radius is critical for avoiding\n        infinitely thin cusps, which cannot be printed.\n\n        This can take a long time for finely subdivided domains. So we call UI_callback\n        every so often if it is not None.\n\n        >>> D = Manifold('m004').dirichlet_domain()\n        >>> D.export_stl('fig-eight-klein.stl')     #doctest: +SKIP\n        >>> D.export_stl('fig-eight-poincare.stl', model='poincare')     #doctest: +SKIP\n        >>> D.export_stl('fig-eight-klein-wireframe.stl', cutout=True)     #doctest: +SKIP\n        >>> D.export_stl('fig-eight-poincare-wireframe.stl', model='poincare', cutout=True)     #doctest: +SKIP\n        ";
static const char __pyx_k_FormatHomForSnapPea_function_f[] = "                     FormatHomForSnapPea := function(f)\n                         subone := function(L)   return [x - 1 : x in L]; end function;\n                         return [subone(Eltseq(f(g))) : g in Generators(Domain(f))];\n                       end function;";
static const char __pyx_k_LengthSpectrumFormatStringBase[] = "LengthSpectrumFormatStringBase";
static const char __pyx_k_Manifold__from_string_line_256[] = "Manifold._from_string (line 256)";
static const char __pyx_k_Manifold_chern_simons_line_807[] = "Manifold.chern_simons (line 807)";
static const char __pyx_k_Manifold_dual_curves_line_1383[] = "Manifold.dual_curves (line 1383)";
static const char __pyx_k_Manifold_set_peripheral_curves[] = "Manifold.set_peripheral_curves";
static const char __pyx_k_Manifold_set_tetrahedra_shapes[] = "Manifold.set_tetrahedra_shapes";
static const char __pyx_k_P_crossings_0_9_P_components_0[] = "(?P<crossings>[0-9]+)[\\^](?P<components>[0-9]+)[_](?P<index>[0-9]+)$";
static const char __pyx_k_Return_a_reasonably_short_byte[] = "\n        Return a reasonably short byte sequence which encodes the\n        combinatorics of this triangulation.\n        >>> M = Manifold('m125')\n        >>> seed = M._to_bytes()\n        >>> len(seed)\n        12\n        >>> N = Manifold('empty')\n        >>> N._from_bytes(seed)\n        >>> N == M\n        True\n        ";
static const char __pyx_k_Return_a_string_containing_the[] = "\n        Return a string containing the contents of a SnapPea triangulation\n        file.\n        >>> M = Manifold('7_4')\n        >>> seed = M._to_string()\n        >>> N = Manifold(seed)\n        >>> N == M\n        True\n        ";
static const char __pyx_k_Return_the_commutator_subgroup[] = "\n        Return the commutator subgroup of the SymmetryGroup\n\n        >>> S = Manifold('m004').symmetry_group()\n        >>> S\n        D4\n        >>> S.commutator_subgroup()\n        Z/2\n        ";
static const char __pyx_k_Returns_a_copy_of_the_manifold[] = "\n        Returns a copy of the manifold\n\n        >>> M = Manifold('m015')\n        >>> N = M.copy()\n        ";
static const char __pyx_k_Save_the_Dirichlet_domain_as_a[] = "\n        Save the Dirichlet domain as a text file in \"% Generators\" format.\n\n        >>> from snappy.number import Number\n        >>> acc, Number._accuracy_for_testing = Number._accuracy_for_testing, None\n        >>> M = Manifold('m125')\n        >>> D = M.dirichlet_domain()\n        >>> from tempfile import NamedTemporaryFile\n        >>> f = NamedTemporaryFile(delete=False)\n        >>> f.close()\n        >>> D.save(f.name)\n        >>> E = DirichletDomain(generator_file=f.name); E\n        30 finite vertices, 2 ideal vertices; 50 edges; 20 faces\n        >>> os.unlink(f.name)\n        >>> from pickle import dumps, loads\n        >>> E = loads(dumps(D)); E\n        30 finite vertices, 2 ideal vertices; 50 edges; 20 faces\n        >>> Number._accuracy_for_testing = acc\n        ";
static const char __pyx_k_That_Magma_type_not_recognized[] = "That Magma type not recognized.";
static const char __pyx_k_Triangulation__symplectic_form[] = "Triangulation._symplectic_form";
static const char __pyx_k_Triangulation_covers_line_2460[] = "Triangulation.covers (line 2460)";
static const char __pyx_k_Triangulation_gluing_equations[] = "Triangulation.gluing_equations";
static const char __pyx_k_Triangulation_symplectic_basis[] = "Triangulation.symplectic_basis";
static const char __pyx_k_c_retriangulated_triangulation[] = "c_retriangulated_triangulation";
static const char __pyx_k_canonical_cells_are_tetrahedra[] = "_canonical_cells_are_tetrahedra";
static const char __pyx_k_contains_degenerate_tetrahedra[] = "contains degenerate tetrahedra";
static const char __pyx_k_cython_core_symmetry_group_pyx[] = "cython/core/symmetry_group.pyx";
static const char __pyx_k_data_1_1_2_2_0_1_3_2_2_3_1_0_0[] = "\n        >>> data = [([1, 1, 2, 2], [[0, 1, 3, 2], [2, 3, 1, 0], [0, 1, 3, 2], [3, 0, 1, 2]]),\n        ...         ([0, 2, 2, 0], [[0, 1, 3, 2], [1, 0, 2, 3], [2, 3, 1, 0], [3, 2, 0, 1]]),\n        ...         ([1, 1, 0, 0], [[1, 0, 2, 3], [3, 2, 0, 1], [1, 2, 3, 0], [0, 1, 3, 2]])]\n        >>> M = Triangulation('empty')\n        >>> M._from_tetrahedra_gluing_data(data)\n        >>> N = Triangulation('m007')\n        >>> M == N\n        True\n\n        Check that cusp indices are transmitted. This manfiold has two\n        cusps and trivial symmetry group and we interchange the two\n        cusps.\n\n        >>> M = Manifold('o9_44133')\n        >>> tet_data = M._get_tetrahedra_gluing_data()\n        >>> cusp_data = M._get_cusp_indices_and_peripheral_curve_data()[0]\n        >>> cusp_data = [[1 - c for c in tet_cusps] for tet_cusps in cusp_data]\n        >>> N = Manifold('empty')\n        >>> N._from_tetrahedra_gluing_data(tet_data, num_or_cusps=2, cusp_indices=cusp_data)\n        >>> M.is_isometric_to(N, True)[0].cusp_images()\n        [1, 0]\n\n        A nonorientable example.\n\n        >>> Y = Triangulation('y885')\n        >>> Y.set_peripheral_curves([([1, 0], [0, 1]), ([-1, 0], [0, -1]), ([1, 7], [1, 8])])\n        >>> tets = Y._get_tetrahedra_gluing_data()\n        >>> cusps, curves = Y._get_cusp_indices_and_peripheral_curve_data()\n        >>> max(sum(curves, []))\n        9\n        >>> X = Triangulation('empty')\n        >>> X._from_tetrahedra_gluing_data(tets, 1, 2, cusps, curves)\n        >>> X._get_cusp_indices_and_peripheral_curve_data() == (cusps, curves)\n        True\n        ";
static const char __pyx_k_fillings_may_affect_generators[] = "fillings_may_affect_generators";
static const char __pyx_k_ptolemy_equations_boundary_map[] = "_ptolemy_equations_boundary_map_3";
static const char __pyx_k_pyx_unpickle_PresentationMatri[] = "__pyx_unpickle_PresentationMatrix";
static const char __pyx_k_sage_groups_perm_gps_permgroup[] = "sage.groups.perm_gps.permgroup";
static const char __pyx_k_set_peripheral_from_decoration[] = "set_peripheral_from_decoration";
static const char __pyx_k_A_CuspNeighborhood_object_repre[] = "\n    A CuspNeighborhood object represents an equivariant collection of\n    disjoint horoballs that project to cusp neighborhoods.\n\n    Instantiate as M.cusp_neighborhood()\n    ";
static const char __pyx_k_A_DirichletDomain_object_repres[] = "\n    A DirichletDomain object represents a Dirichlet Domain of\n    a hyperbolic manifold, typically centered at a point which\n    is a local maximum of injectivity radius.  It will have ideal\n    vertices if the manifold is not closed.\n\n    Instantiate as M.dirichlet_domain() where M is a Manifold to\n    obtain a Dirichlet Domain centered at a point which maximizes\n    injectivity radius.\n\n    Other options can be provided to customize the computation, with\n    the default values shown here\n\n    >>> M = Manifold('m003(3,-4)')\n    >>> M.dirichlet_domain(vertex_epsilon=10.0**-8, displacement = [0.0, 0.0, 0.0], centroid_at_origin=True, maximize_injectivity_radius=True)\n    40 finite vertices, 0 ideal vertices; 60 edges; 22 faces\n\n    You can also create a Dirichlet Domain from a file listing matrix\n    generators for the group, in SnapPea's \"% Generator\" format, via\n\n       D = DirichletDomain(generator_file='test.gens')\n\n    Or from matrices:\n\n    >>> G = Manifold('m004').fundamental_group(False)\n    >>> matrices = [ G.O31('a'), G.O31('b'), G.O31('c') ] # Note: some of the matrices contain (near) 0 entries and thus this tests that Object2Real converts small numbers fromatted by pari as \"1.0 E-10\" (note the pace before \"E\") correctly when not in SageMath.\n    >>> DirichletDomain(O31_generators = matrices,\n    ...                 maximize_injectivity_radius = False)\n    8 finite vertices, 2 ideal vertices; 20 edges; 12 faces\n\n    The group elements for the face-pairings of the Dirichlet domain\n    can be given as words in the original generators by setting\n    include_words = True.\n\n    ";
static const char __pyx_k_A_FundamentalGroup_represents_a[] = "\n    A FundamentalGroup represents a presentation of the fundamental\n    group of a SnapPea Triangulation.  Group elements are described as\n    words in the generators a,b,..., where the inverse of a is denoted\n    A.  Words are represented by Python strings (and the concatenation\n    operator is named \"+\", according to Python conventions).\n\n    Instantiate as T.fundamental_group(), where T is a Triangulation.\n\n    Methods:\n        num_generators() --> number of generators\n        num_relators()   --> number of relators\n        generators()     --> list of generators\n        relators()       --> list of relators\n        meridian(n)      --> word representing the meridian on cusp #n\n        longitude(n)     --> word representing the longitude on cusp #n\n    ";
static const char __pyx_k_A_s_is_specified_by_a_string_or[] = "\n    A %s is specified by a string or a byte sequence, according to the\n    conventions detailed in its docstring.\n    ";
static const char __pyx_k_AbelianGroup___reduce___line_80[] = "AbelianGroup.__reduce__ (line 80)";
static const char __pyx_k_Add_a_possibly_degenerate_hyper[] = "\n        Add a (possibly degenerate) hyperbolic structure, turning the\n        Triangulation into a Manifold.\n\n        >>> M = Triangulation('m004')\n        >>> N = M.with_hyperbolic_structure()\n        >>> N.volume() # doctest: +NUMERIC6\n        2.02988321\n        ";
static const char __pyx_k_Base_class_for_Iterators_Sequen[] = "\n    Base class for Iterators/Sequences for manifolds in the SnapPea\n    Cusped Census.\n    ";
static const char __pyx_k_Base_class_for_manifold_Iterato[] = "\n    Base class for manifold Iterators/Sequences.\n    ";
static const char __pyx_k_Byte_encoding_requires_complete[] = "Byte encoding requires complete cusps.";
static const char __pyx_k_CCuspNeighborhood_triangulation[] = "CCuspNeighborhood.triangulation";
static const char __pyx_k_CCuspNeighborhood_view_line_289[] = "CCuspNeighborhood.view (line 289)";
static const char __pyx_k_CDirichletDomain__edge_to_index[] = "CDirichletDomain._edge_to_index_dict";
static const char __pyx_k_CFundamentalGroup_generators_in[] = "CFundamentalGroup.generators_in_originals";
static const char __pyx_k_CFundamentalGroup_meridian_line[] = "CFundamentalGroup.meridian (line 306)";
static const char __pyx_k_CallFuncList_function_local_F_s[] = "CallFuncList(function() local F, %s; F := FreeGroup(%s); %s  return F/[%s]; end,[])";
static const char __pyx_k_Can_t_compare_triangulations_of[] = "Can't compare triangulations of manifolds with Dehn fillings.";
static const char __pyx_k_ClosedNonorientableDistinct_txt[] = "ClosedNonorientableDistinct.txt";
static const char __pyx_k_Communication_with_PLink_failed[] = "Communication with PLink failed.";
static const char __pyx_k_Constructs_a_reasonable_selecti[] = "\n        Constructs a *reasonable* selection of simple closed curves in\n        a manifold's dual 1-skeleton.  In particular, it returns those\n        that appear to represent geodesics. The resulting curves can\n        be drilled out.\n\n        >>> M = Manifold('m015')\n        >>> curves = M.dual_curves()\n        >>> curves # doctest: +NUMERIC6\n        [  0: orientation-preserving curve of length 0.56239915 - 2.81543089*I,\n           1: orientation-preserving curve of length 1.12479830 + 0.65232354*I,\n           2: orientation-preserving curve of length 1.26080402 + 1.97804689*I,\n           3: orientation-preserving curve of length 1.58826933 + 1.67347167*I,\n           4: orientation-preserving curve of length 1.68719745 + 2.81543089*I]\n\n        Each curve is returned as an info object with these keys\n\n        >>> sorted(curves[0].keys())\n        ['complete_length', 'filled_length', 'index', 'max_segments', 'parity']\n\n        We can drill out any of these curves to get a new manifold\n        with one more cusp.\n\n        >>> N = M.drill(curves[0])\n        >>> (M.num_cusps(), N.num_cusps())\n        (1, 2)\n\n        By default, this function only finds curves of length 6; this\n        can be changed by specifying the optional argument\n        max_segments\n\n        >>> M.dual_curves(max_segments=2) # doctest: +NUMERIC6\n        [  0: orientation-preserving curve of length 0.56239915 - 2.81543089*I]\n        ";
static const char __pyx_k_Cover_degree_should_be_at_least[] = "Cover degree should be at least 1";
static const char __pyx_k_Create_a_3D_picture_of_the_horo[] = "\n        Create a 3D picture of the horoball packing.  One can specify\n        which cusp to put at infinity and how large of horoballs to\n        look at, e.g.\n\n        >>> M = Manifold('m125')\n        >>> C = M.cusp_neighborhood()\n        >>> C.view(which_cusp = 1, cutoff=0.2)   #doctest: +CYOPENGL\n        ";
static const char __pyx_k_Cusp_Neighborhood_with_d_cusp_s[] = "Cusp Neighborhood with %d cusp%s";
static const char __pyx_k_Drills_out_the_specified_dual_c[] = "\n        Drills out the specified dual curve from among all dual curves\n        with at most max_segments, which defaults to 6. The method\n        dual_curve allows one to see the properties of curves before\n        choosing which one to drill out.\n\n        >>> M = Manifold('v3000')\n        >>> N = M.drill(0, max_segments=3)\n        >>> (M.num_cusps(), N.num_cusps())\n        (1, 2)\n        ";
static const char __pyx_k_Each_cusp_has_a_preferred_marki[] = "\n        Each cusp has a preferred marking. In the case of a torus\n        cusp, this is pair of essential simple curves meeting in one\n        point; equivalently, a basis of the first homology of the\n        boundary torus. These curves are called the meridian and the\n        longitude.\n\n        This method changes these markings in various ways.  In many\n        cases, if the flag return_matrices is True then it returns\n        a list of change-of-basis matrices is returned, one per\n        cusp, which will restore the original markings if passed\n        as peripheral_data.\n\n        - Make the shortest curves the meridians, and the second\n          shortest curves the longitudes.\n\n          >>> M = Manifold('5_2')\n          >>> M.cusp_info('shape') # doctest: +NUMERIC6\n          [-2.49024467 + 2.97944707*I]\n          >>> cob = M.set_peripheral_curves('shortest', return_matrices=True)\n          >>> M.cusp_info('shape') # doctest: +NUMERIC6\n          [-0.49024467 + 2.97944707*I]\n          >>> cob\n          [[[1, 0], [-2, 1]]]\n          >>> M.set_peripheral_curves(cob)\n          >>> M.cusp_info('shape') # doctest: +NUMERIC6\n          [-2.49024467 + 2.97944707*I]\n\n          You can also make just the meridians as short as\n          possible while fixing the longitudes via the option\n          'shortest_meridians', and conversely with\n          'shortest_longitudes'.\n\n        - If cusps are Dehn filled, make those curves meridians.\n\n          >>> M = Manifold('m125(0,0)(2,5)')\n          >>> M.set_peripheral_curves('fillings')\n          >>> M\n          m125(0,0)(1,0)\n\n        - Change the basis of a particular cusp, say the first one:\n\n          >>> M.set_peripheral_curves( [ (1,2), (1,3) ] , 0)\n\n          Here (1,2) is the new meridian written in the old basis, and\n          (1,3) the new longitude.\n\n        - Change the basis of all the cusps at once\n\n          >>> new_curves = [ [(1,-1), (1,0)],  [(3,2), (-2,-1)] ]""\n          >>> M.set_peripheral_curves(new_curves)\n          >>> M\n          m125(0,0)(-1,-2)\n        ";
static const char __pyx_k_Elementary_divisors_must_be_non[] = "Elementary divisors must be non-negative integers.\n";
static const char __pyx_k_Extend_the_Neumann_Zagier_Matri[] = "\n        Extend the Neumann-Zagier Matrix to one which is symplectic\n\n        (up to factors of 2) using oscillating curves. Verify parameter\n        explicitly tests if the resulting matrix is symplectic.  Only\n        accepts triangulations with 1 cusp.\n\n        >>> M = Manifold(\"4_1\")\n        >>> M.symplectic_basis()\n        [-1  0 -1 -1]\n        [ 2  0 -2  0]\n        [-2 -1 -2 -1]\n        [ 0 -1 -2 -1]\n\n        <https://arxiv.org/abs/2208.06969>\n        ";
static const char __pyx_k_Failed_to_construct_permutation[] = "Failed to construct permutation representation.";
static const char __pyx_k_Fill_an_empty_manifold_from_a_b[] = "\n        Fill an empty manifold from a byte sequence generated by\n        _to_bytes.\n        >>> M = Manifold('m125')\n        >>> N = Manifold('empty')\n        >>> N._from_bytes(M._to_bytes())\n        >>> N.is_isometric_to(M)\n        True\n        ";
static const char __pyx_k_Fill_an_empty_triangulation_fro[] = "\n        Fill an empty triangulation from a byte sequence generated by\n        _to_bytes.\n        >>> M = Manifold('m125')\n        >>> seed = M._to_bytes()\n        >>> len(seed)\n        12\n        >>> N = Manifold('empty')\n        >>> N._from_bytes(seed)\n        >>> N == M\n        True\n        ";
static const char __pyx_k_For_a_Triangulation_that_descri[] = "\n        For a Triangulation that describes a closed manifold, returns\n        the unsimplified finite triangulation that the kernel builds.\n\n        >>> M = Triangulation('m004(1, 2)')\n        >>> F = M._unsimplified_filled_triangulation()\n        >>> F.num_tetrahedra(), F._num_fake_cusps()\n        (58, 7)\n\n        The default is to use the kernel's original fold method as\n        the final step to close off the cusp. Specifying\n        method='layered' uses a 1-tetrahedron solid torus instead.\n        For method='layered_and_marked', the core solid tori are marked\n        internally so that any calls to simplify/randomize will leave\n        these in place.\n\n        >>> M = Triangulation('m004(1, 2)')\n        >>> F = M._unsimplified_filled_triangulation(method='layered')\n        >>> F.num_tetrahedra(), F._num_fake_cusps()\n        (60, 7)\n        >>> F.simplify(); F.num_tetrahedra() < 15\n        True\n        >>> M = Triangulation('K8n1(1,0)')\n        >>> F = M._unsimplified_filled_triangulation(method='layered_and_marked')\n        >>> F.num_tetrahedra() > 2\n        True\n\n        You can determine which tets are the cores, and remove the\n        marks to allow unrestricted simplification.\n\n        >>> any(F._marked_tetrahedra(clear_marks=True))\n        True\n        >>> F.simplify()\n        >>> F.num_tetrahedra() <= 2\n        True\n        ";
static const char __pyx_k_For_a_non_orientable_Triangulat[] = "\n        For a non-orientable Triangulation, returns the 2-fold cover which\n        is orientable.\n\n        >>> X = Triangulation('x123')\n        >>> Y = X.orientation_cover()\n        >>> (X.is_orientable(), Y.is_orientable())\n        (False, True)\n        >>> Y\n        x123~(0,0)(0,0)\n        >>> Y.cover_info()['type']\n        'cyclic'\n        ";
static const char __pyx_k_Give_the_triangulation_a_new_na[] = "\n        Give the triangulation a new name.\n\n        >>> M = Triangulation('4_1')\n        >>> M.set_name('figure-eight-comp')\n        >>> M\n        figure-eight-comp(0,0)\n        ";
static const char __pyx_k_Gives_the_shapes_of_the_tetrahe[] = "\n        Gives the shapes of the tetrahedra in the current solution to\n        the gluing equations.  Returns a list containing one info object\n        for each tetrahedron.  The keys are:\n\n        - rect : the shape of the tetrahedron, as a point in the\n          complex plane.\n\n        - log : the log of the shape\n\n        - accuracies: a list of the approximate accuracies of the\n          shapes, in order (rect re, rect im, log re, log im)\n\n        If the optional variable 'part' is set to one of the above,\n        then the function returns only that component of the data.\n\n        If the flag 'fixed_alignment' is set to False, then the edges\n        used to report the shape parameters are chosen so as to\n        normalize the triangle.\n\n        >>> M = Manifold('m015')\n        >>> M.tetrahedra_shapes(part='rect') # doctest: +NUMERIC6\n        [0.66235898 + 0.56227951*I, 0.66235898 + 0.56227951*I, 0.66235898 + 0.56227951*I]\n        >>> M.tetrahedra_shapes() #doctest:+SKIP\n        [{'accuracies': (11, 11, 12, 11), 'log': -0.14059979 + 0.70385772*I, 'rect': 0.66235898 + 0.56227951*I},\n         {'accuracies': (11, 11, 11, 11), 'log': -0.14059979 + 0.70385772*I, 'rect': 0.66235898 + 0.56227951*I},\n         {'accuracies': (11, 11, 11, 11), 'log': -0.14059979 + 0.70385772*I, 'rect': 0.66235898 + 0.56227951*I}]\n        ";
static const char __pyx_k_Got_the_empty_link_from_PLink_a[] = "\nGot the empty link from PLink and so not changing the triangulation.\n";
static const char __pyx_k_Group_elements_which_pair_the_f[] = "\n        Group elements which pair the faces of this DirichletDomain\n        as words in the original generators:\n\n        >>> M = Manifold('m004')\n        >>> D = M.dirichlet_domain(include_words = True)\n        >>> sorted(D.pairing_words()) #doctest: +ELLIPSIS\n        ['A', ...]\n\n        Requires that DirichletDomain was computed with\n        include_words = True.\n        ";
static const char __pyx_k_If_the_SymmetryGroup_is_a_nontr[] = "\n        If the SymmetryGroup is a nontrivial direct product with at\n        least one nonabelian factor, return a pair of SymmetryGroups\n        consisting of the (two) factors.\n\n        >>> S = Manifold('s960').symmetry_group()\n        >>> S.direct_product_description()\n        (Z/4, D3)\n        ";
static const char __pyx_k_If_the_manifold_is_the_compleme[] = "\n        If the manifold is the complement of a two-bridge knot or link\n        in S^3, then this method returns (p,q) where p/q is the\n        fraction describing the link.  Otherwise, returns False.\n\n        >>> M = Manifold('m004')\n        >>> M.is_two_bridge()\n        (2, 5)\n        >>> M = Manifold('m016')\n        >>> M.is_two_bridge()\n        False\n\n        Note: An answer of 'True' is rigorous, but not the answer\n        'False', as there could be numerical errors resulting in\n        finding an incorrect canonical triangulation.\n        ";
static const char __pyx_k_If_the_symmetry_group_is_abelia[] = "\n        If the symmetry group is abelian, return it as an AbelianGroup\n\n        >>> S = Manifold('v3379').symmetry_group()\n        >>> S.abelian_description()\n        Z/2 + Z/2 + Z/2\n        ";
static const char __pyx_k_If_this_triangulation_is_a_subd[] = "\n        If this triangulation is a subdivision of the canonical cell\n        decomposition, return the canonical retriangulation as Triangulation.\n\n        Warning: Many operations on a SnapPy Triangulation will remove the\n        finite vertices or change the triangulation so it is no longer the\n        canonical retriangulation.\n        By default, the algorithm numerically checks that the tilts are close\n        to zero to determine which faces are opaque or transparent.\n        But it can also be passed an explicit list of 4 * num_tetrahedra bool's\n        (one per face of each tet) that mark the opaque faces.\n\n        For example, m412's canonical cell decomposition consists of a single\n        cube. The canonical retriangulation thus has 12 simplices.\n\n        >>> M = Manifold(\"m412\")\n\n        Some isometries of M are not visible in this triangulation (not\n        even after calling M.canonize())\n\n        >>> len(M.isomorphisms_to(M))\n        4\n        >>> T = M._canonical_retriangulation()\n        >>> T.num_tetrahedra()\n        12\n\n        But all isometries of M are visible in its canonical retriangulation.\n\n        >>> len(T.isomorphisms_to(T))\n        8\n\n        ";
static const char __pyx_k_Immutable_dictionary_whose_data[] = "\n    Immutable dictionary whose data can be accessed either as\n    attributes or by mapping.\n    Initialize with keyword arguments, or **dict.\n    ";
static const char __pyx_k_In_the_default_mode_this_functi[] = "\n        In the default mode, this function returns a matrix with rows\n        of the form\n\n                  a b c  d e f  ...\n\n        which means\n\n            a*log(z0) + b*log(1/(1-z0)) + c*log((z0-1)/z0) + d*log(z1) +... = 2 pi i\n\n        for an edge equation, and (same) = 0 for a cusp equation.\n        Here, the cusp equations come at the bottom of the matrix, and\n        are listed in the form: meridian of cusp 0, longitude of cusp\n        0, meridian of cusp 1, longitude of cusp 1,...\n\n        In terms of the tetrahedra, a is the invariant of the edge\n        (2,3), b the invariant of the edge (0,2) and c is the\n        invariant of the edge (1,2).  See kernel_code/edge_classes.c\n        for a detailed account of the convention used.\n\n        If the optional argument form='rect' is given, then this\n        function returns a list of tuples of the form:\n\n           ( [a0, a1,..,a_n], [b_0, b_1,...,b_n], c)\n\n        where this corresponds to the equation\n\n           z0^a0 (1 - z0)^b0 z1^a1(1 - z1)^b1 ...  = c\n\n        where c = 1 or -1.\n\n        >>> M = Triangulation('m004(2,3)')\n        >>> M.gluing_equations()\n        [ 2  1  0  1  0  2]\n        [ 0  1  2  1  2  0]\n        [ 2  0  0  0 -8  6]\n        >>> M.gluing_equations(form='rect')\n        [([2, -1], [-1, 2], 1), ([-2, 1], [1, -2], 1), ([2, -6], [0, 14], 1)]\n        ";
static const char __pyx_k_Iterator_Sequence_for_Alternati[] = "\n    Iterator/Sequence for Alternating knot exteriors from the\n    Hoste-Thistlethwaite tables.   Goes through 16 crossings.\n    ";
static const char __pyx_k_Iterator_Sequence_for_nonAltern[] = "\n    Iterator/Sequence for nonAlternating knot exteriors from the\n    Hoste-Thistlethwaite tables.  Goes through 16 crossings.\n    ";
static const char __pyx_k_M_cover_permutation_rep_Returns[] = "\n        M.cover(permutation_rep)\n\n        Returns a Manifold representing the finite cover\n        specified by a transitive permutation representation.  The\n        representation is specified by a list of permutations, one for\n        each generator of the simplified presentation of the\n        fundamental group.  Each permutation is specified as a list P\n        such that set(P) == set(range(d)) where d is the degree of the\n        cover.\n\n        >>> M = Manifold('m004')\n        >>> N0 = M.cover([[1, 3, 0, 4, 2], [0, 2, 1, 4, 3]])\n        >>> abs(N0.volume()/M.volume() - 5) < 0.0000000001\n        True\n\n\n        If within Sage, the permutations can also be of type\n        PermutationGroupElement, in which case they act on the set\n        range(1, d + 1).  Or, you can specify a GAP or Magma subgroup\n        of the fundamental group.     Some examples::\n\n          sage: M = Manifold('m004')\n\n        The basic method::\n\n          sage: N0 = M.cover([[1, 3, 0, 4, 2], [0, 2, 1, 4, 3]])\n\n        From a Gap subgroup::\n\n          sage: G = gap(M.fundamental_group())\n          sage: H = G.LowIndexSubgroupsFpGroup(5)[9]\n          sage: N1 = M.cover(H)\n          sage: N0 == N1\n          True\n\n        Or a homomorphism to a permutation group::\n\n          sage: f = G.GQuotients(PSL(2,7))[1]\n          sage: N2 = M.cover(f)\n          sage: N2.volume()/M.volume() # doctest: +NUMERIC9\n          8.00000000\n\n        Or maybe we want larger cover coming from the kernel of this::\n\n          sage: N3 = M.cover(f.Kernel())\n          sage: N3.volume()/M.volume() # doctest: +NUMERIC9\n          168.00000000\n\n        Check the homology against what Gap computes directly::\n\n          sage: N3.homology().betti_number()\n          32\n          sage: len([ x for x in f.Kernel().AbelianInvariants().sage() if x == 0])\n          32\n\n        We can do the same for Magma::\n\n          sage: G = magma(M.fundamental_group())             #doctes""t: +SKIP\n          sage: Q, f = G.pQuotient(5, 1, nvals = 2)          #doctest: +SKIP\n          sage: M.cover(f.Kernel()).volume()                 #doctest: +SKIP\n          10.14941606\n          sage: h = G.SimpleQuotients(1, 11, 2, 10000)[1,1]  #doctest: +SKIP\n          sage: N4 = M.cover(h)                              #doctest: +SKIP\n          sage: N2 == N4                                     #doctest: +SKIP\n          True\n        ";
static const char __pyx_k_M_covers_degree_method_None_cov[] = "\n        M.covers(degree, method=None, cover_type='all')\n\n        Returns a list of Triangulations corresponding to all of the\n        finite covers of the given degree.  The default method is\n        'low_index' for general covers and 'snappea' for cyclic\n        covers.  The former uses Sim's algorithm while the latter\n        uses the original Snappea algorithm.\n\n        WARNING: If the degree is large this might take a very, very,\n        very long time.\n\n        >>> M = Triangulation('m003')\n        >>> covers = M.covers(4)\n        >>> sorted(N.homology() for N in covers)\n        [Z/3 + Z/15 + Z, Z/5 + Z + Z]\n\n        It is faster to look just at cyclic covers.\n\n        >>> covers = M.covers(4, cover_type='cyclic')\n        >>> [(N, N.homology()) for N in covers]\n        [(m003~cyc~0(0,0), Z/3 + Z/15 + Z)]\n\n        Here we check that we get the same number of covers with the\n        'snappea' and 'low_index' methods.\n\n        >>> M = Triangulation('m125')\n        >>> len(M.covers(5))\n        19\n        >>> len(M.covers(5, method='snappea'))\n        19\n\n        If you are using Sage, you can use GAP to find the subgroups,\n        which is often much faster, by specifying the optional\n        argument method = 'gap' If you have Magma installed, you can\n        used it to do the heavy lifting by specifying method='magma'.\n        ";
static const char __pyx_k_M_gluing_equations_pgl_N_2_equa[] = "\n        M.gluing_equations_pgl(N = 2, equation_type='all')\n\n        Returns a NeumannZagierTypeEquations object that contains a matrix\n        encoding the gluing equations for boundary-parabolic PGL(N,C)\n        representations together with explanations of the meaning\n        of the rows and the columns of the matrix.\n\n        This method generalizes gluing_equations() to PGL(N,C)-representations\n        as described in\n        Stavros Garoufalidis, Matthias Goerner, Christian K. Zickert:\n        \"Gluing Equations for PGL(n,C)-Representations of 3-Manifolds\"\n        (http://arxiv.org/abs/1207.6711).\n\n        The result of the traditional gluing_equations() can be obtained from\n        the general method by:\n\n        >>> M = Triangulation('m004')\n        >>> M.gluing_equations_pgl().matrix\n        [ 2  1  0  1  0  2]\n        [ 0  1  2  1  2  0]\n        [ 1  0  0  0 -1  0]\n        [ 0  0  0  0 -2  2]\n\n        But besides the matrix, the method also returns explanations of\n        the columns and rows:\n\n        >>> M = Triangulation(\"m004\")\n        >>> M.gluing_equations_pgl()\n        NeumannZagierTypeEquations(\n          [ 2  1  0  1  0  2]\n          [ 0  1  2  1  2  0]\n          [ 1  0  0  0 -1  0]\n          [ 0  0  0  0 -2  2],\n          explain_columns = ['z_0000_0', 'zp_0000_0', 'zpp_0000_0', 'z_0000_1', 'zp_0000_1', 'zpp_0000_1'],\n          explain_rows = ['edge_0_0', 'edge_0_1', 'meridian_0_0', 'longitude_0_0'])\n\n        The first row of the matrix means that the edge equation for\n        edge 0 is\n\n           z_0000_0 ^ 2 * zp_0000_0 * z_0000_1 * zpp_0000_1 ^ 2 = 1.\n\n        Similarly, the next row encodes the edge equation for the other edge\n        and the next two rows encode peripheral equations.\n\n        Following the SnapPy convention, a z denotes the cross ratio z at the\n        edge (0,1), a zp the cross ratio z' at the edge (0,2) and a zpp the cross\n        ratio z\" at the edge (1,2). The entire sy""mbol z_xxxx_y then\n        denotes the cross ratio belonging to the subsimplex at integral\n        point xxxx (always 0000 for N = 2) of the simplex y. Note: the\n        SnapPy convention is different from the paper\n        mentioned above, e.g., compare\n        kernel_code/edge_classes.c with Figure 3. We follow the SnapPy\n        convention here so that all computations done in SnapPy are\n        consistent.\n\n        The explanations of the rows and columns can be obtained explicitly by:\n\n        >>> M.gluing_equations_pgl(N = 3, equation_type = 'peripheral').explain_rows\n        ['meridian_0_0', 'meridian_1_0', 'longitude_0_0', 'longitude_1_0']\n        >>> M.gluing_equations_pgl(N = 2).explain_columns\n        ['z_0000_0', 'zp_0000_0', 'zpp_0000_0', 'z_0000_1', 'zp_0000_1', 'zpp_0000_1']\n\n        A subset of all gluing equations can be obtained by setting the\n        equation_type:\n\n        * all gluing equations: 'all'\n        * non-peripheral equations: 'non_peripheral'\n\n          * edge gluing equations: 'edge'\n          * face gluing equations: 'face'\n          * internal gluing equations: 'internal'\n\n        * cusp gluing equations: 'peripheral'\n\n          * cusp gluing equations for meridians: 'meridian'\n          * cusp gluing equations for longitudes: 'longitude'\n        ";
static const char __pyx_k_M_ptolemy_generalized_obstructi[] = "\n        M.ptolemy_generalized_obstruction_classes(N)\n\n        Returns the obstruction classes needed to compute\n        PGL(N,C)-representations for any N, i.e., it returns a list with\n        a representative cocycle for each element in\n        H^2(M, boundary M; Z/N) / (Z/N)^* where (Z/N)^* are the units in Z/N.\n        The first element in the list always corresponds to the trivial\n        obstruction class.\n        The generalized ptolemy obstruction classes are thus a generalization\n        of the ptolemy obstruction classes that allow to find all\n        boundary-unipotent\n        PGL(N,C)-representations including those that do not lift to\n        boundary-unipotent SL(N,C)-representations for N odd or\n        SL(N,C)/{+1,-1}-representations for N even.\n\n        For example, 4_1 has three obstruction classes up to equivalence:\n\n        >>> M = Manifold(\"4_1\")\n        >>> c = M.ptolemy_generalized_obstruction_classes(4)\n        >>> len(c)\n        3\n\n        For 4_1, we only get three obstruction classes even though we have\n        H^2(M, boundary M; Z/4) = Z/4 because the two obstruction classes\n        1 in Z/4 and -1 in Z/4 are related by a unit and thus give\n        isomorphic Ptolemy varieties.\n\n        The primary use of an obstruction class sigma is to construct the\n        Ptolemy variety of sigma. This variety computes boundary-unipotent\n        PGL(N,C)-representations whose obstruction class to a\n        boundary-unipotent lift to SL(N,C) is sigma.\n\n        For example for 4_1, there are 2 obstruction classes for N = 3:\n\n        >>> M = Manifold(\"4_1\")\n        >>> c = M.ptolemy_generalized_obstruction_classes(3)\n        >>> len(c)\n        2\n\n        The Ptolemy variety parametrizing boundary-unipotent\n        SL(3,C)-representations of 4_1 is obtained by\n\n        >>> p = M.ptolemy_variety(N = 3, obstruction_class = c[0])\n\n        and the Ptolemy variety parametrizing boundary-unipotent\n        PSL(3,""C)-representations of 4_1 that do not lift to\n        boundary-unipotent SL(3,C)-representations is obtained by\n\n        >>> p = M.ptolemy_variety(N = 3, obstruction_class = c[1])\n\n        The cocycle representing the non-trivial obstruction class looks as\n        follows:\n\n        >>> c[1]\n        PtolemyGeneralizedObstructionClass([2, 0, 0, 1])\n\n        This means that the cocycle takes the value -1 in Z/3 on the first face\n        class and 1 on the fourth face class but zero on every other of the\n        four face classes.\n        ";
static const char __pyx_k_M_ptolemy_variety_N_obstruction[] = "\n        M.ptolemy_variety(N, obstruction_class = None, simplify = True, eliminate_fixed_ptolemys = False)\n\n        Returns a Ptolemy variety as described in\n\n        * Stavros Garoufalidis, Dyland Thurston, Christian K. Zickert:\n          \"The Complex Volume of SL(n,C)-Representations of 3-Manifolds\"\n          (http://arxiv.org/abs/1111.2828)\n        * Stavros Garoufalidis, Matthias Goerner, Christian K. Zickert:\n          \"Gluing Equations for PGL(n,C)-Representations of 3-Manifolds \"\n          (http://arxiv.org/abs/1207.6711)\n\n        The variety can be exported to magma or sage and solved there. The\n        solutions can be processed to compute invariants. The method can also\n        be used to automatically look up precomputed solutions from the\n        database at http://ptolemy.unhyperbolic.org/data .\n\n        Example for m011 and PSL(2,C)-representations:\n\n        >>> M = Manifold(\"m011\")\n\n        Obtain all Ptolemy varieties for PSL(2,C)-representations:\n\n        >>> p = M.ptolemy_variety(2, obstruction_class = 'all')\n\n        There are two Ptolemy varieties for the two obstruction classes:\n\n        >>> len(p)\n        2\n\n        Retrieve the solutions from the database\n\n        >>> sols = p.retrieve_solutions() #doctest: +SKIP\n\n        Compute the solutions using magma (default in SnapPy)\n\n        >>> sols = p.compute_solutions(engine = 'magma') #doctest: +SKIP\n\n        Compute the solutions using singular (default in sage)\n\n        >>> sols = p.compute_solutions(engine = 'sage') #doctest: +SKIP\n\n        Note that magma is significantly faster.\n\n        Compute all resulting complex volumes\n\n        >>> cvols = sols.complex_volume_numerical() #doctest: +SKIP\n        >>> cvols  #doctest: +SKIP\n        [[[-4.29405713186238 E-16 + 0.725471193740844*I,\n           -0.942707362776931 + 0.459731436553693*I,\n           0.942707362776931 + 0.459731436553693*I]],\n         [[3.94159248086745 E-15 + 0.31268268751""8267*I,\n           4.64549527022581 E-15 + 0.680993020093457*I,\n           -2.78183391239608 - 0.496837853805869*I,\n           2.78183391239608 - 0.496837853805869*I]]]\n\n        Show complex volumes as a non-nested list:\n\n        >>> cvols.flatten(depth=2) #doctest: +SKIP\n        [-4.29405713186238 E-16 + 0.725471193740844*I,\n         -0.942707362776931 + 0.459731436553693*I,\n         0.942707362776931 + 0.459731436553693*I,\n         3.94159248086745 E-15 + 0.312682687518267*I,\n         4.64549527022581 E-15 + 0.680993020093457*I,\n         -2.78183391239608 - 0.496837853805869*I,\n         2.78183391239608 - 0.496837853805869*I]\n\n        For more examples, go to http://ptolemy.unhyperbolic.org/\n\n        === Optional Arguments ===\n\n        obstruction_class --- class from Definition 1.7 of (1).\n        None for trivial class or a value returned from ptolemy_obstruction_classes.\n        Short cuts: obstruction_class = 'all' returns a list of Ptolemy varieties\n        for each obstruction. For easier iteration, can set obstruction_class to\n        an integer.\n\n        simplify --- boolean to indicate whether to simplify the equations which\n        significantly reduces the number of variables.\n        Simplifying means that several identified Ptolemy coordinates x = y = z = ...\n        are eliminated instead of adding relations x - y = 0, y - z = 0, ...\n\n        eliminate_fixed_ptolemys --- boolean to indicate whether to eliminate\n        the Ptolemy coordinates that are set to 1 for fixing the decoration.\n        Even though this simplifies the resulting representation, setting it to\n        True can cause magma to run longer when finding a Groebner basis.\n\n        === Examples for 4_1 ===\n\n        >>> M = Manifold(\"4_1\")\n\n        Get the varieties for all obstruction classes at once (use\n        help(varieties[0]) for more information):\n\n        >>> varieties = M.ptolemy_variety(2, obstruction_class = \"all\")\n\n        Pr""int the variety as an ideal (sage object) for the non-trivial class:\n\n        >>> varieties[1].ideal    #doctest: +SKIP\n        Ideal (-c_0011_0^2 + c_0011_0*c_0101_0 + c_0101_0^2, -c_0011_0^2 - c_0011_0*c_0101_0 + c_0101_0^2, c_0011_0 - 1) of Multivariate Polynomial Ring in c_0011_0, c_0101_0 over Rational Field\n\n        Print the equations of the variety for the non-trivial class:\n\n        >>> for eqn in varieties[1].equations:\n        ...     print(eqn)          #doctest: +NORMALIZE_WHITESPACE\n             - c_0011_0 * c_0101_0 + c_0011_0^2 + c_0101_0^2\n             c_0011_0 * c_0101_0 - c_0011_0^2 - c_0101_0^2\n             - 1 + c_0011_0\n\n        Generate a magma file to compute Primary Decomposition for N = 3:\n\n        >>> p = M.ptolemy_variety(3)\n        >>> s = p.to_magma()\n        >>> print(s.split(\"ring and ideal\")[1].strip())     #doctest: +ELLIPSIS\n        R<c_0012_0, c_0012_1, c_0102_0, c_0111_0, c_0201_0, c_1011_0, c_1011_1, c_1101_0> := PolynomialRing(RationalField(), 8, \"grevlex\");\n        MyIdeal := ideal<R |\n                  c_0012_0 * c_1101_0 + c_0102_0 * c_0111_0 - c_0102_0 * c_1011_0,\n            ...\n\n        === If you have a magma installation ===\n\n        Call p.compute_solutions() to automatically call magma on the above output\n        and produce exact solutions!!!\n\n        >>> try:\n        ...     sols = p.compute_solutions()\n        ... except:\n        ...     # magma failed, use precomputed_solutions\n        ...     sols = None\n\n        Check solutions against manifold\n        >>> if sols:\n        ...     dummy = sols.check_against_manifold()\n\n        === If you do not have a magma installation ===\n\n        Load a precomputed example from magma which is provided with the package:\n\n        >>> from snappy.ptolemy.processMagmaFile import _magma_output_for_4_1__sl3, solutions_from_magma\n        >>> print(_magma_output_for_4_1__sl3)      #doctest: +ELLIPSIS\n        <BLANKLINE>\n        ==TRIAN""GULATION=BEGINS==\n        % Triangulation\n        4_1\n        ...\n\n        Parse the file and produce solutions:\n\n        >>> sols = solutions_from_magma(_magma_output_for_4_1__sl3)\n\n        >>> dummy = sols.check_against_manifold()\n\n        === Continue here whether you have or do not have magma ===\n\n        Pick the first solution of the three different solutions (up to Galois\n        conjugates):\n\n        >>> len(sols)\n        3\n        >>> solution = sols[0]\n\n        Read the exact value for c_1020_0 (help(solution) for more information\n        on how to compute cross ratios, volumes and other invariants):\n\n        >>> solution['c_1020_0']\n        Mod(-1/2*x - 3/2, x^2 + 3*x + 4)\n\n        Example of simplified vs non-simplified variety for N = 4:\n\n        >>> simplified = M.ptolemy_variety(4, obstruction_class = 1)\n        >>> full = M.ptolemy_variety(4, obstruction_class = 1, simplify = False)\n        >>> len(simplified.variables), len(full.variables)\n        (21, 63)\n        >>> len(simplified.equations), len(full.equations)\n        (24, 72)\n        ";
static const char __pyx_k_Manifold__get_tetrahedra_shapes[] = "Manifold._get_tetrahedra_shapes";
static const char __pyx_k_Manifold_cusp_neighborhood_line[] = "Manifold.cusp_neighborhood (line 309)";
static const char __pyx_k_Manifold_fundamental_group_line[] = "Manifold.fundamental_group (line 418)";
static const char __pyx_k_Manifold_tetrahedra_shapes_line[] = "Manifold.tetrahedra_shapes (line 863)";
static const char __pyx_k_MatrixWithExplanations___repr_2[] = "MatrixWithExplanations.__repr__";
static const char __pyx_k_New_triangulation_received_from[] = "\nNew triangulation received from PLink!\n";
static const char __pyx_k_Opens_browser_window_with_a_gra[] = "\n        Opens browser window with a graphical interface, which allows to\n        explore the manifold and interact with it.\n        This includes: invariants, Dirichlet domain, cusp neighborhoods,\n        inside view, symmetry, Dehn filling, drilling, etc.\n\n        >>> M = Manifold('m125')\n        >>> M.browse()  #doctest: +CYOPENGL\n\n        This does not work when using SnapPy in a Docker container.\n        ";
static const char __pyx_k_P_crossings_0_9_P_alternation_a[] = "(?P<crossings>[0-9]+)(?P<alternation>[an])(?P<index>[0-9]+)$";
static const char __pyx_k_P_crossings_0_9___P_index_0_9_P[] = "(?P<crossings>[0-9]+)[_](?P<index>[0-9]+)[\\^](?P<components>[0-9]+)$";
static const char __pyx_k_Perform_random_Pachner_moves_on[] = "\n        Perform random Pachner moves on the underlying triangulation,\n        including some initial 3 -> 2 moves that increase the number of\n        tetrahedra by blowup_multiple.\n\n        >>> M = Triangulation('Braid:[1,2,-3,-3,1,2]')\n        >>> M.randomize()\n        ";
static const char __pyx_k_Removing_any_finite_vertices_by[] = "\n        Removing any finite vertices by simplification and drilling.\n\n        >>> isosig = 'kLLLLMQkccfigghjijjlnabnwnpsii'\n        >>> T = Triangulation(isosig, remove_finite_vertices=False)\n        >>> T.triangulation_isosig(decorated=False) == isosig\n        True\n        >>> T.num_cusps(),  T._num_fake_cusps()\n        (0, 1)\n        >>> T._remove_finite_vertices()\n        >>> T.num_cusps(),  T._num_fake_cusps()\n        (1, 0)\n        ";
static const char __pyx_k_Represents_an_isometry_from_one[] = "\n    Represents an isometry from one manifold to another.\n    ";
static const char __pyx_k_Return_a_HolonomyGroup_represen[] = "\n        Return a HolonomyGroup representing the fundamental group of\n        the manifold, together with its holonomy representation.  If\n        integer Dehn surgery parameters have been set, then the\n        corresponding peripheral elements are killed.\n\n        >>> M = Manifold('m004')\n        >>> G = M.fundamental_group()\n        >>> G\n        Generators:\n           a,b\n        Relators:\n           aaabABBAb\n        >>> G.peripheral_curves()\n        [('ab', 'aBAbABab')]\n        >>> G.SL2C('baaBA') # doctest: +NUMERIC6\n        [ 2.50000000 - 2.59807621*I -6.06217783 - 0.50000000*I]\n        [ 0.86602540 - 2.50000000*I -4.00000000 + 1.73205081*I]\n\n        There are three optional arguments all of which default to True:\n\n        - simplify_presentation\n        - fillings_may_affect_generators\n        - minimize_number_of_generators\n\n        >>> M.fundamental_group(False, False, False)\n        Generators:\n           a,b,c\n        Relators:\n           CbAcB\n           BacA\n        ";
static const char __pyx_k_Return_a_detailed_list_of_all_t[] = "\n        Return a detailed list of all the isometries in the symmetry group.\n\n        >>> S = Manifold('s959').symmetry_group()\n        >>> isoms = S.isometries()\n        >>> isoms[8]\n        0 -> 1   1 -> 0\n        [-1 -1]  [ 0  1]\n        [ 1  0]  [-1 -1]\n        Does not extend to link\n        ";
static const char __pyx_k_Return_a_list_of_info_objects_d[] = "\n        Return a list of info objects describing the short\n        geodesics up to the specified cutoff length.  The keys are\n        'length', 'parity', 'topology', and 'multiplicity'.  The\n        length is the complex length; the parity specifies whether\n        orientation is preserved; and topology distinguishes between\n        circles and mirrored intervals.  Finally, the key 'matrix'\n        in the fundamental group realizing this element.\n\n        >>> M = Manifold('m004(1,2)')\n        >>> D = M.dirichlet_domain(maximize_injectivity_radius=False)\n        >>> lengths = D.length_spectrum_dicts()\n        >>> len(lengths)\n        2\n        >>> lengths[0].matrix in D.pairing_matrices()\n        True\n\n        If the flag 'grouped' is False, then each geodesic is returned as\n        a separate item rather than collating by (length, parity, topology).\n        If the flag 'multiplicities' is False, then the geodesics *are*\n        collated but the multiplicity of each item is set to 0.\n\n        >>> M = Manifold('m003(-3, 1)')\n        >>> D = M.dirichlet_domain()\n        >>> [g.multiplicity for g in D.length_spectrum_dicts()]\n        [3, 3]\n        >>> [g.multiplicity for g in D.length_spectrum_dicts(grouped=False)]\n        [1, 1, 1, 1, 1, 1]\n        ";
static const char __pyx_k_Return_a_new_Manifold_where_the[] = "\n        Return a new Manifold where the specified cusps have been\n        permanently filled in.\n\n        Filling all the cusps results in a Triangulation rather\n        than a Manifold, since SnapPea can't deal with hyperbolic\n        structures when there are no cusps.\n\n        Examples:\n\n        >>> M = Manifold('m125(1,2)(3,4)')\n        >>> N = M.filled_triangulation()\n        >>> N.num_cusps()\n        0\n\n        Filling cusps 0 and 2 :\n\n        >>> M = Manifold('v3227(1,2)(3,4)(5,6)')\n        >>> M.filled_triangulation([0,2])\n        v3227_filled(3,4)\n        ";
static const char __pyx_k_Return_a_new_manifold_where_the[] = "\n        Return a new manifold where the specified cusps have been\n        permanently filled in.  Examples:\n\n        Filling all the cusps:\n\n        >>> M = Triangulation('m125(1,2)(3,4)')\n        >>> N = M.filled_triangulation()\n        >>> N.num_cusps()\n        0\n\n        Filling cusps 0 and 2 :\n\n        >>> M = Triangulation('v3227(1,2)(3,4)(5,6)')\n        >>> M.filled_triangulation([0,2])\n        v3227_filled(3,4)\n        ";
static const char __pyx_k_Return_the_Dowker_Thistlethwait[] = "\n        Return the Dowker-Thistlethwaite code of this link complement,\n        if it is a link complement. The DT code is intended to be an\n        immutable attribute, for use with knot and link exteriors\n        only, which is set only when the manifold was created.\n\n        Here is the Whitehead link:\n\n        >>> M = Manifold('L5a1')\n        >>> M.DT_code()\n        [(6, 8), (2, 10, 4)]\n        >>> M.DT_code(alpha=True)\n        'ebbccdaeb'\n        >>> M.DT_code(alpha=True, flips=True)\n        'ebbccdaeb.01110'\n        >>> M.DT_code(flips=True)\n        ([(6, 8), (2, 10, 4)], [0, 1, 1, 1, 0])\n        ";
static const char __pyx_k_Return_the_abelianization_of_th[] = "\n        Return the abelianization of the symmetry group\n\n        >>> S = Manifold('m004').symmetry_group()\n        >>> S.abelianization()\n        Z/2 + Z/2\n        ";
static const char __pyx_k_Return_the_center_of_the_symmet[] = "\n        Return the center of the symmetry group\n\n        >>> S = Manifold('m004').symmetry_group()\n        >>> S.center()\n        Z/2\n        ";
static const char __pyx_k_Return_the_current_generators_i[] = "\n        Return the current generators in terms of the original\n        geometric generators. Note that by default fundamental_group()\n        returns a simplified presentation of the group.\n\n        If the flag \"raw_form\" is set to True, it returns a sequence of\n        instructions for expressing the current generators in terms of\n        the original ones.  This is sometimes much more concise, though\n        the format is somewhat obscure.  See the source code of this\n        function in fundamental_group.pyx for details.\n\n        >>> M = Manifold('K7_1')\n        >>> G = M.fundamental_group()\n        >>> G.generators_in_originals()   #doctest: +NORMALIZE_WHITESPACE\n        ['DBcACbABcaCbDBcACbABcaCbACbaBcaCbd',\n         'DBcACbABcaCbDBcACbABcaCbCbDBcACbABcaBcACbaBcaCbdACbaBcaCbdBcBcACbaBcaCbd']\n        ";
static const char __pyx_k_Return_the_letters_representing[] = "\n        Return the letters representing the generators in the presentation.\n\n        >>> M = Manifold('9_42')\n        >>> G = M.fundamental_group() #Presentation simplified by default\n        >>> G\n        Generators:\n           a,b\n        Relators:\n           aaaabbABBBAbb\n        >>> H = M.fundamental_group(False) #Unsimplified presentation\n        >>> H\n        Generators:\n           a,b,c,d,e\n        Relators:\n           ECbC\n           dEb\n           dAcaB\n           dbaE\n\n        SnapPy stores a FundamentalGroup as a presentation of the group.\n        The following commands demonstrate how generators in the unsimplified\n        and simplified presentations above correspond:\n\n        >>> G.generators()\n        ['a', 'b']\n        >>> H.generators()\n        ['a', 'b', 'c', 'd', 'e']\n        >>> G.generators_in_originals()\n        ['BABcBcbCABcBcbCCbCba', 'BcBCbCbab']\n        >>> G.original_generators()\n        ['BBAbba', 'A', 'AB', 'abba', 'bba']\n        >>> G.num_generators()\n        2\n        >>> G.num_original_generators()\n        5\n        >>> H.num_generators()\n        5\n        ";
static const char __pyx_k_Return_the_name_of_the_triangul[] = "\n        Return the name of the triangulation.\n\n        >>> M = Triangulation('4_1')\n        >>> M.name()\n        '4_1'\n        ";
static const char __pyx_k_Return_the_number_of_tetrahedra[] = "\n        Return the number of tetrahedra in the triangulation.\n\n        >>> M = Triangulation('m004')\n        >>> M.num_tetrahedra()\n        2\n        ";
static const char __pyx_k_Return_the_order_of_the_symmetr[] = "\n        Return the order of the symmetry group\n\n        >>> S = Manifold('s000').symmetry_group()\n        >>> S.order()\n        4\n        ";
static const char __pyx_k_Return_the_original_geometric_g[] = "\n        Return the original geometric generators (before\n        simplification) in terms of the current generators.\n\n        >>> M = Manifold('v0000')\n        >>> G = M.fundamental_group()\n        >>> G.original_generators(as_int_list=True)\n        [[1], [-1, -2, 1, 2], [-1, 2], [-2, -1, 2], [2]]\n        ";
static const char __pyx_k_Return_the_total_number_of_cusp[] = "\n        Return the total number of cusps.  By giving the optional argument\n        'orientable' or 'nonorientable' it will only count cusps of that type.\n\n        >>> M = Triangulation('m125')\n        >>> M.num_cusps()\n        2\n        ";
static const char __pyx_k_Return_whether_a_one_cusped_has[] = "\n        Return whether a one-cusped has a symmetry that acts on the\n        cusp via the matrix -I.\n\n        >>> S = Manifold('m015').symmetry_group()\n        >>> S.is_invertible_knot()\n        True\n        ";
static const char __pyx_k_Return_whether_the_SymmetryGrou[] = "\n        Return whether the SymmetryGroup is a nontrivial direct\n        product with at least one nonabelian factor.\n\n        >>> S = Manifold('s960').symmetry_group()\n        >>> S.is_direct_product()\n        True\n        >>> S\n        Z/4 x D3\n        ";
static const char __pyx_k_Return_whether_the_full_symmetr[] = "\n        Return whether the full symmetry group has been found.\n\n        >>> S = Manifold('m004').symmetry_group()\n        >>> S.is_full_group()\n        True\n        ";
static const char __pyx_k_Return_whether_the_manifold_has[] = "\n        Return whether the manifold has an orientation reversing symmetry.\n\n        >>> S = Manifold('m004').symmetry_group()\n        >>> S.is_amphicheiral()\n        True\n        ";
static const char __pyx_k_Return_whether_the_symmetry_gro[] = "\n        Return whether the symmetry group is abelian.\n\n        >>> S = Manifold('m004').symmetry_group()\n        >>> S.is_abelian()\n        False\n        ";
static const char __pyx_k_Return_whether_the_underlying_3[] = "\n        Return whether the underlying 3-manifold is orientable.\n\n        >>> M = Triangulation('x124')\n        >>> M.is_orientable()\n        False\n        ";
static const char __pyx_k_Returns_True_if_M_and_N_are_iso[] = "\n        Returns True if M and N are isometric, False if they not.  A\n        RuntimeError is raised in cases where the SnapPea kernel fails\n        to determine either answer.  (This is fairly common for closed\n        manifolds.)\n\n        >>> M = Manifold('m004')\n        >>> N = Manifold('4_1')\n        >>> K = Manifold('5_2')\n        >>> M.is_isometric_to(N)\n        True\n        >>> N.is_isometric_to(K)\n        False\n\n        We can also get a complete list of isometries between the two\n        manifolds:\n\n        >>> M = Manifold('5^2_1')  # The Whitehead link\n        >>> N = Manifold('m129')\n        >>> isoms = M.is_isometric_to(N, return_isometries = True)\n        >>> isoms[6]  # Includes action on cusps\n        0 -> 1  1 -> 0\n        [1  2]  [-1 -2]\n        [0 -1]  [ 0  1]\n        Extends to link\n\n        Each transformation between cusps is given by a matrix which\n        acts on the left.  That is, the two *columns* of the matrix\n        give the image of the meridian and longitude respectively.  In\n        the above example, the meridian of cusp 0 is sent to the\n        meridian of cusp 1.\n\n        Note: The answer True is rigorous, but the answer False may\n        not be as there could be numerical errors resulting in finding\n        an incorrect canonical triangulation.\n        ";
static const char __pyx_k_Returns_True_if_and_only_if_the[] = "\n        Returns True if and only if the triangulation has finite (non-ideal)\n        vertices.\n\n        >>> T = Triangulation(\"m004\")\n        >>> T.has_finite_vertices()\n        False\n        >>> T.dehn_fill((12,13))\n        >>> S = T.filled_triangulation()\n        >>> S.has_finite_vertices()\n        True\n\n        When trying to find a hyperbolic structure, SnapPea will eliminate\n        finite vertices:\n\n        >>> M = S.with_hyperbolic_structure()\n        >>> M.has_finite_vertices()\n        False\n        ";
static const char __pyx_k_Returns_a_Dehn_filling_descript[] = "\n        Returns a Dehn filling description of the manifold realizing\n        the symmetry group.\n\n        >>> M = Manifold('m003(-3,1)')\n        >>> M.symmetry_group()\n        D6\n        >>> N = M.symmetric_triangulation()\n        >>> N\n        m003(1,0)(1,0)(1,0)\n        >>> N.dehn_fill( [(0,0), (0,0), (0,0)] )\n        >>> N.symmetry_group(of_link=True)\n        D6\n        ";
static const char __pyx_k_Returns_a_DirichletDomain_objec[] = "\n        Returns a DirichletDomain object representing a Dirichlet\n        domain of the hyperbolic manifold, typically centered at a\n        point which is a local maximum of injectivity radius.  It will\n        have ideal vertices if the manifold is not closed.\n\n        >>> M = Manifold('m015')\n        >>> D = M.dirichlet_domain()\n        >>> D\n        32 finite vertices, 2 ideal vertices; 54 edges; 22 faces\n        >>> D.view()   #Shows 3d-graphical view.  #doctest: +CYOPENGL\n\n        The group elements for the face-pairings of the Dirichlet domain\n        can be given as words in the original generators of the\n        (unsimplified) fundamental group by setting include_words = True:\n\n        >>> sorted(M.dirichlet_domain(include_words = True).pairing_words()) #doctest: +ELLIPSIS\n        ['A', ...]\n\n        Other options can be provided to customize the computation;\n        the default choices are shown below:\n\n        >>> M.dirichlet_domain(vertex_epsilon=10.0**-8,\n        ...    displacement = [0.0, 0.0, 0.0],\n        ...    centroid_at_origin=True, maximize_injectivity_radius=True)\n        32 finite vertices, 2 ideal vertices; 54 edges; 22 faces\n\n        Here's one with different combinatorics:\n\n        >>> E = M.dirichlet_domain(displacement=[0.5, 0.3, -0.2],\n        ...                        maximize_injectivity_radius=False)\n        >>> E\n        44 finite vertices, 1 ideal vertices; 69 edges; 26 faces\n        ";
static const char __pyx_k_Returns_a_FundamentalGroup_obje[] = "\n        Returns a FundamentalGroup object representing the fundamental\n        group of the manifold.  If integer Dehn surgery parameters\n        have been set, then the corresponding peripheral elements are\n        killed.\n\n        >>> M = Triangulation('m004')\n        >>> G = M.fundamental_group()\n        >>> G\n        Generators:\n           a,b\n        Relators:\n           aaabABBAb\n        >>> G.peripheral_curves()\n        [('ab', 'aBAbABab')]\n\n        There are four optional arguments all of which default to True:\n\n        - simplify_presentation\n        - fillings_may_affect_generators\n        - minimize_number_of_generators\n        - try_hard_to_shorten_relators\n\n        >>> M.fundamental_group(False, False, False)\n        Generators:\n           a,b,c\n        Relators:\n           CbAcB\n           BacA\n        ";
static const char __pyx_k_Returns_a_Manifold_computed_dir[] = "\n        Returns a Manifold computed directly from the Dirichlet\n        domain, regarded as polyhedron with faces identified in pairs.\n        Only works if this gives a manifold not an orbifold.\n\n        >>> M = Manifold('7_3')\n        >>> D = M.dirichlet_domain()\n        >>> A = D.manifold()\n        >>> M.is_isometric_to(A)\n        True\n\n        ";
static const char __pyx_k_Returns_a_Triangulation_compute[] = "\n        Returns a Triangulation computed directly from the Dirichlet\n        domain, regarded as polyhedron with faces identified in pairs.\n        Only works if this gives a manifold not an orbifold.\n\n        >>> M = Manifold('7_3')\n        >>> D = M.dirichlet_domain()\n        >>> B = D.triangulation()\n        >>> M.is_isometric_to(B.with_hyperbolic_structure())\n        True\n\n        ";
static const char __pyx_k_Returns_a_Triangulation_represe[] = "\n        Returns a Triangulation representing the finite cover\n        specified by a transitive permutation representation.  The\n        representation is specified by a list of permutations, one for\n        each generator of the simplified presentation of the\n        fundamental group.  Each permutation is specified as a list P\n        such that set(P) == set(range(d)) where d is the degree of the\n        cover.\n\n        >>> M = Triangulation('m004')\n        >>> N0 = M.cover([[1, 3, 0, 4, 2], [0, 2, 1, 4, 3]])\n        >>> N0.homology()\n        Z + Z + Z\n        >>> N0.cover_info()['type']\n        'irregular'\n        >>> N0.cover_info()['base']\n        'm004'\n        >>> N0.cover_info()['degree']\n        5\n\n        Within Sage the permutations can also be of type\n        PermutationGroupElement, in which case they act on the set\n        range(1, d + 1).  Or, you can specify a GAP or Magma subgroup\n        of the fundamental group.  For examples, see the docstring for\n        Manifold.cover\n        ";
static const char __pyx_k_Returns_a_compact_text_represen[] = "\n        Returns a compact text representation of the triangulation, called a\n        \"decorated isomorphism signature\"\n\n        >>> T = Triangulation('m004')\n        >>> T.triangulation_isosig()\n        'cPcbbbiht_BaCB'\n\n        You can use this string to recreate an isomorphic triangulation later\n\n        >>> A = Triangulation('y233')\n        >>> A.triangulation_isosig()\n        'hLMzMkbcdefggghhhqxqhx_BaaB'\n        >>> B = Triangulation('hLMzMkbcdefggghhhqxqhx_BaaB')\n        >>> A == B\n        True\n\n        By default, the returned string encodes the peripheral curves (and\n        slopes of Dehn-fillings if any are present), but you can request\n        only the \"isomorphism signature\" which can be given to\n        `Regina <https://regina-normal.github.io/>`_.\n\n          >>> E = Triangulation('K3_1')   # the (-2, 3, 7) exterior\n          >>> isosig = E.triangulation_isosig(decorated = False); isosig\n          'dLQacccjsnk'\n          >>> F = Triangulation(isosig)\n          >>> E.isomorphisms_to(F)[1]\n          0 -> 0\n          [1 18]\n          [0  1]\n          Extends to link\n          >>> E.triangulation_isosig()\n          'dLQacccjsnk_BaRsB'\n          >>> F.triangulation_isosig()\n          'dLQacccjsnk_BaaB'\n          >>> G = Triangulation('dLQacccjsnk_BaRsB')\n          >>> E.isomorphisms_to(G)[0]\n          0 -> 0\n          [1 0]\n          [0 1]\n          Extends to link\n\n        If you do not care about the indexing of the cusps when using a\n        decorated signature, use ignore_cusp_ordering\n\n          >>> M = Manifold(\"L14n64110(1,2)(2,3)(-2,1)(3,4)(0,0)\")\n          >>> isosig = M.triangulation_isosig(decorated = True, ignore_cusp_ordering = True)\n          >>> isosig\n          'xLLvLvMLPMPLAMQQcceflnjmmmospsrttvvvtswwwiieiifdeauinasltltahmbjn_bacBbaaBBaBbBbbaabba(2,3)(-2,1)(1,2)(3,4)(0,0)'\n          >>> N = Manifold(isosig).filled_triangulation()\n          >>> N.is_isometric_to(M.filled_triangulation()"")\n          True\n\n        If you do not care about the orientations of the peripheral curves,\n        use ignore_curve_orientations\n\n          >>> M = Manifold(\"L6a1\")\n          >>> M.triangulation_isosig()\n          'gLLAQcdeefffdopuado_BabbBaab'\n          >>> isosig = M.triangulation_isosig(decorated = True, ignore_curve_orientations = True)\n          >>> isosig\n          'gLLAQcdeefffdopuado_babbbaab'\n          >>> N = Manifold(isosig)\n          >>> M.isomorphisms_to(N)\n          [0 -> 0  1 -> 1\n          [-1 0]  [-1 0]\n          [ 0 1]  [ 0 1]\n          Extends to link, 0 -> 0  1 -> 1\n          [1  0]  [1  0]\n          [0 -1]  [0 -1]\n          Extends to link]\n\n        By default, the isomorphism signature does not capture the orientation\n        of an orientable triangulation. If you specify\n        `ignore_orientation = False`, the isomorphism signature for an oriented\n        triangulation and its mirror image will be different if the\n        triangulation is cheiral.\n\n          >>> M = Manifold(\"m006\")\n          >>> M.triangulation_isosig(decorated = False, ignore_orientation = False)\n          'dLQacccjnjs'\n          >>> M.reverse_orientation()\n          >>> M.triangulation_isosig(decorated = False, ignore_orientation = False)\n          'dLQacccnsnk'\n\n        Note that a decorated triangulation isosig with the default values\n        `ignore_orientation = True` but `ignore_curve_orientations = False`\n        still captures the orientations of the triangulation through the\n        peripheral curves.\n\n          >>> M = Manifold(\"m006\")\n          >>> M.triangulation_isosig()\n          'dLQacccjnjs_aBbB'\n          >>> M.reverse_orientation()\n          >>> M.triangulation_isosig()\n          'dLQacccjnjs_aBBb'\n\n        The code has been copied from `Regina <https://regina-normal.github.io/>`_ where\n        the corresponding method is called \"isoSig\".\n\n        Unlike dehydrations for 3-manifold triangulation""s, an\n        isomorphism signature uniquely determines a triangulation up\n        to combinatorial isomorphism.  That is, two triangulations of\n        3-dimensional manifolds are combinatorially isomorphic if and\n        only if their isomorphism signatures are the same string.  For\n        full details, see `Simplification paths in the Pachner graphs\n        of closed orientable 3-manifold triangulations, Burton, 2011\n        <http://arxiv.org/abs/1110.6080>`_.\n\n        For details about how the peripheral decorations work, see\n        the SnapPy source code.\n        ";
static const char __pyx_k_Returns_a_complete_list_of_comb[] = "\n        Returns a complete list of combinatorial isomorphisms between\n        the two triangulations:\n\n        >>> M = Manifold('5^2_1')\n        >>> N = Manifold('5^2_1')\n        >>> N.set_peripheral_curves([[[2,3],[-1,-1]],[[1,1],[0,1]]])\n        >>> isoms = M.isomorphisms_to(N)\n        >>> isoms[6]\n        0 -> 1  1 -> 0\n        [ 1 0]  [-1 1]\n        [-1 1]  [-3 2]\n        Does not extend to link\n\n        Each transformation between cusps is given by a matrix which\n        acts on the left.  That is, the two *columns* of the matrix\n        give the image of the meridian and longitude respectively.  In\n        the above example, the meridian of cusp 0 is sent to the\n        meridian of cusp 1.\n        ";
static const char __pyx_k_Returns_a_copy_of_the_triangula[] = "\n        Returns a copy of the triangulation.\n\n        >>> M = Triangulation('m125')\n        >>> N = M.copy()\n        ";
static const char __pyx_k_Returns_a_dictionary_whose_keys[] = "\n        Returns a dictionary whose keys are the valences of the edges\n        in the triangulation, and the value associated to a key is the\n        number of edges of that valence.\n\n        >>> M = Triangulation('v3227')\n        >>> M.edge_valences()     # doctest: +SKIP\n        {10: 1, 4: 1, 5: 2, 6: 3}\n        ";
static const char __pyx_k_Returns_a_list_of_geodesics_wit[] = "\n        Returns a list of geodesics (with multiplicities) of length\n        up to the specified cutoff value. (The default cutoff is 1.0.)\n\n        Here's a quick example:\n\n        >>> L = Manifold(\"m016\").length_spectrum(0.75, include_words=True)\n        >>> L # doctest: +SKIP\n        mult  length                                  topology     parity word\n        1     0.58460368501799 +  2.49537045556047*I  circle       +      a\n        1     0.72978937305180 +  3.02669828218116*I  circle       +      Bc\n\n        Access just the length:\n\n        >>> L[0].length # doctest: +NUMERIC6\n        0.584603685017987 + 2.495370455560469*I\n        ";
static const char __pyx_k_Returns_a_list_of_meridian_long[] = "\n        Returns a list of meridian-longitude pairs for all cusps.\n\n        >>> G = Manifold('m125').fundamental_group()\n        >>> G.peripheral_curves()\n        [('aaba', 'abb'), ('baaba', 'Ba')]\n        ";
static const char __pyx_k_Returns_a_list_of_the_O31Matric[] = "\n        Returns a list of the O31Matrices which pair the faces of\n        this DirichletDomain.\n\n        >>> M = Manifold('s345')\n        >>> D = M.dirichlet_domain()\n        >>> matrices = D.pairing_matrices()\n        >>> D1 = DirichletDomain(O31_generators=matrices)\n        >>> N = D1.manifold()\n        >>> M.is_isometric_to(N)\n        True\n        ";
static const char __pyx_k_Returns_a_list_of_variables_and[] = "\n        Returns a list of variables and a list polynomials where the\n        polynomials generate the ideal defining the SL(2, C) character\n        variety of this group.  Each variable is of the form \"Tw\" where\n        \"w\" is a word in the generators and \"Tw\" represents the trace\n        function of that word.\n\n        >>> H = Manifold('dLQacccbjkg')  # Hopf link exterior.\n        >>> G = H.fundamental_group()\n        >>> vars, polys = G.character_variety_vars_and_polys()\n        >>> vars\n        [Ta, Tb, Tab]\n        >>> polys    # doctest: +NORMALIZE_WHITESPACE\n        [Ta^3 - Tab*Tb*Ta^2 + (Tb^2 + (Tab^2 - 4))*Ta,\n         Ta^2 - Tab*Tb*Ta + (Tb^2 + (Tab^2 - 4))]\n\n        When used inside Sage, you can ask for the answer as a proper\n        ideal::\n\n          sage: M = Manifold('m000')  # Gieseking manifold\n          sage: G = M.fundamental_group()\n          sage: I = G.character_variety_vars_and_polys(as_ideal=True)\n          sage: I\n          Ideal (-Ta^3*Tb^2*Tab + Ta^4*Tb + Ta^2*Tb^3 + Ta^2*Tb*Tab^2 + Ta*Tb^2*Tab - 5*Ta^2*Tb - Tb^3 - Tb*Tab^2 + Ta*Tab - Ta + 3*Tb, Tb*Tab - Ta - Tb, -Ta^2*Tb^2*Tab + Ta^3*Tb + Ta*Tb^3 + Ta*Tb*Tab^2 - 4*Ta*Tb + Tab - 2) of Multivariate Polynomial Ring in Ta, Tb, Tab over Rational Field\n          sage: I.dimension()\n          1\n\n        ";
static const char __pyx_k_Returns_a_string_which_will_def[] = "\n        Returns a string which will define this group within GAP:\n\n        >>> M = Manifold('b++LLR')\n        >>> G = M.fundamental_group()\n        >>> G\n        Generators:\n           a,b\n        Relators:\n           aaaaBAbbAB\n        >>> G.gap_string()\n        'CallFuncList(function() local F, a, b; F := FreeGroup(\"a\", \"b\"); a := F.1; b := F.2;   return F/[a*a*a*a*b^-1*a^-1*b*b*a^-1*b^-1]; end,[])'\n        >>> G.magma_string()\n        'Group<a,b|a*a*a*a*b^-1*a^-1*b*b*a^-1*b^-1>'\n        ";
static const char __pyx_k_Returns_a_word_representing_a_c[] = "\n        Returns a word representing a conjugate of the current\n        meridian for the given cusp.  Guaranteed to commute with the\n        longitude for the same cusp.\n\n        >>> G = Manifold('m125').fundamental_group()\n        >>> G.meridian(0)\n        'aaba'\n        >>> G.meridian(-1)  # The last cusp\n        'baaba'\n        ";
static const char __pyx_k_Returns_an_AbelianGroup_represe[] = "\n        Returns an AbelianGroup representing the first integral\n        homology group of the underlying (Dehn filled) manifold.\n\n        >>> M = Triangulation('m003')\n        >>> M.homology()\n        Z/5 + Z\n\n        ";
static const char __pyx_k_Returns_an_info_object_containi[] = "\n        Returns an info object containing information about the given\n        cusp.   Usage:\n\n        >>> M = Triangulation('v3227(0,0)(1,2)(3,2)')\n        >>> M.cusp_info(1)\n        Cusp 1 : torus cusp with Dehn filling coefficients (M, L) = (1.0, 2.0)\n        >>> c = M.cusp_info(1)\n        >>> c.is_complete\n        False\n        >>> sorted(c.keys())\n        ['filling', 'index', 'is_complete', 'topology']\n\n        You can get information about multiple cusps at once:\n\n        >>> M.cusp_info()\n        [Cusp 0 : torus cusp, not filled,\n         Cusp 1 : torus cusp with Dehn filling coefficients (M, L) = (1.0, 2.0),\n         Cusp 2 : torus cusp with Dehn filling coefficients (M, L) = (3.0, 2.0)]\n        >>> M.cusp_info('is_complete')\n        [True, False, False]\n        ";
static const char __pyx_k_Returns_information_about_the_c[] = "\n        Returns information about the cusp neighborhoods of the\n        manifold, in the form of data about the corresponding horoball\n        diagrams in hyperbolic 3-space.\n\n        >>> M = Manifold('s000')\n        >>> CN = M.cusp_neighborhood()\n        >>> CN.volume() # doctest: +NUMERIC6\n        0.32475953\n        >>> len(CN.horoballs(0.01))\n        178\n        >>> CN.view()  # Opens picture of the horoballs  #doctest: +CYOPENGL\n        ";
static const char __pyx_k_Returns_self_as_a_Triangulation[] = "\n        Returns self as a Triangulation, forgetting the hyperbolic\n        structure in the process.\n\n        >>> M = Manifold('9_42')\n        >>> T = M.without_hyperbolic_structure()\n        >>> hasattr(T, 'volume')\n        False\n        ";
static const char __pyx_k_Returns_the_Chern_Simons_invari[] = "\n        Returns the Chern-Simons invariant of the manifold, if it is known.\n\n        >>> M = Manifold('m015')\n        >>> M.chern_simons() # doctest: +NUMERIC6\n        -0.15320413\n\n        The return value has an extra attribute, accuracy, which\n        is the number of digits of accuracy as *estimated* by SnapPea.\n\n        >>> cs, accuracy = M.chern_simons(accuracy = True)\n        >>> accuracy in (8, 9, 56) # Low and High precision\n        True\n\n        By default, when the manifold has at least one cusp, Zickert's\n        algorithm is used; when the manifold is closed we use SnapPea's\n        original algorithm, which is based on Meyerhoff-Hodgson-Neumann.\n\n        Note: When computing the Chern-Simons invariant of a closed\n        manifold, one must sometimes compute it first for the unfilled\n        manifold so as to initialize SnapPea's internals.  For instance,\n\n        >>> M = Manifold('5_2')\n        >>> M.chern_simons() # doctest: +NUMERIC6\n        -0.15320413\n        >>> M.dehn_fill( (1,2) )\n        >>> M.chern_simons() # doctest: +NUMERIC6\n        0.07731787\n\n        works, but will fail with 'Chern-Simons invariant not\n        currently known' if the first call to chern_simons is not\n        made.\n        ";
static const char __pyx_k_Returns_the_number_of_fake_cusp[] = "\n        Returns the number of \"fake\" cusps, which is typically the number\n        of finite vertices.\n\n        >>> M = Triangulation('m004(1,2)')\n        >>> F = M.filled_triangulation()\n        >>> F.num_cusps(),  F._num_fake_cusps()\n        (0, 1)\n        >>> S = Triangulation('bkaagb', remove_finite_vertices=False)\n        >>> S.num_cusps(),  S._num_fake_cusps()\n        (0, 2)\n        ";
static const char __pyx_k_Returns_the_obstruction_classes[] = "\n        Returns the obstruction classes needed to compute\n        pSL(N,C) = SL(N,C)/{+1,-1} representations for even N, i.e., it\n        returns a list with a representative cocycle for each class in\n        H^2(M, boundary M; Z/2). The first element in the list is always\n        representing the trivial obstruction class.\n\n        For example, 4_1 has two obstruction classes:\n\n        >>> M = Manifold(\"4_1\")\n        >>> c = M.ptolemy_obstruction_classes()\n        >>> len(c)\n        2\n\n        The primary use of these obstruction classes is to construct\n        the Ptolemy variety as described in Definition 1.7 of\n        Stavros Garoufalidis, Dylan Thurston, Christian K. Zickert:\n        \"The Complex Volume of SL(n,C)-Representations of 3-Manifolds\"\n        (http://arxiv.org/abs/1111.2828).\n\n        For example, to construct the Ptolemy variety for\n        PSL(2,C)-representations of 4_1 that do not lift to boundary-parabolic\n        SL(2,C)-representations, use:\n\n        >>> p = M.ptolemy_variety(N = 2, obstruction_class = c[1])\n\n        Or the following short-cut:\n\n        >>> p = M.ptolemy_variety(2, obstruction_class = 1)\n\n        Note that this obstruction class only makes sense for even N:\n\n        >>> p = M.ptolemy_variety(3, obstruction_class = c[1])\n        Traceback (most recent call last):\n        ...\n        AssertionError: PtolemyObstructionClass only makes sense for even N, try PtolemyGeneralizedObstructionClass\n\n        To obtain PGL(N,C)-representations for N > 2, use the generalized\n        obstruction class:\n\n        >>> c = M.ptolemy_generalized_obstruction_classes(3)\n        >>> p = M.ptolemy_variety(3, obstruction_class = c[1])\n\n        The original obstruction class encodes a representing cocycle in Z/2 as follows:\n\n        >>> c = M.ptolemy_obstruction_classes()\n        >>> c[1]\n        PtolemyObstructionClass(s_0_0 + 1, s_1_0 - 1, s_2_0 - 1, s_3_0 + 1, s_0_0 - s_0_1, s_1_0 - s_3_1, s_2_0 -"" s_2_1, s_3_0 - s_1_1)\n\n        This means that the cocycle to represent this obstruction class in Z/2\n        takes value 1 in Z/2 on face 0 of tetrahedra 0 (because s_0_0 = -1)\n        and value 0 in Z/2 on face 1 of tetrahedra 0 (because s_1_0 = +1).\n\n        Face 3 of tetrahedra 0 and face 1 of tetrahedra 1 are identified,\n        hence the cocycle takes the same value on those two faces (s_3_0 = s_1_1).\n\n        ";
static const char __pyx_k_Returns_the_product_of_group_el[] = "\n        Returns the product of group elements i and j.  The convention\n        is that products of symmetries read right to left.  That is,\n        the composition (symmetry[i] o symmetry[j]) acts by first\n        doing symmetry[j], then symmetry[i].\n\n        >>> S = Manifold('m004').symmetry_group()\n        >>> S.multiply_elements(2, 3)\n        1\n        ";
static const char __pyx_k_Returns_the_type_of_the_current[] = "\n        Returns the type of the current solution to the gluing\n        equations, basically a summary of how degenerate the solution\n        is.  If the flag enum=True is set, then an integer value is\n        returned. The possible answers are:\n\n        - 0: 'not attempted'\n\n        - 1: 'all tetrahedra positively oriented' aka 'geometric_solution'\n          Should correspond to a genuine hyperbolic structure.\n\n        - 2: 'contains negatively oriented tetrahedra' aka 'nongeometric_solution'\n          Probably corresponds to a hyperbolic structure but some\n          simplices have reversed orientations.\n\n        - 3: 'contains flat tetrahedra' All tetrahedra have shape in R - {0, 1}.\n\n        - 4: 'contains degenerate tetrahedra' Some shapes are close to\n          {0,1, or infinity}.\n\n        - 5: 'unrecognized solution type'\n\n        - 6: 'no solution found'\n\n        >>> M = Manifold('m007')\n        >>> M.solution_type()\n        'all tetrahedra positively oriented'\n        >>> M.dehn_fill( (3,1) )\n        >>> M.solution_type()\n        'contains negatively oriented tetrahedra'\n        >>> M.dehn_fill( (3,-1) )\n        >>> M.solution_type()\n        'contains degenerate tetrahedra'\n        ";
static const char __pyx_k_Returns_the_volume_of_the_curre[] = "\n        Returns the volume of the current solution to the hyperbolic\n        gluing equations; if the solution is sufficiently non-degenerate,\n        this is the sum of the volumes of the hyperbolic pieces in\n        the geometric decomposition of the manifold.\n\n        >>> M = Manifold('m004')\n        >>> M.volume() # doctest: +NUMERIC6\n        2.02988321\n        >>> M.solution_type()\n        'all tetrahedra positively oriented'\n\n        The return value has an extra attribute, accuracy, which is the\n        number of digits of accuracy as *estimated* by SnapPea.  When\n        printing the volume, the result is rounded to 1 more than this\n        number of digits.\n\n        >>> vol, accuracy = M.volume(accuracy = True)\n        >>> accuracy in (10, 63) # Low precision, High precision\n        True\n\n        Inside SageMath, verified computation of the volume of a\n        hyperbolic manifold is also possible (this will verify first\n        that the manifold is indeed hyperbolic)::\n\n            sage: M.volume(verified=True, bits_prec=100)   #doctest: +NUMERIC24\n            2.029883212819307250042405109?\n        ";
static const char __pyx_k_Reverses_the_orientation_of_the[] = "\n        Reverses the orientation of the Triangulation, presuming that\n        it is orientable.\n\n        >>> M = Manifold('m015')\n        >>> cs = M.chern_simons()\n        >>> M.reverse_orientation()\n        >>> abs(cs + M.chern_simons()) # doctest: +NUMERIC9\n        0.0\n        ";
static const char __pyx_k_Save_the_triangulation_as_a_Sna[] = "\n        Save the triangulation as a SnapPea triangulation file.\n\n        >>> M = Triangulation('m004')\n        >>> M.save('fig-eight.tri')     #doctest: +SKIP\n\n        To retrieve a SnapPea triangulation from the saved file\n        you can do the following. The first command creates a cusped\n        manifold M. The second one creates the filled manifold M1\n        with Dehn coefficients (2,3).\n\n        >>> M = Manifold('fig-eight.tri')   #doctest: +SKIP\n        >>> M1 = Manifold('fig-eight.tri(2,3)')   #doctest: +SKIP\n\n        ";
static const char __pyx_k_Searches_for_connected_closed_n[] = "\n        Searches for connected closed normal surfaces of nonnegative Euler\n        characteristic.  If spheres or projective planes are found, then\n        tori and Klein bottles aren't reported.  There is no guarantee\n        that all such normal surfaces will be found nor that any given\n        surface is incompressible.  The search is confined to surfaces\n        whose quads are in the tetrahedra that have degenerate shapes.\n\n        You can split the manifold open along one of these surfaces\n        using the method \"split\".\n\n        A connect sum of two trefoils:\n\n        >>> M1 = Manifold('DT: fafBCAEFD')\n        >>> len(M1.splitting_surfaces())\n        2\n\n        First satellite knot in the table.\n\n        >>> M2 = Manifold('K13n4587')\n        >>> M2.splitting_surfaces()\n        [Orientable two-sided with euler = 0]\n        ";
static const char __pyx_k_Set_the_Dehn_filling_coefficien[] = "\n        Set the Dehn filling coefficients of the cusps.  This can be\n        specified in the following ways, where the cusps are numbered\n        by 0,1,...,(num_cusps - 1).\n\n        - Fill cusp 2:\n\n          >>> M = Triangulation('8^4_1')\n          >>> M.dehn_fill((2,3), 2)\n          >>> M\n          8^4_1(0,0)(0,0)(2,3)(0,0)\n\n        - Fill the last cusp:\n\n          >>> M.dehn_fill((1,5), -1)\n          >>> M\n          8^4_1(0,0)(0,0)(2,3)(1,5)\n\n        - Fill the first two cusps:\n\n          >>> M.dehn_fill( [ (3,0), (1, -4) ])\n          >>> M\n          8^4_1(3,0)(1,-4)(2,3)(1,5)\n\n        - When there is only one cusp, there's a shortcut\n\n          >>> N = Triangulation('m004')\n          >>> N.dehn_fill( (-3,4) )\n          >>> N\n          m004(-3,4)\n\n        Does not return a new Triangulation.\n        ";
static const char __pyx_k_SnapPea_kernel_style_estimation[] = "SnapPea kernel style estimation of accuracy not available for arbitrary precision/interval arithmetic.";
static const char __pyx_k_Split_the_manifold_open_along_a[] = "\n        Split the manifold open along a surface of positive characteristic found\n        by the method \"splitting_surfaces\".  Returns a list of the pieces, with any\n        sphere boundary components filled in.\n\n        Here's an example of a Whitehead double on the trefoil.\n\n        >>> M = Manifold('K14n26039')\n        >>> S = M.splitting_surfaces()[0]\n        >>> S\n        Orientable two-sided with euler = 0\n\n        >>> pieces = M.split(S); pieces\n        [K14n26039.a(0,0)(0,0), K14n26039.b(0,0)]\n        >>> pieces[0].volume() # doctest: +NUMERIC6\n        3.66386238\n        >>> pieces[1].fundamental_group().relators()\n        ['aabbb']\n\n        You can also specify a surface by its index.\n\n        >>> M = Manifold('L10n111')\n        >>> max( P.volume() for P in M.split(0) ) # doctest: +NUMERIC6\n        5.33348957\n        ";
static const char __pyx_k_Starting_the_link_editor_Select[] = "Starting the link editor.\nSelect Tools->Send to SnapPy to load the link complement.";
static const char __pyx_k_Supply_a_manifold_or_generators[] = "Supply a manifold, or generators.";
static const char __pyx_k_Supported_methods_are_low_index[] = "Supported methods are 'low_index', 'gap', 'magma' and 'snappea'";
static const char __pyx_k_SymmetryGroup___setstate_cython[] = "SymmetryGroup.__setstate_cython__";
static const char __pyx_k_SymmetryGroup_is_direct_product[] = "SymmetryGroup.is_direct_product";
static const char __pyx_k_SymmetryGroup_multiply_elements[] = "SymmetryGroup.multiply_elements";
static const char __pyx_k_Tetrahedra_data_appears_invalid[] = "Tetrahedra data appears invalid";
static const char __pyx_k_The_SnapPea_kernel_was_not_able[] = "The SnapPea kernel was not able to determine if the manifolds are isometric.";
static const char __pyx_k_The_Triangulation_must_be_empty[] = "The Triangulation must be empty.";
static const char __pyx_k_The_amount_of_data_given_is_not[] = "The amount of data given is not consistent with %d O31 or SL2C matrices.";
static const char __pyx_k_The_census_knot_s_was_not_found[] = "The census knot %s was not found.";
static const char __pyx_k_The_data_provided_does_not_give[] = "The data provided does not give a (positively oriented) basis.";
static const char __pyx_k_The_drilling_curve_requested_is[] = "The drilling curve requested is not in range(%d).";
static const char __pyx_k_The_homomorphism_image_is_not_a[] = "The homomorphism image is not a permutation group.";
static const char __pyx_k_The_permutation_list_is_invalid[] = "The permutation list is invalid.";
static const char __pyx_k_There_are_only_201_census_knots[] = "There are only 201 census knots.";
static const char __pyx_k_Triangulation_DT_code_line_1076[] = "Triangulation.DT_code (line 1076)";
static const char __pyx_k_Triangulation__covers_low_index[] = "Triangulation._covers_low_index";
static const char __pyx_k_Triangulation__from_isosig_line[] = "Triangulation._from_isosig (line 821)";
static const char __pyx_k_Triangulation__from_string_line[] = "Triangulation._from_string (line 675)";
static const char __pyx_k_Triangulation__get_cusp_indices[] = "Triangulation._get_cusp_indices_and_peripheral_curve_data";
static const char __pyx_k_Triangulation_fundamental_group[] = "Triangulation.fundamental_group";
static const char __pyx_k_Triangulation_orientation_cover[] = "Triangulation.orientation_cover";
static const char __pyx_k_Triangulation_simplify_line_473[] = "Triangulation.simplify (line 473)";
static const char __pyx_k_Try_to_simplify_the_triangulati[] = "\n        Try to simplify the triangulation by doing Pachner moves.\n\n        >>> M = Triangulation('12n123')\n        >>> M.simplify()\n\n        It does four kinds of moves that reduce the number of\n        tetrahedra:\n\n        * 3 -> 2 and 2 -> 0 Pacher moves, which eliminate one or two\n          tetrahedra respectively.\n\n        * On suitable valence-1 edges, does a 2 -> 3 and then 2 -> 0 move,\n          which removes a tetrahedron and creates a new valence-1 edge.\n\n        * When a 2-simplex has two edges of valence-4 giving rise to the\n          suspension of a pentagon, replace these 6 tetrahedra with a\n          single edge of valence 5.\n\n        It also does random 4 -> 4 moves in hopes of setting up a\n        simplfication.  The argument passes_at_fours is the number of\n        times it goes through the valence-4 edges without progress\n        before giving up.\n\n        ";
static const char __pyx_k_Used_by_pickle_dumps_from_pickl[] = "\n        Used by pickle.dumps.\n\n        >>> from pickle import loads, dumps\n        >>> from spherogram import random_link\n        >>> M = Manifold('m125')\n        >>> M == loads(dumps(M))\n        True\n        >>> M.dehn_fill((2,3),0)\n        >>> len(dumps(M)) < len(M._to_string())\n        True\n        >>> N = loads(dumps(M))\n        >>> N\n        m125(2,3)(0,0)\n        >>> M.is_isometric_to(N)\n        True\n        >>> M = Manifold('m024')\n        >>> M.is_orientable()\n        False\n        >>> N = loads(dumps(M))\n        >>> N == M\n        True\n        >>> N.volume() == M.volume()\n        True\n        >>> while True:\n        ...    M = random_link(500).exterior()\n        ...    if M.num_tetrahedra() > 256:\n        ...       break\n        ...\n        >>> M == loads(dumps(M))\n        True\n        ";
static const char __pyx_k_Used_by_the_pickle_module_to_pi[] = "\n        Used by the pickle module to pickle an Abelian Group.\n        >>> from pickle import loads, dumps\n        >>> A = AbelianGroup([[n**2 + 3 for n in range(n+3,n+10)] for n in range(7)])\n        >>> A\n        Z/8 + Z + Z + Z + Z\n        >>> A == loads(dumps(A))\n        True\n        ";
static const char __pyx_k_WARNING_Users_should_not_use_th[] = "\n        WARNING: Users should not use this function directly.  To\n        create a Triangulation or Manifold or ManifoldHP from a string\n        containing the contents of a triangulation file, simply do:\n\n        >>> M = Manifold('7_4')\n        >>> seed = M._to_string()\n        >>> N = Manifold(seed)\n        >>> N == M\n        True\n\n        Fill an empty Triangulation from a string generated by\n        _to_string.\n        ";
static const char __pyx_k_abcdefghijklmnopqrstuvwxyzZYXWV[] = "$abcdefghijklmnopqrstuvwxyzZYXWVUTSRQPONMLKJIHGFEDCBA";
static const char __pyx_k_d_finite_vertices_d_ideal_verti[] = "%d finite vertices, %d ideal vertices; %d edges; %d faces";
static const char __pyx_k_get_cusp_indices_and_peripheral[] = "_get_cusp_indices_and_peripheral_curve_data";
static const char __pyx_k_get_ptolemy_obstruction_classes[] = "get_ptolemy_obstruction_classes";
static const char __pyx_k_get_triangulation_tester_doctes[] = "\n    >>> get_triangulation_tester() # doctest: +NUMERIC6\n    L13n9331(0,0)(0,0)(0,0) 16.64369585 Z + Z + Z\n    m003(0,0) 2.02988321 Z/5 + Z\n    m004(0,0) 2.02988321 Z\n    v1205(2,3) 4.70744340 Z/40\n    x012(0,0)(0,0) 3.54972978 Z/2 + Z\n    y123(0,0) 5.02755480 Z\n    L13n9331(3,4)(2,3)(2,1) 14.60215339 Z/53\n    K7_1(0,0) 3.57388254 Z\n    6_1(0,0) 3.16396323 Z\n    5^2_1(3,4)(1,-2) 2.73300075 Z/3\n    8^3_3(0,0)(0,0)(0,0) 8.96736085 Z + Z + Z\n    4_1(0,0) 2.02988321 Z\n    12n123(0,0) 18.15036328 Z\n    16n1235(0,0) 21.29383093 Z\n    b++RL(0,0) 2.02988321 Z\n    b-+RRL(0,0) 2.40690959 Z/3 + Z\n    b+-RL(0,0) 2.02988321 Z/5 + Z\n    b--RRL(0,0) 2.40690959 Z/3 + Z\n    Braid:[1, 2, -1, -2](0,0)(0,0) 4.05976643 Z + Z\n    DT:[(8, 10, -14), (2, 6, 20), (-4, 22, 24, 12, 26, 18, 16)](0,0)(0,0)(0,0) 16.64369585 Z + Z + Z\n    DT[4,6,2](0,0) 0.0 Z\n    DT[mcccgdeGacjBklfmih](0,0)(0,0)(0,0) 16.64369585 Z + Z + Z\n    DT:mcccgdeGacjBklfmih(0,0)(0,0)(0,0) 16.64369585 Z + Z + Z\n    a0*B1(0,0) 2.02988321 Z\n    b1*A0 a0*B1(1,0) 0.0 Z/2\n    dLQbcccdxwb(0,0) 2.56897060 Z/3 + Z\n    L13n9331(0,0)(0,0)(0,0) Z + Z + Z\n    m003(0,0) Z/5 + Z\n    m004(0,0) Z\n    v1205(2,3) Z/40\n    x012(0,0)(0,0) Z/2 + Z\n    y123(0,0) Z\n    L13n9331(3,4)(2,3)(2,1) Z/53\n    K7_1(0,0) Z\n    6_1(0,0) Z\n    5^2_1(3,4)(1,-2) Z/3\n    8^3_3(0,0)(0,0)(0,0) Z + Z + Z\n    4_1(0,0) Z\n    12n123(0,0) Z\n    16n1235(0,0) Z\n    b++RL(0,0) Z\n    b-+RRL(0,0) Z/3 + Z\n    b+-RL(0,0) Z/5 + Z\n    b--RRL(0,0) Z/3 + Z\n    Braid:[1, 2, -1, -2](0,0)(0,0) Z + Z\n    DT:[(8, 10, -14), (2, 6, 20), (-4, 22, 24, 12, 26, 18, 16)](0,0)(0,0)(0,0) Z + Z + Z\n    DT[4,6,2](0,0) Z\n    DT[mcccgdeGacjBklfmih](0,0)(0,0)(0,0) Z + Z + Z\n    DT:mcccgdeGacjBklfmih(0,0)(0,0)(0,0) Z + Z + Z\n    a0*B1(0,0) Z\n    b1*A0 a0*B1(1,0) Z/2\n    dLQbcccdxwb(0,0) Z/3 + Z\n    ";
static const char __pyx_k_import_itertools_M_Manifold_L14[] = "\n        >>> import itertools\n        >>> M = Manifold('L14n62484')\n        >>> ['%.5f' % z.real() for z in M.cusp_info('shape')]\n        ['0.10384', '1.17955', '-1.89674', '0.86324']\n        >>> perms = itertools.permutations(range(4))\n        >>> for perm in perms:\n        ...     shapes = M.cusp_info('shape')\n        ...     M._reindex_cusps(perm)\n        ...     new_shapes = M.cusp_info('shape')\n        ...     for i in range(4):\n        ...         assert new_shapes[perm[i]] == shapes[i]\n        ";
static const char __pyx_k_lL_P_components_0_9_1_P_crossin[] = "[lL](?P<components>[0-9]{1})(?P<crossings>[0-9]{2})(?P<index>[0-9]+)$";
static const char __pyx_k_ptolemy_equations_action_by_dec[] = "_ptolemy_equations_action_by_decoration_change";
static const char __pyx_k_ptolemy_equations_identified_co[] = "_ptolemy_equations_identified_coordinates";
static const char __pyx_k_ptolemy_equations_identified_fa[] = "_ptolemy_equations_identified_face_classes";
static const char __pyx_k_ptolemy_generalized_obstruction[] = "ptolemy_generalized_obstruction_classes";
static const char __pyx_k_s_s_explain_columns_s_explain_r[] = "%s(\n  %s,\n  explain_columns = %s,\n  explain_rows = %s)";
static const char __pyx_k_tetrahedra_shapes_were_inserted[] = "tetrahedra shapes were inserted";
static const char __pyx_k_unsimplified_filled_triangulati[] = "_unsimplified_filled_triangulation.<locals>.genexpr";
static const char __pyx_k_A_non_existent_shape_data_type_w[] = "A non-existent shape data type was specified.";
static const char __pyx_k_AbelianGroup_elementary_divisors[] = "AbelianGroup.elementary_divisors";
static const char __pyx_k_Acceptable_cusp_types_are_all_or[] = "Acceptable cusp types are ['all', 'orientable', 'nonorientable'].";
static const char __pyx_k_All_Dehn_filling_coefficients_mu[] = "All Dehn filling coefficients must be integers";
static const char __pyx_k_An_empty_triangulation_was_gener[] = "An empty triangulation was generated.";
static const char __pyx_k_Braids_must_have_at_least_2_stra[] = "Braids must have at least 2 strands.";
static const char __pyx_k_Browser_not_imported_Tk_CyOpenGL[] = "Browser not imported; Tk, CyOpenGL or pypng is probably missing.";
static const char __pyx_k_CCuspNeighborhood___reduce_cytho[] = "CCuspNeighborhood.__reduce_cython__";
static const char __pyx_k_CCuspNeighborhood___setstate_cyt[] = "CCuspNeighborhood.__setstate_cython__";
static const char __pyx_k_CCuspNeighborhood_get_displaceme[] = "CCuspNeighborhood.get_displacement";
static const char __pyx_k_CCuspNeighborhood_original_index[] = "CCuspNeighborhood.original_index";
static const char __pyx_k_CCuspNeighborhood_set_displaceme[] = "CCuspNeighborhood.set_displacement";
static const char __pyx_k_CCuspNeighborhood_stopping_displ[] = "CCuspNeighborhood.stopping_displacement";
static const char __pyx_k_CDirichletDomain__vertex_data_li[] = "CDirichletDomain._vertex_data_list";
static const char __pyx_k_CDirichletDomain__vertex_to_inde[] = "CDirichletDomain._vertex_to_index_dict";
static const char __pyx_k_CDirichletDomain_export_stl_line[] = "CDirichletDomain.export_stl (line 666)";
static const char __pyx_k_CDirichletDomain_length_spectrum[] = "CDirichletDomain.length_spectrum_dicts";
static const char __pyx_k_CDirichletDomain_manifold_line_5[] = "CDirichletDomain.manifold (line 509)";
static const char __pyx_k_CDirichletDomain_num_finite_vert[] = "CDirichletDomain.num_finite_vertices";
static const char __pyx_k_CDirichletDomain_num_ideal_verti[] = "CDirichletDomain.num_ideal_vertices";
static const char __pyx_k_CDirichletDomain_pairing_matrice[] = "CDirichletDomain.pairing_matrices";
static const char __pyx_k_CDirichletDomain_pairing_words_l[] = "CDirichletDomain.pairing_words (line 593)";
static const char __pyx_k_CDirichletDomain_triangulation_l[] = "CDirichletDomain.triangulation (line 524)";
static const char __pyx_k_CFundamentalGroup___reduce_cytho[] = "CFundamentalGroup.__reduce_cython__";
static const char __pyx_k_CFundamentalGroup___setstate_cyt[] = "CFundamentalGroup.__setstate_cython__";
static const char __pyx_k_CFundamentalGroup_character_vari[] = "CFundamentalGroup.character_variety_vars_and_polys";
static const char __pyx_k_CFundamentalGroup_gap_string_lin[] = "CFundamentalGroup.gap_string (line 376)";
static const char __pyx_k_CFundamentalGroup_generators_lin[] = "CFundamentalGroup.generators (line 239)";
static const char __pyx_k_CFundamentalGroup_longitude_line[] = "CFundamentalGroup.longitude (line 331)";
static const char __pyx_k_CFundamentalGroup_num_generators[] = "CFundamentalGroup.num_generators";
static const char __pyx_k_CFundamentalGroup_num_original_g[] = "CFundamentalGroup.num_original_generators";
static const char __pyx_k_CFundamentalGroup_original_gener[] = "CFundamentalGroup.original_generators";
static const char __pyx_k_CFundamentalGroup_peripheral_cur[] = "CFundamentalGroup.peripheral_curves";
static const char __pyx_k_CHolonomyGroup___setstate_cython[] = "CHolonomyGroup.__setstate_cython__";
static const char __pyx_k_Can_t_get_the_list_of_isometries[] = "Can't get the list of isometries for closed manifolds";
static const char __pyx_k_Christy_census_of_s_component_li[] = "Christy census of %s-component link complements in S^3";
static const char __pyx_k_Could_not_allocate_a_crossing_ta[] = "Could not allocate a crossing table.";
static const char __pyx_k_Could_not_certify_shape_interval[] = "Could not certify shape intervals, either there are degenerate shapes or the precision must be increased.";
static const char __pyx_k_Could_not_create_the_triangulati[] = "Could not create the triangulation.";
static const char __pyx_k_Cusp_2d_s_with_Dehn_filling_coef[] = "Cusp %-2d: %s with Dehn filling coefficients (M, L) = %s";
static const char __pyx_k_Elementary_divisors_must_be_give[] = "Elementary divisors must be given as a sequence.";
static const char __pyx_k_Equations_are_available_in_log_a[] = "Equations are available in 'log' and 'rect' forms only.";
static const char __pyx_k_Failed_to_allocate_memory_for_cu[] = "Failed to allocate memory for cusps";
static const char __pyx_k_Failed_to_allocate_memory_for_te[] = "Failed to allocate memory for tets.";
static const char __pyx_k_High_precision_shapes_must_be_co[] = "High precision shapes must be computed in the fixed alignment";
static const char __pyx_k_If_there_is_more_than_one_cusp_y[] = "If there is more than one cusp you must specify which one you\nare filling, e.g. M.dehn_fill((2,3),1)";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0x59cf8a3, 0x3a22a1e, 0x3df3bb8) = (_col_support, _entries, _row_support, _units, cols, dead_columns, rows))";
static const char __pyx_k_IsToPermGroupHomomorphismByImage[] = "IsToPermGroupHomomorphismByImages";
static const char __pyx_k_Knots_in_S_3_which_appear_in_the[] = "Knots in S^3 which appear in the SnapPea Census";
static const char __pyx_k_LengthSpectrumFormatStringWithWo[] = "LengthSpectrumFormatStringWithWord";
static const char __pyx_k_Manifold__canonical_cells_are_te[] = "Manifold._canonical_cells_are_tetrahedra";
static const char __pyx_k_Manifold__canonical_retriangulat[] = "Manifold._canonical_retriangulation";
static const char __pyx_k_Manifold__choose_generators_info[] = "Manifold._choose_generators_info";
static const char __pyx_k_Manifold__cusp_cross_section_inf[] = "Manifold._cusp_cross_section_info";
static const char __pyx_k_Manifold__polish_hyperbolic_stru[] = "Manifold._polish_hyperbolic_structures";
static const char __pyx_k_Manifold_dirichlet_domain_line_3[] = "Manifold.dirichlet_domain (line 325)";
static const char __pyx_k_Manifold_filled_triangulation_li[] = "Manifold.filled_triangulation (line 391)";
static const char __pyx_k_Manifold_init_hyperbolic_structu[] = "Manifold.init_hyperbolic_structure";
static const char __pyx_k_Manifold_is_isometric_to_line_15[] = "Manifold.is_isometric_to (line 1532)";
static const char __pyx_k_Manifold_is_two_bridge_line_1616[] = "Manifold.is_two_bridge (line 1616)";
static const char __pyx_k_Manifold_length_spectrum_line_14[] = "Manifold.length_spectrum (line 1449)";
static const char __pyx_k_Manifold_must_be_pickled_with__t[] = "Manifold must be pickled with _to_string.";
static const char __pyx_k_Manifold_set_peripheral_curves_l[] = "Manifold.set_peripheral_curves (line 1269)";
static const char __pyx_k_Manifold_solution_type_line_1048[] = "Manifold.solution_type (line 1048)";
static const char __pyx_k_Manifold_splitting_surfaces_line[] = "Manifold.splitting_surfaces (line 1692)";
static const char __pyx_k_Manifold_symmetric_triangulation[] = "Manifold.symmetric_triangulation";
static const char __pyx_k_Manifold_without_hyperbolic_stru[] = "Manifold.without_hyperbolic_structure";
static const char __pyx_k_NeumannZagierTypeEquations___ini[] = "NeumannZagierTypeEquations.__init__";
static const char __pyx_k_NeumannZagierTypeEquations___rep[] = "NeumannZagierTypeEquations.__repr__";
static const char __pyx_k_NonalternatingKnotExteriors___in[] = "NonalternatingKnotExteriors.__init__";
static const char __pyx_k_Number_of_opacities_does_not_mat[] = "Number of opacities does not match.";
static const char __pyx_k_Number_of_permutations_is_not_th[] = "Number of permutations is not the same as the number of generators";
static const char __pyx_k_ObsNonorientableClosedCensus___g[] = "ObsNonorientableClosedCensus.__getitem__";
static const char __pyx_k_ObsNonorientableClosedCensus___i[] = "ObsNonorientableClosedCensus.__init__";
static const char __pyx_k_ObsNonorientableCuspedCensus___i[] = "ObsNonorientableCuspedCensus.__init__";
static const char __pyx_k_ObsNonorientableCuspedCensus_loo[] = "ObsNonorientableCuspedCensus.lookup";
static const char __pyx_k_ObsOrientableClosedCensus___geti[] = "ObsOrientableClosedCensus.__getitem__";
static const char __pyx_k_ObsOrientableClosedCensus___init[] = "ObsOrientableClosedCensus.__init__";
static const char __pyx_k_Obstruction_class_has_wrong_leng[] = "Obstruction class has wrong length";
static const char __pyx_k_Please_specify_filled_or_complet[] = "Please specify 'filled' or 'complete'.";
static const char __pyx_k_PresentationMatrix___reduce_cyth[] = "PresentationMatrix.__reduce_cython__";
static const char __pyx_k_PresentationMatrix___setstate_cy[] = "PresentationMatrix.__setstate_cython__";
static const char __pyx_k_PresentationMatrix_simplified_ma[] = "PresentationMatrix.simplified_matrix";
static const char __pyx_k_Result_is_symplectic_up_to_facto[] = "Result is symplectic (up to factors of 2)";
static const char __pyx_k_SnapPea_crashed_in_function_s_de[] = "SnapPea crashed in function %s(), defined in %s.c.";
static const char __pyx_k_SnapPea_failed_to_compute_any_pa[] = "SnapPea failed to compute any part of the symmetry group.";
static const char __pyx_k_SnapPea_failed_to_find_the_canon[] = "SnapPea failed to find the canonical triangulation.";
static const char __pyx_k_SnapPea_failed_to_read_the_censu[] = "SnapPea failed to read the census manifold.";
static const char __pyx_k_SnapPea_kernel_failed_when_compu[] = "SnapPea kernel failed when computing normal surfaces";
static const char __pyx_k_SnapPea_kernel_failed_when_split[] = "SnapPea kernel failed when splitting open along the given surface.";
static const char __pyx_k_SnapPea_only_found_d_surfaces_bu[] = "SnapPea only found %d surfaces, but you asked for surface number %s.";
static const char __pyx_k_SnapPy_has_no_data_on_links_with[] = "SnapPy has no data on links with %s components.";
static const char __pyx_k_Supported_cover_types_are_all_an[] = "Supported cover_types are 'all' and 'cyclic'.";
static const char __pyx_k_SymmetryGroup_abelian_descriptio[] = "SymmetryGroup.abelian_description";
static const char __pyx_k_SymmetryGroup_abelianization_lin[] = "SymmetryGroup.abelianization (line 236)";
static const char __pyx_k_SymmetryGroup_commutator_subgrou[] = "SymmetryGroup.commutator_subgroup";
static const char __pyx_k_SymmetryGroup_direct_product_des[] = "SymmetryGroup.direct_product_description";
static const char __pyx_k_SymmetryGroup_is_abelian_line_72[] = "SymmetryGroup.is_abelian (line 72)";
static const char __pyx_k_SymmetryGroup_is_amphicheiral_li[] = "SymmetryGroup.is_amphicheiral (line 197)";
static const char __pyx_k_SymmetryGroup_is_dihedral_line_1[] = "SymmetryGroup.is_dihedral (line 105)";
static const char __pyx_k_SymmetryGroup_is_full_group_line[] = "SymmetryGroup.is_full_group (line 30)";
static const char __pyx_k_SymmetryGroup_is_invertible_knot[] = "SymmetryGroup.is_invertible_knot";
static const char __pyx_k_SymmetryGroup_isometries_line_29[] = "SymmetryGroup.isometries (line 295)";
static const char __pyx_k_SymmetryGroup_polyhedral_descrip[] = "SymmetryGroup.polyhedral_description";
static const char __pyx_k_The_Chern_Simons_invariant_isn_t[] = "The Chern-Simons invariant isn't currently known.";
static const char __pyx_k_The_Dehn_filling_coefficients_mu[] = "The Dehn filling coefficients must be relatively prime integers.";
static const char __pyx_k_The_Dirichlet_Domain_was_compute[] = "The Dirichlet Domain was computed without include_words = True.";
static const char __pyx_k_The_Dirichlet_Domain_was_not_com[] = "The Dirichlet Domain was not computed.";
static const char __pyx_k_The_Dirichlet_construction_faile[] = "The Dirichlet construction failed.";
static const char __pyx_k_The_Dirichlet_domain_could_not_b[] = "The Dirichlet domain could not be triangulated; perhaps this is an orbifold group?";
static const char __pyx_k_The_Ford_domain_construction_fai[] = "The Ford domain construction failed.";
static const char __pyx_k_The_HoroballViewer_class_was_not[] = "The HoroballViewer class was not imported.";
static const char __pyx_k_The_Manifold_is_not_orientable_s[] = "The Manifold is not orientable, so its orientation can't be reversed.";
static const char __pyx_k_The_MorwenLinks_class_has_been_r[] = "The MorwenLinks class has been replaced by HTLinkExteriors. Please refer to the documentation for HTLinkExteriors.";
static const char __pyx_k_The_Morwen_8_tetrahedra_manifold[] = "The Morwen 8 tetrahedra manifold %s was not found.";
static const char __pyx_k_The_PolyhedronViewer_class_was_n[] = "The PolyhedronViewer class was not imported.";
static const char __pyx_k_The_SnapPea_kernel_couldn_t_comp[] = "The SnapPea kernel couldn't compute the homology presentation matrix";
static const char __pyx_k_The_Triangulation_is_already_ori[] = "The Triangulation is already orientable.";
static const char __pyx_k_The_curve_is_not_isotopic_to_a_g[] = "The curve is not isotopic to a geodesic.";
static const char __pyx_k_The_cusp_neighborhood_constructi[] = "The cusp neighborhood construction failed.";
static const char __pyx_k_The_data_given_do_not_have_the_r[] = "The data given do not have the right determinants.";
static const char __pyx_k_The_data_provided_are_invalid_fo[] = "The data provided are invalid for Klein bottle cusps.";
static const char __pyx_k_The_elementary_divisors_must_for[] = "The elementary divisors must form a divisibility chain\n";
static const char __pyx_k_The_empty_triangulation_has_no_n[] = "The empty triangulation has no name.";
static const char __pyx_k_The_full_symmetry_group_is_not_k[] = "The full symmetry group is not known.";
static const char __pyx_k_The_full_symmetry_group_not_know[] = "The full symmetry group not known.";
static const char __pyx_k_The_generator_data_does_not_star[] = "The generator data does not start with \"% Generators\"";
static const char __pyx_k_The_horoball_construction_failed[] = "The horoball construction failed.";
static const char __pyx_k_The_link_complement_s_was_not_fo[] = "The link complement %s was not found.";
static const char __pyx_k_The_manifold_file_s_was_not_foun[] = "The manifold file %s was not found.\n%s";
static const char __pyx_k_The_method_must_be_fold_or_layer[] = "The method must be 'fold' or 'layered' or 'layered_and_marked'";
static const char __pyx_k_The_number_of_fillings_specified[] = "The number of fillings specified exceeds the number of cusps.";
static const char __pyx_k_The_peripheral_data_d_d_d_d_is_n[] = "The peripheral data ((%d, %d), (%d,%d)) is not acceptable.";
static const char __pyx_k_The_peripheral_data_s_is_not_acc[] = "The peripheral data %s is not acceptable.";
static const char __pyx_k_The_specified_cusp_s_does_not_ex[] = "The specified cusp (%s) does not exist.";
static const char __pyx_k_The_specified_edge_index_s_is_in[] = "The specified edge index (%s) is invalid.";
static const char __pyx_k_The_specified_face_index_s_is_in[] = "The specified face index (%s) is invalid.";
static const char __pyx_k_The_specified_indices_to_be_fill[] = "The specified indices to be filled are beyond the actual number of cusps.";
static const char __pyx_k_The_specified_tetrahedron_s_does[] = "The specified tetrahedron (%s) does not exist.";
static const char __pyx_k_The_symmetry_group_has_only_d_el[] = "The symmetry group has only %d elements.";
static const char __pyx_k_The_symmetry_group_is_not_a_nont[] = "The symmetry group is not a nontrivial, nonabelian direct product.";
static const char __pyx_k_The_symmetry_group_is_not_abelia[] = "The symmetry group is not abelian.";
static const char __pyx_k_The_symmetry_group_is_not_polyhe[] = "The symmetry group is not polyhedral.";
static const char __pyx_k_The_triangulation_construction_f[] = "The triangulation construction failed.";
static const char __pyx_k_The_word_contains_a_non_generato[] = "The word contains a non-generator.";
static const char __pyx_k_This_census_does_not_support_man[] = "This census does not support manifold lookup";
static const char __pyx_k_To_permanently_fill_a_cusp_the_D[] = "To permanently fill a cusp, the Dehn filling coefficients must be relatively prime integers.";
static const char __pyx_k_Triangulation___reduce___line_86[] = "Triangulation.__reduce__ (line 862)";
static const char __pyx_k_Triangulation__from_bytes_line_7[] = "Triangulation._from_bytes (line 737)";
static const char __pyx_k_Triangulation__from_tetrahedra_g[] = "Triangulation._from_tetrahedra_gluing_data";
static const char __pyx_k_Triangulation__get_from_link_dat[] = "Triangulation._get_from_link_data";
static const char __pyx_k_Triangulation__get_tetrahedra_gl[] = "Triangulation._get_tetrahedra_gluing_data";
static const char __pyx_k_Triangulation__marked_tetrahedra[] = "Triangulation._marked_tetrahedra";
static const char __pyx_k_Triangulation__num_fake_cusps_li[] = "Triangulation._num_fake_cusps (line 382)";
static const char __pyx_k_Triangulation__polish_hyperbolic[] = "Triangulation._polish_hyperbolic_structures";
static const char __pyx_k_Triangulation__presentation_matr[] = "Triangulation._presentation_matrix";
static const char __pyx_k_Triangulation__ptolemy_equations[] = "Triangulation._ptolemy_equations_identified_face_classes";
static const char __pyx_k_Triangulation__reindex_cusps_lin[] = "Triangulation._reindex_cusps (line 906)";
static const char __pyx_k_Triangulation__remove_finite_ver[] = "Triangulation._remove_finite_vertices";
static const char __pyx_k_Triangulation__to_bytes_line_699[] = "Triangulation._to_bytes (line 699)";
static const char __pyx_k_Triangulation__to_string_line_65[] = "Triangulation._to_string (line 653)";
static const char __pyx_k_Triangulation__unsimplified_fill[] = "Triangulation._unsimplified_filled_triangulation";
static const char __pyx_k_Triangulation_contains_cusps_onl[] = "Triangulation contains {} cusps, only accepts triangulations with 1 cusp";
static const char __pyx_k_Triangulation_cusp_info_line_119[] = "Triangulation.cusp_info (line 1198)";
static const char __pyx_k_Triangulation_dehn_fill_line_112[] = "Triangulation.dehn_fill (line 1128)";
static const char __pyx_k_Triangulation_edge_valences_line[] = "Triangulation.edge_valences (line 1403)";
static const char __pyx_k_Triangulation_filled_triangulati[] = "Triangulation.filled_triangulation";
static const char __pyx_k_Triangulation_gluing_equations_l[] = "Triangulation.gluing_equations (line 2075)";
static const char __pyx_k_Triangulation_gluing_equations_p[] = "Triangulation.gluing_equations_pgl";
static const char __pyx_k_Triangulation_has_finite_vertice[] = "Triangulation.has_finite_vertices";
static const char __pyx_k_Triangulation_homology_line_2278[] = "Triangulation.homology (line 2278)";
static const char __pyx_k_Triangulation_is_orientable_line[] = "Triangulation.is_orientable (line 427)";
static const char __pyx_k_Triangulation_isomorphisms_to_li[] = "Triangulation.isomorphisms_to (line 969)";
static const char __pyx_k_Triangulation_num_cusps_line_363[] = "Triangulation.num_cusps (line 363)";
static const char __pyx_k_Triangulation_num_tetrahedra_lin[] = "Triangulation.num_tetrahedra (line 1116)";
static const char __pyx_k_Triangulation_ptolemy_generalize[] = "Triangulation.ptolemy_generalized_obstruction_classes";
static const char __pyx_k_Triangulation_ptolemy_obstructio[] = "Triangulation.ptolemy_obstruction_classes";
static const char __pyx_k_Triangulation_ptolemy_variety_li[] = "Triangulation.ptolemy_variety (line 1890)";
static const char __pyx_k_Triangulation_randomize_line_459[] = "Triangulation.randomize (line 459)";
static const char __pyx_k_Triangulation_reverse_orientatio[] = "Triangulation.reverse_orientation";
static const char __pyx_k_Triangulation_set_name_line_1061[] = "Triangulation.set_name (line 1061)";
static const char __pyx_k_Triangulation_set_peripheral_cur[] = "Triangulation.set_peripheral_curves";
static const char __pyx_k_Triangulation_symplectic_basis_l[] = "Triangulation.symplectic_basis (line 3057)";
static const char __pyx_k_Triangulation_triangulation_isos[] = "Triangulation.triangulation_isosig";
static const char __pyx_k_Triangulation_with_hyperbolic_st[] = "Triangulation.with_hyperbolic_structure";
static const char __pyx_k_Verified_and_arbitrary_precision[] = "Verified and arbitrary precision computation of cusp_info only implemented for cusp shapes. Pass 'shape' as first argument to cusp_info().";
static const char __pyx_k_Warning_Result_is_not_symplectic[] = "Warning: Result is not symplectic";
static const char __pyx_k_Words_must_be_represented_as_Pyt[] = "Words must be represented as Python strings.";
static const char __pyx_k_You_have_specified_a_Hoste_Thist[] = "You have specified a Hoste-Thistlethwaite knot with an \ninappropriate index or number of crossings.";
static const char __pyx_k_You_must_apply_fillings_to_all_o[] = "You must apply 'fillings' to all of the cusps.";
static const char __pyx_k_You_must_apply_shortest_to_all_o[] = "You must apply 'shortest' to all of the cusps.";
static const char __pyx_k_You_provided_filling_data_for_to[] = "You provided filling data for too many cusps.  There are only %s.";
static const char __pyx_k_You_provided_more_peripheral_dat[] = "You provided more peripheral data than there are cusps.";
static const char __pyx_k_You_tried_to_create_an_empty_Sym[] = "You tried to create an *empty* SymmetryGroup.";
static const char __pyx_k_all_tetrahedra_positively_orient[] = "all tetrahedra positively oriented";
static const char __pyx_k_character_variety_vars_and_polys[] = "character_variety_vars_and_polys";
static const char __pyx_k_contains_negatively_oriented_tet[] = "contains negatively oriented tetrahedra";
static const char __pyx_k_cython_core_cusp_neighborhoods_p[] = "cython/core/cusp_neighborhoods.pyx";
static const char __pyx_k_cython_core_fundamental_group_py[] = "cython/core/fundamental_group.pyx";
static const char __pyx_k_get_generalized_ptolemy_obstruct[] = "get_generalized_ptolemy_obstruction_classes";
static const char __pyx_k_get_triangulation_tester_line_11[] = "get_triangulation_tester (line 117)";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_ptolemy_equations_boundary_map_2[] = "_ptolemy_equations_boundary_map_2";
static const char __pyx_k_ptolemy_equations_boundary_map_3[] = "_ptolemy_equations_boundary_map_1";
static const char __pyx_k_sage_groups_perm_gps_permgroup_e[] = "sage.groups.perm_gps.permgroup_element";
static const char __pyx_k_the_gap_method_for_covers_requir[] = "the \"gap\" method for covers requires Sage";
static const char __pyx_k_the_magma_method_for_covers_requ[] = "the \"magma\" method for covers requires Sage";
static const char __pyx_k_A_FundamentalGroup_represents_a_2[] = "\n    A FundamentalGroup represents a presentation of the fundamental\n    group of a SnapPea Triangulation.  Group elements are described as\n    words in the generators a,b,..., where the inverse of a is denoted\n    A.  Words are represented by python strings (and the concatenation\n    operator is named '+', according to Python conventions).\n\n    Instantiate via ``T.fundamental_group()``, where T is a triangulation:\n\n    >>> T = Triangulation('m125')\n    >>> T.fundamental_group()\n    Generators:\n       a,b\n    Relators:\n       aabaBBAABAbb\n    >>> type(T.fundamental_group()) #doctest: +SKIP\n    <class 'SnapPy.FundamentalGroup'>\n\n    A HolonomyGroup is a FundamentalGroup with added structure\n    consisting of a holonomy representation into O(3,1), and an\n    arbitrarily chosen lift of the holonomy representation to SL(2,C).\n    The holonomy is determined by the shapes of the tetrahedra, so a\n    HolonomyGroup is associated to a Manifold, while a Triangulation\n    only has a FundamentalGroup:\n\n    Instantiate via ``M.fundamental_group()``, where M is a Manifold:\n\n    >>> M = Manifold('m125')\n    >>> G = M.fundamental_group()\n    >>> G\n    Generators:\n       a,b\n    Relators:\n       aabaBBAABAbb\n    >>> type(G) #doctest: +SKIP\n    <class 'SnapPy.HolonomyGroup'>\n\n    In the class HolonomyGroup, methods are provided to evaluate the\n    representations on a group element. Other methods are shared\n    with the FundamentalGroup class.\n\n    >>> G.O31('a') # doctest: +NUMERIC12\n    [    2.50000000000000   -0.500000000000000    -2.12132034355964   -0.707106781186547]\n    [   0.500000000000002   -0.500000000000001   -0.707106781186549    0.707106781186547]\n    [  -0.707106781186548   -0.707106781186547     1.00000000000000                    0]\n    [    2.12132034355964   -0.707106781186548    -2.00000000000000    -1.00000000000000]\n    >>> G.SL2C('aaB') # doctest: +NUMERIC12\n    [-1.00000000000000 + 4.00000000000000*I 2.12132034355""964 - 0.707106781186545*I]\n    [2.12132034355964 - 0.707106781186549*I -1.00000000000000 - 1.00000000000000*I]\n    >>> G.complex_length('ab') # doctest: +NUMERIC12\n    1.06127506190504 - 2.23703575928741*I\n    ";
static const char __pyx_k_Base_class_for_Iterators_Sequen_2[] = "\n    Base class for Iterators/Sequences for knots from the\n    Hoste-Thistlethwaite tables.\n    ";
static const char __pyx_k_CFundamentalGroup_generators_in_2[] = "CFundamentalGroup.generators_in_originals (line 177)";
static const char __pyx_k_M_covers_degree_method_None_cov_2[] = "\n        M.covers(degree, method=None, cover_type='all')\n\n        Returns a list of Manifolds corresponding to all of the\n        finite covers of the given degree.  The default method is\n        'low_index' for general covers and 'snappea' for cyclic\n        covers.  The former uses Sim's algorithm while the latter\n        uses the original Snappea algorithm.\n\n        WARNING: If the degree is large this might take a very, very,\n        very long time.\n\n        >>> M = Manifold('m003')\n        >>> covers = M.covers(4)\n        >>> sorted(N.homology() for N in covers)\n        [Z/3 + Z/15 + Z, Z/5 + Z + Z]\n\n        It is faster to look just at cyclic covers.\n\n        >>> covers = M.covers(4, cover_type='cyclic')\n        >>> [(N, N.homology()) for N in covers]\n        [(m003~cyc~0(0,0), Z/3 + Z/15 + Z)]\n\n        Here we check that we get the same number of covers with the\n        'snappea' and 'low_index' methods.\n\n        >>> M = Manifold('m125')\n        >>> len(M.covers(5))\n        19\n        >>> len(M.covers(5, method='snappea'))\n        19\n\n        If you are using Sage, you can use GAP to find the subgroups,\n        which is often much faster, by specifying the optional\n        argument method = 'gap' If you have Magma installed, you can\n        used it to do the heavy lifting by specifying method='magma'.\n        ";
static const char __pyx_k_Return_whether_the_symmetry_gro_2[] = "\n        Return whether the symmetry group is dihedral.\n\n        >>> S = Manifold('m004').symmetry_group()\n        >>> S.is_dihedral()\n        True\n        ";
static const char __pyx_k_Returns_True_if_and_only_if_the_2[] = "\n        Returns True if and only if the canonical\n        cell decomposition is a triangulation.\n\n        >>> Manifold('K4a1')._canonical_cells_are_tetrahedra()\n        True\n        >>> Manifold('L6a4')._canonical_cells_are_tetrahedra()\n        False\n        ";
static const char __pyx_k_Returns_a_word_representing_a_c_2[] = "\n        Returns a word representing a conjugate of the current\n        longitude for the given cusp.  Guaranteed to commute with the\n        meridian for the same cusp.  Note: for Klein bottle cusps,\n        the longitude must be defined carefully.\n\n        >>> G = Manifold('m004').fundamental_group()\n        >>> G.longitude(0)\n        'aBAbABab'\n        >>> G.longitude()   # shortcut for the above.\n        'aBAbABab'\n        ";
static const char __pyx_k_Returns_an_info_object_containi_2[] = "\n        Returns an info object containing information about the given\n        cusp.   Usage:\n\n        >>> M = Manifold('v3227(0,0)(1,2)(3,2)')\n        >>> M.cusp_info(1)\n        Cusp 1 : torus cusp with Dehn filling coefficients (M, L) = (1.0, 2.0)\n\n        To get more detailed information about the cusp, we do\n\n        >>> c = M.cusp_info(0)\n        >>> c.shape # doctest: +NUMERIC6\n        0.11044502 + 0.94677098*I\n        >>> c.modulus# doctest: +NUMERIC6\n        -0.12155872 + 1.04204128*I\n        >>> sorted(c.keys())\n        ['filling', 'holonomies', 'holonomy_accuracy', 'index', 'is_complete', 'modulus', 'shape', 'shape_accuracy', 'topology']\n\n        Here 'shape' is the shape of the cusp, i.e.\n        (longitude/meridian)\n        and 'modulus' is its shape in the geometrically preferred\n        basis, i.e.\n        ( (second shortest translation)/(shortest translation)).\n        For cusps that are filled, one instead cares about the\n        holonomies:\n\n        >>> M.cusp_info(-1)['holonomies'] # doctest: +NUMERIC6\n        (-0.59883089 + 1.09812548*I, 0.89824633 + 1.49440443*I)\n\n        The complex numbers returned for the shape and for the two\n        holonomies have an extra attribute, accuracy, which is\n        SnapPea's *estimate* of their accuracy.\n\n        You can also get information about multiple cusps at once:\n\n        >>> M.cusp_info() # doctest: +NUMERIC6\n        [Cusp 0 : complete torus cusp of shape 0.11044502 + 0.94677098*I,\n         Cusp 1 : torus cusp with Dehn filling coefficients (M, L) = (1.0, 2.0),\n         Cusp 2 : torus cusp with Dehn filling coefficients (M, L) = (3.0, 2.0)]\n        >>> M.cusp_info('is_complete')\n        [True, False, False]\n\n        The cusp shapes can be verified::\n\n            sage: M = Manifold('m292')\n            sage: M.cusp_info('shape', verified = True, bits_prec = 60) # doctest: +NUMERIC12\n            [-0.1766049820997? + 1.2028208192855?*I,\n             -0.17660498""20997? + 1.2028208192855?*I]\n\n        ";
static const char __pyx_k_Set_the_Dehn_filling_coefficien_2[] = "\n        Set the Dehn filling coefficients of the cusps.  This can be\n        specified in the following ways, where the cusps are numbered\n        by 0,1,...,(num_cusps - 1).\n\n        - Fill cusp 2:\n\n          >>> M = Manifold('8^4_1')\n          >>> M.dehn_fill((2,3), 2)\n          >>> M\n          8^4_1(0,0)(0,0)(2,3)(0,0)\n\n        - Fill the last cusp:\n\n          >>> M.dehn_fill((1,5), -1)\n          >>> M\n          8^4_1(0,0)(0,0)(2,3)(1,5)\n\n        - Fill the first two cusps:\n\n          >>> M.dehn_fill( [ (3,0), (1, -4) ])\n          >>> M\n          8^4_1(3,0)(1,-4)(2,3)(1,5)\n\n        - When there is only one cusp, there's a shortcut\n\n          >>> N = Manifold('m004')\n          >>> N.dehn_fill( (-3,4) )\n          >>> N\n          m004(-3,4)\n\n        Does not return a new Manifold.\n        ";
static const char __pyx_k_SymmetryGroup_is_direct_product_2[] = "SymmetryGroup.is_direct_product (line 156)";
static const char __pyx_k_SymmetryGroup_multiply_elements_2[] = "SymmetryGroup.multiply_elements (line 276)";
static const char __pyx_k_The_data_provided_does_not_give_2[] = "The data provided does not give a basis.";
static const char __pyx_k_Triangulation_fundamental_group_2[] = "Triangulation.fundamental_group (line 2313)";
static const char __pyx_k_Triangulation_orientation_cover_2[] = "Triangulation.orientation_cover (line 398)";
static const char __pyx_k_WARNING_Users_should_not_use_th_2[] = "\n        WARNING: Users should not use this function directly.  To\n        create a Triangulation or Manifold or ManifoldHP from an isosig,\n        simply do:\n\n        >>> M = Manifold('empty')\n        >>> M._from_isosig('jLAwLMQbcbdghgiiixxnxhhxkwv')\n        >>> N = Manifold('o9_10894')\n        >>> M == N\n        True\n\n        Fill an empty Triangulation from an isosig generated by\n        triangulation_isosig.\n        ";
static const char __pyx_k_WARNING_Users_should_not_use_th_3[] = "\n        WARNING: Users should not use this function directly.  To create a\n        Manifold or ManifoldHP from a string containing the contents\n        of a triangulation file, simply do:\n\n        >>> M = Manifold('7_4')\n        >>> seed = M._to_string()\n        >>> N = Manifold(seed)\n        >>> N.volume() # doctest: +NUMERIC6\n        5.13794120\n        ";
static const char __pyx_k_unsimplified_filled_triangulati_2[] = "_unsimplified_filled_triangulation";
static const char __pyx_k_CDirichletDomain_length_spectrum_2[] = "CDirichletDomain.length_spectrum_dicts (line 236)";
static const char __pyx_k_CDirichletDomain_pairing_matrice_2[] = "CDirichletDomain.pairing_matrices (line 564)";
static const char __pyx_k_CFundamentalGroup_character_vari_2[] = "CFundamentalGroup.character_variety_vars_and_polys (line 420)";
static const char __pyx_k_CFundamentalGroup_original_gener_2[] = "CFundamentalGroup.original_generators (line 152)";
static const char __pyx_k_CFundamentalGroup_peripheral_cur_2[] = "CFundamentalGroup.peripheral_curves (line 357)";
static const char __pyx_k_Manifold__canonical_cells_are_te_2[] = "Manifold._canonical_cells_are_tetrahedra (line 238)";
static const char __pyx_k_Manifold__canonical_retriangulat_2[] = "Manifold._canonical_retriangulation (line 167)";
static const char __pyx_k_Manifold_symmetric_triangulation_2[] = "Manifold.symmetric_triangulation (line 514)";
static const char __pyx_k_Manifold_without_hyperbolic_stru_2[] = "Manifold.without_hyperbolic_structure (line 848)";
static const char __pyx_k_SnapPea_kernel_failed_when_compu_2[] = "SnapPea kernel failed when computing normal surfaces.";
static const char __pyx_k_SymmetryGroup_abelian_descriptio_2[] = "SymmetryGroup.abelian_description (line 84)";
static const char __pyx_k_SymmetryGroup_commutator_subgrou_2[] = "SymmetryGroup.commutator_subgroup (line 218)";
static const char __pyx_k_SymmetryGroup_direct_product_des_2[] = "SymmetryGroup.direct_product_description (line 169)";
static const char __pyx_k_SymmetryGroup_is_invertible_knot_2[] = "SymmetryGroup.is_invertible_knot (line 207)";
static const char __pyx_k_Triangulation__from_tetrahedra_g_2[] = "Triangulation._from_tetrahedra_gluing_data (line 767)";
static const char __pyx_k_Triangulation__ptolemy_equations_2[] = "Triangulation._ptolemy_equations_identified_coordinates";
static const char __pyx_k_Triangulation__ptolemy_equations_3[] = "Triangulation._ptolemy_equations_action_by_decoration_change";
static const char __pyx_k_Triangulation__ptolemy_equations_4[] = "Triangulation._ptolemy_equations_boundary_map_3";
static const char __pyx_k_Triangulation__ptolemy_equations_5[] = "Triangulation._ptolemy_equations_boundary_map_2";
static const char __pyx_k_Triangulation__ptolemy_equations_6[] = "Triangulation._ptolemy_equations_boundary_map_1";
static const char __pyx_k_Triangulation__remove_finite_ver_2[] = "Triangulation._remove_finite_vertices (line 290)";
static const char __pyx_k_Triangulation__unsimplified_fill_2[] = "Triangulation._unsimplified_filled_triangulation (line 1320)";
static const char __pyx_k_Triangulation_filled_triangulati_2[] = "Triangulation.filled_triangulation (line 1271)";
static const char __pyx_k_Triangulation_gluing_equations_p_2[] = "Triangulation.gluing_equations_pgl (line 1424)";
static const char __pyx_k_Triangulation_has_finite_vertice_2[] = "Triangulation.has_finite_vertices (line 2862)";
static const char __pyx_k_Triangulation_ptolemy_generalize_2[] = "Triangulation.ptolemy_generalized_obstruction_classes (line 1823)";
static const char __pyx_k_Triangulation_ptolemy_obstructio_2[] = "Triangulation.ptolemy_obstruction_classes (line 1761)";
static const char __pyx_k_Triangulation_reverse_orientatio_2[] = "Triangulation.reverse_orientation (line 1254)";
static const char __pyx_k_Triangulation_triangulation_isos_2[] = "Triangulation.triangulation_isosig (line 2889)";
static const char __pyx_k_Triangulation_with_hyperbolic_st_2[] = "Triangulation.with_hyperbolic_structure (line 590)";
/* #### Code section: decls ### */
static PyObject *__pyx_pf_6SnapPy_is_GapElement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_elt); /* proto */
static PyObject *__pyx_pf_6SnapPy_2is_MagmaElement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_elt); /* proto */
static PyObject *__pyx_pf_6SnapPy_4valid_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_i, PyObject *__pyx_v_n, PyObject *__pyx_v_format_str); /* proto */
static PyObject *__pyx_pf_6SnapPy_5MsgIO___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_6to_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_6SnapPy_8bytearray_to_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_6SnapPy_10to_byte_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_6SnapPy_12set_test_flag(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_6SnapPy_14SnapPea_interrupt(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16cy_eval(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
static PyObject *__pyx_pf_6SnapPy_18smith_form(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_M); /* proto */
static PyObject *__pyx_pf_6SnapPy_20check_SnapPea_memory(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_22set_rand_seed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seed); /* proto */
static PyObject *__pyx_pf_6SnapPy_22MatrixWithExplanations___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mat, PyObject *__pyx_v_explain_rows, PyObject *__pyx_v_explain_columns); /* proto */
static PyObject *__pyx_pf_6SnapPy_22MatrixWithExplanations_8__repr___format_explain_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_l); /* proto */
static PyObject *__pyx_pf_6SnapPy_22MatrixWithExplanations_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v__type_str); /* proto */
static PyObject *__pyx_pf_6SnapPy_26NeumannZagierTypeEquations___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mat, PyObject *__pyx_v_explain_rows, PyObject *__pyx_v_explain_columns); /* proto */
static PyObject *__pyx_pf_6SnapPy_26NeumannZagierTypeEquations_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_4Info___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_6SnapPy_4Info_2_immutable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_6SnapPy_4Info_4keys(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_8CuspInfo___repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13DualCurveInfo___repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_14_StrLongestLen_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
static PyObject *__pyx_pf_6SnapPy_24_StrLongestLen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_l); /* proto */
static PyObject *__pyx_pf_6SnapPy_18LengthSpectrumInfo___repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_9ShapeInfo___repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17NormalSurfaceInfo___repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_14LengthSpectrum___repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_14ListOnePerLine___repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_26format_two_by_two(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mat); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Isometry___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cusp_images, PyObject *__pyx_v_cusp_maps, PyObject *__pyx_v_extends_to_link); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Isometry_2cusp_images(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Isometry_4cusp_maps(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Isometry_6extends_to_link(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Isometry_8num_cusps(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Isometry_10__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_28_plink_callback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_LE); /* proto */
static PyObject *__pyx_pf_6SnapPy_30Manifold_from_Triangulation(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_T, PyObject *__pyx_v_recompute, PyObject *__pyx_v_manifold_class); /* proto */
static PyObject *__pyx_pf_6SnapPy_32Triangulation_from_Manifold(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_6SnapPy_Manifold *__pyx_v_M); /* proto */
static int __pyx_pf_6SnapPy_13Triangulation___cinit__(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_spec, PyObject *__pyx_v_remove_finite_vertices); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_2_get_from_link_data(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_remove_finite_vertices); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_4_remove_finite_vertices(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_6cover_info(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_8plink(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_10link(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_12num_cusps(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_cusp_type); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_14_num_fake_cusps(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_16orientation_cover(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_18is_orientable(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_20copy(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_22randomize(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_blowup_multiple, PyObject *__pyx_v_passes_at_fours); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_24simplify(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_passes_at_fours); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_26_two_to_three(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_tet_num, PyObject *__pyx_v_face_index); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_28_three_to_two(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_tet_num, PyObject *__pyx_v_edge_index); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_30with_hyperbolic_structure(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_32_polish_hyperbolic_structures(CYTHON_UNUSED struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_34_empty_save(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_36save(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_file_name); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_38_to_string(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_40_from_string(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_string, PyObject *__pyx_v_remove_finite_vertices); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_42_to_bytes(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_44_from_bytes(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_bytestring, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_46_from_pickle(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_bytestring, PyObject *__pyx_v_remove_finite_vertices); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_48_from_tetrahedra_gluing_data(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_tetrahedra_data, PyObject *__pyx_v_num_or_cusps, PyObject *__pyx_v_num_nonor_cusps, PyObject *__pyx_v_cusp_indices, PyObject *__pyx_v_peripheral_curves, PyObject *__pyx_v_remove_finite_vertices); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_50_from_isosig(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_isosig, PyObject *__pyx_v_remove_finite_vertices); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_52__reduce__(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_54pickle(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_56_reindex_cusps(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_permutation); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_58_get_cusp_indices_and_peripheral_curve_data(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_60_get_tetrahedra_gluing_data(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_62isomorphisms_to(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_other); /* proto */
static void __pyx_pf_6SnapPy_13Triangulation_64__dealloc__(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_66__richcmp__(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_other, PyObject *__pyx_v_op); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_68__repr__(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_70name(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_72set_name(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_new_name); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_74DT_code(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_alpha, PyObject *__pyx_v_flips); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_76_set_DTcode(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_code, PyObject *__pyx_v_lazy); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_78_set_PDcode(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_code); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_80num_tetrahedra(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_82dehn_fill(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_filling_data, PyObject *__pyx_v_which_cusp); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_84cusp_info(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_data_spec); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_86reverse_orientation(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_88filled_triangulation(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_cusps_to_fill); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_34_unsimplified_filled_triangulation_genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_90_unsimplified_filled_triangulation(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_method); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_92_marked_tetrahedra(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_clear_marks); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_94edge_valences(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_96gluing_equations_pgl(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_N, PyObject *__pyx_v_equation_type); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_98_ptolemy_equations_identified_face_classes(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_100_ptolemy_equations_identified_coordinates(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_N, PyObject *__pyx_v_obstruction_class); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_102_ptolemy_equations_action_by_decoration_change(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, int __pyx_v_N); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_104_ptolemy_equations_boundary_map_3(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_106_ptolemy_equations_boundary_map_2(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_108_ptolemy_equations_boundary_map_1(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_110ptolemy_obstruction_classes(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_112ptolemy_generalized_obstruction_classes(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_N); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_114ptolemy_variety(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_N, PyObject *__pyx_v_obstruction_class, PyObject *__pyx_v_simplify, PyObject *__pyx_v_eliminate_fixed_ptolemys); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_116gluing_equations(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_form); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_118_presentation_matrix(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_120homology(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_122fundamental_group(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_simplify_presentation, PyObject *__pyx_v_fillings_may_affect_generators, PyObject *__pyx_v_minimize_number_of_generators, PyObject *__pyx_v_try_hard_to_shorten_relators); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_5cover_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_124cover(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_permutation_rep); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_126covers(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_degree, PyObject *__pyx_v_method, PyObject *__pyx_v_cover_type); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_17_covers_low_index_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_subgroup); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_128_covers_low_index(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_degree, PyObject *__pyx_v_num_threads); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_130_covers_gap(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_degree); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_132_covers_magma(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_degree); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_134_covers_snappea(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_degree, PyObject *__pyx_v_cover_type); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_136set_peripheral_curves(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_peripheral_data, PyObject *__pyx_v_which_cusp, PyObject *__pyx_v_return_matrices); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_138has_finite_vertices(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_140triangulation_isosig(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_decorated, PyObject *__pyx_v_ignore_cusp_ordering, PyObject *__pyx_v_ignore_curve_orientations, PyObject *__pyx_v_ignore_orientation); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_142_symplectic_form(CYTHON_UNUSED struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_u, PyObject *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_144_is_symplectic(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_M); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_146symplectic_basis(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_verify); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_6_cache___get__(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13Triangulation_2LE___get__(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self); /* proto */
static int __pyx_pf_6SnapPy_8Manifold___init__(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_spec); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_2_number_(PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_4use_field_conversion(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_func); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_6init_hyperbolic_structure(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_force_recompute); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_8canonize(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_10_canonical_retriangulation(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_opacities); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_12_canonical_cells_are_tetrahedra(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_14_from_string(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_string, PyObject *__pyx_v_initialize_structure); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_16_from_bytes(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_bytestring, PyObject *__pyx_v_initialize_structure); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_18_from_isosig(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_isosig, PyObject *__pyx_v_initialize_structure); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_20copy(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_22cusp_neighborhood(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_24dirichlet_domain(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_vertex_epsilon, PyObject *__pyx_v_displacement, PyObject *__pyx_v_centroid_at_origin, PyObject *__pyx_v_maximize_injectivity_radius, PyObject *__pyx_v_include_words); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_26browse(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_28filled_triangulation(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_cusps_to_fill); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_30fundamental_group(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_simplify_presentation, PyObject *__pyx_v_fillings_may_affect_generators, PyObject *__pyx_v_minimize_number_of_generators, PyObject *__pyx_v_try_hard_to_shorten_relators); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_32symmetry_group(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_of_link); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_34symmetric_triangulation(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_36cover(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_permutation_rep); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_38covers(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_degree, PyObject *__pyx_v_method, PyObject *__pyx_v_cover_type); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_40_complex_volume(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_42volume(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_accuracy, PyObject *__pyx_v_verified, PyObject *__pyx_v_bits_prec); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_44chern_simons(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_accuracy); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_46without_hyperbolic_structure(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_48_polish_hyperbolic_structures(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_50tetrahedra_shapes(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_part, PyObject *__pyx_v_fixed_alignment, PyObject *__pyx_v_bits_prec, PyObject *__pyx_v_dec_prec, PyObject *__pyx_v_intervals); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_52_get_tetrahedra_shapes(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_which_solution); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_54set_tetrahedra_shapes(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_filled_shapes, PyObject *__pyx_v_complete_shapes, PyObject *__pyx_v_fillings); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_56solution_type(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_enum); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_58set_target_holonomy(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_target, PyObject *__pyx_v_which_cusp, PyObject *__pyx_v_recompute); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_60cusp_info(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_data_spec, PyObject *__pyx_v_verified, PyObject *__pyx_v_bits_prec); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_62dehn_fill(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_filling_data, PyObject *__pyx_v_which_cusp); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_64set_peripheral_curves(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_peripheral_data, PyObject *__pyx_v_which_cusp, PyObject *__pyx_v_return_matrices); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_66dual_curves(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_max_segments); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_68length_spectrum(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_cutoff, PyObject *__pyx_v_full_rigor, PyObject *__pyx_v_grouped, PyObject *__pyx_v_include_words); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_70drill(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_which_curve, PyObject *__pyx_v_max_segments); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_72is_isometric_to(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, struct __pyx_obj_6SnapPy_Manifold *__pyx_v_other, PyObject *__pyx_v_return_isometries); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_74is_two_bridge(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_76_choose_generators(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_compute_corners, PyObject *__pyx_v_centroid_at_origin); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_78_choose_generators_info(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_80splitting_surfaces(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_82split(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_which_surface); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_84_identify(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_extends_to_link); /* proto */
static PyObject *__pyx_pf_6SnapPy_8Manifold_86_cusp_cross_section_info(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self); /* proto */
static int __pyx_pf_6SnapPy_12AbelianGroup___init__(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self, PyObject *__pyx_v_presentation, PyObject *__pyx_v_elementary_divisors); /* proto */
static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_2__repr__(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_6SnapPy_12AbelianGroup_4__len__(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_6__getitem__(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_8__reduce__(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_10__richcmp__(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self, struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_other, PyObject *__pyx_v_op); /* proto */
static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_12__call__(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_14elementary_divisors(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_16rank(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_18betti_number(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_20order(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_12coefficients___get__(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self); /* proto */
static int __pyx_pf_6SnapPy_12AbelianGroup_12coefficients_2__set__(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_6SnapPy_12AbelianGroup_12coefficients_4__del__(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self); /* proto */
static int __pyx_pf_6SnapPy_18PresentationMatrix___init__(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self, PyObject *__pyx_v_rows, PyObject *__pyx_v_cols); /* proto */
static PyObject *__pyx_pf_6SnapPy_18PresentationMatrix_2get_data(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self); /* proto */
static int __pyx_pf_6SnapPy_18PresentationMatrix_4__setitem__(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self, PyObject *__pyx_v_ij, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_6SnapPy_18PresentationMatrix_6__getitem__(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self, PyObject *__pyx_v_ij); /* proto */
static PyObject *__pyx_pf_6SnapPy_18PresentationMatrix_8__repr__(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_18PresentationMatrix_10add_rows(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_6SnapPy_18PresentationMatrix_12row_op(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, PyObject *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_6SnapPy_18PresentationMatrix_14explode(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_18PresentationMatrix_16simplify(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_18PresentationMatrix_18simplified_matrix(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_18PresentationMatrix_20__reduce_cython__(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_18PresentationMatrix_22__setstate_cython__(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6SnapPy_34inverse_list_word(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_word); /* proto */
static PyObject *__pyx_pf_6SnapPy_36reduce_list_word(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_word); /* proto */
static PyObject *__pyx_pf_6SnapPy_38_letter_seperator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_verbose_form); /* proto */
static PyObject *__pyx_pf_6SnapPy_40word_as_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_word, int __pyx_v_num_generators); /* proto */
static PyObject *__pyx_pf_6SnapPy_12list_as_word_genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
static PyObject *__pyx_pf_6SnapPy_42list_as_word(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_int_list, int __pyx_v_num_generators, PyObject *__pyx_v_verbose_form); /* proto */
static int __pyx_pf_6SnapPy_17CFundamentalGroup___cinit__(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_triangulation, PyObject *__pyx_v_simplify_presentation, PyObject *__pyx_v_fillings_may_affect_generators, PyObject *__pyx_v_minimize_number_of_generators, PyObject *__pyx_v_try_hard_to_shorten_relators); /* proto */
static void __pyx_pf_6SnapPy_17CFundamentalGroup_2__dealloc__(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_4__repr__(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_6num_generators(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_8num_relators(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_10num_original_generators(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_12original_generators(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, PyObject *__pyx_v_verbose_form, PyObject *__pyx_v_as_int_list); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_14generators_in_originals(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, PyObject *__pyx_v_verbose_form, PyObject *__pyx_v_raw_form, PyObject *__pyx_v_as_int_list); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_16_word_moves(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_18generators(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_20relators(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, PyObject *__pyx_v_verbose_form, PyObject *__pyx_v_as_int_list); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_22meridian(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, int __pyx_v_which_cusp, PyObject *__pyx_v_as_int_list); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_24longitude(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, int __pyx_v_which_cusp, PyObject *__pyx_v_as_int_list); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_26peripheral_curves(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, PyObject *__pyx_v_as_int_list); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_28magma_string(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_30gap_string(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_32_gap_init_(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_34_magma_init_(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_magma); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_36sage(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_38character_variety_vars_and_polys(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, PyObject *__pyx_v_as_ideal); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_9num_cusps___get__(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_40__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_42__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6SnapPy_14CHolonomyGroup__matrices(struct __pyx_obj_6SnapPy_CHolonomyGroup *__pyx_v_self, PyObject *__pyx_v_word); /* proto */
static PyObject *__pyx_pf_6SnapPy_14CHolonomyGroup_2SL2C(struct __pyx_obj_6SnapPy_CHolonomyGroup *__pyx_v_self, PyObject *__pyx_v_word); /* proto */
static PyObject *__pyx_pf_6SnapPy_14CHolonomyGroup_4O31(struct __pyx_obj_6SnapPy_CHolonomyGroup *__pyx_v_self, PyObject *__pyx_v_word); /* proto */
static PyObject *__pyx_pf_6SnapPy_14CHolonomyGroup_6complex_length(struct __pyx_obj_6SnapPy_CHolonomyGroup *__pyx_v_self, PyObject *__pyx_v_word); /* proto */
static PyObject *__pyx_pf_6SnapPy_14CHolonomyGroup_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6SnapPy_CHolonomyGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_14CHolonomyGroup_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6SnapPy_CHolonomyGroup *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6SnapPy_13HolonomyGroup__number_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n); /* proto */
static int __pyx_pf_6SnapPy_13SymmetryGroup___cinit__(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self, PyObject *__pyx_v_is_full_group, PyObject *__pyx_v_owns_c_symmetry_group); /* proto */
static void __pyx_pf_6SnapPy_13SymmetryGroup_2__dealloc__(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_4is_full_group(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_6__repr__(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_8order(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_10is_abelian(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_12abelian_description(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_14is_dihedral(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_16is_polyhedral(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_18polyhedral_description(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_20is_S5(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_22is_direct_product(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_24direct_product_description(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_26is_amphicheiral(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_28is_invertible_knot(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_30commutator_subgroup(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_32abelianization(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_34center(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_36multiply_elements(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_38isometries(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_14_is_full_group___get__(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_22_owns_c_symmetry_group___get__(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_40__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_42__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain__number_(PyObject *__pyx_v_n); /* proto */
static int __pyx_pf_6SnapPy_16CDirichletDomain_2__cinit__(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self, struct __pyx_obj_6SnapPy_Manifold *__pyx_v_manifold, PyObject *__pyx_v_vertex_epsilon, PyObject *__pyx_v_displacement, PyObject *__pyx_v_centroid_at_origin, PyObject *__pyx_v_maximize_injectivity_radius, PyObject *__pyx_v_include_words, PyObject *__pyx_v_generator_file, PyObject *__pyx_v_generator_bytes, PyObject *__pyx_v_O31_generators, PyObject *__pyx_v_manifold_name); /* proto */
static void __pyx_pf_6SnapPy_16CDirichletDomain_4__dealloc__(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_6__repr__(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_8num_vertices(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_10num_finite_vertices(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_12num_ideal_vertices(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_14num_edges(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_16num_faces(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_18in_radius(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_20out_radius(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_22spine_radius(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_24length_spectrum_dicts(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self, PyObject *__pyx_v_cutoff_length, PyObject *__pyx_v_full_rigor, PyObject *__pyx_v_multiplicities, PyObject *__pyx_v_user_radius, PyObject *__pyx_v_grouped); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_26vertex_list(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self, PyObject *__pyx_v_details); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_28_vertex_list(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_30_vertex_data_list(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_32_vertex_to_index_dict(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_34_edge_to_index_dict(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_9face_list_genexpr(PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_36face_list(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_38edge_list(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_40view(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_42manifold(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_44triangulation(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_46volume(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_48pairing_matrices(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_50pairing_words(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_10_to_string_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_52_to_string(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_54__reduce_ex__(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_protocol); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_56save(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */
static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_58export_stl(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_model, PyObject *__pyx_v_cutout, PyObject *__pyx_v_num_subdivisions, PyObject *__pyx_v_shrink_factor, PyObject *__pyx_v_cutoff_radius, CYTHON_UNUSED PyObject *__pyx_v_callback); /* proto */
static PyObject *__pyx_pf_6SnapPy_44_unpickle_dirichlet_domain(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood__number_(PyObject *__pyx_v_n); /* proto */
static int __pyx_pf_6SnapPy_17CCuspNeighborhood_2__cinit__(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, struct __pyx_obj_6SnapPy_Manifold *__pyx_v_manifold); /* proto */
static void __pyx_pf_6SnapPy_17CCuspNeighborhood_4__dealloc__(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_6__repr__(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_8manifold(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_10original_index(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_12check_index(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_14num_cusps(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_16topology(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_18get_displacement(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_20set_displacement(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_new_displacement, PyObject *__pyx_v_which_cusp); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_22stopping_displacement(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_24stopper(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_26reach(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_28max_reach(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_30get_tie(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_32set_tie(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp, PyObject *__pyx_v_new_tie); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_34volume(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_36translations(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_38horoballs(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_cutoff, PyObject *__pyx_v_which_cusp, PyObject *__pyx_v_full_list, PyObject *__pyx_v_high_precision); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_40Ford_domain(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp, PyObject *__pyx_v_high_precision); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_42triangulation(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp, PyObject *__pyx_v_high_precision); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_44view(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp, PyObject *__pyx_v_cutoff); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_46__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_48__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_6SnapPy_46bundle_from_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_desc); /* proto */
static PyObject *__pyx_pf_6SnapPy_48splitting_from_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_desc); /* proto */
static PyObject *__pyx_pf_6SnapPy_50get_triangulation_tester(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_52extract_HT_knot(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_record, PyObject *__pyx_v_crossings, PyObject *__pyx_v_alternation); /* proto */
static PyObject *__pyx_pf_6SnapPy_54get_HT_knot_DT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_crossings, PyObject *__pyx_v_alternation, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_6SnapPy_56get_HT_knot_by_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_alternation, PyObject *__pyx_v_index, PyObject *__pyx_v_manifold_class); /* proto */
static PyObject *__pyx_pf_6SnapPy_6Census___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_indices); /* proto */
static PyObject *__pyx_pf_6SnapPy_6Census_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_6Census_4__contains__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_item); /* proto */
static PyObject *__pyx_pf_6SnapPy_6Census_6next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_6Census_8__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_6Census_10__getitem__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_6SnapPy_62__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_12CuspedCensus___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_indices); /* proto */
static PyObject *__pyx_pf_6SnapPy_12CuspedCensus_2lookup(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_6SnapPy_12CuspedCensus_4__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_6SnapPy_64__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_28ObsNonorientableCuspedCensus___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_indices); /* proto */
static PyObject *__pyx_pf_6SnapPy_28ObsNonorientableCuspedCensus_2lookup(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_6SnapPy_25ObsOrientableClosedCensus___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_indices); /* proto */
static PyObject *__pyx_pf_6SnapPy_25ObsOrientableClosedCensus_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_6SnapPy_28ObsNonorientableClosedCensus___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_indices); /* proto */
static PyObject *__pyx_pf_6SnapPy_28ObsNonorientableClosedCensus_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_6SnapPy_66__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_13KnotExteriors___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_indices); /* proto */
static PyObject *__pyx_pf_6SnapPy_13KnotExteriors_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_6SnapPy_68__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_27NonalternatingKnotExteriors___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_indices); /* proto */
static PyObject *__pyx_pf_6SnapPy_70__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_14ObsCensusKnots___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_indices); /* proto */
static PyObject *__pyx_pf_6SnapPy_14ObsCensusKnots_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_14ObsCensusKnots_4__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_6SnapPy_16ObsLinkExteriors___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_components, PyObject *__pyx_v_indices); /* proto */
static PyObject *__pyx_pf_6SnapPy_16ObsLinkExteriors_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_6SnapPy_16ObsLinkExteriors_4__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_j); /* proto */
static PyObject *__pyx_pf_6SnapPy_11MorwenLinks___init__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_num_components, CYTHON_UNUSED PyObject *__pyx_v_num_crossings); /* proto */
static PyObject *__pyx_pf_6SnapPy_58left_pad_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_str, PyObject *__pyx_v_length, PyObject *__pyx_v_pad); /* proto */
static PyObject *__pyx_pf_6SnapPy_14ObsMorwenLinks___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_components, PyObject *__pyx_v_num_crossings); /* proto */
static PyObject *__pyx_pf_6SnapPy_14ObsMorwenLinks_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_6SnapPy_60__pyx_unpickle_PresentationMatrix(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_6SnapPy_Triangulation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6SnapPy_Manifold(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6SnapPy_AbelianGroup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6SnapPy_PresentationMatrix(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6SnapPy_CFundamentalGroup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6SnapPy_SymmetryGroup(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6SnapPy_CDirichletDomain(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6SnapPy_CCuspNeighborhood(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6SnapPy___pyx_scope_struct__genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6SnapPy___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6SnapPy___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6SnapPy___pyx_scope_struct_4_list_as_word(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6SnapPy___pyx_scope_struct_5_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6SnapPy___pyx_scope_struct_6_face_list(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6SnapPy___pyx_scope_struct_7_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_6SnapPy___pyx_scope_struct_8_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};
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop = {0, 0, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_update = {0, 0, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyList_Type_pop = {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
  PyObject *__pyx_type_6SnapPy_Triangulation;
  PyObject *__pyx_type_6SnapPy_Manifold;
  PyObject *__pyx_type_6SnapPy_AbelianGroup;
  PyObject *__pyx_type_6SnapPy_PresentationMatrix;
  PyObject *__pyx_type_6SnapPy_CFundamentalGroup;
  PyObject *__pyx_type_6SnapPy_CHolonomyGroup;
  PyObject *__pyx_type_6SnapPy_SymmetryGroup;
  PyObject *__pyx_type_6SnapPy_CDirichletDomain;
  PyObject *__pyx_type_6SnapPy_CCuspNeighborhood;
  PyObject *__pyx_type_6SnapPy___pyx_scope_struct__genexpr;
  PyObject *__pyx_type_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation;
  PyObject *__pyx_type_6SnapPy___pyx_scope_struct_2_genexpr;
  PyObject *__pyx_type_6SnapPy___pyx_scope_struct_3_genexpr;
  PyObject *__pyx_type_6SnapPy___pyx_scope_struct_4_list_as_word;
  PyObject *__pyx_type_6SnapPy___pyx_scope_struct_5_genexpr;
  PyObject *__pyx_type_6SnapPy___pyx_scope_struct_6_face_list;
  PyObject *__pyx_type_6SnapPy___pyx_scope_struct_7_genexpr;
  PyObject *__pyx_type_6SnapPy___pyx_scope_struct_8_genexpr;
  #endif
  PyTypeObject *__pyx_ptype_6SnapPy_Triangulation;
  PyTypeObject *__pyx_ptype_6SnapPy_Manifold;
  PyTypeObject *__pyx_ptype_6SnapPy_AbelianGroup;
  PyTypeObject *__pyx_ptype_6SnapPy_PresentationMatrix;
  PyTypeObject *__pyx_ptype_6SnapPy_CFundamentalGroup;
  PyTypeObject *__pyx_ptype_6SnapPy_CHolonomyGroup;
  PyTypeObject *__pyx_ptype_6SnapPy_SymmetryGroup;
  PyTypeObject *__pyx_ptype_6SnapPy_CDirichletDomain;
  PyTypeObject *__pyx_ptype_6SnapPy_CCuspNeighborhood;
  PyTypeObject *__pyx_ptype_6SnapPy___pyx_scope_struct__genexpr;
  PyTypeObject *__pyx_ptype_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation;
  PyTypeObject *__pyx_ptype_6SnapPy___pyx_scope_struct_2_genexpr;
  PyTypeObject *__pyx_ptype_6SnapPy___pyx_scope_struct_3_genexpr;
  PyTypeObject *__pyx_ptype_6SnapPy___pyx_scope_struct_4_list_as_word;
  PyTypeObject *__pyx_ptype_6SnapPy___pyx_scope_struct_5_genexpr;
  PyTypeObject *__pyx_ptype_6SnapPy___pyx_scope_struct_6_face_list;
  PyTypeObject *__pyx_ptype_6SnapPy___pyx_scope_struct_7_genexpr;
  PyTypeObject *__pyx_ptype_6SnapPy___pyx_scope_struct_8_genexpr;
  PyObject *__pyx_kp_b_;
  PyObject *__pyx_kp_s_;
  PyObject *__pyx_kp_s_0;
  PyObject *__pyx_kp_s_0_0;
  PyObject *__pyx_kp_s_0_9_0_9;
  PyObject *__pyx_kp_s_1;
  PyObject *__pyx_kp_s_12n123;
  PyObject *__pyx_kp_s_16_14f_I;
  PyObject *__pyx_kp_s_16n1235;
  PyObject *__pyx_kp_s_17_14f;
  PyObject *__pyx_kp_s_18f;
  PyObject *__pyx_kp_s_2_3_move;
  PyObject *__pyx_kp_s_3_2_move;
  PyObject *__pyx_kp_s_3d_s_curve_of_length_s;
  PyObject *__pyx_kp_s_4s_40s;
  PyObject *__pyx_kp_s_5_2_1_3_4_1_2;
  PyObject *__pyx_kp_s_6_1;
  PyObject *__pyx_kp_s_6s_s;
  PyObject *__pyx_kp_s_8_3_3;
  PyObject *__pyx_n_s_A;
  PyObject *__pyx_kp_s_A_CuspNeighborhood_object_repre;
  PyObject *__pyx_kp_s_A_DirichletDomain_object_repres;
  PyObject *__pyx_kp_s_A_FundamentalGroup_represents_a;
  PyObject *__pyx_kp_s_A_FundamentalGroup_represents_a_2;
  PyObject *__pyx_kp_s_A_non_existent_shape_data_type_w;
  PyObject *__pyx_kp_s_A_s_is_specified_by_a_string_or;
  PyObject *__pyx_n_s_AbelianGroup;
  PyObject *__pyx_n_s_AbelianGroup___reduce;
  PyObject *__pyx_kp_u_AbelianGroup___reduce___line_80;
  PyObject *__pyx_n_s_AbelianGroup_betti_number;
  PyObject *__pyx_n_s_AbelianGroup_elementary_divisors;
  PyObject *__pyx_n_s_AbelianGroup_order;
  PyObject *__pyx_n_s_AbelianGroup_rank;
  PyObject *__pyx_kp_s_Acceptable_cusp_types_are_all_or;
  PyObject *__pyx_kp_u_Add_a_possibly_degenerate_hyper;
  PyObject *__pyx_kp_s_All_Dehn_filling_coefficients_mu;
  PyObject *__pyx_kp_s_All_cusps_must_be_fillable;
  PyObject *__pyx_kp_s_All_files;
  PyObject *__pyx_kp_s_All_text_files;
  PyObject *__pyx_n_s_Alphabet;
  PyObject *__pyx_n_s_AlternatingKnotExteriors;
  PyObject *__pyx_n_s_Alternating_numbers;
  PyObject *__pyx_n_s_Alternating_offsets;
  PyObject *__pyx_n_s_Alternating_table;
  PyObject *__pyx_kp_s_An_empty_triangulation_was_gener;
  PyObject *__pyx_n_s_AssertionError;
  PyObject *__pyx_n_s_AttributeError;
  PyObject *__pyx_n_s_B;
  PyObject *__pyx_kp_s_Base_class_for_Iterators_Sequen;
  PyObject *__pyx_kp_s_Base_class_for_Iterators_Sequen_2;
  PyObject *__pyx_kp_s_Base_class_for_manifold_Iterato;
  PyObject *__pyx_kp_s_Bb_raid_0_9;
  PyObject *__pyx_kp_s_Braid;
  PyObject *__pyx_kp_s_Braid_1_2_1_2;
  PyObject *__pyx_kp_s_Braids_must_have_at_least_2_stra;
  PyObject *__pyx_kp_u_Brings_up_a_link_editor_window;
  PyObject *__pyx_n_s_Browser;
  PyObject *__pyx_kp_s_Browser_not_imported_Tk_CyOpenGL;
  PyObject *__pyx_kp_s_Bundle_S__1_1_a0_B1;
  PyObject *__pyx_kp_s_Bundle_S__d_d;
  PyObject *__pyx_kp_s_Byte_encoding_requires_complete;
  PyObject *__pyx_n_s_CCuspNeighborhood;
  PyObject *__pyx_n_s_CCuspNeighborhood_Ford_domain;
  PyObject *__pyx_n_s_CCuspNeighborhood___reduce_cytho;
  PyObject *__pyx_n_s_CCuspNeighborhood___setstate_cyt;
  PyObject *__pyx_n_s_CCuspNeighborhood__number;
  PyObject *__pyx_n_s_CCuspNeighborhood_check_index;
  PyObject *__pyx_n_s_CCuspNeighborhood_get_displaceme;
  PyObject *__pyx_n_s_CCuspNeighborhood_get_tie;
  PyObject *__pyx_n_s_CCuspNeighborhood_horoballs;
  PyObject *__pyx_n_s_CCuspNeighborhood_manifold;
  PyObject *__pyx_n_s_CCuspNeighborhood_max_reach;
  PyObject *__pyx_n_s_CCuspNeighborhood_num_cusps;
  PyObject *__pyx_n_s_CCuspNeighborhood_original_index;
  PyObject *__pyx_n_s_CCuspNeighborhood_reach;
  PyObject *__pyx_n_s_CCuspNeighborhood_set_displaceme;
  PyObject *__pyx_n_s_CCuspNeighborhood_set_tie;
  PyObject *__pyx_n_s_CCuspNeighborhood_stopper;
  PyObject *__pyx_n_s_CCuspNeighborhood_stopping_displ;
  PyObject *__pyx_n_s_CCuspNeighborhood_topology;
  PyObject *__pyx_n_s_CCuspNeighborhood_translations;
  PyObject *__pyx_n_s_CCuspNeighborhood_triangulation;
  PyObject *__pyx_n_s_CCuspNeighborhood_view;
  PyObject *__pyx_kp_u_CCuspNeighborhood_view_line_289;
  PyObject *__pyx_n_s_CCuspNeighborhood_volume;
  PyObject *__pyx_n_s_CDirichletDomain;
  PyObject *__pyx_n_s_CDirichletDomain___reduce_ex;
  PyObject *__pyx_n_s_CDirichletDomain__edge_to_index;
  PyObject *__pyx_n_s_CDirichletDomain__number;
  PyObject *__pyx_n_s_CDirichletDomain__to_string;
  PyObject *__pyx_n_s_CDirichletDomain__vertex_data_li;
  PyObject *__pyx_n_s_CDirichletDomain__vertex_list;
  PyObject *__pyx_n_s_CDirichletDomain__vertex_to_inde;
  PyObject *__pyx_n_s_CDirichletDomain_edge_list;
  PyObject *__pyx_n_s_CDirichletDomain_export_stl;
  PyObject *__pyx_kp_u_CDirichletDomain_export_stl_line;
  PyObject *__pyx_n_s_CDirichletDomain_face_list;
  PyObject *__pyx_n_s_CDirichletDomain_in_radius;
  PyObject *__pyx_n_s_CDirichletDomain_length_spectrum;
  PyObject *__pyx_kp_u_CDirichletDomain_length_spectrum_2;
  PyObject *__pyx_n_s_CDirichletDomain_manifold;
  PyObject *__pyx_kp_u_CDirichletDomain_manifold_line_5;
  PyObject *__pyx_n_s_CDirichletDomain_num_edges;
  PyObject *__pyx_n_s_CDirichletDomain_num_faces;
  PyObject *__pyx_n_s_CDirichletDomain_num_finite_vert;
  PyObject *__pyx_n_s_CDirichletDomain_num_ideal_verti;
  PyObject *__pyx_n_s_CDirichletDomain_num_vertices;
  PyObject *__pyx_n_s_CDirichletDomain_out_radius;
  PyObject *__pyx_n_s_CDirichletDomain_pairing_matrice;
  PyObject *__pyx_kp_u_CDirichletDomain_pairing_matrice_2;
  PyObject *__pyx_n_s_CDirichletDomain_pairing_words;
  PyObject *__pyx_kp_u_CDirichletDomain_pairing_words_l;
  PyObject *__pyx_n_s_CDirichletDomain_save;
  PyObject *__pyx_kp_u_CDirichletDomain_save_line_643;
  PyObject *__pyx_n_s_CDirichletDomain_spine_radius;
  PyObject *__pyx_n_s_CDirichletDomain_triangulation;
  PyObject *__pyx_kp_u_CDirichletDomain_triangulation_l;
  PyObject *__pyx_n_s_CDirichletDomain_vertex_list;
  PyObject *__pyx_n_s_CDirichletDomain_view;
  PyObject *__pyx_n_s_CDirichletDomain_volume;
  PyObject *__pyx_n_s_CFundamentalGroup;
  PyObject *__pyx_n_s_CFundamentalGroup___reduce_cytho;
  PyObject *__pyx_n_s_CFundamentalGroup___setstate_cyt;
  PyObject *__pyx_n_s_CFundamentalGroup__gap_init;
  PyObject *__pyx_n_s_CFundamentalGroup__magma_init;
  PyObject *__pyx_n_s_CFundamentalGroup__word_moves;
  PyObject *__pyx_n_s_CFundamentalGroup_character_vari;
  PyObject *__pyx_kp_u_CFundamentalGroup_character_vari_2;
  PyObject *__pyx_n_s_CFundamentalGroup_gap_string;
  PyObject *__pyx_kp_u_CFundamentalGroup_gap_string_lin;
  PyObject *__pyx_n_s_CFundamentalGroup_generators;
  PyObject *__pyx_n_s_CFundamentalGroup_generators_in;
  PyObject *__pyx_kp_u_CFundamentalGroup_generators_in_2;
  PyObject *__pyx_kp_u_CFundamentalGroup_generators_lin;
  PyObject *__pyx_n_s_CFundamentalGroup_longitude;
  PyObject *__pyx_kp_u_CFundamentalGroup_longitude_line;
  PyObject *__pyx_n_s_CFundamentalGroup_magma_string;
  PyObject *__pyx_n_s_CFundamentalGroup_meridian;
  PyObject *__pyx_kp_u_CFundamentalGroup_meridian_line;
  PyObject *__pyx_n_s_CFundamentalGroup_num_generators;
  PyObject *__pyx_n_s_CFundamentalGroup_num_original_g;
  PyObject *__pyx_n_s_CFundamentalGroup_num_relators;
  PyObject *__pyx_n_s_CFundamentalGroup_original_gener;
  PyObject *__pyx_kp_u_CFundamentalGroup_original_gener_2;
  PyObject *__pyx_n_s_CFundamentalGroup_peripheral_cur;
  PyObject *__pyx_kp_u_CFundamentalGroup_peripheral_cur_2;
  PyObject *__pyx_n_s_CFundamentalGroup_relators;
  PyObject *__pyx_n_s_CFundamentalGroup_sage;
  PyObject *__pyx_n_s_CHolonomyGroup;
  PyObject *__pyx_n_s_CHolonomyGroup_O31;
  PyObject *__pyx_n_s_CHolonomyGroup_SL2C;
  PyObject *__pyx_n_s_CHolonomyGroup___reduce_cython;
  PyObject *__pyx_n_s_CHolonomyGroup___setstate_cython;
  PyObject *__pyx_n_s_CHolonomyGroup__matrices;
  PyObject *__pyx_n_s_CHolonomyGroup_complex_length;
  PyObject *__pyx_kp_s_CallFuncList_function_local_F_s;
  PyObject *__pyx_kp_s_Can_t_compare_triangulations_of;
  PyObject *__pyx_kp_s_Can_t_get_the_list_of_isometries;
  PyObject *__pyx_kp_s_Cannot_convert_s_to_a_Real;
  PyObject *__pyx_n_s_Census;
  PyObject *__pyx_kp_s_CensusKnots_s;
  PyObject *__pyx_kp_s_CensusKnots_tgz;
  PyObject *__pyx_n_s_Census_Knots;
  PyObject *__pyx_n_s_Census_Morwen8;
  PyObject *__pyx_n_s_Census___contains;
  PyObject *__pyx_n_s_Census___getitem;
  PyObject *__pyx_n_s_Census___init;
  PyObject *__pyx_n_s_Census___iter;
  PyObject *__pyx_n_s_Census___len;
  PyObject *__pyx_n_s_Census_next;
  PyObject *__pyx_n_s_CertifiedShapesEngine;
  PyObject *__pyx_kp_u_Change_the_triangulation_to_an;
  PyObject *__pyx_n_s_ChristyLinks;
  PyObject *__pyx_kp_s_ChristyLinks_s;
  PyObject *__pyx_kp_s_ChristyLinks_tgz;
  PyObject *__pyx_kp_s_Christy_census_of_s_component_li;
  PyObject *__pyx_n_s_Christy_links;
  PyObject *__pyx_n_s_ClosedCensusData;
  PyObject *__pyx_kp_s_ClosedNonorientableDistinct_txt;
  PyObject *__pyx_kp_s_ClosedOrientableDistinct_txt;
  PyObject *__pyx_kp_s_Communication_with_PLink_failed;
  PyObject *__pyx_kp_u_Constructs_a_reasonable_selecti;
  PyObject *__pyx_n_s_CosetAction;
  PyObject *__pyx_kp_s_Could_not_allocate_a_crossing_ta;
  PyObject *__pyx_kp_s_Could_not_certify_shape_interval;
  PyObject *__pyx_kp_s_Could_not_create_the_triangulati;
  PyObject *__pyx_kp_s_Cover_degree_should_be_at_least;
  PyObject *__pyx_kp_u_Create_a_3D_picture_of_the_horo;
  PyObject *__pyx_n_s_CuspInfo;
  PyObject *__pyx_n_s_CuspInfo___repr;
  PyObject *__pyx_n_s_CuspNeighborhood;
  PyObject *__pyx_n_s_CuspTopology;
  PyObject *__pyx_kp_s_Cusp_2d_complete_s_of_shape_s;
  PyObject *__pyx_kp_s_Cusp_2d_s_not_filled;
  PyObject *__pyx_kp_s_Cusp_2d_s_with_Dehn_filling_coef;
  PyObject *__pyx_kp_s_Cusp_Neighborhood_with_d_cusp_s;
  PyObject *__pyx_kp_s_Cusp_neighborhood_s_of_s;
  PyObject *__pyx_n_s_CuspedCensus;
  PyObject *__pyx_n_s_CuspedCensus___getitem;
  PyObject *__pyx_n_s_CuspedCensus___init;
  PyObject *__pyx_n_s_CuspedCensus_lookup;
  PyObject *__pyx_n_s_D;
  PyObject *__pyx_kp_s_DT;
  PyObject *__pyx_kp_s_DT_0_9_01;
  PyObject *__pyx_kp_s_DT_2;
  PyObject *__pyx_n_s_DT_3;
  PyObject *__pyx_kp_s_DT_4_6_2;
  PyObject *__pyx_kp_s_DT_a_zA_Z_01;
  PyObject *__pyx_n_s_DT_code;
  PyObject *__pyx_n_s_DT_codes;
  PyObject *__pyx_kp_s_DT_s;
  PyObject *__pyx_n_s_DTcodec;
  PyObject *__pyx_kp_s_D_d;
  PyObject *__pyx_n_s_DirichletDomain;
  PyObject *__pyx_kp_u_Dirichlet_Domain_of;
  PyObject *__pyx_kp_s_Does_not_extend_to_link;
  PyObject *__pyx_kp_u_Drills_out_the_specified_dual_c;
  PyObject *__pyx_n_s_DualCurveInfo;
  PyObject *__pyx_n_s_DualCurveInfo___repr;
  PyObject *__pyx_kp_u_Each_cusp_has_a_preferred_marki;
  PyObject *__pyx_kp_s_Elementary_divisors_must_be_give;
  PyObject *__pyx_kp_s_Elementary_divisors_must_be_non;
  PyObject *__pyx_kp_s_Empty_Triangulation;
  PyObject *__pyx_kp_s_Equations_are_available_in_log_a;
  PyObject *__pyx_kp_u_Export_the_Dirichlet_domain_as;
  PyObject *__pyx_kp_u_Extend_the_Neumann_Zagier_Matri;
  PyObject *__pyx_kp_s_Extends_to_link;
  PyObject *__pyx_n_s_F;
  PyObject *__pyx_n_s_FactorCosetAction;
  PyObject *__pyx_kp_s_Failed_to_allocate_memory_for_cu;
  PyObject *__pyx_kp_s_Failed_to_allocate_memory_for_te;
  PyObject *__pyx_kp_s_Failed_to_construct_permutation;
  PyObject *__pyx_kp_u_Fill_an_empty_manifold_from_a_b;
  PyObject *__pyx_kp_u_Fill_an_empty_triangulation_fro;
  PyObject *__pyx_kp_u_For_a_Triangulation_that_descri;
  PyObject *__pyx_kp_u_For_a_non_orientable_Triangulat;
  PyObject *__pyx_n_s_Ford_domain;
  PyObject *__pyx_n_s_FormatHomForSnapPea;
  PyObject *__pyx_kp_s_FormatHomForSnapPea_function_f;
  PyObject *__pyx_n_s_FreeGroup;
  PyObject *__pyx_n_s_FuncResult;
  PyObject *__pyx_n_s_FundamentalGroup;
  PyObject *__pyx_n_s_G;
  PyObject *__pyx_n_s_GG;
  PyObject *__pyx_n_s_GapElement;
  PyObject *__pyx_kp_b_Generators;
  PyObject *__pyx_n_s_GeneratorsOfGroup;
  PyObject *__pyx_kp_s_Generators_s;
  PyObject *__pyx_kp_s_Generators_s_Relators_s;
  PyObject *__pyx_kp_u_Give_the_triangulation_a_new_na;
  PyObject *__pyx_kp_u_Gives_the_shapes_of_the_tetrahe;
  PyObject *__pyx_kp_s_Got_the_empty_link_from_PLink_a;
  PyObject *__pyx_kp_s_Group;
  PyObject *__pyx_kp_u_Group_elements_which_pair_the_f;
  PyObject *__pyx_n_s_GrpFP;
  PyObject *__pyx_n_s_GrpPerm;
  PyObject *__pyx_n_s_H;
  PyObject *__pyx_n_s_HTLinkExteriors;
  PyObject *__pyx_n_s_HTWKnots;
  PyObject *__pyx_kp_s_High_precision_shapes_must_be_co;
  PyObject *__pyx_n_s_HolonomyGroup;
  PyObject *__pyx_n_s_HolonomyGroup__number;
  PyObject *__pyx_n_s_HomGrp;
  PyObject *__pyx_n_s_HoroballViewer;
  PyObject *__pyx_n_s_I;
  PyObject *__pyx_n_s_IOError;
  PyObject *__pyx_kp_u_If_the_SymmetryGroup_is_a_nontr;
  PyObject *__pyx_kp_u_If_the_manifold_is_the_compleme;
  PyObject *__pyx_kp_u_If_the_symmetry_group_is_abelia;
  PyObject *__pyx_kp_s_If_there_is_more_than_one_cusp_y;
  PyObject *__pyx_kp_u_If_this_triangulation_is_a_subd;
  PyObject *__pyx_n_s_Image;
  PyObject *__pyx_kp_s_Immutable_dictionary_whose_data;
  PyObject *__pyx_n_s_ImportError;
  PyObject *__pyx_kp_u_In_the_default_mode_this_functi;
  PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
  PyObject *__pyx_n_s_Index;
  PyObject *__pyx_n_s_IndexError;
  PyObject *__pyx_kp_s_Index_is_out_of_range;
  PyObject *__pyx_n_s_Info;
  PyObject *__pyx_n_s_Info___init;
  PyObject *__pyx_n_s_Info__immutable;
  PyObject *__pyx_n_s_Info_keys;
  PyObject *__pyx_kp_s_Info_objects_are_immutable;
  PyObject *__pyx_n_s_Integer;
  PyObject *__pyx_kp_s_Invalid_generator_status;
  PyObject *__pyx_kp_s_Invalid_permutation_data;
  PyObject *__pyx_kp_s_Invalid_pickle_byte_sequence;
  PyObject *__pyx_n_s_IsSubgroupFpGroup;
  PyObject *__pyx_n_s_IsToPermGroupHomomorphismByImage;
  PyObject *__pyx_n_s_Isometry;
  PyObject *__pyx_n_s_Isometry___init;
  PyObject *__pyx_n_s_Isometry___repr;
  PyObject *__pyx_n_s_Isometry_cusp_images;
  PyObject *__pyx_n_s_Isometry_cusp_maps;
  PyObject *__pyx_n_s_Isometry_extends_to_link;
  PyObject *__pyx_n_s_Isometry_num_cusps;
  PyObject *__pyx_kp_s_Iterator_Sequence_for_Alternati;
  PyObject *__pyx_kp_s_Iterator_Sequence_for_nonAltern;
  PyObject *__pyx_n_s_K7_1;
  PyObject *__pyx_n_s_KLPProjection;
  PyObject *__pyx_kp_s_K_s__s;
  PyObject *__pyx_n_s_KeyError;
  PyObject *__pyx_n_s_Klein;
  PyObject *__pyx_kp_s_Klein_bottle_cusp;
  PyObject *__pyx_n_s_KnotExteriors;
  PyObject *__pyx_n_s_KnotExteriors___getitem;
  PyObject *__pyx_n_s_KnotExteriors___init;
  PyObject *__pyx_kp_s_Knots_in_S_3_which_appear_in_the;
  PyObject *__pyx_n_s_L;
  PyObject *__pyx_n_s_L104001;
  PyObject *__pyx_n_s_L13n9331;
  PyObject *__pyx_kp_s_L13n9331_3_4_2_3_2_1;
  PyObject *__pyx_n_s_LE;
  PyObject *__pyx_kp_s_L_d_2d_3d;
  PyObject *__pyx_n_s_LengthSpectrum;
  PyObject *__pyx_n_s_LengthSpectrumFormatString;
  PyObject *__pyx_n_s_LengthSpectrumFormatStringBase;
  PyObject *__pyx_n_s_LengthSpectrumFormatStringWithWo;
  PyObject *__pyx_n_s_LengthSpectrumInfo;
  PyObject *__pyx_n_s_LengthSpectrumInfo___repr;
  PyObject *__pyx_n_s_LengthSpectrum___repr;
  PyObject *__pyx_n_s_Link;
  PyObject *__pyx_n_s_LinkEditor;
  PyObject *__pyx_n_s_LinkExteriors;
  PyObject *__pyx_n_s_LinkManager;
  PyObject *__pyx_kp_s_Link_Projection;
  PyObject *__pyx_n_s_ListOnePerLine;
  PyObject *__pyx_n_s_ListOnePerLine___repr;
  PyObject *__pyx_n_s_LowIndexSubgroups;
  PyObject *__pyx_n_s_LowIndexSubgroupsFpGroup;
  PyObject *__pyx_n_s_M;
  PyObject *__pyx_n_s_M0;
  PyObject *__pyx_n_s_M1;
  PyObject *__pyx_n_s_MTLinks;
  PyObject *__pyx_kp_u_M_cover_permutation_rep_Returns;
  PyObject *__pyx_kp_u_M_covers_degree_method_None_cov;
  PyObject *__pyx_kp_u_M_covers_degree_method_None_cov_2;
  PyObject *__pyx_kp_u_M_gluing_equations_pgl_N_2_equa;
  PyObject *__pyx_kp_u_M_ptolemy_generalized_obstructi;
  PyObject *__pyx_kp_u_M_ptolemy_variety_N_obstruction;
  PyObject *__pyx_n_s_MagmaElement;
  PyObject *__pyx_n_s_Manifold;
  PyObject *__pyx_n_s_Manifold__canonical_cells_are_te;
  PyObject *__pyx_kp_u_Manifold__canonical_cells_are_te_2;
  PyObject *__pyx_n_s_Manifold__canonical_retriangulat;
  PyObject *__pyx_kp_u_Manifold__canonical_retriangulat_2;
  PyObject *__pyx_n_s_Manifold__choose_generators;
  PyObject *__pyx_n_s_Manifold__choose_generators_info;
  PyObject *__pyx_n_s_Manifold__complex_volume;
  PyObject *__pyx_n_s_Manifold__cusp_cross_section_inf;
  PyObject *__pyx_n_s_Manifold__from_bytes;
  PyObject *__pyx_kp_u_Manifold__from_bytes_line_272;
  PyObject *__pyx_n_s_Manifold__from_isosig;
  PyObject *__pyx_n_s_Manifold__from_string;
  PyObject *__pyx_kp_u_Manifold__from_string_line_256;
  PyObject *__pyx_n_s_Manifold__get_tetrahedra_shapes;
  PyObject *__pyx_n_s_Manifold__identify;
  PyObject *__pyx_n_s_Manifold__number;
  PyObject *__pyx_n_s_Manifold__polish_hyperbolic_stru;
  PyObject *__pyx_n_s_Manifold_browse;
  PyObject *__pyx_kp_u_Manifold_browse_line_375;
  PyObject *__pyx_n_s_Manifold_canonize;
  PyObject *__pyx_kp_u_Manifold_canonize_line_145;
  PyObject *__pyx_n_s_Manifold_chern_simons;
  PyObject *__pyx_kp_u_Manifold_chern_simons_line_807;
  PyObject *__pyx_n_s_Manifold_copy;
  PyObject *__pyx_kp_u_Manifold_copy_line_297;
  PyObject *__pyx_n_s_Manifold_cover;
  PyObject *__pyx_kp_u_Manifold_cover_line_535;
  PyObject *__pyx_n_s_Manifold_covers;
  PyObject *__pyx_kp_u_Manifold_covers_line_607;
  PyObject *__pyx_n_s_Manifold_cusp_info;
  PyObject *__pyx_kp_u_Manifold_cusp_info_line_1108;
  PyObject *__pyx_n_s_Manifold_cusp_neighborhood;
  PyObject *__pyx_kp_u_Manifold_cusp_neighborhood_line;
  PyObject *__pyx_kp_s_Manifold_dehn_fill;
  PyObject *__pyx_kp_u_Manifold_dehn_fill_line_1231;
  PyObject *__pyx_n_s_Manifold_dirichlet_domain;
  PyObject *__pyx_kp_u_Manifold_dirichlet_domain_line_3;
  PyObject *__pyx_n_s_Manifold_drill;
  PyObject *__pyx_kp_u_Manifold_drill_line_1485;
  PyObject *__pyx_n_s_Manifold_dual_curves;
  PyObject *__pyx_kp_u_Manifold_dual_curves_line_1383;
  PyObject *__pyx_n_s_Manifold_filled_triangulation;
  PyObject *__pyx_kp_u_Manifold_filled_triangulation_li;
  PyObject *__pyx_n_s_Manifold_from_Triangulation;
  PyObject *__pyx_n_s_Manifold_fundamental_group;
  PyObject *__pyx_kp_u_Manifold_fundamental_group_line;
  PyObject *__pyx_n_s_Manifold_init_hyperbolic_structu;
  PyObject *__pyx_n_s_Manifold_is_isometric_to;
  PyObject *__pyx_kp_u_Manifold_is_isometric_to_line_15;
  PyObject *__pyx_n_s_Manifold_is_two_bridge;
  PyObject *__pyx_kp_u_Manifold_is_two_bridge_line_1616;
  PyObject *__pyx_n_s_Manifold_length_spectrum;
  PyObject *__pyx_kp_u_Manifold_length_spectrum_line_14;
  PyObject *__pyx_kp_s_Manifold_must_be_pickled_with__t;
  PyObject *__pyx_kp_s_Manifold_set_peripheral_curves;
  PyObject *__pyx_kp_u_Manifold_set_peripheral_curves_l;
  PyObject *__pyx_n_s_Manifold_set_target_holonomy;
  PyObject *__pyx_kp_s_Manifold_set_tetrahedra_shapes;
  PyObject *__pyx_n_s_Manifold_solution_type;
  PyObject *__pyx_kp_u_Manifold_solution_type_line_1048;
  PyObject *__pyx_n_s_Manifold_split;
  PyObject *__pyx_kp_u_Manifold_split_line_1736;
  PyObject *__pyx_n_s_Manifold_splitting_surfaces;
  PyObject *__pyx_kp_u_Manifold_splitting_surfaces_line;
  PyObject *__pyx_n_s_Manifold_symmetric_triangulation;
  PyObject *__pyx_kp_u_Manifold_symmetric_triangulation_2;
  PyObject *__pyx_n_s_Manifold_symmetry_group;
  PyObject *__pyx_n_s_Manifold_tetrahedra_shapes;
  PyObject *__pyx_kp_u_Manifold_tetrahedra_shapes_line;
  PyObject *__pyx_n_s_Manifold_use_field_conversion;
  PyObject *__pyx_n_s_Manifold_volume;
  PyObject *__pyx_kp_u_Manifold_volume_line_714;
  PyObject *__pyx_n_s_Manifold_without_hyperbolic_stru;
  PyObject *__pyx_kp_u_Manifold_without_hyperbolic_stru_2;
  PyObject *__pyx_kp_s_Manifolds_must_be_non_empty;
  PyObject *__pyx_n_s_MatrixParity;
  PyObject *__pyx_n_s_MatrixWithExplanations;
  PyObject *__pyx_n_s_MatrixWithExplanations___init;
  PyObject *__pyx_n_s_MatrixWithExplanations___repr;
  PyObject *__pyx_n_s_MatrixWithExplanations___repr_2;
  PyObject *__pyx_n_s_MorwenLinks;
  PyObject *__pyx_n_s_MorwenLinks___init;
  PyObject *__pyx_n_s_MsgIO;
  PyObject *__pyx_n_s_MsgIO___init;
  PyObject *__pyx_n_s_N;
  PyObject *__pyx_kp_s_N_has_to_be_2_15;
  PyObject *__pyx_n_s_NeumannZagierTypeEquations;
  PyObject *__pyx_n_s_NeumannZagierTypeEquations___ini;
  PyObject *__pyx_n_s_NeumannZagierTypeEquations___rep;
  PyObject *__pyx_kp_s_New_triangulation_received_from;
  PyObject *__pyx_kp_s_No_associated_link_known;
  PyObject *__pyx_kp_s_No_tetrahedra_data_provided;
  PyObject *__pyx_kp_s_Non_orientable;
  PyObject *__pyx_n_s_NonalternatingKnotExteriors;
  PyObject *__pyx_n_s_NonalternatingKnotExteriors___in;
  PyObject *__pyx_n_s_Nonalternating_numbers;
  PyObject *__pyx_n_s_Nonalternating_offsets;
  PyObject *__pyx_n_s_Nonalternating_table;
  PyObject *__pyx_n_s_Nonorientable_lengths;
  PyObject *__pyx_n_s_NormalSurfaceInfo;
  PyObject *__pyx_n_s_NormalSurfaceInfo___repr;
  PyObject *__pyx_n_s_NotImplemented;
  PyObject *__pyx_n_s_NotImplementedError;
  PyObject *__pyx_kp_s_Not_a_valid_permutation;
  PyObject *__pyx_kp_s_Not_within_Sage;
  PyObject *__pyx_n_s_Num_Alternating;
  PyObject *__pyx_n_s_Num_Nonalternating;
  PyObject *__pyx_n_s_Number;
  PyObject *__pyx_kp_s_Number_of_opacities_does_not_mat;
  PyObject *__pyx_kp_s_Number_of_permutations_is_not_th;
  PyObject *__pyx_n_s_O;
  PyObject *__pyx_n_s_O31;
  PyObject *__pyx_n_s_O31_generators;
  PyObject *__pyx_n_s_ObsCensusKnots;
  PyObject *__pyx_n_s_ObsCensusKnots___getitem;
  PyObject *__pyx_n_s_ObsCensusKnots___init;
  PyObject *__pyx_n_s_ObsCensusKnots___repr;
  PyObject *__pyx_n_s_ObsLinkExteriors;
  PyObject *__pyx_n_s_ObsLinkExteriors___getitem;
  PyObject *__pyx_n_s_ObsLinkExteriors___init;
  PyObject *__pyx_n_s_ObsLinkExteriors___repr;
  PyObject *__pyx_n_s_ObsMorwenLinks;
  PyObject *__pyx_n_s_ObsMorwenLinks___getitem;
  PyObject *__pyx_n_s_ObsMorwenLinks___init;
  PyObject *__pyx_n_s_ObsNonorientableClosedCensus;
  PyObject *__pyx_n_s_ObsNonorientableClosedCensus___g;
  PyObject *__pyx_n_s_ObsNonorientableClosedCensus___i;
  PyObject *__pyx_n_s_ObsNonorientableCuspedCensus;
  PyObject *__pyx_n_s_ObsNonorientableCuspedCensus___i;
  PyObject *__pyx_n_s_ObsNonorientableCuspedCensus_loo;
  PyObject *__pyx_n_s_ObsOrientableClosedCensus;
  PyObject *__pyx_n_s_ObsOrientableClosedCensus___geti;
  PyObject *__pyx_n_s_ObsOrientableClosedCensus___init;
  PyObject *__pyx_n_s_ObsOrientableCuspedCensus;
  PyObject *__pyx_kp_s_Obsolete;
  PyObject *__pyx_kp_s_Obsolete_2;
  PyObject *__pyx_kp_s_Obstruction_class_has_wrong_leng;
  PyObject *__pyx_kp_u_Opens_browser_window_with_a_gra;
  PyObject *__pyx_n_s_Orbifold1;
  PyObject *__pyx_n_s_Orientability;
  PyObject *__pyx_n_s_Orientable;
  PyObject *__pyx_n_s_Orientable_lengths;
  PyObject *__pyx_kp_s_Out_of_memory;
  PyObject *__pyx_n_s_PD_code;
  PyObject *__pyx_kp_s_PLink_was_not_imported;
  PyObject *__pyx_kp_s_P_crossings_0_9_P_alternation_a;
  PyObject *__pyx_kp_s_P_crossings_0_9_P_components_0;
  PyObject *__pyx_kp_s_P_crossings_0_9___P_index_0_9_P;
  PyObject *__pyx_kp_u_Perform_random_Pachner_moves_on;
  PyObject *__pyx_n_s_PermutationGroup;
  PyObject *__pyx_n_s_PickleError;
  PyObject *__pyx_kp_s_Please_specify_a_file_name;
  PyObject *__pyx_kp_s_Please_specify_filled_or_complet;
  PyObject *__pyx_n_s_PolyhedronViewer;
  PyObject *__pyx_n_s_PreImage;
  PyObject *__pyx_n_s_PresentationMatrix;
  PyObject *__pyx_n_s_PresentationMatrix___reduce_cyth;
  PyObject *__pyx_n_s_PresentationMatrix___setstate_cy;
  PyObject *__pyx_n_s_PresentationMatrix_add_rows;
  PyObject *__pyx_n_s_PresentationMatrix_explode;
  PyObject *__pyx_n_s_PresentationMatrix_get_data;
  PyObject *__pyx_n_s_PresentationMatrix_row_op;
  PyObject *__pyx_n_s_PresentationMatrix_simplified_ma;
  PyObject *__pyx_n_s_PresentationMatrix_simplify;
  PyObject *__pyx_n_s_Q;
  PyObject *__pyx_kp_s_Q_s_A_s;
  PyObject *__pyx_n_s_R;
  PyObject *__pyx_n_s_RawNumber;
  PyObject *__pyx_kp_u_Removing_any_finite_vertices_by;
  PyObject *__pyx_kp_s_Represents_an_isometry_from_one;
  PyObject *__pyx_kp_s_Result_is_symplectic_up_to_facto;
  PyObject *__pyx_kp_u_Return_a_HolonomyGroup_represen;
  PyObject *__pyx_kp_u_Return_a_detailed_list_of_all_t;
  PyObject *__pyx_kp_u_Return_a_list_of_info_objects_d;
  PyObject *__pyx_kp_u_Return_a_new_Manifold_where_the;
  PyObject *__pyx_kp_u_Return_a_new_manifold_where_the;
  PyObject *__pyx_kp_u_Return_a_reasonably_short_byte;
  PyObject *__pyx_kp_u_Return_a_string_containing_the;
  PyObject *__pyx_kp_u_Return_the_Dowker_Thistlethwait;
  PyObject *__pyx_kp_u_Return_the_abelianization_of_th;
  PyObject *__pyx_kp_u_Return_the_center_of_the_symmet;
  PyObject *__pyx_kp_u_Return_the_commutator_subgroup;
  PyObject *__pyx_kp_u_Return_the_current_generators_i;
  PyObject *__pyx_kp_u_Return_the_letters_representing;
  PyObject *__pyx_kp_u_Return_the_name_of_the_triangul;
  PyObject *__pyx_kp_u_Return_the_number_of_tetrahedra;
  PyObject *__pyx_kp_u_Return_the_order_of_the_symmetr;
  PyObject *__pyx_kp_u_Return_the_original_geometric_g;
  PyObject *__pyx_kp_u_Return_the_total_number_of_cusp;
  PyObject *__pyx_kp_u_Return_whether_a_one_cusped_has;
  PyObject *__pyx_kp_u_Return_whether_the_SymmetryGrou;
  PyObject *__pyx_kp_u_Return_whether_the_full_symmetr;
  PyObject *__pyx_kp_u_Return_whether_the_manifold_has;
  PyObject *__pyx_kp_u_Return_whether_the_symmetry_gro;
  PyObject *__pyx_kp_u_Return_whether_the_symmetry_gro_2;
  PyObject *__pyx_kp_u_Return_whether_the_underlying_3;
  PyObject *__pyx_kp_u_Returns_True_if_M_and_N_are_iso;
  PyObject *__pyx_kp_u_Returns_True_if_and_only_if_the;
  PyObject *__pyx_kp_u_Returns_True_if_and_only_if_the_2;
  PyObject *__pyx_kp_u_Returns_a_Dehn_filling_descript;
  PyObject *__pyx_kp_u_Returns_a_DirichletDomain_objec;
  PyObject *__pyx_kp_u_Returns_a_FundamentalGroup_obje;
  PyObject *__pyx_kp_u_Returns_a_Manifold_computed_dir;
  PyObject *__pyx_kp_u_Returns_a_Triangulation_compute;
  PyObject *__pyx_kp_u_Returns_a_Triangulation_represe;
  PyObject *__pyx_kp_u_Returns_a_compact_text_represen;
  PyObject *__pyx_kp_u_Returns_a_complete_list_of_comb;
  PyObject *__pyx_kp_u_Returns_a_copy_of_the_manifold;
  PyObject *__pyx_kp_u_Returns_a_copy_of_the_triangula;
  PyObject *__pyx_kp_u_Returns_a_dictionary_whose_keys;
  PyObject *__pyx_kp_u_Returns_a_list_of_geodesics_wit;
  PyObject *__pyx_kp_u_Returns_a_list_of_meridian_long;
  PyObject *__pyx_kp_u_Returns_a_list_of_the_O31Matric;
  PyObject *__pyx_kp_u_Returns_a_list_of_variables_and;
  PyObject *__pyx_kp_u_Returns_a_string_which_will_def;
  PyObject *__pyx_kp_u_Returns_a_word_representing_a_c;
  PyObject *__pyx_kp_u_Returns_a_word_representing_a_c_2;
  PyObject *__pyx_kp_u_Returns_an_AbelianGroup_represe;
  PyObject *__pyx_kp_u_Returns_an_info_object_containi;
  PyObject *__pyx_kp_u_Returns_an_info_object_containi_2;
  PyObject *__pyx_kp_u_Returns_information_about_the_c;
  PyObject *__pyx_kp_u_Returns_self_as_a_Triangulation;
  PyObject *__pyx_kp_u_Returns_the_Chern_Simons_invari;
  PyObject *__pyx_kp_u_Returns_the_number_of_fake_cusp;
  PyObject *__pyx_kp_u_Returns_the_obstruction_classes;
  PyObject *__pyx_kp_u_Returns_the_product_of_group_el;
  PyObject *__pyx_kp_u_Returns_the_type_of_the_current;
  PyObject *__pyx_kp_u_Returns_the_volume_of_the_curre;
  PyObject *__pyx_kp_u_Reverses_the_orientation_of_the;
  PyObject *__pyx_n_s_RuntimeError;
  PyObject *__pyx_n_s_S5;
  PyObject *__pyx_n_s_SC;
  PyObject *__pyx_n_s_SL2C;
  PyObject *__pyx_n_s_SNAPPEA_MANIFOLD_DIRECTORY;
  PyObject *__pyx_n_s_SageNotAvailable;
  PyObject *__pyx_n_s_SageObject;
  PyObject *__pyx_kp_s_Save_Triangulation;
  PyObject *__pyx_kp_u_Save_the_Dirichlet_domain_as_a;
  PyObject *__pyx_kp_u_Save_the_triangulation_as_a_Sna;
  PyObject *__pyx_kp_u_Searches_for_connected_closed_n;
  PyObject *__pyx_kp_s_Send_to_SnapPy;
  PyObject *__pyx_kp_u_Set_the_Dehn_filling_coefficien;
  PyObject *__pyx_kp_u_Set_the_Dehn_filling_coefficien_2;
  PyObject *__pyx_n_s_ShapeInfo;
  PyObject *__pyx_n_s_ShapeInfo___repr;
  PyObject *__pyx_n_s_ShortMatrixParity;
  PyObject *__pyx_n_s_SnapPeaFatalError;
  PyObject *__pyx_n_s_SnapPea_KLPProjection;
  PyObject *__pyx_kp_s_SnapPea_crashed_in_function_s_de;
  PyObject *__pyx_kp_s_SnapPea_failed_to_compute_any_pa;
  PyObject *__pyx_kp_s_SnapPea_failed_to_find_the_canon;
  PyObject *__pyx_kp_s_SnapPea_failed_to_read_the_censu;
  PyObject *__pyx_n_s_SnapPea_interrupt;
  PyObject *__pyx_kp_s_SnapPea_kernel_failed_when_compu;
  PyObject *__pyx_kp_s_SnapPea_kernel_failed_when_compu_2;
  PyObject *__pyx_kp_s_SnapPea_kernel_failed_when_split;
  PyObject *__pyx_kp_s_SnapPea_kernel_style_estimation;
  PyObject *__pyx_kp_s_SnapPea_only_found_d_surfaces_bu;
  PyObject *__pyx_n_s_SnapPy;
  PyObject *__pyx_n_s_SnapPyCache;
  PyObject *__pyx_kp_s_SnapPy_has_no_data_on_links_with;
  PyObject *__pyx_n_s_SolutionType;
  PyObject *__pyx_kp_s_Solution_type_is_s;
  PyObject *__pyx_kp_u_Split_the_manifold_open_along_a;
  PyObject *__pyx_kp_s_Splitting_S__1_0_b1_A0_a0_B1;
  PyObject *__pyx_kp_s_Splitting_S__d_d;
  PyObject *__pyx_n_s_Stabilizer;
  PyObject *__pyx_kp_s_Starting_the_link_editor_Select;
  PyObject *__pyx_n_s_StopIteration;
  PyObject *__pyx_n_s_StrLongestLen;
  PyObject *__pyx_n_s_StrLongestLen_locals_genexpr;
  PyObject *__pyx_kp_s_Supply_a_manifold_or_generators;
  PyObject *__pyx_kp_s_Supported_cover_types_are_all_an;
  PyObject *__pyx_kp_s_Supported_methods_are_low_index;
  PyObject *__pyx_n_s_Surface;
  PyObject *__pyx_n_s_SymmetryGroup;
  PyObject *__pyx_n_s_SymmetryGroup___reduce_cython;
  PyObject *__pyx_n_s_SymmetryGroup___setstate_cython;
  PyObject *__pyx_n_s_SymmetryGroup_abelian_descriptio;
  PyObject *__pyx_kp_u_SymmetryGroup_abelian_descriptio_2;
  PyObject *__pyx_n_s_SymmetryGroup_abelianization;
  PyObject *__pyx_kp_u_SymmetryGroup_abelianization_lin;
  PyObject *__pyx_n_s_SymmetryGroup_center;
  PyObject *__pyx_kp_u_SymmetryGroup_center_line_256;
  PyObject *__pyx_n_s_SymmetryGroup_commutator_subgrou;
  PyObject *__pyx_kp_u_SymmetryGroup_commutator_subgrou_2;
  PyObject *__pyx_n_s_SymmetryGroup_direct_product_des;
  PyObject *__pyx_kp_u_SymmetryGroup_direct_product_des_2;
  PyObject *__pyx_n_s_SymmetryGroup_is_S5;
  PyObject *__pyx_n_s_SymmetryGroup_is_abelian;
  PyObject *__pyx_kp_u_SymmetryGroup_is_abelian_line_72;
  PyObject *__pyx_n_s_SymmetryGroup_is_amphicheiral;
  PyObject *__pyx_kp_u_SymmetryGroup_is_amphicheiral_li;
  PyObject *__pyx_n_s_SymmetryGroup_is_dihedral;
  PyObject *__pyx_kp_u_SymmetryGroup_is_dihedral_line_1;
  PyObject *__pyx_n_s_SymmetryGroup_is_direct_product;
  PyObject *__pyx_kp_u_SymmetryGroup_is_direct_product_2;
  PyObject *__pyx_n_s_SymmetryGroup_is_full_group;
  PyObject *__pyx_kp_u_SymmetryGroup_is_full_group_line;
  PyObject *__pyx_n_s_SymmetryGroup_is_invertible_knot;
  PyObject *__pyx_kp_u_SymmetryGroup_is_invertible_knot_2;
  PyObject *__pyx_n_s_SymmetryGroup_is_polyhedral;
  PyObject *__pyx_n_s_SymmetryGroup_isometries;
  PyObject *__pyx_kp_u_SymmetryGroup_isometries_line_29;
  PyObject *__pyx_n_s_SymmetryGroup_multiply_elements;
  PyObject *__pyx_kp_u_SymmetryGroup_multiply_elements_2;
  PyObject *__pyx_n_s_SymmetryGroup_order;
  PyObject *__pyx_kp_u_SymmetryGroup_order_line_62;
  PyObject *__pyx_n_s_SymmetryGroup_polyhedral_descrip;
  PyObject *__pyx_n_s_T;
  PyObject *__pyx_n_s_TEXT;
  PyObject *__pyx_kp_s_Tetrahedra_data_appears_invalid;
  PyObject *__pyx_kp_s_That_Magma_type_not_recognized;
  PyObject *__pyx_kp_s_The_Chern_Simons_invariant_isn_t;
  PyObject *__pyx_kp_s_The_Dehn_filling_coefficients_mu;
  PyObject *__pyx_kp_s_The_Dirichlet_Domain_was_compute;
  PyObject *__pyx_kp_s_The_Dirichlet_Domain_was_not_com;
  PyObject *__pyx_kp_s_The_Dirichlet_construction_faile;
  PyObject *__pyx_kp_s_The_Dirichlet_domain_could_not_b;
  PyObject *__pyx_kp_s_The_Ford_domain_construction_fai;
  PyObject *__pyx_kp_s_The_HoroballViewer_class_was_not;
  PyObject *__pyx_kp_s_The_Manifold_is_not_orientable_s;
  PyObject *__pyx_kp_s_The_MorwenLinks_class_has_been_r;
  PyObject *__pyx_kp_s_The_Morwen_8_tetrahedra_manifold;
  PyObject *__pyx_kp_s_The_PolyhedronViewer_class_was_n;
  PyObject *__pyx_kp_s_The_SnapPea_kernel_couldn_t_comp;
  PyObject *__pyx_kp_s_The_SnapPea_kernel_was_not_able;
  PyObject *__pyx_kp_s_The_Triangulation_is_already_ori;
  PyObject *__pyx_kp_s_The_Triangulation_is_empty;
  PyObject *__pyx_kp_s_The_Triangulation_is_empty_2;
  PyObject *__pyx_kp_s_The_Triangulation_must_be_empty;
  PyObject *__pyx_kp_s_The_amount_of_data_given_is_not;
  PyObject *__pyx_kp_s_The_braid_word_is_invalid;
  PyObject *__pyx_kp_s_The_census_knot_s_was_not_found;
  PyObject *__pyx_kp_s_The_curve_is_not_isotopic_to_a_g;
  PyObject *__pyx_kp_s_The_cusp_neighborhood_constructi;
  PyObject *__pyx_kp_s_The_data_given_do_not_have_the_r;
  PyObject *__pyx_kp_s_The_data_provided_are_invalid_fo;
  PyObject *__pyx_kp_s_The_data_provided_does_not_give;
  PyObject *__pyx_kp_s_The_data_provided_does_not_give_2;
  PyObject *__pyx_kp_s_The_drilling_curve_requested_is;
  PyObject *__pyx_kp_s_The_elementary_divisors_must_for;
  PyObject *__pyx_kp_s_The_empty_triangulation_has_no_n;
  PyObject *__pyx_kp_s_The_full_symmetry_group_is_not_k;
  PyObject *__pyx_kp_s_The_full_symmetry_group_not_know;
  PyObject *__pyx_kp_s_The_generator_data_does_not_star;
  PyObject *__pyx_kp_s_The_homomorphism_image_is_not_a;
  PyObject *__pyx_kp_s_The_horoball_construction_failed;
  PyObject *__pyx_kp_s_The_link_complement_s_was_not_fo;
  PyObject *__pyx_kp_s_The_manifold_file_s_was_not_foun;
  PyObject *__pyx_kp_s_The_method_must_be_fold_or_layer;
  PyObject *__pyx_kp_s_The_number_of_fillings_specified;
  PyObject *__pyx_kp_s_The_peripheral_data_d_d_d_d_is_n;
  PyObject *__pyx_kp_s_The_peripheral_data_s_is_not_acc;
  PyObject *__pyx_kp_s_The_permutation_list_is_invalid;
  PyObject *__pyx_kp_s_The_solution_type_is_s;
  PyObject *__pyx_kp_s_The_specified_cusp_s_does_not_ex;
  PyObject *__pyx_kp_s_The_specified_edge_index_s_is_in;
  PyObject *__pyx_kp_s_The_specified_face_index_s_is_in;
  PyObject *__pyx_kp_s_The_specified_indices_to_be_fill;
  PyObject *__pyx_kp_s_The_specified_tetrahedron_s_does;
  PyObject *__pyx_kp_s_The_symmetry_group_has_only_d_el;
  PyObject *__pyx_kp_s_The_symmetry_group_is_not_a_nont;
  PyObject *__pyx_kp_s_The_symmetry_group_is_not_abelia;
  PyObject *__pyx_kp_s_The_symmetry_group_is_not_polyhe;
  PyObject *__pyx_kp_s_The_triangulation_construction_f;
  PyObject *__pyx_kp_s_The_word_contains_a_non_generato;
  PyObject *__pyx_kp_s_There_are_only_201_census_knots;
  PyObject *__pyx_kp_s_This_census_does_not_support_man;
  PyObject *__pyx_kp_s_To_permanently_fill_a_cusp_the_D;
  PyObject *__pyx_kp_b_Triangulation;
  PyObject *__pyx_kp_s_Triangulation;
  PyObject *__pyx_n_s_Triangulation_2;
  PyObject *__pyx_n_s_Triangulation_DT_code;
  PyObject *__pyx_kp_u_Triangulation_DT_code_line_1076;
  PyObject *__pyx_n_s_Triangulation___reduce;
  PyObject *__pyx_kp_u_Triangulation___reduce___line_86;
  PyObject *__pyx_n_s_Triangulation__covers_gap;
  PyObject *__pyx_n_s_Triangulation__covers_low_index;
  PyObject *__pyx_n_s_Triangulation__covers_magma;
  PyObject *__pyx_n_s_Triangulation__covers_snappea;
  PyObject *__pyx_n_s_Triangulation__empty_save;
  PyObject *__pyx_n_s_Triangulation__from_bytes;
  PyObject *__pyx_kp_u_Triangulation__from_bytes_line_7;
  PyObject *__pyx_n_s_Triangulation__from_isosig;
  PyObject *__pyx_kp_u_Triangulation__from_isosig_line;
  PyObject *__pyx_n_s_Triangulation__from_pickle;
  PyObject *__pyx_n_s_Triangulation__from_string;
  PyObject *__pyx_kp_u_Triangulation__from_string_line;
  PyObject *__pyx_n_s_Triangulation__from_tetrahedra_g;
  PyObject *__pyx_kp_u_Triangulation__from_tetrahedra_g_2;
  PyObject *__pyx_n_s_Triangulation__get_cusp_indices;
  PyObject *__pyx_n_s_Triangulation__get_from_link_dat;
  PyObject *__pyx_n_s_Triangulation__get_tetrahedra_gl;
  PyObject *__pyx_n_s_Triangulation__is_symplectic;
  PyObject *__pyx_n_s_Triangulation__marked_tetrahedra;
  PyObject *__pyx_n_s_Triangulation__num_fake_cusps;
  PyObject *__pyx_kp_u_Triangulation__num_fake_cusps_li;
  PyObject *__pyx_n_s_Triangulation__polish_hyperbolic;
  PyObject *__pyx_n_s_Triangulation__presentation_matr;
  PyObject *__pyx_n_s_Triangulation__ptolemy_equations;
  PyObject *__pyx_n_s_Triangulation__ptolemy_equations_2;
  PyObject *__pyx_n_s_Triangulation__ptolemy_equations_3;
  PyObject *__pyx_n_s_Triangulation__ptolemy_equations_4;
  PyObject *__pyx_n_s_Triangulation__ptolemy_equations_5;
  PyObject *__pyx_n_s_Triangulation__ptolemy_equations_6;
  PyObject *__pyx_n_s_Triangulation__reindex_cusps;
  PyObject *__pyx_kp_u_Triangulation__reindex_cusps_lin;
  PyObject *__pyx_n_s_Triangulation__remove_finite_ver;
  PyObject *__pyx_kp_u_Triangulation__remove_finite_ver_2;
  PyObject *__pyx_n_s_Triangulation__set_DTcode;
  PyObject *__pyx_n_s_Triangulation__set_PDcode;
  PyObject *__pyx_n_s_Triangulation__symplectic_form;
  PyObject *__pyx_n_s_Triangulation__three_to_two;
  PyObject *__pyx_n_s_Triangulation__to_bytes;
  PyObject *__pyx_kp_u_Triangulation__to_bytes_line_699;
  PyObject *__pyx_n_s_Triangulation__to_string;
  PyObject *__pyx_kp_u_Triangulation__to_string_line_65;
  PyObject *__pyx_n_s_Triangulation__two_to_three;
  PyObject *__pyx_n_s_Triangulation__unsimplified_fill;
  PyObject *__pyx_kp_u_Triangulation__unsimplified_fill_2;
  PyObject *__pyx_kp_s_Triangulation_and_text_files;
  PyObject *__pyx_kp_s_Triangulation_contains_cusps_onl;
  PyObject *__pyx_n_s_Triangulation_copy;
  PyObject *__pyx_kp_u_Triangulation_copy_line_442;
  PyObject *__pyx_n_s_Triangulation_cover;
  PyObject *__pyx_n_s_Triangulation_cover_info;
  PyObject *__pyx_kp_u_Triangulation_cover_line_2360;
  PyObject *__pyx_n_s_Triangulation_covers;
  PyObject *__pyx_kp_u_Triangulation_covers_line_2460;
  PyObject *__pyx_n_s_Triangulation_cusp_info;
  PyObject *__pyx_kp_u_Triangulation_cusp_info_line_119;
  PyObject *__pyx_n_s_Triangulation_dehn_fill;
  PyObject *__pyx_kp_u_Triangulation_dehn_fill_line_112;
  PyObject *__pyx_n_s_Triangulation_edge_valences;
  PyObject *__pyx_kp_u_Triangulation_edge_valences_line;
  PyObject *__pyx_n_s_Triangulation_filled_triangulati;
  PyObject *__pyx_kp_u_Triangulation_filled_triangulati_2;
  PyObject *__pyx_n_s_Triangulation_from_Manifold;
  PyObject *__pyx_n_s_Triangulation_fundamental_group;
  PyObject *__pyx_kp_u_Triangulation_fundamental_group_2;
  PyObject *__pyx_n_s_Triangulation_gluing_equations;
  PyObject *__pyx_kp_u_Triangulation_gluing_equations_l;
  PyObject *__pyx_n_s_Triangulation_gluing_equations_p;
  PyObject *__pyx_kp_u_Triangulation_gluing_equations_p_2;
  PyObject *__pyx_n_s_Triangulation_has_finite_vertice;
  PyObject *__pyx_kp_u_Triangulation_has_finite_vertice_2;
  PyObject *__pyx_n_s_Triangulation_homology;
  PyObject *__pyx_kp_u_Triangulation_homology_line_2278;
  PyObject *__pyx_n_s_Triangulation_is_orientable;
  PyObject *__pyx_kp_u_Triangulation_is_orientable_line;
  PyObject *__pyx_n_s_Triangulation_isomorphisms_to;
  PyObject *__pyx_kp_u_Triangulation_isomorphisms_to_li;
  PyObject *__pyx_n_s_Triangulation_link;
  PyObject *__pyx_n_s_Triangulation_name;
  PyObject *__pyx_kp_u_Triangulation_name_line_1049;
  PyObject *__pyx_n_s_Triangulation_num_cusps;
  PyObject *__pyx_kp_u_Triangulation_num_cusps_line_363;
  PyObject *__pyx_n_s_Triangulation_num_tetrahedra;
  PyObject *__pyx_kp_u_Triangulation_num_tetrahedra_lin;
  PyObject *__pyx_kp_s_Triangulation_or_Manifold;
  PyObject *__pyx_n_s_Triangulation_orientation_cover;
  PyObject *__pyx_kp_u_Triangulation_orientation_cover_2;
  PyObject *__pyx_n_s_Triangulation_pickle;
  PyObject *__pyx_n_s_Triangulation_plink;
  PyObject *__pyx_kp_u_Triangulation_plink_line_319;
  PyObject *__pyx_n_s_Triangulation_ptolemy_generalize;
  PyObject *__pyx_kp_u_Triangulation_ptolemy_generalize_2;
  PyObject *__pyx_n_s_Triangulation_ptolemy_obstructio;
  PyObject *__pyx_kp_u_Triangulation_ptolemy_obstructio_2;
  PyObject *__pyx_n_s_Triangulation_ptolemy_variety;
  PyObject *__pyx_kp_u_Triangulation_ptolemy_variety_li;
  PyObject *__pyx_n_s_Triangulation_randomize;
  PyObject *__pyx_kp_u_Triangulation_randomize_line_459;
  PyObject *__pyx_n_s_Triangulation_reverse_orientatio;
  PyObject *__pyx_kp_u_Triangulation_reverse_orientatio_2;
  PyObject *__pyx_n_s_Triangulation_save;
  PyObject *__pyx_kp_u_Triangulation_save_line_629;
  PyObject *__pyx_n_s_Triangulation_set_name;
  PyObject *__pyx_kp_u_Triangulation_set_name_line_1061;
  PyObject *__pyx_n_s_Triangulation_set_peripheral_cur;
  PyObject *__pyx_n_s_Triangulation_simplify;
  PyObject *__pyx_kp_u_Triangulation_simplify_line_473;
  PyObject *__pyx_n_s_Triangulation_symplectic_basis;
  PyObject *__pyx_kp_u_Triangulation_symplectic_basis_l;
  PyObject *__pyx_n_s_Triangulation_triangulation_isos;
  PyObject *__pyx_kp_u_Triangulation_triangulation_isos_2;
  PyObject *__pyx_n_s_Triangulation_with_hyperbolic_st;
  PyObject *__pyx_kp_u_Triangulation_with_hyperbolic_st_2;
  PyObject *__pyx_kp_u_Try_to_simplify_the_triangulati;
  PyObject *__pyx_n_s_Type;
  PyObject *__pyx_n_s_TypeError;
  PyObject *__pyx_n_s_UI_callback;
  PyObject *__pyx_kp_u_Used_by_pickle_dumps_from_pickl;
  PyObject *__pyx_kp_u_Used_by_the_pickle_module_to_pi;
  PyObject *__pyx_n_s_ValueError;
  PyObject *__pyx_kp_s_Verified_and_arbitrary_precision;
  PyObject *__pyx_n_s_ViewerWindow;
  PyObject *__pyx_kp_u_WARNING_Users_should_not_use_th;
  PyObject *__pyx_kp_u_WARNING_Users_should_not_use_th_2;
  PyObject *__pyx_kp_u_WARNING_Users_should_not_use_th_3;
  PyObject *__pyx_kp_s_Warning_Result_is_not_symplectic;
  PyObject *__pyx_kp_s_Words_must_be_represented_as_Pyt;
  PyObject *__pyx_kp_s_Wrong_equation_type;
  PyObject *__pyx_n_s_X;
  PyObject *__pyx_n_s_Xbackward_neighbor;
  PyObject *__pyx_n_s_Xbackward_strand;
  PyObject *__pyx_n_s_Xcomponent;
  PyObject *__pyx_n_s_Xforward_neighbor;
  PyObject *__pyx_n_s_Xforward_strand;
  PyObject *__pyx_n_s_Y;
  PyObject *__pyx_n_s_Ybackward_neighbor;
  PyObject *__pyx_n_s_Ybackward_strand;
  PyObject *__pyx_n_s_Ycomponent;
  PyObject *__pyx_n_s_Yforward_neighbor;
  PyObject *__pyx_n_s_Yforward_strand;
  PyObject *__pyx_kp_s_You_have_specified_a_Hoste_Thist;
  PyObject *__pyx_kp_s_You_must_apply_fillings_to_all_o;
  PyObject *__pyx_kp_s_You_must_apply_shortest_to_all_o;
  PyObject *__pyx_kp_s_You_provided_filling_data_for_to;
  PyObject *__pyx_kp_s_You_provided_more_peripheral_dat;
  PyObject *__pyx_kp_s_You_tried_to_create_an_empty_Sym;
  PyObject *__pyx_n_s_Z;
  PyObject *__pyx_kp_s_Z_d;
  PyObject *__pyx_kp_s__111;
  PyObject *__pyx_kp_s__114;
  PyObject *__pyx_kp_s__115;
  PyObject *__pyx_kp_s__116;
  PyObject *__pyx_kp_s__117;
  PyObject *__pyx_kp_s__118;
  PyObject *__pyx_kp_s__12;
  PyObject *__pyx_kp_s__13;
  PyObject *__pyx_kp_b__144;
  PyObject *__pyx_n_s__150;
  PyObject *__pyx_kp_s__16;
  PyObject *__pyx_kp_s__17;
  PyObject *__pyx_kp_s__170;
  PyObject *__pyx_kp_u__170;
  PyObject *__pyx_kp_s__18;
  PyObject *__pyx_kp_s__2;
  PyObject *__pyx_kp_s__23;
  PyObject *__pyx_kp_s__29;
  PyObject *__pyx_kp_s__30;
  PyObject *__pyx_kp_s__32;
  PyObject *__pyx_kp_s__33;
  PyObject *__pyx_kp_s__38;
  PyObject *__pyx_kp_s__653;
  PyObject *__pyx_kp_s__7;
  PyObject *__pyx_n_s__726;
  PyObject *__pyx_kp_s__8;
  PyObject *__pyx_kp_b__9;
  PyObject *__pyx_kp_s__9;
  PyObject *__pyx_kp_s_a;
  PyObject *__pyx_n_s_a_2;
  PyObject *__pyx_n_s_a_il;
  PyObject *__pyx_kp_s_a_zA_Z0_9;
  PyObject *__pyx_kp_s_abcABC__d_abcABC__d;
  PyObject *__pyx_kp_s_abcdefghijklmnopqrstuvwxyzZYXWV;
  PyObject *__pyx_n_s_abelian_description;
  PyObject *__pyx_n_s_abelianization;
  PyObject *__pyx_n_s_absImag;
  PyObject *__pyx_n_s_abspath;
  PyObject *__pyx_n_s_acc_log_im;
  PyObject *__pyx_n_s_acc_log_re;
  PyObject *__pyx_n_s_acc_rec_im;
  PyObject *__pyx_n_s_acc_rec_re;
  PyObject *__pyx_n_s_accuracies;
  PyObject *__pyx_n_s_accuracy;
  PyObject *__pyx_n_s_add;
  PyObject *__pyx_n_s_add_rows;
  PyObject *__pyx_n_s_algorithm;
  PyObject *__pyx_n_s_all;
  PyObject *__pyx_n_s_all_tables;
  PyObject *__pyx_kp_s_all_tetrahedra_positively_orient;
  PyObject *__pyx_n_s_alpha;
  PyObject *__pyx_kp_s_alternating_gz;
  PyObject *__pyx_n_s_alternation;
  PyObject *__pyx_n_s_ans;
  PyObject *__pyx_n_s_append;
  PyObject *__pyx_n_s_are_isometric;
  PyObject *__pyx_n_s_args;
  PyObject *__pyx_n_s_as_ideal;
  PyObject *__pyx_n_s_as_int_list;
  PyObject *__pyx_n_s_as_string;
  PyObject *__pyx_n_s_ascii;
  PyObject *__pyx_n_s_ascii_lowercase;
  PyObject *__pyx_n_s_asksaveasfile;
  PyObject *__pyx_n_s_assignments;
  PyObject *__pyx_n_s_asyncio_coroutines;
  PyObject *__pyx_kp_s_at_least;
  PyObject *__pyx_n_s_atexit;
  PyObject *__pyx_kp_s_b;
  PyObject *__pyx_n_s_b_2;
  PyObject *__pyx_kp_s_b_RL;
  PyObject *__pyx_kp_s_b_RL_2;
  PyObject *__pyx_kp_s_b_RRL;
  PyObject *__pyx_kp_s_b_RRL_2;
  PyObject *__pyx_n_s_b_file_name;
  PyObject *__pyx_n_s_b_new_name;
  PyObject *__pyx_kp_s_b_no_lLrR;
  PyObject *__pyx_n_s_b_string;
  PyObject *__pyx_n_s_ball;
  PyObject *__pyx_n_s_base;
  PyObject *__pyx_n_s_bases;
  PyObject *__pyx_n_s_basis;
  PyObject *__pyx_n_s_betti_number;
  PyObject *__pyx_kp_s_binary;
  PyObject *__pyx_kp_s_binary_dihedral_group_2_2_d;
  PyObject *__pyx_n_s_bit;
  PyObject *__pyx_n_s_bits_prec;
  PyObject *__pyx_n_s_blowup_multiple;
  PyObject *__pyx_n_s_browse;
  PyObject *__pyx_n_s_browser;
  PyObject *__pyx_n_s_bundle;
  PyObject *__pyx_n_s_bundle_from_string;
  PyObject *__pyx_n_s_byte;
  PyObject *__pyx_n_s_bytearray_to_bytes;
  PyObject *__pyx_n_s_byteseq;
  PyObject *__pyx_n_s_bytestring;
  PyObject *__pyx_n_s_c;
  PyObject *__pyx_n_s_c0;
  PyObject *__pyx_n_s_c1;
  PyObject *__pyx_n_s_c2;
  PyObject *__pyx_n_s_c3;
  PyObject *__pyx_n_s_c_abelianization;
  PyObject *__pyx_n_s_c_canonized_triangulation;
  PyObject *__pyx_n_s_c_center;
  PyObject *__pyx_n_s_c_comm_subgroup;
  PyObject *__pyx_n_s_c_core_length;
  PyObject *__pyx_n_s_c_cover_type;
  PyObject *__pyx_n_s_c_eqns;
  PyObject *__pyx_n_s_c_factor_0;
  PyObject *__pyx_n_s_c_factor_1;
  PyObject *__pyx_n_s_c_filled_tri;
  PyObject *__pyx_n_s_c_longitude;
  PyObject *__pyx_n_s_c_matrix;
  PyObject *__pyx_n_s_c_meridian;
  PyObject *__pyx_n_s_c_moves;
  PyObject *__pyx_n_s_c_new_name;
  PyObject *__pyx_n_s_c_new_tri;
  PyObject *__pyx_n_s_c_obstruction_class;
  PyObject *__pyx_n_s_c_opacities;
  PyObject *__pyx_n_s_c_representation;
  PyObject *__pyx_n_s_c_retriangulated_triangulation;
  PyObject *__pyx_n_s_c_string;
  PyObject *__pyx_n_s_c_symmetric_triangulation;
  PyObject *__pyx_n_s_c_target;
  PyObject *__pyx_n_s_c_terse;
  PyObject *__pyx_n_s_c_triangulation;
  PyObject *__pyx_n_s_c_vars;
  PyObject *__pyx_n_s_c_word;
  PyObject *__pyx_n_s_cache;
  PyObject *__pyx_n_s_callback;
  PyObject *__pyx_n_s_canonical;
  PyObject *__pyx_n_s_canonical_cells_are_tetrahedra;
  PyObject *__pyx_n_s_canonical_retriangulation;
  PyObject *__pyx_n_s_canonize;
  PyObject *__pyx_n_s_cb_menu;
  PyObject *__pyx_n_s_census_index;
  PyObject *__pyx_n_s_census_knot_archive;
  PyObject *__pyx_n_s_census_knot_numbers;
  PyObject *__pyx_n_s_center;
  PyObject *__pyx_n_s_centroid_at_origin;
  PyObject *__pyx_n_s_certified_shapes;
  PyObject *__pyx_n_s_character_variety;
  PyObject *__pyx_n_s_character_variety_ideal;
  PyObject *__pyx_n_s_character_variety_vars_and_polys;
  PyObject *__pyx_n_s_check_SnapPea_memory;
  PyObject *__pyx_n_s_check_index;
  PyObject *__pyx_n_s_chern_simons;
  PyObject *__pyx_n_s_choose_generators;
  PyObject *__pyx_n_s_choose_generators_info;
  PyObject *__pyx_n_s_circle;
  PyObject *__pyx_n_s_class;
  PyObject *__pyx_n_s_class_getitem;
  PyObject *__pyx_n_s_clear;
  PyObject *__pyx_n_s_clear_marks;
  PyObject *__pyx_n_s_cline_in_traceback;
  PyObject *__pyx_n_s_close;
  PyObject *__pyx_n_s_closed_census_directory;
  PyObject *__pyx_n_s_closed_nonorientable;
  PyObject *__pyx_n_s_closed_orientable;
  PyObject *__pyx_n_s_closest;
  PyObject *__pyx_n_s_cls;
  PyObject *__pyx_n_s_cobs;
  PyObject *__pyx_n_s_code;
  PyObject *__pyx_n_s_codec;
  PyObject *__pyx_n_s_coefficient_list;
  PyObject *__pyx_n_s_coeffs;
  PyObject *__pyx_n_s_col_support;
  PyObject *__pyx_n_s_cols;
  PyObject *__pyx_n_s_columns;
  PyObject *__pyx_n_s_combinatorial;
  PyObject *__pyx_n_s_comm_subgroup;
  PyObject *__pyx_n_s_commutator_subgroup;
  PyObject *__pyx_n_s_compile;
  PyObject *__pyx_n_s_complete;
  PyObject *__pyx_kp_s_complete_2;
  PyObject *__pyx_n_s_complete_length;
  PyObject *__pyx_kp_s_complete_length_2;
  PyObject *__pyx_n_s_complete_shape_array;
  PyObject *__pyx_n_s_complete_shapes;
  PyObject *__pyx_n_s_complex;
  PyObject *__pyx_n_s_complex_length;
  PyObject *__pyx_n_s_complex_volume;
  PyObject *__pyx_n_s_complex_volume_2;
  PyObject *__pyx_n_s_components;
  PyObject *__pyx_n_s_compute_corners;
  PyObject *__pyx_n_s_compute_cusp_shapes;
  PyObject *__pyx_n_s_compute_volume;
  PyObject *__pyx_n_s_contains;
  PyObject *__pyx_kp_s_contains_degenerate_tetrahedra;
  PyObject *__pyx_kp_s_contains_flat_tetrahedra;
  PyObject *__pyx_kp_s_contains_negatively_oriented_tet;
  PyObject *__pyx_n_s_content;
  PyObject *__pyx_n_s_copy;
  PyObject *__pyx_n_s_copy_c_triangulation;
  PyObject *__pyx_n_s_core_length;
  PyObject *__pyx_n_s_corners;
  PyObject *__pyx_n_s_coset_action;
  PyObject *__pyx_n_s_cover;
  PyObject *__pyx_n_s_cover_c_triangulation;
  PyObject *__pyx_n_s_cover_count;
  PyObject *__pyx_n_s_cover_info;
  PyObject *__pyx_n_s_cover_locals_genexpr;
  PyObject *__pyx_n_s_cover_type;
  PyObject *__pyx_n_s_cover_types;
  PyObject *__pyx_n_s_covers;
  PyObject *__pyx_n_s_covers_gap;
  PyObject *__pyx_n_s_covers_low_index;
  PyObject *__pyx_n_s_covers_low_index_locals_index;
  PyObject *__pyx_n_s_covers_magma;
  PyObject *__pyx_n_s_covers_snappea;
  PyObject *__pyx_n_s_crossings;
  PyObject *__pyx_n_s_cs;
  PyObject *__pyx_n_s_curdir;
  PyObject *__pyx_n_s_current_modulus;
  PyObject *__pyx_n_s_current_shape;
  PyObject *__pyx_n_s_current_shape_accuracy;
  PyObject *__pyx_n_s_curve_list;
  PyObject *__pyx_n_s_cusp_cross_section_info;
  PyObject *__pyx_n_s_cusp_images;
  PyObject *__pyx_n_s_cusp_images_2;
  PyObject *__pyx_n_s_cusp_index;
  PyObject *__pyx_n_s_cusp_indices;
  PyObject *__pyx_n_s_cusp_info;
  PyObject *__pyx_n_s_cusp_maps;
  PyObject *__pyx_n_s_cusp_maps_2;
  PyObject *__pyx_n_s_cusp_neighborhood;
  PyObject *__pyx_n_s_cusp_type;
  PyObject *__pyx_n_s_cusps;
  PyObject *__pyx_n_s_cusps_to_fill;
  PyObject *__pyx_n_s_cutoff;
  PyObject *__pyx_n_s_cutoff_length;
  PyObject *__pyx_n_s_cutoff_radius;
  PyObject *__pyx_n_s_cutout;
  PyObject *__pyx_n_s_cy_eval;
  PyObject *__pyx_n_s_cyclic;
  PyObject *__pyx_kp_s_cython_core_abelian_group_pyx;
  PyObject *__pyx_kp_s_cython_core_basic_pyx;
  PyObject *__pyx_kp_s_cython_core_cusp_neighborhoods_p;
  PyObject *__pyx_kp_s_cython_core_dirichlet_pyx;
  PyObject *__pyx_kp_s_cython_core_fundamental_group_py;
  PyObject *__pyx_kp_s_cython_core_manifold_pyx;
  PyObject *__pyx_kp_s_cython_core_symmetry_group_pyx;
  PyObject *__pyx_kp_s_cython_core_tail_pyx;
  PyObject *__pyx_kp_s_cython_core_triangulation_pyx;
  PyObject *__pyx_kp_s_d;
  PyObject *__pyx_kp_s_dB;
  PyObject *__pyx_n_s_dLQbcccdxwb;
  PyObject *__pyx_kp_s_d_2;
  PyObject *__pyx_kp_s_d_3;
  PyObject *__pyx_n_s_d_4;
  PyObject *__pyx_kp_s_d__d;
  PyObject *__pyx_kp_s_d_d;
  PyObject *__pyx_kp_s_d_d_2;
  PyObject *__pyx_kp_s_d_d__d;
  PyObject *__pyx_kp_s_d_finite_vertices_d_ideal_verti;
  PyObject *__pyx_n_s_data;
  PyObject *__pyx_kp_u_data_1_1_2_2_0_1_3_2_2_3_1_0_0;
  PyObject *__pyx_n_s_data_ijk;
  PyObject *__pyx_n_s_data_spec;
  PyObject *__pyx_n_s_database;
  PyObject *__pyx_n_s_datafile;
  PyObject *__pyx_n_s_dec_prec;
  PyObject *__pyx_n_s_decode;
  PyObject *__pyx_n_s_decorated;
  PyObject *__pyx_n_s_decorated_isosig;
  PyObject *__pyx_n_s_decoration;
  PyObject *__pyx_n_s_default_precision;
  PyObject *__pyx_n_s_defaultextension;
  PyObject *__pyx_n_s_degree;
  PyObject *__pyx_n_s_dehn_fill;
  PyObject *__pyx_n_s_delattr;
  PyObject *__pyx_n_s_delitem;
  PyObject *__pyx_n_s_desc;
  PyObject *__pyx_n_s_det;
  PyObject *__pyx_n_s_details;
  PyObject *__pyx_n_s_dict;
  PyObject *__pyx_n_s_dict_2;
  PyObject *__pyx_n_s_dict_3;
  PyObject *__pyx_n_s_direct_product_description;
  PyObject *__pyx_n_s_dirichlet_domain;
  PyObject *__pyx_kp_u_disable;
  PyObject *__pyx_n_s_disp;
  PyObject *__pyx_n_s_displacement;
  PyObject *__pyx_n_s_distance;
  PyObject *__pyx_n_s_doc;
  PyObject *__pyx_n_s_domain;
  PyObject *__pyx_n_s_drill;
  PyObject *__pyx_n_s_dual_curves;
  PyObject *__pyx_n_s_dual_rows;
  PyObject *__pyx_n_s_e;
  PyObject *__pyx_n_s_edge;
  PyObject *__pyx_n_s_edge_class;
  PyObject *__pyx_n_s_edge_image_indices;
  PyObject *__pyx_n_s_edge_index;
  PyObject *__pyx_n_s_edge_indices;
  PyObject *__pyx_n_s_edge_list;
  PyObject *__pyx_n_s_edge_orientations;
  PyObject *__pyx_n_s_edge_to_index;
  PyObject *__pyx_n_s_edge_to_index_dict;
  PyObject *__pyx_n_s_edge_valences;
  PyObject *__pyx_n_s_edges;
  PyObject *__pyx_n_s_eight_length;
  PyObject *__pyx_n_s_elementary_divisors;
  PyObject *__pyx_n_s_eliminate_fixed_ptolemys;
  PyObject *__pyx_n_s_elt;
  PyObject *__pyx_n_s_empty;
  PyObject *__pyx_n_s_empty_save;
  PyObject *__pyx_kp_u_enable;
  PyObject *__pyx_n_s_encode;
  PyObject *__pyx_n_s_end;
  PyObject *__pyx_n_s_endpoints;
  PyObject *__pyx_n_s_engine;
  PyObject *__pyx_n_s_enter;
  PyObject *__pyx_n_s_entries;
  PyObject *__pyx_n_s_enum;
  PyObject *__pyx_n_s_enumerate;
  PyObject *__pyx_n_s_environ;
  PyObject *__pyx_n_s_eqn;
  PyObject *__pyx_n_s_eqns;
  PyObject *__pyx_n_s_equation_type;
  PyObject *__pyx_n_s_equations;
  PyObject *__pyx_n_s_euler;
  PyObject *__pyx_n_s_eval;
  PyObject *__pyx_n_s_exceptions;
  PyObject *__pyx_n_s_exit;
  PyObject *__pyx_n_s_exit_2;
  PyObject *__pyx_n_s_expand_until_certified;
  PyObject *__pyx_n_s_explain_cols;
  PyObject *__pyx_n_s_explain_columns;
  PyObject *__pyx_n_s_explain_rows;
  PyObject *__pyx_n_s_explode;
  PyObject *__pyx_n_s_export_stl;
  PyObject *__pyx_n_s_extends_to_link;
  PyObject *__pyx_n_s_extends_to_link_2;
  PyObject *__pyx_n_s_extract_HT_knot;
  PyObject *__pyx_n_s_extractfile;
  PyObject *__pyx_n_s_f;
  PyObject *__pyx_n_s_face;
  PyObject *__pyx_n_s_face0_gen;
  PyObject *__pyx_n_s_face1_gen;
  PyObject *__pyx_n_s_face2_gen;
  PyObject *__pyx_n_s_face3_gen;
  PyObject *__pyx_n_s_face_index;
  PyObject *__pyx_n_s_face_list;
  PyObject *__pyx_n_s_face_list_locals_genexpr;
  PyObject *__pyx_n_s_facedicts;
  PyObject *__pyx_n_s_faces;
  PyObject *__pyx_n_s_factor_0;
  PyObject *__pyx_n_s_factor_1;
  PyObject *__pyx_n_s_file;
  PyObject *__pyx_n_s_file_name;
  PyObject *__pyx_n_s_filedata;
  PyObject *__pyx_n_s_filedialog;
  PyObject *__pyx_n_s_filename;
  PyObject *__pyx_n_s_files;
  PyObject *__pyx_n_s_filetypes;
  PyObject *__pyx_n_s_fill;
  PyObject *__pyx_n_s_fill_all;
  PyObject *__pyx_n_s_fill_by_fold;
  PyObject *__pyx_n_s_fill_cusp_spec;
  PyObject *__pyx_n_s_filled;
  PyObject *__pyx_n_s_filled_2;
  PyObject *__pyx_n_s_filled_length;
  PyObject *__pyx_kp_s_filled_length_2;
  PyObject *__pyx_n_s_filled_shape_array;
  PyObject *__pyx_n_s_filled_shapes;
  PyObject *__pyx_n_s_filled_tri;
  PyObject *__pyx_n_s_filled_triangulation;
  PyObject *__pyx_n_s_filling;
  PyObject *__pyx_kp_s_filling__d__d;
  PyObject *__pyx_n_s_filling_data;
  PyObject *__pyx_n_s_fillings;
  PyObject *__pyx_n_s_fillings_may_affect_generators;
  PyObject *__pyx_n_s_find;
  PyObject *__pyx_n_s_findall;
  PyObject *__pyx_n_s_first_nybble;
  PyObject *__pyx_n_s_five_length;
  PyObject *__pyx_n_s_five_tet_nonorientable;
  PyObject *__pyx_n_s_five_tet_orientable;
  PyObject *__pyx_n_s_fixed_alignment;
  PyObject *__pyx_n_s_flips;
  PyObject *__pyx_n_s_flush;
  PyObject *__pyx_n_s_fold;
  PyObject *__pyx_n_s_force_recompute;
  PyObject *__pyx_n_s_form;
  PyObject *__pyx_n_s_format;
  PyObject *__pyx_n_s_format_explain_list;
  PyObject *__pyx_n_s_format_str;
  PyObject *__pyx_n_s_format_two_by_two;
  PyObject *__pyx_n_s_from_bytes;
  PyObject *__pyx_n_b_from_data;
  PyObject *__pyx_n_s_from_isosig;
  PyObject *__pyx_n_s_from_pickle;
  PyObject *__pyx_n_s_from_string;
  PyObject *__pyx_n_s_from_tetrahedra_gluing_data;
  PyObject *__pyx_n_s_full_list;
  PyObject *__pyx_n_s_full_rigor;
  PyObject *__pyx_n_s_func;
  PyObject *__pyx_n_s_func_OK;
  PyObject *__pyx_n_s_func_bad_input;
  PyObject *__pyx_n_s_func_cancelled;
  PyObject *__pyx_n_s_func_failed;
  PyObject *__pyx_n_s_fundamental_group;
  PyObject *__pyx_n_s_g;
  PyObject *__pyx_n_s_g_eqns;
  PyObject *__pyx_kp_s_g_g;
  PyObject *__pyx_n_s_gap;
  PyObject *__pyx_n_s_gap_image_gens;
  PyObject *__pyx_n_s_gap_init;
  PyObject *__pyx_n_s_gap_string;
  PyObject *__pyx_kp_u_gc;
  PyObject *__pyx_n_s_gen;
  PyObject *__pyx_n_s_gen_names;
  PyObject *__pyx_n_s_generator_bytes;
  PyObject *__pyx_n_s_generator_file;
  PyObject *__pyx_n_s_generator_path;
  PyObject *__pyx_n_s_generators;
  PyObject *__pyx_n_s_generators_in_originals;
  PyObject *__pyx_n_s_genexpr;
  PyObject *__pyx_n_s_gens;
  PyObject *__pyx_n_s_geodesics;
  PyObject *__pyx_n_s_get;
  PyObject *__pyx_n_s_get_HT_knot_DT;
  PyObject *__pyx_n_s_get_HT_knot_by_index;
  PyObject *__pyx_n_s_get_cusp_indices_and_peripheral;
  PyObject *__pyx_n_s_get_data;
  PyObject *__pyx_n_s_get_displacement;
  PyObject *__pyx_n_s_get_from_link_data;
  PyObject *__pyx_n_s_get_generalized_ptolemy_obstruct;
  PyObject *__pyx_n_s_get_ptolemy_obstruction_classes;
  PyObject *__pyx_n_s_get_ptolemy_variety;
  PyObject *__pyx_n_s_get_tetrahedra_gluing_data;
  PyObject *__pyx_n_s_get_tetrahedra_shapes;
  PyObject *__pyx_n_s_get_tie;
  PyObject *__pyx_n_s_get_triangulation_tester;
  PyObject *__pyx_kp_u_get_triangulation_tester_doctes;
  PyObject *__pyx_kp_u_get_triangulation_tester_line_11;
  PyObject *__pyx_n_s_getitem;
  PyObject *__pyx_n_s_getstate;
  PyObject *__pyx_n_s_gluing;
  PyObject *__pyx_n_s_gluing_equations;
  PyObject *__pyx_n_s_gluing_equations_pgl;
  PyObject *__pyx_n_s_gluings;
  PyObject *__pyx_n_s_group;
  PyObject *__pyx_n_s_grouped;
  PyObject *__pyx_n_s_groups;
  PyObject *__pyx_n_s_gui;
  PyObject *__pyx_n_s_gzip;
  PyObject *__pyx_n_s_handles;
  PyObject *__pyx_n_s_has_finite_vertices;
  PyObject *__pyx_n_s_header;
  PyObject *__pyx_n_s_high_precision;
  PyObject *__pyx_n_s_holonomies;
  PyObject *__pyx_n_s_holonomy_accuracy;
  PyObject *__pyx_kp_s_holonomy_precision;
  PyObject *__pyx_n_s_homology;
  PyObject *__pyx_n_s_horoball_list;
  PyObject *__pyx_n_s_horoballs;
  PyObject *__pyx_n_s_horoviewer;
  PyObject *__pyx_n_s_hue;
  PyObject *__pyx_kp_s_hyperbolic_data__sa_gz;
  PyObject *__pyx_kp_s_hyperbolic_data__sn_gz;
  PyObject *__pyx_n_s_i;
  PyObject *__pyx_kp_s_icosohedral_group;
  PyObject *__pyx_n_s_ideal;
  PyObject *__pyx_n_s_identify;
  PyObject *__pyx_n_s_identify_2;
  PyObject *__pyx_n_s_ignore_curve_orientations;
  PyObject *__pyx_n_s_ignore_cusp_ordering;
  PyObject *__pyx_n_s_ignore_orientation;
  PyObject *__pyx_n_s_ignore_solution_type;
  PyObject *__pyx_n_s_imag;
  PyObject *__pyx_n_s_images;
  PyObject *__pyx_n_s_immutable;
  PyObject *__pyx_n_s_import;
  PyObject *__pyx_kp_u_import_itertools_M_Manifold_L14;
  PyObject *__pyx_n_s_in_radius;
  PyObject *__pyx_n_s_include_words;
  PyObject *__pyx_n_s_index;
  PyObject *__pyx_n_s_index_within_crossings;
  PyObject *__pyx_n_s_indices;
  PyObject *__pyx_n_s_infinite;
  PyObject *__pyx_n_s_info;
  PyObject *__pyx_n_s_init;
  PyObject *__pyx_n_s_init_hyperbolic_structure;
  PyObject *__pyx_n_s_init_subclass;
  PyObject *__pyx_n_s_initial_modulus;
  PyObject *__pyx_n_s_initial_shape;
  PyObject *__pyx_n_s_initial_shape_accuracy;
  PyObject *__pyx_n_s_initialize_structure;
  PyObject *__pyx_n_s_initializing;
  PyObject *__pyx_n_s_input_type;
  PyObject *__pyx_n_s_int_list;
  PyObject *__pyx_n_s_integer;
  PyObject *__pyx_n_s_internal;
  PyObject *__pyx_n_s_interrupted;
  PyObject *__pyx_n_s_intervals;
  PyObject *__pyx_n_s_inverse_list_word;
  PyObject *__pyx_n_s_irregular;
  PyObject *__pyx_n_s_is_GapElement;
  PyObject *__pyx_n_s_is_HT_knot;
  PyObject *__pyx_n_s_is_MagmaElement;
  PyObject *__pyx_n_s_is_PermutationGroupElement;
  PyObject *__pyx_n_s_is_S5;
  PyObject *__pyx_n_s_is_abelian;
  PyObject *__pyx_n_s_is_alpha_DT_exterior;
  PyObject *__pyx_n_s_is_amphicheiral;
  PyObject *__pyx_n_s_is_binary_group;
  PyObject *__pyx_n_s_is_braid_complement;
  PyObject *__pyx_n_s_is_complete;
  PyObject *__pyx_n_s_is_coroutine;
  PyObject *__pyx_n_s_is_decorated_isosig;
  PyObject *__pyx_n_s_is_dihedral;
  PyObject *__pyx_n_s_is_direct_product;
  PyObject *__pyx_n_s_is_full_group;
  PyObject *__pyx_n_s_is_geometric;
  PyObject *__pyx_n_s_is_int_DT_exterior;
  PyObject *__pyx_n_s_is_invertible_knot;
  PyObject *__pyx_n_s_is_isometric_to;
  PyObject *__pyx_n_s_is_isosig;
  PyObject *__pyx_n_s_is_link_complement1;
  PyObject *__pyx_n_s_is_link_complement1_pat;
  PyObject *__pyx_n_s_is_link_complement2;
  PyObject *__pyx_n_s_is_link_complement2_pat;
  PyObject *__pyx_n_s_is_link_complement3;
  PyObject *__pyx_n_s_is_link_complement3_pat;
  PyObject *__pyx_n_s_is_orientable;
  PyObject *__pyx_n_s_is_polyhedral;
  PyObject *__pyx_n_s_is_symplectic;
  PyObject *__pyx_n_s_is_torus_bundle;
  PyObject *__pyx_n_s_is_twister_bundle;
  PyObject *__pyx_n_s_is_twister_splitting;
  PyObject *__pyx_n_s_is_two_bridge;
  PyObject *__pyx_kp_u_isenabled;
  PyObject *__pyx_n_s_isfile;
  PyObject *__pyx_n_s_islower;
  PyObject *__pyx_n_s_isometries;
  PyObject *__pyx_n_s_isomorphisms_to;
  PyObject *__pyx_n_s_isosig;
  PyObject *__pyx_n_s_isosig_pattern;
  PyObject *__pyx_n_s_item;
  PyObject *__pyx_n_s_items;
  PyObject *__pyx_n_s_iter;
  PyObject *__pyx_n_s_its_matrix;
  PyObject *__pyx_n_s_j;
  PyObject *__pyx_n_s_join;
  PyObject *__pyx_n_s_k;
  PyObject *__pyx_n_s_key;
  PyObject *__pyx_n_s_keys;
  PyObject *__pyx_n_s_kl;
  PyObject *__pyx_n_s_klein;
  PyObject *__pyx_n_s_klp;
  PyObject *__pyx_n_s_kwargs;
  PyObject *__pyx_n_s_l;
  PyObject *__pyx_n_s_l0;
  PyObject *__pyx_n_s_l1;
  PyObject *__pyx_n_s_l2;
  PyObject *__pyx_kp_s_lL_P_components_0_9_1_P_crossin;
  PyObject *__pyx_n_s_layered;
  PyObject *__pyx_n_s_layered_and_marked;
  PyObject *__pyx_n_s_lazy;
  PyObject *__pyx_n_s_left;
  PyObject *__pyx_n_s_left_pad_string;
  PyObject *__pyx_n_s_len;
  PyObject *__pyx_n_s_lenStr;
  PyObject *__pyx_n_s_len_2;
  PyObject *__pyx_n_s_length;
  PyObject *__pyx_kp_s_length_2;
  PyObject *__pyx_n_s_length_spectrum;
  PyObject *__pyx_n_s_length_spectrum_dicts;
  PyObject *__pyx_n_s_letter;
  PyObject *__pyx_n_s_letter_seperator;
  PyObject *__pyx_n_s_line;
  PyObject *__pyx_n_s_line0;
  PyObject *__pyx_n_s_line1;
  PyObject *__pyx_n_s_line2;
  PyObject *__pyx_n_s_line3;
  PyObject *__pyx_n_s_link;
  PyObject *__pyx_n_s_link_archive;
  PyObject *__pyx_n_s_link_directory;
  PyObject *__pyx_n_s_list_as_word;
  PyObject *__pyx_n_s_list_as_word_locals_genexpr;
  PyObject *__pyx_n_s_ljust;
  PyObject *__pyx_n_s_log;
  PyObject *__pyx_n_s_log_im;
  PyObject *__pyx_n_s_log_re;
  PyObject *__pyx_n_s_log_shape;
  PyObject *__pyx_n_s_long_relators;
  PyObject *__pyx_n_s_longitude;
  PyObject *__pyx_kp_s_longitude__d__d;
  PyObject *__pyx_n_s_longitude_accuracy;
  PyObject *__pyx_n_s_lookup;
  PyObject *__pyx_n_s_low_index;
  PyObject *__pyx_n_s_low_index_version;
  PyObject *__pyx_n_s_lower;
  PyObject *__pyx_n_s_m;
  PyObject *__pyx_n_s_m003;
  PyObject *__pyx_n_s_m004;
  PyObject *__pyx_n_s_magma;
  PyObject *__pyx_n_s_magma_init;
  PyObject *__pyx_n_s_magma_string;
  PyObject *__pyx_n_s_main;
  PyObject *__pyx_n_s_major;
  PyObject *__pyx_n_s_manifold;
  PyObject *__pyx_n_s_manifoldMethods;
  PyObject *__pyx_n_s_manifold_class;
  PyObject *__pyx_n_s_manifold_class_2;
  PyObject *__pyx_n_s_manifold_name;
  PyObject *__pyx_n_s_manifold_path;
  PyObject *__pyx_n_s_manifold_paths;
  PyObject *__pyx_n_s_manifolds;
  PyObject *__pyx_n_s_map;
  PyObject *__pyx_n_s_maps;
  PyObject *__pyx_n_s_mark_solid_tori;
  PyObject *__pyx_n_s_marked;
  PyObject *__pyx_n_s_marked_tetrahedra;
  PyObject *__pyx_n_s_mask;
  PyObject *__pyx_n_s_mat;
  PyObject *__pyx_n_s_match;
  PyObject *__pyx_n_s_math;
  PyObject *__pyx_n_s_matrices;
  PyObject *__pyx_n_s_matrices_2;
  PyObject *__pyx_n_s_matrix;
  PyObject *__pyx_n_s_matsnf;
  PyObject *__pyx_n_s_max;
  PyObject *__pyx_n_s_max_crossings;
  PyObject *__pyx_n_s_max_reach;
  PyObject *__pyx_n_s_max_segments;
  PyObject *__pyx_n_s_maximize_injectivity_radius;
  PyObject *__pyx_n_s_meridian;
  PyObject *__pyx_kp_s_meridian__d__d;
  PyObject *__pyx_n_s_meridian_accuracy;
  PyObject *__pyx_n_s_message;
  PyObject *__pyx_n_s_metaclass;
  PyObject *__pyx_n_s_method;
  PyObject *__pyx_n_s_minimize_number_of_generators;
  PyObject *__pyx_kp_s_mirrored_arc;
  PyObject *__pyx_n_s_mode;
  PyObject *__pyx_n_s_model;
  PyObject *__pyx_n_s_module;
  PyObject *__pyx_n_s_modulus;
  PyObject *__pyx_n_s_monodromy;
  PyObject *__pyx_kp_s_morwen8;
  PyObject *__pyx_kp_s_morwen8_tgz;
  PyObject *__pyx_n_s_morwen_link_directory;
  PyObject *__pyx_n_s_moves;
  PyObject *__pyx_n_s_mro_entries;
  PyObject *__pyx_n_s_msg_stream;
  PyObject *__pyx_n_s_mult;
  PyObject *__pyx_n_s_multiplicities;
  PyObject *__pyx_n_s_multiplicity;
  PyObject *__pyx_n_s_multiply_elements;
  PyObject *__pyx_n_s_myslice;
  PyObject *__pyx_n_s_n;
  PyObject *__pyx_n_s_name;
  PyObject *__pyx_n_s_name_2;
  PyObject *__pyx_n_s_ncols;
  PyObject *__pyx_n_s_neighbor;
  PyObject *__pyx_n_s_neighbor0_idx;
  PyObject *__pyx_n_s_neighbor1_idx;
  PyObject *__pyx_n_s_neighbor2_idx;
  PyObject *__pyx_n_s_neighbor3_idx;
  PyObject *__pyx_n_s_neighbor_end;
  PyObject *__pyx_n_s_neighbors;
  PyObject *__pyx_n_s_new;
  PyObject *__pyx_n_s_new_2;
  PyObject *__pyx_n_s_new_displacement;
  PyObject *__pyx_n_s_new_name;
  PyObject *__pyx_n_s_new_tie;
  PyObject *__pyx_n_s_new_tri;
  PyObject *__pyx_n_s_next;
  PyObject *__pyx_n_s_next_2;
  PyObject *__pyx_n_s_no_arcs;
  PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
  PyObject *__pyx_kp_s_no_solution_found;
  PyObject *__pyx_n_s_non_peripheral;
  PyObject *__pyx_kp_s_nonabelian_group_of_order_d;
  PyObject *__pyx_kp_s_nonalternating_gz;
  PyObject *__pyx_n_s_nonorientable;
  PyObject *__pyx_n_s_nonzeros;
  PyObject *__pyx_kp_s_not_attempted;
  PyObject *__pyx_n_s_nrows;
  PyObject *__pyx_n_s_num;
  PyObject *__pyx_n_s_num_cols;
  PyObject *__pyx_n_s_num_components;
  PyObject *__pyx_n_s_num_crossings;
  PyObject *__pyx_n_s_num_curves;
  PyObject *__pyx_n_s_num_cusps;
  PyObject *__pyx_n_s_num_edges;
  PyObject *__pyx_n_s_num_faces;
  PyObject *__pyx_n_s_num_fake_cusps;
  PyObject *__pyx_n_s_num_finite_vertices;
  PyObject *__pyx_n_s_num_gen;
  PyObject *__pyx_n_s_num_generators;
  PyObject *__pyx_n_s_num_gens;
  PyObject *__pyx_n_s_num_ideal_vertices;
  PyObject *__pyx_n_s_num_lengths;
  PyObject *__pyx_n_s_num_links;
  PyObject *__pyx_n_s_num_nonor_cusps;
  PyObject *__pyx_n_s_num_or_cusps;
  PyObject *__pyx_n_s_num_orig_gens;
  PyObject *__pyx_n_s_num_original_generators;
  PyObject *__pyx_n_s_num_relations;
  PyObject *__pyx_n_s_num_relators;
  PyObject *__pyx_n_s_num_rows;
  PyObject *__pyx_n_s_num_subdivisions;
  PyObject *__pyx_n_s_num_surfaces;
  PyObject *__pyx_n_s_num_tet;
  PyObject *__pyx_n_s_num_tetrahedra;
  PyObject *__pyx_n_s_num_threads;
  PyObject *__pyx_n_s_num_vertices;
  PyObject *__pyx_n_s_number;
  PyObject *__pyx_n_s_number_2;
  PyObject *__pyx_n_s_number_to_native_number;
  PyObject *__pyx_n_s_o31;
  PyObject *__pyx_n_s_obsolete;
  PyObject *__pyx_n_s_obstruction_class;
  PyObject *__pyx_kp_s_octahedral_group;
  PyObject *__pyx_n_s_of_link;
  PyObject *__pyx_n_s_offset;
  PyObject *__pyx_n_s_old;
  PyObject *__pyx_n_s_omega;
  PyObject *__pyx_n_s_one_manifold;
  PyObject *__pyx_kp_s_one_sided;
  PyObject *__pyx_n_s_one_tet_lengths;
  PyObject *__pyx_n_s_one_tet_tilts;
  PyObject *__pyx_n_s_one_vertex_lengths;
  PyObject *__pyx_n_s_opacities;
  PyObject *__pyx_n_s_open;
  PyObject *__pyx_n_s_operator;
  PyObject *__pyx_n_s_order;
  PyObject *__pyx_n_s_orient;
  PyObject *__pyx_n_s_orientability;
  PyObject *__pyx_n_s_orientable;
  PyObject *__pyx_n_s_orientation_cover;
  PyObject *__pyx_kp_s_orientation_preserving;
  PyObject *__pyx_kp_s_orientation_reversing;
  PyObject *__pyx_n_s_orig_gens;
  PyObject *__pyx_n_s_original_generators;
  PyObject *__pyx_n_s_original_index;
  PyObject *__pyx_n_s_os;
  PyObject *__pyx_n_s_other;
  PyObject *__pyx_n_s_out_radius;
  PyObject *__pyx_n_s_output;
  PyObject *__pyx_n_s_output_file;
  PyObject *__pyx_n_s_owns_c_symmetry_group;
  PyObject *__pyx_n_s_p;
  PyObject *__pyx_n_s_pad;
  PyObject *__pyx_n_s_pair;
  PyObject *__pyx_n_s_pairing_matrices;
  PyObject *__pyx_n_s_pairing_words;
  PyObject *__pyx_n_s_pari;
  PyObject *__pyx_n_s_parity;
  PyObject *__pyx_n_s_part;
  PyObject *__pyx_n_s_parts;
  PyObject *__pyx_n_s_passes_at_fours;
  PyObject *__pyx_n_s_path;
  PyObject *__pyx_n_s_path_2;
  PyObject *__pyx_n_s_peripheral;
  PyObject *__pyx_n_s_peripheral_curves;
  PyObject *__pyx_n_s_peripheral_data;
  PyObject *__pyx_n_s_perm;
  PyObject *__pyx_n_s_perm0;
  PyObject *__pyx_n_s_perm1;
  PyObject *__pyx_n_s_perm2;
  PyObject *__pyx_n_s_perm3;
  PyObject *__pyx_n_s_perms;
  PyObject *__pyx_n_s_permutation;
  PyObject *__pyx_n_s_permutation_rep;
  PyObject *__pyx_n_s_permutation_reps;
  PyObject *__pyx_kp_b_pickle;
  PyObject *__pyx_n_b_pickle_2;
  PyObject *__pyx_n_s_pickle_2;
  PyObject *__pyx_n_s_pieces;
  PyObject *__pyx_n_s_plink;
  PyObject *__pyx_n_s_plink_callback;
  PyObject *__pyx_n_s_plink_callback_2;
  PyObject *__pyx_n_s_polish_hyperbolic_structures;
  PyObject *__pyx_n_s_polished_tetrahedra_shapes;
  PyObject *__pyx_n_s_polyhedral_description;
  PyObject *__pyx_n_s_polyviewer;
  PyObject *__pyx_n_s_pop;
  PyObject *__pyx_n_s_popitem;
  PyObject *__pyx_n_s_position;
  PyObject *__pyx_n_s_precision;
  PyObject *__pyx_n_s_prefix;
  PyObject *__pyx_n_s_prepare;
  PyObject *__pyx_n_s_presentation;
  PyObject *__pyx_n_s_presentation_matrix;
  PyObject *__pyx_n_s_print;
  PyObject *__pyx_n_s_protocol;
  PyObject *__pyx_n_s_ptolemy;
  PyObject *__pyx_n_s_ptolemyManifoldMethods;
  PyObject *__pyx_n_s_ptolemy_equations_action_by_dec;
  PyObject *__pyx_n_s_ptolemy_equations_boundary_map;
  PyObject *__pyx_n_s_ptolemy_equations_boundary_map_2;
  PyObject *__pyx_n_s_ptolemy_equations_boundary_map_3;
  PyObject *__pyx_n_s_ptolemy_equations_identified_co;
  PyObject *__pyx_n_s_ptolemy_equations_identified_fa;
  PyObject *__pyx_n_s_ptolemy_generalized_obstruction;
  PyObject *__pyx_n_s_ptolemy_obstruction_classes;
  PyObject *__pyx_n_s_ptolemy_variety;
  PyObject *__pyx_n_s_python_major_version;
  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_PresentationMatri;
  PyObject *__pyx_n_s_pyx_vtable;
  PyObject *__pyx_n_s_q;
  PyObject *__pyx_n_s_qualname;
  PyObject *__pyx_n_s_r;
  PyObject *__pyx_kp_s_r_2;
  PyObject *__pyx_n_s_radius;
  PyObject *__pyx_n_s_randomize;
  PyObject *__pyx_n_s_range;
  PyObject *__pyx_n_s_rank;
  PyObject *__pyx_n_s_raw_form;
  PyObject *__pyx_n_s_rb;
  PyObject *__pyx_n_s_re;
  PyObject *__pyx_n_s_reach;
  PyObject *__pyx_n_s_read;
  PyObject *__pyx_n_s_readline;
  PyObject *__pyx_n_s_readlines;
  PyObject *__pyx_n_s_real;
  PyObject *__pyx_n_s_real_coerced_to_bits_prec;
  PyObject *__pyx_n_s_recompute;
  PyObject *__pyx_n_s_record;
  PyObject *__pyx_n_s_rect;
  PyObject *__pyx_n_s_rect_im;
  PyObject *__pyx_n_s_rect_re;
  PyObject *__pyx_n_s_rect_shape;
  PyObject *__pyx_n_s_reduce;
  PyObject *__pyx_n_s_reduce_cython;
  PyObject *__pyx_n_s_reduce_ex;
  PyObject *__pyx_n_s_reduce_list_word;
  PyObject *__pyx_n_s_regular;
  PyObject *__pyx_n_s_reindex_cusps;
  PyObject *__pyx_n_s_rel;
  PyObject *__pyx_n_s_relation;
  PyObject *__pyx_n_s_relation_list;
  PyObject *__pyx_n_s_relators;
  PyObject *__pyx_n_s_rels;
  PyObject *__pyx_n_s_remove;
  PyObject *__pyx_n_s_remove_finite_vertices;
  PyObject *__pyx_n_s_remove_finite_vertices_2;
  PyObject *__pyx_n_s_reopen;
  PyObject *__pyx_n_s_rep;
  PyObject *__pyx_n_s_replace;
  PyObject *__pyx_n_s_repr;
  PyObject *__pyx_n_s_repr_2;
  PyObject *__pyx_n_s_reps;
  PyObject *__pyx_n_s_result;
  PyObject *__pyx_n_s_result_curves;
  PyObject *__pyx_n_s_result_cusp_indices;
  PyObject *__pyx_n_s_return_isometries;
  PyObject *__pyx_n_s_return_matrices;
  PyObject *__pyx_n_s_return_type;
  PyObject *__pyx_n_s_retval;
  PyObject *__pyx_n_s_rev_spec_dict;
  PyObject *__pyx_n_s_reverse_orientation;
  PyObject *__pyx_n_s_right;
  PyObject *__pyx_n_s_rings;
  PyObject *__pyx_n_s_rjust;
  PyObject *__pyx_n_s_rolfsen_link_regexs;
  PyObject *__pyx_n_s_round;
  PyObject *__pyx_n_s_row;
  PyObject *__pyx_n_s_row_entries;
  PyObject *__pyx_n_s_row_op;
  PyObject *__pyx_n_s_rows;
  PyObject *__pyx_n_s_s;
  PyObject *__pyx_kp_s_s_2;
  PyObject *__pyx_kp_s_s_3;
  PyObject *__pyx_kp_s_s_4;
  PyObject *__pyx_kp_s_s_F_d;
  PyObject *__pyx_kp_s_s_s;
  PyObject *__pyx_kp_s_s_s_explain_columns_s_explain_r;
  PyObject *__pyx_kp_s_s_s_with_euler_s;
  PyObject *__pyx_kp_s_s_x_s;
  PyObject *__pyx_n_s_sage;
  PyObject *__pyx_n_s_sage_all;
  PyObject *__pyx_n_s_sage_groups_free_group;
  PyObject *__pyx_n_s_sage_groups_perm_gps_permgroup;
  PyObject *__pyx_n_s_sage_groups_perm_gps_permgroup_e;
  PyObject *__pyx_n_s_sage_helper;
  PyObject *__pyx_n_s_sage_interfaces_abc;
  PyObject *__pyx_n_s_sage_interfaces_gap;
  PyObject *__pyx_n_s_sage_interfaces_magma;
  PyObject *__pyx_n_s_sage_matrix;
  PyObject *__pyx_n_s_sage_matrix_constructor;
  PyObject *__pyx_n_s_sage_object;
  PyObject *__pyx_n_s_sage_structure_sage_object;
  PyObject *__pyx_n_s_save;
  PyObject *__pyx_n_s_savefile;
  PyObject *__pyx_n_s_second_char;
  PyObject *__pyx_n_s_second_nybble;
  PyObject *__pyx_n_s_seed;
  PyObject *__pyx_n_s_seek;
  PyObject *__pyx_n_s_segment;
  PyObject *__pyx_n_s_segment_list;
  PyObject *__pyx_n_s_self;
  PyObject *__pyx_n_s_send;
  PyObject *__pyx_n_s_sep;
  PyObject *__pyx_n_s_set_DTcode;
  PyObject *__pyx_n_s_set_PDcode;
  PyObject *__pyx_n_s_set_displacement;
  PyObject *__pyx_n_s_set_name;
  PyObject *__pyx_n_s_set_name_2;
  PyObject *__pyx_n_s_set_peripheral_curves;
  PyObject *__pyx_n_s_set_peripheral_from_decoration;
  PyObject *__pyx_n_s_set_rand_seed;
  PyObject *__pyx_n_s_set_target_holonomy;
  PyObject *__pyx_n_s_set_test_flag;
  PyObject *__pyx_n_s_set_tetrahedra_shapes;
  PyObject *__pyx_n_s_set_tie;
  PyObject *__pyx_n_s_setattr;
  PyObject *__pyx_n_s_setitem;
  PyObject *__pyx_n_s_setstate;
  PyObject *__pyx_n_s_setstate_cython;
  PyObject *__pyx_n_s_seven_length;
  PyObject *__pyx_n_s_shape;
  PyObject *__pyx_n_s_shape_accuracy;
  PyObject *__pyx_kp_s_shape_precision;
  PyObject *__pyx_n_s_shapes;
  PyObject *__pyx_n_s_short_relators;
  PyObject *__pyx_n_s_shortest;
  PyObject *__pyx_n_s_shortest_longitudes;
  PyObject *__pyx_n_s_shortest_meridians;
  PyObject *__pyx_n_s_show_uAcknowledge;
  PyObject *__pyx_n_s_shrink_factor;
  PyObject *__pyx_n_s_side;
  PyObject *__pyx_n_s_side_lengths;
  PyObject *__pyx_n_s_sided;
  PyObject *__pyx_n_s_sign;
  PyObject *__pyx_n_s_signs;
  PyObject *__pyx_n_s_signtype;
  PyObject *__pyx_n_s_simplified_matrix;
  PyObject *__pyx_n_s_simplify;
  PyObject *__pyx_n_s_simplify_presentation;
  PyObject *__pyx_n_s_singularity_index;
  PyObject *__pyx_n_s_six_length;
  PyObject *__pyx_n_s_size;
  PyObject *__pyx_n_s_sl2;
  PyObject *__pyx_n_s_smith_form;
  PyObject *__pyx_n_s_snap;
  PyObject *__pyx_n_s_snapPea;
  PyObject *__pyx_n_s_snappea;
  PyObject *__pyx_n_s_snappy;
  PyObject *__pyx_n_s_so_far;
  PyObject *__pyx_n_s_soln;
  PyObject *__pyx_n_s_solution_type;
  PyObject *__pyx_n_s_sorted;
  PyObject *__pyx_n_s_spec;
  PyObject *__pyx_n_s_spec_2;
  PyObject *__pyx_n_s_specs;
  PyObject *__pyx_n_s_spectrum;
  PyObject *__pyx_n_s_spherogram;
  PyObject *__pyx_n_s_spin_short;
  PyObject *__pyx_n_s_spine_radius;
  PyObject *__pyx_n_s_split;
  PyObject *__pyx_n_s_split_filling_info;
  PyObject *__pyx_n_s_splitting;
  PyObject *__pyx_n_s_splitting_from_string;
  PyObject *__pyx_n_s_splitting_surfaces;
  PyObject *__pyx_n_s_start;
  PyObject *__pyx_n_s_startswith;
  PyObject *__pyx_n_s_state;
  PyObject *__pyx_n_s_staticmethod;
  PyObject *__pyx_n_s_stderr;
  PyObject *__pyx_n_s_stdout;
  PyObject *__pyx_n_s_step;
  PyObject *__pyx_n_s_stl;
  PyObject *__pyx_n_s_stop;
  PyObject *__pyx_n_s_stopper;
  PyObject *__pyx_n_s_stopping_displacement;
  PyObject *__pyx_n_s_str;
  PyObject *__pyx_n_s_strandtype;
  PyObject *__pyx_n_s_strategy;
  PyObject *__pyx_n_s_string;
  PyObject *__pyx_kp_s_stringsource;
  PyObject *__pyx_n_s_strip;
  PyObject *__pyx_n_s_strline;
  PyObject *__pyx_n_s_struct;
  PyObject *__pyx_n_s_structure;
  PyObject *__pyx_n_s_subgroup;
  PyObject *__pyx_n_s_sum;
  PyObject *__pyx_n_s_super;
  PyObject *__pyx_n_s_surface;
  PyObject *__pyx_n_s_surfaces;
  PyObject *__pyx_n_s_symmetric_triangulation;
  PyObject *__pyx_n_s_symmetries_of_link;
  PyObject *__pyx_n_s_symmetries_of_manifold;
  PyObject *__pyx_n_s_symmetry_group;
  PyObject *__pyx_n_s_symplectic_basis;
  PyObject *__pyx_n_s_symplectic_form;
  PyObject *__pyx_n_s_sys;
  PyObject *__pyx_n_s_t;
  PyObject *__pyx_n_s_table;
  PyObject *__pyx_n_s_table_directory;
  PyObject *__pyx_n_s_tail;
  PyObject *__pyx_n_s_tail_vertex_index;
  PyObject *__pyx_n_s_tarfile;
  PyObject *__pyx_n_s_target;
  PyObject *__pyx_n_s_tarpath;
  PyObject *__pyx_n_s_temp;
  PyObject *__pyx_n_s_tempfile;
  PyObject *__pyx_n_s_test;
  PyObject *__pyx_n_s_tet;
  PyObject *__pyx_n_s_tet_num;
  PyObject *__pyx_n_s_tetrahedra_data;
  PyObject *__pyx_n_s_tetrahedra_shapes;
  PyObject *__pyx_kp_s_tetrahedra_shapes_were_inserted;
  PyObject *__pyx_kp_s_tetrahedral_group;
  PyObject *__pyx_kp_s_the_gap_method_for_covers_requir;
  PyObject *__pyx_kp_s_the_magma_method_for_covers_requ;
  PyObject *__pyx_n_s_three_to_two;
  PyObject *__pyx_n_s_throw;
  PyObject *__pyx_n_s_tilts;
  PyObject *__pyx_n_s_time;
  PyObject *__pyx_n_s_tip;
  PyObject *__pyx_n_s_tip_vertex_index;
  PyObject *__pyx_n_s_title;
  PyObject *__pyx_n_s_to_byte_str;
  PyObject *__pyx_n_s_to_bytes;
  PyObject *__pyx_n_s_to_do;
  PyObject *__pyx_n_s_to_str;
  PyObject *__pyx_n_s_to_string;
  PyObject *__pyx_n_s_to_string_locals_genexpr;
  PyObject *__pyx_n_s_topology;
  PyObject *__pyx_kp_s_torus_cusp;
  PyObject *__pyx_n_s_total;
  PyObject *__pyx_n_s_translations;
  PyObject *__pyx_kp_s_tri;
  PyObject *__pyx_kp_s_tri_txt;
  PyObject *__pyx_n_s_triangulation;
  PyObject *__pyx_n_s_triangulation_class;
  PyObject *__pyx_n_s_triangulation_help;
  PyObject *__pyx_n_s_triangulation_isosig;
  PyObject *__pyx_n_s_try_hard_to_shorten_relators;
  PyObject *__pyx_n_s_twister;
  PyObject *__pyx_n_s_twister_word;
  PyObject *__pyx_n_s_two_sided;
  PyObject *__pyx_kp_s_two_sided_2;
  PyObject *__pyx_n_s_two_to_three;
  PyObject *__pyx_n_s_type;
  PyObject *__pyx_n_s_type_str;
  PyObject *__pyx_n_s_types;
  PyObject *__pyx_n_s_u;
  PyObject *__pyx_n_s_unit;
  PyObject *__pyx_n_s_unknown;
  PyObject *__pyx_n_s_unnamed;
  PyObject *__pyx_kp_s_unnamed_link;
  PyObject *__pyx_n_s_unpack;
  PyObject *__pyx_n_s_unpickle_dirichlet_domain;
  PyObject *__pyx_kp_s_unrecognized_solution_type;
  PyObject *__pyx_n_s_unsimplified_filled_triangulati;
  PyObject *__pyx_n_s_unsimplified_filled_triangulati_2;
  PyObject *__pyx_n_s_update;
  PyObject *__pyx_n_s_upper;
  PyObject *__pyx_n_s_use_field_conversion;
  PyObject *__pyx_n_s_use_setstate;
  PyObject *__pyx_n_s_user_radius;
  PyObject *__pyx_kp_s_utf_8;
  PyObject *__pyx_n_s_v;
  PyObject *__pyx_kp_s_v1205_2_3;
  PyObject *__pyx_n_s_valid_index;
  PyObject *__pyx_n_s_value;
  PyObject *__pyx_n_s_values;
  PyObject *__pyx_n_s_verbose_form;
  PyObject *__pyx_n_s_verified;
  PyObject *__pyx_n_s_verify;
  PyObject *__pyx_n_s_verify_complex_volume;
  PyObject *__pyx_n_s_version;
  PyObject *__pyx_n_s_version_info;
  PyObject *__pyx_n_s_vertex;
  PyObject *__pyx_n_s_vertex_class;
  PyObject *__pyx_n_s_vertex_data_list;
  PyObject *__pyx_n_s_vertex_epsilon;
  PyObject *__pyx_n_s_vertex_image_indices;
  PyObject *__pyx_n_s_vertex_indices;
  PyObject *__pyx_n_s_vertex_list;
  PyObject *__pyx_n_s_vertex_list_2;
  PyObject *__pyx_n_s_vertex_to_index;
  PyObject *__pyx_n_s_vertex_to_index_dict;
  PyObject *__pyx_n_s_vertices;
  PyObject *__pyx_n_s_view;
  PyObject *__pyx_n_s_vol;
  PyObject *__pyx_n_s_volume;
  PyObject *__pyx_n_s_w;
  PyObject *__pyx_n_s_w0;
  PyObject *__pyx_n_s_w1;
  PyObject *__pyx_n_s_wb;
  PyObject *__pyx_n_s_where_to_resume;
  PyObject *__pyx_n_s_which_curve;
  PyObject *__pyx_n_s_which_cusp;
  PyObject *__pyx_n_s_which_solution;
  PyObject *__pyx_n_s_which_surface;
  PyObject *__pyx_n_s_with_hyperbolic_structure;
  PyObject *__pyx_n_s_within_sage;
  PyObject *__pyx_n_s_without_hyperbolic_structure;
  PyObject *__pyx_n_s_word;
  PyObject *__pyx_n_s_word_as_list;
  PyObject *__pyx_n_s_word_list;
  PyObject *__pyx_n_s_word_moves;
  PyObject *__pyx_n_s_words;
  PyObject *__pyx_n_s_write;
  PyObject *__pyx_n_s_x;
  PyObject *__pyx_n_s_x012;
  PyObject *__pyx_kp_s_xX_d;
  PyObject *__pyx_kp_s_x_d_1;
  PyObject *__pyx_n_s_y;
  PyObject *__pyx_n_s_y123;
  PyObject *__pyx_n_s_z;
  PyObject *__pyx_n_s_zeros;
  PyObject *__pyx_float_0_0;
  PyObject *__pyx_float_0_1;
  PyObject *__pyx_float_0_2;
  PyObject *__pyx_float_0_9;
  PyObject *__pyx_float_1_0;
  PyObject *__pyx_float_1eneg_9;
  PyObject *__pyx_int_0;
  PyObject *__pyx_int_1;
  PyObject *__pyx_int_2;
  PyObject *__pyx_int_3;
  PyObject *__pyx_int_4;
  PyObject *__pyx_int_5;
  PyObject *__pyx_int_6;
  PyObject *__pyx_int_7;
  PyObject *__pyx_int_8;
  PyObject *__pyx_int_9;
  PyObject *__pyx_int_10;
  PyObject *__pyx_int_11;
  PyObject *__pyx_int_12;
  PyObject *__pyx_int_13;
  PyObject *__pyx_int_14;
  PyObject *__pyx_int_15;
  PyObject *__pyx_int_16;
  PyObject *__pyx_int_17;
  PyObject *__pyx_int_18;
  PyObject *__pyx_int_19;
  PyObject *__pyx_int_20;
  PyObject *__pyx_int_21;
  PyObject *__pyx_int_22;
  PyObject *__pyx_int_23;
  PyObject *__pyx_int_24;
  PyObject *__pyx_int_25;
  PyObject *__pyx_int_26;
  PyObject *__pyx_int_27;
  PyObject *__pyx_int_28;
  PyObject *__pyx_int_29;
  PyObject *__pyx_int_30;
  PyObject *__pyx_int_31;
  PyObject *__pyx_int_32;
  PyObject *__pyx_int_33;
  PyObject *__pyx_int_34;
  PyObject *__pyx_int_35;
  PyObject *__pyx_int_36;
  PyObject *__pyx_int_37;
  PyObject *__pyx_int_38;
  PyObject *__pyx_int_39;
  PyObject *__pyx_int_40;
  PyObject *__pyx_int_41;
  PyObject *__pyx_int_42;
  PyObject *__pyx_int_43;
  PyObject *__pyx_int_44;
  PyObject *__pyx_int_45;
  PyObject *__pyx_int_46;
  PyObject *__pyx_int_47;
  PyObject *__pyx_int_48;
  PyObject *__pyx_int_49;
  PyObject *__pyx_int_50;
  PyObject *__pyx_int_51;
  PyObject *__pyx_int_52;
  PyObject *__pyx_int_53;
  PyObject *__pyx_int_54;
  PyObject *__pyx_int_55;
  PyObject *__pyx_int_56;
  PyObject *__pyx_int_57;
  PyObject *__pyx_int_58;
  PyObject *__pyx_int_59;
  PyObject *__pyx_int_60;
  PyObject *__pyx_int_61;
  PyObject *__pyx_int_62;
  PyObject *__pyx_int_63;
  PyObject *__pyx_int_64;
  PyObject *__pyx_int_65;
  PyObject *__pyx_int_66;
  PyObject *__pyx_int_67;
  PyObject *__pyx_int_68;
  PyObject *__pyx_int_69;
  PyObject *__pyx_int_70;
  PyObject *__pyx_int_71;
  PyObject *__pyx_int_72;
  PyObject *__pyx_int_73;
  PyObject *__pyx_int_74;
  PyObject *__pyx_int_75;
  PyObject *__pyx_int_76;
  PyObject *__pyx_int_77;
  PyObject *__pyx_int_78;
  PyObject *__pyx_int_79;
  PyObject *__pyx_int_80;
  PyObject *__pyx_int_81;
  PyObject *__pyx_int_82;
  PyObject *__pyx_int_83;
  PyObject *__pyx_int_84;
  PyObject *__pyx_int_85;
  PyObject *__pyx_int_86;
  PyObject *__pyx_int_87;
  PyObject *__pyx_int_88;
  PyObject *__pyx_int_89;
  PyObject *__pyx_int_90;
  PyObject *__pyx_int_91;
  PyObject *__pyx_int_92;
  PyObject *__pyx_int_93;
  PyObject *__pyx_int_94;
  PyObject *__pyx_int_95;
  PyObject *__pyx_int_96;
  PyObject *__pyx_int_97;
  PyObject *__pyx_int_98;
  PyObject *__pyx_int_99;
  PyObject *__pyx_int_100;
  PyObject *__pyx_int_101;
  PyObject *__pyx_int_102;
  PyObject *__pyx_int_103;
  PyObject *__pyx_int_104;
  PyObject *__pyx_int_105;
  PyObject *__pyx_int_106;
  PyObject *__pyx_int_107;
  PyObject *__pyx_int_108;
  PyObject *__pyx_int_109;
  PyObject *__pyx_int_110;
  PyObject *__pyx_int_111;
  PyObject *__pyx_int_112;
  PyObject *__pyx_int_113;
  PyObject *__pyx_int_114;
  PyObject *__pyx_int_115;
  PyObject *__pyx_int_116;
  PyObject *__pyx_int_117;
  PyObject *__pyx_int_118;
  PyObject *__pyx_int_119;
  PyObject *__pyx_int_120;
  PyObject *__pyx_int_121;
  PyObject *__pyx_int_122;
  PyObject *__pyx_int_123;
  PyObject *__pyx_int_124;
  PyObject *__pyx_int_125;
  PyObject *__pyx_int_126;
  PyObject *__pyx_int_127;
  PyObject *__pyx_int_128;
  PyObject *__pyx_int_129;
  PyObject *__pyx_int_130;
  PyObject *__pyx_int_131;
  PyObject *__pyx_int_132;
  PyObject *__pyx_int_133;
  PyObject *__pyx_int_134;
  PyObject *__pyx_int_135;
  PyObject *__pyx_int_136;
  PyObject *__pyx_int_137;
  PyObject *__pyx_int_138;
  PyObject *__pyx_int_139;
  PyObject *__pyx_int_140;
  PyObject *__pyx_int_141;
  PyObject *__pyx_int_142;
  PyObject *__pyx_int_143;
  PyObject *__pyx_int_144;
  PyObject *__pyx_int_145;
  PyObject *__pyx_int_146;
  PyObject *__pyx_int_147;
  PyObject *__pyx_int_148;
  PyObject *__pyx_int_149;
  PyObject *__pyx_int_150;
  PyObject *__pyx_int_151;
  PyObject *__pyx_int_152;
  PyObject *__pyx_int_153;
  PyObject *__pyx_int_154;
  PyObject *__pyx_int_155;
  PyObject *__pyx_int_156;
  PyObject *__pyx_int_157;
  PyObject *__pyx_int_158;
  PyObject *__pyx_int_159;
  PyObject *__pyx_int_160;
  PyObject *__pyx_int_161;
  PyObject *__pyx_int_162;
  PyObject *__pyx_int_163;
  PyObject *__pyx_int_164;
  PyObject *__pyx_int_165;
  PyObject *__pyx_int_166;
  PyObject *__pyx_int_167;
  PyObject *__pyx_int_168;
  PyObject *__pyx_int_169;
  PyObject *__pyx_int_170;
  PyObject *__pyx_int_171;
  PyObject *__pyx_int_172;
  PyObject *__pyx_int_173;
  PyObject *__pyx_int_174;
  PyObject *__pyx_int_175;
  PyObject *__pyx_int_176;
  PyObject *__pyx_int_177;
  PyObject *__pyx_int_178;
  PyObject *__pyx_int_179;
  PyObject *__pyx_int_180;
  PyObject *__pyx_int_181;
  PyObject *__pyx_int_182;
  PyObject *__pyx_int_183;
  PyObject *__pyx_int_184;
  PyObject *__pyx_int_185;
  PyObject *__pyx_int_186;
  PyObject *__pyx_int_187;
  PyObject *__pyx_int_188;
  PyObject *__pyx_int_189;
  PyObject *__pyx_int_190;
  PyObject *__pyx_int_191;
  PyObject *__pyx_int_192;
  PyObject *__pyx_int_193;
  PyObject *__pyx_int_194;
  PyObject *__pyx_int_195;
  PyObject *__pyx_int_196;
  PyObject *__pyx_int_197;
  PyObject *__pyx_int_198;
  PyObject *__pyx_int_199;
  PyObject *__pyx_int_200;
  PyObject *__pyx_int_201;
  PyObject *__pyx_int_202;
  PyObject *__pyx_int_203;
  PyObject *__pyx_int_204;
  PyObject *__pyx_int_205;
  PyObject *__pyx_int_206;
  PyObject *__pyx_int_207;
  PyObject *__pyx_int_208;
  PyObject *__pyx_int_209;
  PyObject *__pyx_int_210;
  PyObject *__pyx_int_211;
  PyObject *__pyx_int_212;
  PyObject *__pyx_int_213;
  PyObject *__pyx_int_214;
  PyObject *__pyx_int_215;
  PyObject *__pyx_int_216;
  PyObject *__pyx_int_217;
  PyObject *__pyx_int_218;
  PyObject *__pyx_int_219;
  PyObject *__pyx_int_220;
  PyObject *__pyx_int_221;
  PyObject *__pyx_int_222;
  PyObject *__pyx_int_223;
  PyObject *__pyx_int_224;
  PyObject *__pyx_int_225;
  PyObject *__pyx_int_226;
  PyObject *__pyx_int_227;
  PyObject *__pyx_int_228;
  PyObject *__pyx_int_229;
  PyObject *__pyx_int_230;
  PyObject *__pyx_int_231;
  PyObject *__pyx_int_232;
  PyObject *__pyx_int_233;
  PyObject *__pyx_int_234;
  PyObject *__pyx_int_235;
  PyObject *__pyx_int_236;
  PyObject *__pyx_int_237;
  PyObject *__pyx_int_238;
  PyObject *__pyx_int_239;
  PyObject *__pyx_int_240;
  PyObject *__pyx_int_241;
  PyObject *__pyx_int_242;
  PyObject *__pyx_int_243;
  PyObject *__pyx_int_244;
  PyObject *__pyx_int_245;
  PyObject *__pyx_int_246;
  PyObject *__pyx_int_247;
  PyObject *__pyx_int_248;
  PyObject *__pyx_int_249;
  PyObject *__pyx_int_250;
  PyObject *__pyx_int_251;
  PyObject *__pyx_int_252;
  PyObject *__pyx_int_253;
  PyObject *__pyx_int_254;
  PyObject *__pyx_int_255;
  PyObject *__pyx_int_256;
  PyObject *__pyx_int_257;
  PyObject *__pyx_int_258;
  PyObject *__pyx_int_259;
  PyObject *__pyx_int_260;
  PyObject *__pyx_int_261;
  PyObject *__pyx_int_262;
  PyObject *__pyx_int_263;
  PyObject *__pyx_int_264;
  PyObject *__pyx_int_265;
  PyObject *__pyx_int_266;
  PyObject *__pyx_int_267;
  PyObject *__pyx_int_268;
  PyObject *__pyx_int_269;
  PyObject *__pyx_int_270;
  PyObject *__pyx_int_271;
  PyObject *__pyx_int_272;
  PyObject *__pyx_int_273;
  PyObject *__pyx_int_274;
  PyObject *__pyx_int_275;
  PyObject *__pyx_int_276;
  PyObject *__pyx_int_277;
  PyObject *__pyx_int_278;
  PyObject *__pyx_int_279;
  PyObject *__pyx_int_280;
  PyObject *__pyx_int_281;
  PyObject *__pyx_int_282;
  PyObject *__pyx_int_283;
  PyObject *__pyx_int_284;
  PyObject *__pyx_int_285;
  PyObject *__pyx_int_286;
  PyObject *__pyx_int_287;
  PyObject *__pyx_int_288;
  PyObject *__pyx_int_289;
  PyObject *__pyx_int_290;
  PyObject *__pyx_int_291;
  PyObject *__pyx_int_292;
  PyObject *__pyx_int_293;
  PyObject *__pyx_int_294;
  PyObject *__pyx_int_295;
  PyObject *__pyx_int_296;
  PyObject *__pyx_int_297;
  PyObject *__pyx_int_298;
  PyObject *__pyx_int_299;
  PyObject *__pyx_int_300;
  PyObject *__pyx_int_301;
  PyObject *__pyx_int_302;
  PyObject *__pyx_int_303;
  PyObject *__pyx_int_304;
  PyObject *__pyx_int_305;
  PyObject *__pyx_int_306;
  PyObject *__pyx_int_307;
  PyObject *__pyx_int_308;
  PyObject *__pyx_int_309;
  PyObject *__pyx_int_310;
  PyObject *__pyx_int_311;
  PyObject *__pyx_int_312;
  PyObject *__pyx_int_313;
  PyObject *__pyx_int_314;
  PyObject *__pyx_int_315;
  PyObject *__pyx_int_316;
  PyObject *__pyx_int_317;
  PyObject *__pyx_int_318;
  PyObject *__pyx_int_319;
  PyObject *__pyx_int_320;
  PyObject *__pyx_int_321;
  PyObject *__pyx_int_322;
  PyObject *__pyx_int_323;
  PyObject *__pyx_int_324;
  PyObject *__pyx_int_325;
  PyObject *__pyx_int_326;
  PyObject *__pyx_int_327;
  PyObject *__pyx_int_328;
  PyObject *__pyx_int_329;
  PyObject *__pyx_int_330;
  PyObject *__pyx_int_331;
  PyObject *__pyx_int_332;
  PyObject *__pyx_int_333;
  PyObject *__pyx_int_334;
  PyObject *__pyx_int_335;
  PyObject *__pyx_int_336;
  PyObject *__pyx_int_337;
  PyObject *__pyx_int_338;
  PyObject *__pyx_int_339;
  PyObject *__pyx_int_340;
  PyObject *__pyx_int_341;
  PyObject *__pyx_int_342;
  PyObject *__pyx_int_343;
  PyObject *__pyx_int_344;
  PyObject *__pyx_int_345;
  PyObject *__pyx_int_346;
  PyObject *__pyx_int_347;
  PyObject *__pyx_int_348;
  PyObject *__pyx_int_349;
  PyObject *__pyx_int_350;
  PyObject *__pyx_int_351;
  PyObject *__pyx_int_352;
  PyObject *__pyx_int_353;
  PyObject *__pyx_int_354;
  PyObject *__pyx_int_355;
  PyObject *__pyx_int_356;
  PyObject *__pyx_int_357;
  PyObject *__pyx_int_358;
  PyObject *__pyx_int_359;
  PyObject *__pyx_int_360;
  PyObject *__pyx_int_361;
  PyObject *__pyx_int_362;
  PyObject *__pyx_int_363;
  PyObject *__pyx_int_364;
  PyObject *__pyx_int_365;
  PyObject *__pyx_int_366;
  PyObject *__pyx_int_367;
  PyObject *__pyx_int_368;
  PyObject *__pyx_int_369;
  PyObject *__pyx_int_370;
  PyObject *__pyx_int_371;
  PyObject *__pyx_int_372;
  PyObject *__pyx_int_373;
  PyObject *__pyx_int_374;
  PyObject *__pyx_int_375;
  PyObject *__pyx_int_376;
  PyObject *__pyx_int_377;
  PyObject *__pyx_int_378;
  PyObject *__pyx_int_379;
  PyObject *__pyx_int_380;
  PyObject *__pyx_int_381;
  PyObject *__pyx_int_382;
  PyObject *__pyx_int_383;
  PyObject *__pyx_int_384;
  PyObject *__pyx_int_385;
  PyObject *__pyx_int_386;
  PyObject *__pyx_int_387;
  PyObject *__pyx_int_388;
  PyObject *__pyx_int_389;
  PyObject *__pyx_int_390;
  PyObject *__pyx_int_391;
  PyObject *__pyx_int_392;
  PyObject *__pyx_int_393;
  PyObject *__pyx_int_394;
  PyObject *__pyx_int_395;
  PyObject *__pyx_int_396;
  PyObject *__pyx_int_397;
  PyObject *__pyx_int_398;
  PyObject *__pyx_int_399;
  PyObject *__pyx_int_400;
  PyObject *__pyx_int_401;
  PyObject *__pyx_int_402;
  PyObject *__pyx_int_403;
  PyObject *__pyx_int_404;
  PyObject *__pyx_int_405;
  PyObject *__pyx_int_406;
  PyObject *__pyx_int_407;
  PyObject *__pyx_int_408;
  PyObject *__pyx_int_409;
  PyObject *__pyx_int_410;
  PyObject *__pyx_int_411;
  PyObject *__pyx_int_412;
  PyObject *__pyx_int_413;
  PyObject *__pyx_int_414;
  PyObject *__pyx_int_552;
  PyObject *__pyx_int_887;
  PyObject *__pyx_int_888;
  PyObject *__pyx_int_962;
  PyObject *__pyx_int_1260;
  PyObject *__pyx_int_1288;
  PyObject *__pyx_int_3552;
  PyObject *__pyx_int_4878;
  PyObject *__pyx_int_5110;
  PyObject *__pyx_int_10000;
  PyObject *__pyx_int_11031;
  PyObject *__pyx_int_12846;
  PyObject *__pyx_int_17661;
  PyObject *__pyx_int_19536;
  PyObject *__pyx_int_27436;
  PyObject *__pyx_int_32768;
  PyObject *__pyx_int_85263;
  PyObject *__pyx_int_168030;
  PyObject *__pyx_int_379799;
  PyObject *__pyx_int_1008906;
  PyObject *__pyx_int_60959262;
  PyObject *__pyx_int_64961464;
  PyObject *__pyx_int_94173347;
  PyObject *__pyx_int_neg_1;
  PyObject *__pyx_int_neg_3;
  PyObject *__pyx_k__85;
  PyObject *__pyx_k__108;
  PyObject *__pyx_k__130;
  PyObject *__pyx_slice__3;
  PyObject *__pyx_slice__4;
  PyObject *__pyx_tuple__5;
  PyObject *__pyx_slice__34;
  PyObject *__pyx_slice__92;
  PyObject *__pyx_tuple__10;
  PyObject *__pyx_tuple__11;
  PyObject *__pyx_tuple__14;
  PyObject *__pyx_tuple__15;
  PyObject *__pyx_tuple__19;
  PyObject *__pyx_tuple__20;
  PyObject *__pyx_tuple__21;
  PyObject *__pyx_tuple__22;
  PyObject *__pyx_tuple__24;
  PyObject *__pyx_tuple__25;
  PyObject *__pyx_tuple__26;
  PyObject *__pyx_tuple__27;
  PyObject *__pyx_tuple__28;
  PyObject *__pyx_tuple__31;
  PyObject *__pyx_tuple__35;
  PyObject *__pyx_tuple__36;
  PyObject *__pyx_tuple__37;
  PyObject *__pyx_tuple__39;
  PyObject *__pyx_tuple__40;
  PyObject *__pyx_tuple__41;
  PyObject *__pyx_tuple__42;
  PyObject *__pyx_tuple__43;
  PyObject *__pyx_tuple__44;
  PyObject *__pyx_tuple__45;
  PyObject *__pyx_tuple__46;
  PyObject *__pyx_tuple__47;
  PyObject *__pyx_tuple__48;
  PyObject *__pyx_tuple__49;
  PyObject *__pyx_tuple__50;
  PyObject *__pyx_tuple__51;
  PyObject *__pyx_tuple__52;
  PyObject *__pyx_tuple__53;
  PyObject *__pyx_tuple__54;
  PyObject *__pyx_tuple__55;
  PyObject *__pyx_tuple__56;
  PyObject *__pyx_tuple__57;
  PyObject *__pyx_tuple__58;
  PyObject *__pyx_tuple__59;
  PyObject *__pyx_tuple__60;
  PyObject *__pyx_tuple__61;
  PyObject *__pyx_tuple__62;
  PyObject *__pyx_tuple__63;
  PyObject *__pyx_tuple__64;
  PyObject *__pyx_tuple__65;
  PyObject *__pyx_tuple__66;
  PyObject *__pyx_tuple__67;
  PyObject *__pyx_tuple__68;
  PyObject *__pyx_tuple__69;
  PyObject *__pyx_tuple__71;
  PyObject *__pyx_tuple__72;
  PyObject *__pyx_tuple__73;
  PyObject *__pyx_tuple__74;
  PyObject *__pyx_tuple__75;
  PyObject *__pyx_tuple__76;
  PyObject *__pyx_tuple__77;
  PyObject *__pyx_tuple__78;
  PyObject *__pyx_tuple__79;
  PyObject *__pyx_tuple__80;
  PyObject *__pyx_tuple__81;
  PyObject *__pyx_tuple__82;
  PyObject *__pyx_tuple__83;
  PyObject *__pyx_tuple__84;
  PyObject *__pyx_tuple__86;
  PyObject *__pyx_tuple__87;
  PyObject *__pyx_tuple__88;
  PyObject *__pyx_tuple__89;
  PyObject *__pyx_tuple__90;
  PyObject *__pyx_tuple__91;
  PyObject *__pyx_tuple__93;
  PyObject *__pyx_tuple__94;
  PyObject *__pyx_tuple__95;
  PyObject *__pyx_tuple__96;
  PyObject *__pyx_tuple__97;
  PyObject *__pyx_tuple__98;
  PyObject *__pyx_tuple__99;
  PyObject *__pyx_codeobj__6;
  PyObject *__pyx_slice__110;
  PyObject *__pyx_slice__128;
  PyObject *__pyx_tuple__100;
  PyObject *__pyx_tuple__101;
  PyObject *__pyx_tuple__102;
  PyObject *__pyx_tuple__103;
  PyObject *__pyx_tuple__104;
  PyObject *__pyx_tuple__105;
  PyObject *__pyx_tuple__106;
  PyObject *__pyx_tuple__107;
  PyObject *__pyx_tuple__109;
  PyObject *__pyx_tuple__112;
  PyObject *__pyx_tuple__113;
  PyObject *__pyx_tuple__119;
  PyObject *__pyx_tuple__120;
  PyObject *__pyx_tuple__121;
  PyObject *__pyx_tuple__122;
  PyObject *__pyx_tuple__123;
  PyObject *__pyx_tuple__124;
  PyObject *__pyx_tuple__125;
  PyObject *__pyx_tuple__126;
  PyObject *__pyx_tuple__127;
  PyObject *__pyx_tuple__129;
  PyObject *__pyx_tuple__131;
  PyObject *__pyx_tuple__132;
  PyObject *__pyx_tuple__133;
  PyObject *__pyx_tuple__134;
  PyObject *__pyx_tuple__135;
  PyObject *__pyx_tuple__136;
  PyObject *__pyx_tuple__137;
  PyObject *__pyx_tuple__138;
  PyObject *__pyx_tuple__139;
  PyObject *__pyx_tuple__140;
  PyObject *__pyx_tuple__141;
  PyObject *__pyx_tuple__142;
  PyObject *__pyx_tuple__143;
  PyObject *__pyx_tuple__145;
  PyObject *__pyx_tuple__146;
  PyObject *__pyx_tuple__147;
  PyObject *__pyx_tuple__148;
  PyObject *__pyx_tuple__149;
  PyObject *__pyx_tuple__151;
  PyObject *__pyx_tuple__152;
  PyObject *__pyx_tuple__153;
  PyObject *__pyx_tuple__154;
  PyObject *__pyx_tuple__155;
  PyObject *__pyx_tuple__156;
  PyObject *__pyx_tuple__157;
  PyObject *__pyx_tuple__158;
  PyObject *__pyx_tuple__159;
  PyObject *__pyx_tuple__160;
  PyObject *__pyx_tuple__161;
  PyObject *__pyx_tuple__162;
  PyObject *__pyx_tuple__163;
  PyObject *__pyx_tuple__164;
  PyObject *__pyx_tuple__165;
  PyObject *__pyx_tuple__166;
  PyObject *__pyx_tuple__167;
  PyObject *__pyx_tuple__168;
  PyObject *__pyx_tuple__169;
  PyObject *__pyx_tuple__171;
  PyObject *__pyx_tuple__172;
  PyObject *__pyx_tuple__173;
  PyObject *__pyx_tuple__176;
  PyObject *__pyx_tuple__178;
  PyObject *__pyx_tuple__180;
  PyObject *__pyx_tuple__182;
  PyObject *__pyx_tuple__185;
  PyObject *__pyx_tuple__189;
  PyObject *__pyx_tuple__192;
  PyObject *__pyx_tuple__194;
  PyObject *__pyx_tuple__196;
  PyObject *__pyx_tuple__198;
  PyObject *__pyx_tuple__201;
  PyObject *__pyx_tuple__203;
  PyObject *__pyx_tuple__208;
  PyObject *__pyx_tuple__210;
  PyObject *__pyx_tuple__213;
  PyObject *__pyx_tuple__215;
  PyObject *__pyx_tuple__217;
  PyObject *__pyx_tuple__219;
  PyObject *__pyx_tuple__221;
  PyObject *__pyx_tuple__227;
  PyObject *__pyx_tuple__229;
  PyObject *__pyx_tuple__231;
  PyObject *__pyx_tuple__233;
  PyObject *__pyx_tuple__234;
  PyObject *__pyx_tuple__236;
  PyObject *__pyx_tuple__238;
  PyObject *__pyx_tuple__241;
  PyObject *__pyx_tuple__244;
  PyObject *__pyx_tuple__246;
  PyObject *__pyx_tuple__248;
  PyObject *__pyx_tuple__250;
  PyObject *__pyx_tuple__252;
  PyObject *__pyx_tuple__254;
  PyObject *__pyx_tuple__256;
  PyObject *__pyx_tuple__257;
  PyObject *__pyx_tuple__259;
  PyObject *__pyx_tuple__260;
  PyObject *__pyx_tuple__262;
  PyObject *__pyx_tuple__266;
  PyObject *__pyx_tuple__268;
  PyObject *__pyx_tuple__270;
  PyObject *__pyx_tuple__271;
  PyObject *__pyx_tuple__273;
  PyObject *__pyx_tuple__275;
  PyObject *__pyx_tuple__277;
  PyObject *__pyx_tuple__279;
  PyObject *__pyx_tuple__281;
  PyObject *__pyx_tuple__283;
  PyObject *__pyx_tuple__284;
  PyObject *__pyx_tuple__288;
  PyObject *__pyx_tuple__290;
  PyObject *__pyx_tuple__292;
  PyObject *__pyx_tuple__294;
  PyObject *__pyx_tuple__297;
  PyObject *__pyx_tuple__299;
  PyObject *__pyx_tuple__301;
  PyObject *__pyx_tuple__302;
  PyObject *__pyx_tuple__304;
  PyObject *__pyx_tuple__307;
  PyObject *__pyx_tuple__309;
  PyObject *__pyx_tuple__312;
  PyObject *__pyx_tuple__314;
  PyObject *__pyx_tuple__316;
  PyObject *__pyx_tuple__317;
  PyObject *__pyx_tuple__319;
  PyObject *__pyx_tuple__320;
  PyObject *__pyx_tuple__322;
  PyObject *__pyx_tuple__324;
  PyObject *__pyx_tuple__325;
  PyObject *__pyx_tuple__327;
  PyObject *__pyx_tuple__329;
  PyObject *__pyx_tuple__331;
  PyObject *__pyx_tuple__336;
  PyObject *__pyx_tuple__338;
  PyObject *__pyx_tuple__340;
  PyObject *__pyx_tuple__341;
  PyObject *__pyx_tuple__343;
  PyObject *__pyx_tuple__345;
  PyObject *__pyx_tuple__347;
  PyObject *__pyx_tuple__349;
  PyObject *__pyx_tuple__350;
  PyObject *__pyx_tuple__352;
  PyObject *__pyx_tuple__354;
  PyObject *__pyx_tuple__355;
  PyObject *__pyx_tuple__357;
  PyObject *__pyx_tuple__358;
  PyObject *__pyx_tuple__361;
  PyObject *__pyx_tuple__363;
  PyObject *__pyx_tuple__365;
  PyObject *__pyx_tuple__367;
  PyObject *__pyx_tuple__369;
  PyObject *__pyx_tuple__370;
  PyObject *__pyx_tuple__372;
  PyObject *__pyx_tuple__374;
  PyObject *__pyx_tuple__376;
  PyObject *__pyx_tuple__378;
  PyObject *__pyx_tuple__380;
  PyObject *__pyx_tuple__382;
  PyObject *__pyx_tuple__384;
  PyObject *__pyx_tuple__386;
  PyObject *__pyx_tuple__388;
  PyObject *__pyx_tuple__390;
  PyObject *__pyx_tuple__392;
  PyObject *__pyx_tuple__394;
  PyObject *__pyx_tuple__397;
  PyObject *__pyx_tuple__400;
  PyObject *__pyx_tuple__402;
  PyObject *__pyx_tuple__404;
  PyObject *__pyx_tuple__407;
  PyObject *__pyx_tuple__409;
  PyObject *__pyx_tuple__411;
  PyObject *__pyx_tuple__413;
  PyObject *__pyx_tuple__415;
  PyObject *__pyx_tuple__416;
  PyObject *__pyx_tuple__420;
  PyObject *__pyx_tuple__422;
  PyObject *__pyx_tuple__423;
  PyObject *__pyx_tuple__425;
  PyObject *__pyx_tuple__427;
  PyObject *__pyx_tuple__429;
  PyObject *__pyx_tuple__431;
  PyObject *__pyx_tuple__432;
  PyObject *__pyx_tuple__434;
  PyObject *__pyx_tuple__435;
  PyObject *__pyx_tuple__437;
  PyObject *__pyx_tuple__439;
  PyObject *__pyx_tuple__441;
  PyObject *__pyx_tuple__443;
  PyObject *__pyx_tuple__444;
  PyObject *__pyx_tuple__446;
  PyObject *__pyx_tuple__448;
  PyObject *__pyx_tuple__450;
  PyObject *__pyx_tuple__452;
  PyObject *__pyx_tuple__454;
  PyObject *__pyx_tuple__456;
  PyObject *__pyx_tuple__458;
  PyObject *__pyx_tuple__460;
  PyObject *__pyx_tuple__465;
  PyObject *__pyx_tuple__467;
  PyObject *__pyx_tuple__471;
  PyObject *__pyx_tuple__473;
  PyObject *__pyx_tuple__475;
  PyObject *__pyx_tuple__477;
  PyObject *__pyx_tuple__479;
  PyObject *__pyx_tuple__481;
  PyObject *__pyx_tuple__483;
  PyObject *__pyx_tuple__485;
  PyObject *__pyx_tuple__487;
  PyObject *__pyx_tuple__489;
  PyObject *__pyx_tuple__491;
  PyObject *__pyx_tuple__496;
  PyObject *__pyx_tuple__498;
  PyObject *__pyx_tuple__500;
  PyObject *__pyx_tuple__501;
  PyObject *__pyx_tuple__503;
  PyObject *__pyx_tuple__505;
  PyObject *__pyx_tuple__507;
  PyObject *__pyx_tuple__509;
  PyObject *__pyx_tuple__511;
  PyObject *__pyx_tuple__514;
  PyObject *__pyx_tuple__517;
  PyObject *__pyx_tuple__519;
  PyObject *__pyx_tuple__521;
  PyObject *__pyx_tuple__525;
  PyObject *__pyx_tuple__527;
  PyObject *__pyx_tuple__536;
  PyObject *__pyx_tuple__538;
  PyObject *__pyx_tuple__542;
  PyObject *__pyx_tuple__546;
  PyObject *__pyx_tuple__550;
  PyObject *__pyx_tuple__552;
  PyObject *__pyx_tuple__554;
  PyObject *__pyx_tuple__556;
  PyObject *__pyx_tuple__558;
  PyObject *__pyx_tuple__568;
  PyObject *__pyx_tuple__572;
  PyObject *__pyx_tuple__574;
  PyObject *__pyx_tuple__575;
  PyObject *__pyx_tuple__577;
  PyObject *__pyx_tuple__580;
  PyObject *__pyx_tuple__582;
  PyObject *__pyx_tuple__584;
  PyObject *__pyx_tuple__586;
  PyObject *__pyx_tuple__591;
  PyObject *__pyx_tuple__593;
  PyObject *__pyx_tuple__595;
  PyObject *__pyx_tuple__597;
  PyObject *__pyx_tuple__599;
  PyObject *__pyx_tuple__601;
  PyObject *__pyx_tuple__603;
  PyObject *__pyx_tuple__605;
  PyObject *__pyx_tuple__606;
  PyObject *__pyx_tuple__609;
  PyObject *__pyx_tuple__611;
  PyObject *__pyx_tuple__613;
  PyObject *__pyx_tuple__616;
  PyObject *__pyx_tuple__618;
  PyObject *__pyx_tuple__620;
  PyObject *__pyx_tuple__624;
  PyObject *__pyx_tuple__626;
  PyObject *__pyx_tuple__629;
  PyObject *__pyx_tuple__631;
  PyObject *__pyx_tuple__633;
  PyObject *__pyx_tuple__635;
  PyObject *__pyx_tuple__637;
  PyObject *__pyx_tuple__638;
  PyObject *__pyx_tuple__640;
  PyObject *__pyx_tuple__642;
  PyObject *__pyx_tuple__644;
  PyObject *__pyx_tuple__647;
  PyObject *__pyx_tuple__648;
  PyObject *__pyx_tuple__649;
  PyObject *__pyx_tuple__650;
  PyObject *__pyx_tuple__651;
  PyObject *__pyx_tuple__652;
  PyObject *__pyx_tuple__654;
  PyObject *__pyx_tuple__655;
  PyObject *__pyx_tuple__657;
  PyObject *__pyx_tuple__659;
  PyObject *__pyx_tuple__660;
  PyObject *__pyx_tuple__661;
  PyObject *__pyx_tuple__662;
  PyObject *__pyx_tuple__663;
  PyObject *__pyx_tuple__664;
  PyObject *__pyx_tuple__665;
  PyObject *__pyx_tuple__667;
  PyObject *__pyx_tuple__669;
  PyObject *__pyx_tuple__671;
  PyObject *__pyx_tuple__673;
  PyObject *__pyx_tuple__675;
  PyObject *__pyx_tuple__677;
  PyObject *__pyx_tuple__682;
  PyObject *__pyx_tuple__683;
  PyObject *__pyx_tuple__684;
  PyObject *__pyx_tuple__685;
  PyObject *__pyx_tuple__686;
  PyObject *__pyx_tuple__689;
  PyObject *__pyx_tuple__693;
  PyObject *__pyx_tuple__695;
  PyObject *__pyx_tuple__696;
  PyObject *__pyx_tuple__698;
  PyObject *__pyx_tuple__700;
  PyObject *__pyx_tuple__707;
  PyObject *__pyx_tuple__709;
  PyObject *__pyx_tuple__711;
  PyObject *__pyx_tuple__713;
  PyObject *__pyx_tuple__715;
  PyObject *__pyx_tuple__717;
  PyObject *__pyx_tuple__719;
  PyObject *__pyx_tuple__720;
  PyObject *__pyx_tuple__722;
  PyObject *__pyx_tuple__724;
  PyObject *__pyx_codeobj__70;
  PyObject *__pyx_codeobj__174;
  PyObject *__pyx_codeobj__175;
  PyObject *__pyx_codeobj__177;
  PyObject *__pyx_codeobj__179;
  PyObject *__pyx_codeobj__181;
  PyObject *__pyx_codeobj__183;
  PyObject *__pyx_codeobj__184;
  PyObject *__pyx_codeobj__186;
  PyObject *__pyx_codeobj__187;
  PyObject *__pyx_codeobj__188;
  PyObject *__pyx_codeobj__190;
  PyObject *__pyx_codeobj__191;
  PyObject *__pyx_codeobj__193;
  PyObject *__pyx_codeobj__195;
  PyObject *__pyx_codeobj__197;
  PyObject *__pyx_codeobj__199;
  PyObject *__pyx_codeobj__200;
  PyObject *__pyx_codeobj__202;
  PyObject *__pyx_codeobj__204;
  PyObject *__pyx_codeobj__205;
  PyObject *__pyx_codeobj__206;
  PyObject *__pyx_codeobj__207;
  PyObject *__pyx_codeobj__209;
  PyObject *__pyx_codeobj__211;
  PyObject *__pyx_codeobj__212;
  PyObject *__pyx_codeobj__214;
  PyObject *__pyx_codeobj__216;
  PyObject *__pyx_codeobj__218;
  PyObject *__pyx_codeobj__220;
  PyObject *__pyx_codeobj__222;
  PyObject *__pyx_codeobj__223;
  PyObject *__pyx_codeobj__224;
  PyObject *__pyx_codeobj__225;
  PyObject *__pyx_codeobj__226;
  PyObject *__pyx_codeobj__228;
  PyObject *__pyx_codeobj__230;
  PyObject *__pyx_codeobj__232;
  PyObject *__pyx_codeobj__235;
  PyObject *__pyx_codeobj__237;
  PyObject *__pyx_codeobj__239;
  PyObject *__pyx_codeobj__240;
  PyObject *__pyx_codeobj__242;
  PyObject *__pyx_codeobj__243;
  PyObject *__pyx_codeobj__245;
  PyObject *__pyx_codeobj__247;
  PyObject *__pyx_codeobj__249;
  PyObject *__pyx_codeobj__251;
  PyObject *__pyx_codeobj__253;
  PyObject *__pyx_codeobj__255;
  PyObject *__pyx_codeobj__258;
  PyObject *__pyx_codeobj__261;
  PyObject *__pyx_codeobj__263;
  PyObject *__pyx_codeobj__264;
  PyObject *__pyx_codeobj__265;
  PyObject *__pyx_codeobj__267;
  PyObject *__pyx_codeobj__269;
  PyObject *__pyx_codeobj__272;
  PyObject *__pyx_codeobj__274;
  PyObject *__pyx_codeobj__276;
  PyObject *__pyx_codeobj__278;
  PyObject *__pyx_codeobj__280;
  PyObject *__pyx_codeobj__282;
  PyObject *__pyx_codeobj__285;
  PyObject *__pyx_codeobj__286;
  PyObject *__pyx_codeobj__287;
  PyObject *__pyx_codeobj__289;
  PyObject *__pyx_codeobj__291;
  PyObject *__pyx_codeobj__293;
  PyObject *__pyx_codeobj__295;
  PyObject *__pyx_codeobj__296;
  PyObject *__pyx_codeobj__298;
  PyObject *__pyx_codeobj__300;
  PyObject *__pyx_codeobj__303;
  PyObject *__pyx_codeobj__305;
  PyObject *__pyx_codeobj__306;
  PyObject *__pyx_codeobj__308;
  PyObject *__pyx_codeobj__310;
  PyObject *__pyx_codeobj__311;
  PyObject *__pyx_codeobj__313;
  PyObject *__pyx_codeobj__315;
  PyObject *__pyx_codeobj__318;
  PyObject *__pyx_codeobj__321;
  PyObject *__pyx_codeobj__323;
  PyObject *__pyx_codeobj__326;
  PyObject *__pyx_codeobj__328;
  PyObject *__pyx_codeobj__330;
  PyObject *__pyx_codeobj__332;
  PyObject *__pyx_codeobj__333;
  PyObject *__pyx_codeobj__334;
  PyObject *__pyx_codeobj__335;
  PyObject *__pyx_codeobj__337;
  PyObject *__pyx_codeobj__339;
  PyObject *__pyx_codeobj__342;
  PyObject *__pyx_codeobj__344;
  PyObject *__pyx_codeobj__346;
  PyObject *__pyx_codeobj__348;
  PyObject *__pyx_codeobj__351;
  PyObject *__pyx_codeobj__353;
  PyObject *__pyx_codeobj__356;
  PyObject *__pyx_codeobj__359;
  PyObject *__pyx_codeobj__360;
  PyObject *__pyx_codeobj__362;
  PyObject *__pyx_codeobj__364;
  PyObject *__pyx_codeobj__366;
  PyObject *__pyx_codeobj__368;
  PyObject *__pyx_codeobj__371;
  PyObject *__pyx_codeobj__373;
  PyObject *__pyx_codeobj__375;
  PyObject *__pyx_codeobj__377;
  PyObject *__pyx_codeobj__379;
  PyObject *__pyx_codeobj__381;
  PyObject *__pyx_codeobj__383;
  PyObject *__pyx_codeobj__385;
  PyObject *__pyx_codeobj__387;
  PyObject *__pyx_codeobj__389;
  PyObject *__pyx_codeobj__391;
  PyObject *__pyx_codeobj__393;
  PyObject *__pyx_codeobj__395;
  PyObject *__pyx_codeobj__396;
  PyObject *__pyx_codeobj__398;
  PyObject *__pyx_codeobj__399;
  PyObject *__pyx_codeobj__401;
  PyObject *__pyx_codeobj__403;
  PyObject *__pyx_codeobj__405;
  PyObject *__pyx_codeobj__406;
  PyObject *__pyx_codeobj__408;
  PyObject *__pyx_codeobj__410;
  PyObject *__pyx_codeobj__412;
  PyObject *__pyx_codeobj__414;
  PyObject *__pyx_codeobj__417;
  PyObject *__pyx_codeobj__418;
  PyObject *__pyx_codeobj__419;
  PyObject *__pyx_codeobj__421;
  PyObject *__pyx_codeobj__424;
  PyObject *__pyx_codeobj__426;
  PyObject *__pyx_codeobj__428;
  PyObject *__pyx_codeobj__430;
  PyObject *__pyx_codeobj__433;
  PyObject *__pyx_codeobj__436;
  PyObject *__pyx_codeobj__438;
  PyObject *__pyx_codeobj__440;
  PyObject *__pyx_codeobj__442;
  PyObject *__pyx_codeobj__445;
  PyObject *__pyx_codeobj__447;
  PyObject *__pyx_codeobj__449;
  PyObject *__pyx_codeobj__451;
  PyObject *__pyx_codeobj__453;
  PyObject *__pyx_codeobj__455;
  PyObject *__pyx_codeobj__457;
  PyObject *__pyx_codeobj__459;
  PyObject *__pyx_codeobj__461;
  PyObject *__pyx_codeobj__462;
  PyObject *__pyx_codeobj__463;
  PyObject *__pyx_codeobj__464;
  PyObject *__pyx_codeobj__466;
  PyObject *__pyx_codeobj__468;
  PyObject *__pyx_codeobj__469;
  PyObject *__pyx_codeobj__470;
  PyObject *__pyx_codeobj__472;
  PyObject *__pyx_codeobj__474;
  PyObject *__pyx_codeobj__476;
  PyObject *__pyx_codeobj__478;
  PyObject *__pyx_codeobj__480;
  PyObject *__pyx_codeobj__482;
  PyObject *__pyx_codeobj__484;
  PyObject *__pyx_codeobj__486;
  PyObject *__pyx_codeobj__488;
  PyObject *__pyx_codeobj__490;
  PyObject *__pyx_codeobj__492;
  PyObject *__pyx_codeobj__493;
  PyObject *__pyx_codeobj__494;
  PyObject *__pyx_codeobj__495;
  PyObject *__pyx_codeobj__497;
  PyObject *__pyx_codeobj__499;
  PyObject *__pyx_codeobj__502;
  PyObject *__pyx_codeobj__504;
  PyObject *__pyx_codeobj__506;
  PyObject *__pyx_codeobj__508;
  PyObject *__pyx_codeobj__510;
  PyObject *__pyx_codeobj__512;
  PyObject *__pyx_codeobj__513;
  PyObject *__pyx_codeobj__515;
  PyObject *__pyx_codeobj__516;
  PyObject *__pyx_codeobj__518;
  PyObject *__pyx_codeobj__520;
  PyObject *__pyx_codeobj__522;
  PyObject *__pyx_codeobj__523;
  PyObject *__pyx_codeobj__524;
  PyObject *__pyx_codeobj__526;
  PyObject *__pyx_codeobj__528;
  PyObject *__pyx_codeobj__529;
  PyObject *__pyx_codeobj__530;
  PyObject *__pyx_codeobj__531;
  PyObject *__pyx_codeobj__532;
  PyObject *__pyx_codeobj__533;
  PyObject *__pyx_codeobj__534;
  PyObject *__pyx_codeobj__535;
  PyObject *__pyx_codeobj__537;
  PyObject *__pyx_codeobj__539;
  PyObject *__pyx_codeobj__540;
  PyObject *__pyx_codeobj__541;
  PyObject *__pyx_codeobj__543;
  PyObject *__pyx_codeobj__544;
  PyObject *__pyx_codeobj__545;
  PyObject *__pyx_codeobj__547;
  PyObject *__pyx_codeobj__548;
  PyObject *__pyx_codeobj__549;
  PyObject *__pyx_codeobj__551;
  PyObject *__pyx_codeobj__553;
  PyObject *__pyx_codeobj__555;
  PyObject *__pyx_codeobj__557;
  PyObject *__pyx_codeobj__559;
  PyObject *__pyx_codeobj__560;
  PyObject *__pyx_codeobj__561;
  PyObject *__pyx_codeobj__562;
  PyObject *__pyx_codeobj__563;
  PyObject *__pyx_codeobj__564;
  PyObject *__pyx_codeobj__565;
  PyObject *__pyx_codeobj__566;
  PyObject *__pyx_codeobj__567;
  PyObject *__pyx_codeobj__569;
  PyObject *__pyx_codeobj__570;
  PyObject *__pyx_codeobj__571;
  PyObject *__pyx_codeobj__573;
  PyObject *__pyx_codeobj__576;
  PyObject *__pyx_codeobj__578;
  PyObject *__pyx_codeobj__579;
  PyObject *__pyx_codeobj__581;
  PyObject *__pyx_codeobj__583;
  PyObject *__pyx_codeobj__585;
  PyObject *__pyx_codeobj__587;
  PyObject *__pyx_codeobj__588;
  PyObject *__pyx_codeobj__589;
  PyObject *__pyx_codeobj__590;
  PyObject *__pyx_codeobj__592;
  PyObject *__pyx_codeobj__594;
  PyObject *__pyx_codeobj__596;
  PyObject *__pyx_codeobj__598;
  PyObject *__pyx_codeobj__600;
  PyObject *__pyx_codeobj__602;
  PyObject *__pyx_codeobj__604;
  PyObject *__pyx_codeobj__607;
  PyObject *__pyx_codeobj__608;
  PyObject *__pyx_codeobj__610;
  PyObject *__pyx_codeobj__612;
  PyObject *__pyx_codeobj__614;
  PyObject *__pyx_codeobj__615;
  PyObject *__pyx_codeobj__617;
  PyObject *__pyx_codeobj__619;
  PyObject *__pyx_codeobj__621;
  PyObject *__pyx_codeobj__622;
  PyObject *__pyx_codeobj__623;
  PyObject *__pyx_codeobj__625;
  PyObject *__pyx_codeobj__627;
  PyObject *__pyx_codeobj__628;
  PyObject *__pyx_codeobj__630;
  PyObject *__pyx_codeobj__632;
  PyObject *__pyx_codeobj__634;
  PyObject *__pyx_codeobj__636;
  PyObject *__pyx_codeobj__639;
  PyObject *__pyx_codeobj__641;
  PyObject *__pyx_codeobj__643;
  PyObject *__pyx_codeobj__645;
  PyObject *__pyx_codeobj__646;
  PyObject *__pyx_codeobj__656;
  PyObject *__pyx_codeobj__658;
  PyObject *__pyx_codeobj__666;
  PyObject *__pyx_codeobj__668;
  PyObject *__pyx_codeobj__670;
  PyObject *__pyx_codeobj__672;
  PyObject *__pyx_codeobj__674;
  PyObject *__pyx_codeobj__676;
  PyObject *__pyx_codeobj__678;
  PyObject *__pyx_codeobj__679;
  PyObject *__pyx_codeobj__680;
  PyObject *__pyx_codeobj__681;
  PyObject *__pyx_codeobj__687;
  PyObject *__pyx_codeobj__688;
  PyObject *__pyx_codeobj__690;
  PyObject *__pyx_codeobj__691;
  PyObject *__pyx_codeobj__692;
  PyObject *__pyx_codeobj__694;
  PyObject *__pyx_codeobj__697;
  PyObject *__pyx_codeobj__699;
  PyObject *__pyx_codeobj__701;
  PyObject *__pyx_codeobj__702;
  PyObject *__pyx_codeobj__703;
  PyObject *__pyx_codeobj__704;
  PyObject *__pyx_codeobj__705;
  PyObject *__pyx_codeobj__706;
  PyObject *__pyx_codeobj__708;
  PyObject *__pyx_codeobj__710;
  PyObject *__pyx_codeobj__712;
  PyObject *__pyx_codeobj__714;
  PyObject *__pyx_codeobj__716;
  PyObject *__pyx_codeobj__718;
  PyObject *__pyx_codeobj__721;
  PyObject *__pyx_codeobj__723;
  PyObject *__pyx_codeobj__725;
} __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_6SnapPy_Triangulation);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy_Triangulation);
  Py_CLEAR(clear_module_state->__pyx_ptype_6SnapPy_Manifold);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy_Manifold);
  Py_CLEAR(clear_module_state->__pyx_ptype_6SnapPy_AbelianGroup);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy_AbelianGroup);
  Py_CLEAR(clear_module_state->__pyx_ptype_6SnapPy_PresentationMatrix);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy_PresentationMatrix);
  Py_CLEAR(clear_module_state->__pyx_ptype_6SnapPy_CFundamentalGroup);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy_CFundamentalGroup);
  Py_CLEAR(clear_module_state->__pyx_ptype_6SnapPy_CHolonomyGroup);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy_CHolonomyGroup);
  Py_CLEAR(clear_module_state->__pyx_ptype_6SnapPy_SymmetryGroup);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy_SymmetryGroup);
  Py_CLEAR(clear_module_state->__pyx_ptype_6SnapPy_CDirichletDomain);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy_CDirichletDomain);
  Py_CLEAR(clear_module_state->__pyx_ptype_6SnapPy_CCuspNeighborhood);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy_CCuspNeighborhood);
  Py_CLEAR(clear_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct__genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy___pyx_scope_struct__genexpr);
  Py_CLEAR(clear_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation);
  Py_CLEAR(clear_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct_2_genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy___pyx_scope_struct_2_genexpr);
  Py_CLEAR(clear_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct_3_genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy___pyx_scope_struct_3_genexpr);
  Py_CLEAR(clear_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct_4_list_as_word);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy___pyx_scope_struct_4_list_as_word);
  Py_CLEAR(clear_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct_5_genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy___pyx_scope_struct_5_genexpr);
  Py_CLEAR(clear_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct_6_face_list);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy___pyx_scope_struct_6_face_list);
  Py_CLEAR(clear_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct_7_genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy___pyx_scope_struct_7_genexpr);
  Py_CLEAR(clear_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct_8_genexpr);
  Py_CLEAR(clear_module_state->__pyx_type_6SnapPy___pyx_scope_struct_8_genexpr);
  Py_CLEAR(clear_module_state->__pyx_kp_b_);
  Py_CLEAR(clear_module_state->__pyx_kp_s_);
  Py_CLEAR(clear_module_state->__pyx_kp_s_0);
  Py_CLEAR(clear_module_state->__pyx_kp_s_0_0);
  Py_CLEAR(clear_module_state->__pyx_kp_s_0_9_0_9);
  Py_CLEAR(clear_module_state->__pyx_kp_s_1);
  Py_CLEAR(clear_module_state->__pyx_kp_s_12n123);
  Py_CLEAR(clear_module_state->__pyx_kp_s_16_14f_I);
  Py_CLEAR(clear_module_state->__pyx_kp_s_16n1235);
  Py_CLEAR(clear_module_state->__pyx_kp_s_17_14f);
  Py_CLEAR(clear_module_state->__pyx_kp_s_18f);
  Py_CLEAR(clear_module_state->__pyx_kp_s_2_3_move);
  Py_CLEAR(clear_module_state->__pyx_kp_s_3_2_move);
  Py_CLEAR(clear_module_state->__pyx_kp_s_3d_s_curve_of_length_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_4s_40s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_5_2_1_3_4_1_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_6_1);
  Py_CLEAR(clear_module_state->__pyx_kp_s_6s_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_8_3_3);
  Py_CLEAR(clear_module_state->__pyx_n_s_A);
  Py_CLEAR(clear_module_state->__pyx_kp_s_A_CuspNeighborhood_object_repre);
  Py_CLEAR(clear_module_state->__pyx_kp_s_A_DirichletDomain_object_repres);
  Py_CLEAR(clear_module_state->__pyx_kp_s_A_FundamentalGroup_represents_a);
  Py_CLEAR(clear_module_state->__pyx_kp_s_A_FundamentalGroup_represents_a_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_A_non_existent_shape_data_type_w);
  Py_CLEAR(clear_module_state->__pyx_kp_s_A_s_is_specified_by_a_string_or);
  Py_CLEAR(clear_module_state->__pyx_n_s_AbelianGroup);
  Py_CLEAR(clear_module_state->__pyx_n_s_AbelianGroup___reduce);
  Py_CLEAR(clear_module_state->__pyx_kp_u_AbelianGroup___reduce___line_80);
  Py_CLEAR(clear_module_state->__pyx_n_s_AbelianGroup_betti_number);
  Py_CLEAR(clear_module_state->__pyx_n_s_AbelianGroup_elementary_divisors);
  Py_CLEAR(clear_module_state->__pyx_n_s_AbelianGroup_order);
  Py_CLEAR(clear_module_state->__pyx_n_s_AbelianGroup_rank);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Acceptable_cusp_types_are_all_or);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Add_a_possibly_degenerate_hyper);
  Py_CLEAR(clear_module_state->__pyx_kp_s_All_Dehn_filling_coefficients_mu);
  Py_CLEAR(clear_module_state->__pyx_kp_s_All_cusps_must_be_fillable);
  Py_CLEAR(clear_module_state->__pyx_kp_s_All_files);
  Py_CLEAR(clear_module_state->__pyx_kp_s_All_text_files);
  Py_CLEAR(clear_module_state->__pyx_n_s_Alphabet);
  Py_CLEAR(clear_module_state->__pyx_n_s_AlternatingKnotExteriors);
  Py_CLEAR(clear_module_state->__pyx_n_s_Alternating_numbers);
  Py_CLEAR(clear_module_state->__pyx_n_s_Alternating_offsets);
  Py_CLEAR(clear_module_state->__pyx_n_s_Alternating_table);
  Py_CLEAR(clear_module_state->__pyx_kp_s_An_empty_triangulation_was_gener);
  Py_CLEAR(clear_module_state->__pyx_n_s_AssertionError);
  Py_CLEAR(clear_module_state->__pyx_n_s_AttributeError);
  Py_CLEAR(clear_module_state->__pyx_n_s_B);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Base_class_for_Iterators_Sequen);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Base_class_for_Iterators_Sequen_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Base_class_for_manifold_Iterato);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Bb_raid_0_9);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Braid);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Braid_1_2_1_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Braids_must_have_at_least_2_stra);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Brings_up_a_link_editor_window);
  Py_CLEAR(clear_module_state->__pyx_n_s_Browser);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Browser_not_imported_Tk_CyOpenGL);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Bundle_S__1_1_a0_B1);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Bundle_S__d_d);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Byte_encoding_requires_complete);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_Ford_domain);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood___reduce_cytho);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood___setstate_cyt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood__number);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_check_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_get_displaceme);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_get_tie);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_horoballs);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_manifold);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_max_reach);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_num_cusps);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_original_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_reach);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_set_displaceme);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_set_tie);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_stopper);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_stopping_displ);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_topology);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_translations);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_triangulation);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_view);
  Py_CLEAR(clear_module_state->__pyx_kp_u_CCuspNeighborhood_view_line_289);
  Py_CLEAR(clear_module_state->__pyx_n_s_CCuspNeighborhood_volume);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain___reduce_ex);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain__edge_to_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain__number);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain__to_string);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain__vertex_data_li);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain__vertex_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain__vertex_to_inde);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_edge_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_export_stl);
  Py_CLEAR(clear_module_state->__pyx_kp_u_CDirichletDomain_export_stl_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_face_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_in_radius);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_length_spectrum);
  Py_CLEAR(clear_module_state->__pyx_kp_u_CDirichletDomain_length_spectrum_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_manifold);
  Py_CLEAR(clear_module_state->__pyx_kp_u_CDirichletDomain_manifold_line_5);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_num_edges);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_num_faces);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_num_finite_vert);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_num_ideal_verti);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_num_vertices);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_out_radius);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_pairing_matrice);
  Py_CLEAR(clear_module_state->__pyx_kp_u_CDirichletDomain_pairing_matrice_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_pairing_words);
  Py_CLEAR(clear_module_state->__pyx_kp_u_CDirichletDomain_pairing_words_l);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_save);
  Py_CLEAR(clear_module_state->__pyx_kp_u_CDirichletDomain_save_line_643);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_spine_radius);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_triangulation);
  Py_CLEAR(clear_module_state->__pyx_kp_u_CDirichletDomain_triangulation_l);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_vertex_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_view);
  Py_CLEAR(clear_module_state->__pyx_n_s_CDirichletDomain_volume);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup___reduce_cytho);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup___setstate_cyt);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup__gap_init);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup__magma_init);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup__word_moves);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup_character_vari);
  Py_CLEAR(clear_module_state->__pyx_kp_u_CFundamentalGroup_character_vari_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup_gap_string);
  Py_CLEAR(clear_module_state->__pyx_kp_u_CFundamentalGroup_gap_string_lin);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup_generators);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup_generators_in);
  Py_CLEAR(clear_module_state->__pyx_kp_u_CFundamentalGroup_generators_in_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_CFundamentalGroup_generators_lin);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup_longitude);
  Py_CLEAR(clear_module_state->__pyx_kp_u_CFundamentalGroup_longitude_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup_magma_string);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup_meridian);
  Py_CLEAR(clear_module_state->__pyx_kp_u_CFundamentalGroup_meridian_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup_num_generators);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup_num_original_g);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup_num_relators);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup_original_gener);
  Py_CLEAR(clear_module_state->__pyx_kp_u_CFundamentalGroup_original_gener_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup_peripheral_cur);
  Py_CLEAR(clear_module_state->__pyx_kp_u_CFundamentalGroup_peripheral_cur_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup_relators);
  Py_CLEAR(clear_module_state->__pyx_n_s_CFundamentalGroup_sage);
  Py_CLEAR(clear_module_state->__pyx_n_s_CHolonomyGroup);
  Py_CLEAR(clear_module_state->__pyx_n_s_CHolonomyGroup_O31);
  Py_CLEAR(clear_module_state->__pyx_n_s_CHolonomyGroup_SL2C);
  Py_CLEAR(clear_module_state->__pyx_n_s_CHolonomyGroup___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_CHolonomyGroup___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_CHolonomyGroup__matrices);
  Py_CLEAR(clear_module_state->__pyx_n_s_CHolonomyGroup_complex_length);
  Py_CLEAR(clear_module_state->__pyx_kp_s_CallFuncList_function_local_F_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Can_t_compare_triangulations_of);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Can_t_get_the_list_of_isometries);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_convert_s_to_a_Real);
  Py_CLEAR(clear_module_state->__pyx_n_s_Census);
  Py_CLEAR(clear_module_state->__pyx_kp_s_CensusKnots_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_CensusKnots_tgz);
  Py_CLEAR(clear_module_state->__pyx_n_s_Census_Knots);
  Py_CLEAR(clear_module_state->__pyx_n_s_Census_Morwen8);
  Py_CLEAR(clear_module_state->__pyx_n_s_Census___contains);
  Py_CLEAR(clear_module_state->__pyx_n_s_Census___getitem);
  Py_CLEAR(clear_module_state->__pyx_n_s_Census___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_Census___iter);
  Py_CLEAR(clear_module_state->__pyx_n_s_Census___len);
  Py_CLEAR(clear_module_state->__pyx_n_s_Census_next);
  Py_CLEAR(clear_module_state->__pyx_n_s_CertifiedShapesEngine);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Change_the_triangulation_to_an);
  Py_CLEAR(clear_module_state->__pyx_n_s_ChristyLinks);
  Py_CLEAR(clear_module_state->__pyx_kp_s_ChristyLinks_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_ChristyLinks_tgz);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Christy_census_of_s_component_li);
  Py_CLEAR(clear_module_state->__pyx_n_s_Christy_links);
  Py_CLEAR(clear_module_state->__pyx_n_s_ClosedCensusData);
  Py_CLEAR(clear_module_state->__pyx_kp_s_ClosedNonorientableDistinct_txt);
  Py_CLEAR(clear_module_state->__pyx_kp_s_ClosedOrientableDistinct_txt);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Communication_with_PLink_failed);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Constructs_a_reasonable_selecti);
  Py_CLEAR(clear_module_state->__pyx_n_s_CosetAction);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Could_not_allocate_a_crossing_ta);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Could_not_certify_shape_interval);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Could_not_create_the_triangulati);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Cover_degree_should_be_at_least);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Create_a_3D_picture_of_the_horo);
  Py_CLEAR(clear_module_state->__pyx_n_s_CuspInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_CuspInfo___repr);
  Py_CLEAR(clear_module_state->__pyx_n_s_CuspNeighborhood);
  Py_CLEAR(clear_module_state->__pyx_n_s_CuspTopology);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Cusp_2d_complete_s_of_shape_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Cusp_2d_s_not_filled);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Cusp_2d_s_with_Dehn_filling_coef);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Cusp_Neighborhood_with_d_cusp_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Cusp_neighborhood_s_of_s);
  Py_CLEAR(clear_module_state->__pyx_n_s_CuspedCensus);
  Py_CLEAR(clear_module_state->__pyx_n_s_CuspedCensus___getitem);
  Py_CLEAR(clear_module_state->__pyx_n_s_CuspedCensus___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_CuspedCensus_lookup);
  Py_CLEAR(clear_module_state->__pyx_n_s_D);
  Py_CLEAR(clear_module_state->__pyx_kp_s_DT);
  Py_CLEAR(clear_module_state->__pyx_kp_s_DT_0_9_01);
  Py_CLEAR(clear_module_state->__pyx_kp_s_DT_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DT_3);
  Py_CLEAR(clear_module_state->__pyx_kp_s_DT_4_6_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_DT_a_zA_Z_01);
  Py_CLEAR(clear_module_state->__pyx_n_s_DT_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_DT_codes);
  Py_CLEAR(clear_module_state->__pyx_kp_s_DT_s);
  Py_CLEAR(clear_module_state->__pyx_n_s_DTcodec);
  Py_CLEAR(clear_module_state->__pyx_kp_s_D_d);
  Py_CLEAR(clear_module_state->__pyx_n_s_DirichletDomain);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Dirichlet_Domain_of);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Does_not_extend_to_link);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Drills_out_the_specified_dual_c);
  Py_CLEAR(clear_module_state->__pyx_n_s_DualCurveInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_DualCurveInfo___repr);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Each_cusp_has_a_preferred_marki);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Elementary_divisors_must_be_give);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Elementary_divisors_must_be_non);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Empty_Triangulation);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Equations_are_available_in_log_a);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Export_the_Dirichlet_domain_as);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Extend_the_Neumann_Zagier_Matri);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Extends_to_link);
  Py_CLEAR(clear_module_state->__pyx_n_s_F);
  Py_CLEAR(clear_module_state->__pyx_n_s_FactorCosetAction);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Failed_to_allocate_memory_for_cu);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Failed_to_allocate_memory_for_te);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Failed_to_construct_permutation);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Fill_an_empty_manifold_from_a_b);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Fill_an_empty_triangulation_fro);
  Py_CLEAR(clear_module_state->__pyx_kp_u_For_a_Triangulation_that_descri);
  Py_CLEAR(clear_module_state->__pyx_kp_u_For_a_non_orientable_Triangulat);
  Py_CLEAR(clear_module_state->__pyx_n_s_Ford_domain);
  Py_CLEAR(clear_module_state->__pyx_n_s_FormatHomForSnapPea);
  Py_CLEAR(clear_module_state->__pyx_kp_s_FormatHomForSnapPea_function_f);
  Py_CLEAR(clear_module_state->__pyx_n_s_FreeGroup);
  Py_CLEAR(clear_module_state->__pyx_n_s_FuncResult);
  Py_CLEAR(clear_module_state->__pyx_n_s_FundamentalGroup);
  Py_CLEAR(clear_module_state->__pyx_n_s_G);
  Py_CLEAR(clear_module_state->__pyx_n_s_GG);
  Py_CLEAR(clear_module_state->__pyx_n_s_GapElement);
  Py_CLEAR(clear_module_state->__pyx_kp_b_Generators);
  Py_CLEAR(clear_module_state->__pyx_n_s_GeneratorsOfGroup);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Generators_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Generators_s_Relators_s);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Give_the_triangulation_a_new_na);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Gives_the_shapes_of_the_tetrahe);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Got_the_empty_link_from_PLink_a);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Group);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Group_elements_which_pair_the_f);
  Py_CLEAR(clear_module_state->__pyx_n_s_GrpFP);
  Py_CLEAR(clear_module_state->__pyx_n_s_GrpPerm);
  Py_CLEAR(clear_module_state->__pyx_n_s_H);
  Py_CLEAR(clear_module_state->__pyx_n_s_HTLinkExteriors);
  Py_CLEAR(clear_module_state->__pyx_n_s_HTWKnots);
  Py_CLEAR(clear_module_state->__pyx_kp_s_High_precision_shapes_must_be_co);
  Py_CLEAR(clear_module_state->__pyx_n_s_HolonomyGroup);
  Py_CLEAR(clear_module_state->__pyx_n_s_HolonomyGroup__number);
  Py_CLEAR(clear_module_state->__pyx_n_s_HomGrp);
  Py_CLEAR(clear_module_state->__pyx_n_s_HoroballViewer);
  Py_CLEAR(clear_module_state->__pyx_n_s_I);
  Py_CLEAR(clear_module_state->__pyx_n_s_IOError);
  Py_CLEAR(clear_module_state->__pyx_kp_u_If_the_SymmetryGroup_is_a_nontr);
  Py_CLEAR(clear_module_state->__pyx_kp_u_If_the_manifold_is_the_compleme);
  Py_CLEAR(clear_module_state->__pyx_kp_u_If_the_symmetry_group_is_abelia);
  Py_CLEAR(clear_module_state->__pyx_kp_s_If_there_is_more_than_one_cusp_y);
  Py_CLEAR(clear_module_state->__pyx_kp_u_If_this_triangulation_is_a_subd);
  Py_CLEAR(clear_module_state->__pyx_n_s_Image);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Immutable_dictionary_whose_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_ImportError);
  Py_CLEAR(clear_module_state->__pyx_kp_u_In_the_default_mode_this_functi);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
  Py_CLEAR(clear_module_state->__pyx_n_s_Index);
  Py_CLEAR(clear_module_state->__pyx_n_s_IndexError);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Index_is_out_of_range);
  Py_CLEAR(clear_module_state->__pyx_n_s_Info);
  Py_CLEAR(clear_module_state->__pyx_n_s_Info___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_Info__immutable);
  Py_CLEAR(clear_module_state->__pyx_n_s_Info_keys);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Info_objects_are_immutable);
  Py_CLEAR(clear_module_state->__pyx_n_s_Integer);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Invalid_generator_status);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Invalid_permutation_data);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Invalid_pickle_byte_sequence);
  Py_CLEAR(clear_module_state->__pyx_n_s_IsSubgroupFpGroup);
  Py_CLEAR(clear_module_state->__pyx_n_s_IsToPermGroupHomomorphismByImage);
  Py_CLEAR(clear_module_state->__pyx_n_s_Isometry);
  Py_CLEAR(clear_module_state->__pyx_n_s_Isometry___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_Isometry___repr);
  Py_CLEAR(clear_module_state->__pyx_n_s_Isometry_cusp_images);
  Py_CLEAR(clear_module_state->__pyx_n_s_Isometry_cusp_maps);
  Py_CLEAR(clear_module_state->__pyx_n_s_Isometry_extends_to_link);
  Py_CLEAR(clear_module_state->__pyx_n_s_Isometry_num_cusps);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Iterator_Sequence_for_Alternati);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Iterator_Sequence_for_nonAltern);
  Py_CLEAR(clear_module_state->__pyx_n_s_K7_1);
  Py_CLEAR(clear_module_state->__pyx_n_s_KLPProjection);
  Py_CLEAR(clear_module_state->__pyx_kp_s_K_s__s);
  Py_CLEAR(clear_module_state->__pyx_n_s_KeyError);
  Py_CLEAR(clear_module_state->__pyx_n_s_Klein);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Klein_bottle_cusp);
  Py_CLEAR(clear_module_state->__pyx_n_s_KnotExteriors);
  Py_CLEAR(clear_module_state->__pyx_n_s_KnotExteriors___getitem);
  Py_CLEAR(clear_module_state->__pyx_n_s_KnotExteriors___init);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Knots_in_S_3_which_appear_in_the);
  Py_CLEAR(clear_module_state->__pyx_n_s_L);
  Py_CLEAR(clear_module_state->__pyx_n_s_L104001);
  Py_CLEAR(clear_module_state->__pyx_n_s_L13n9331);
  Py_CLEAR(clear_module_state->__pyx_kp_s_L13n9331_3_4_2_3_2_1);
  Py_CLEAR(clear_module_state->__pyx_n_s_LE);
  Py_CLEAR(clear_module_state->__pyx_kp_s_L_d_2d_3d);
  Py_CLEAR(clear_module_state->__pyx_n_s_LengthSpectrum);
  Py_CLEAR(clear_module_state->__pyx_n_s_LengthSpectrumFormatString);
  Py_CLEAR(clear_module_state->__pyx_n_s_LengthSpectrumFormatStringBase);
  Py_CLEAR(clear_module_state->__pyx_n_s_LengthSpectrumFormatStringWithWo);
  Py_CLEAR(clear_module_state->__pyx_n_s_LengthSpectrumInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_LengthSpectrumInfo___repr);
  Py_CLEAR(clear_module_state->__pyx_n_s_LengthSpectrum___repr);
  Py_CLEAR(clear_module_state->__pyx_n_s_Link);
  Py_CLEAR(clear_module_state->__pyx_n_s_LinkEditor);
  Py_CLEAR(clear_module_state->__pyx_n_s_LinkExteriors);
  Py_CLEAR(clear_module_state->__pyx_n_s_LinkManager);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Link_Projection);
  Py_CLEAR(clear_module_state->__pyx_n_s_ListOnePerLine);
  Py_CLEAR(clear_module_state->__pyx_n_s_ListOnePerLine___repr);
  Py_CLEAR(clear_module_state->__pyx_n_s_LowIndexSubgroups);
  Py_CLEAR(clear_module_state->__pyx_n_s_LowIndexSubgroupsFpGroup);
  Py_CLEAR(clear_module_state->__pyx_n_s_M);
  Py_CLEAR(clear_module_state->__pyx_n_s_M0);
  Py_CLEAR(clear_module_state->__pyx_n_s_M1);
  Py_CLEAR(clear_module_state->__pyx_n_s_MTLinks);
  Py_CLEAR(clear_module_state->__pyx_kp_u_M_cover_permutation_rep_Returns);
  Py_CLEAR(clear_module_state->__pyx_kp_u_M_covers_degree_method_None_cov);
  Py_CLEAR(clear_module_state->__pyx_kp_u_M_covers_degree_method_None_cov_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_M_gluing_equations_pgl_N_2_equa);
  Py_CLEAR(clear_module_state->__pyx_kp_u_M_ptolemy_generalized_obstructi);
  Py_CLEAR(clear_module_state->__pyx_kp_u_M_ptolemy_variety_N_obstruction);
  Py_CLEAR(clear_module_state->__pyx_n_s_MagmaElement);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold__canonical_cells_are_te);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold__canonical_cells_are_te_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold__canonical_retriangulat);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold__canonical_retriangulat_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold__choose_generators);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold__choose_generators_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold__complex_volume);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold__cusp_cross_section_inf);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold__from_bytes);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold__from_bytes_line_272);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold__from_isosig);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold__from_string);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold__from_string_line_256);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold__get_tetrahedra_shapes);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold__identify);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold__number);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold__polish_hyperbolic_stru);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_browse);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_browse_line_375);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_canonize);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_canonize_line_145);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_chern_simons);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_chern_simons_line_807);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_copy);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_copy_line_297);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_cover);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_cover_line_535);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_covers);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_covers_line_607);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_cusp_info);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_cusp_info_line_1108);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_cusp_neighborhood);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_cusp_neighborhood_line);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Manifold_dehn_fill);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_dehn_fill_line_1231);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_dirichlet_domain);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_dirichlet_domain_line_3);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_drill);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_drill_line_1485);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_dual_curves);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_dual_curves_line_1383);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_filled_triangulation);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_filled_triangulation_li);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_from_Triangulation);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_fundamental_group);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_fundamental_group_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_init_hyperbolic_structu);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_is_isometric_to);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_is_isometric_to_line_15);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_is_two_bridge);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_is_two_bridge_line_1616);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_length_spectrum);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_length_spectrum_line_14);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Manifold_must_be_pickled_with__t);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Manifold_set_peripheral_curves);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_set_peripheral_curves_l);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_set_target_holonomy);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Manifold_set_tetrahedra_shapes);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_solution_type);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_solution_type_line_1048);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_split);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_split_line_1736);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_splitting_surfaces);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_splitting_surfaces_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_symmetric_triangulation);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_symmetric_triangulation_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_symmetry_group);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_tetrahedra_shapes);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_tetrahedra_shapes_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_use_field_conversion);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_volume);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_volume_line_714);
  Py_CLEAR(clear_module_state->__pyx_n_s_Manifold_without_hyperbolic_stru);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Manifold_without_hyperbolic_stru_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Manifolds_must_be_non_empty);
  Py_CLEAR(clear_module_state->__pyx_n_s_MatrixParity);
  Py_CLEAR(clear_module_state->__pyx_n_s_MatrixWithExplanations);
  Py_CLEAR(clear_module_state->__pyx_n_s_MatrixWithExplanations___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_MatrixWithExplanations___repr);
  Py_CLEAR(clear_module_state->__pyx_n_s_MatrixWithExplanations___repr_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_MorwenLinks);
  Py_CLEAR(clear_module_state->__pyx_n_s_MorwenLinks___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_MsgIO);
  Py_CLEAR(clear_module_state->__pyx_n_s_MsgIO___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_N);
  Py_CLEAR(clear_module_state->__pyx_kp_s_N_has_to_be_2_15);
  Py_CLEAR(clear_module_state->__pyx_n_s_NeumannZagierTypeEquations);
  Py_CLEAR(clear_module_state->__pyx_n_s_NeumannZagierTypeEquations___ini);
  Py_CLEAR(clear_module_state->__pyx_n_s_NeumannZagierTypeEquations___rep);
  Py_CLEAR(clear_module_state->__pyx_kp_s_New_triangulation_received_from);
  Py_CLEAR(clear_module_state->__pyx_kp_s_No_associated_link_known);
  Py_CLEAR(clear_module_state->__pyx_kp_s_No_tetrahedra_data_provided);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Non_orientable);
  Py_CLEAR(clear_module_state->__pyx_n_s_NonalternatingKnotExteriors);
  Py_CLEAR(clear_module_state->__pyx_n_s_NonalternatingKnotExteriors___in);
  Py_CLEAR(clear_module_state->__pyx_n_s_Nonalternating_numbers);
  Py_CLEAR(clear_module_state->__pyx_n_s_Nonalternating_offsets);
  Py_CLEAR(clear_module_state->__pyx_n_s_Nonalternating_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_Nonorientable_lengths);
  Py_CLEAR(clear_module_state->__pyx_n_s_NormalSurfaceInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_NormalSurfaceInfo___repr);
  Py_CLEAR(clear_module_state->__pyx_n_s_NotImplemented);
  Py_CLEAR(clear_module_state->__pyx_n_s_NotImplementedError);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Not_a_valid_permutation);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Not_within_Sage);
  Py_CLEAR(clear_module_state->__pyx_n_s_Num_Alternating);
  Py_CLEAR(clear_module_state->__pyx_n_s_Num_Nonalternating);
  Py_CLEAR(clear_module_state->__pyx_n_s_Number);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Number_of_opacities_does_not_mat);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Number_of_permutations_is_not_th);
  Py_CLEAR(clear_module_state->__pyx_n_s_O);
  Py_CLEAR(clear_module_state->__pyx_n_s_O31);
  Py_CLEAR(clear_module_state->__pyx_n_s_O31_generators);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsCensusKnots);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsCensusKnots___getitem);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsCensusKnots___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsCensusKnots___repr);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsLinkExteriors);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsLinkExteriors___getitem);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsLinkExteriors___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsLinkExteriors___repr);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsMorwenLinks);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsMorwenLinks___getitem);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsMorwenLinks___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsNonorientableClosedCensus);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsNonorientableClosedCensus___g);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsNonorientableClosedCensus___i);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsNonorientableCuspedCensus);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsNonorientableCuspedCensus___i);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsNonorientableCuspedCensus_loo);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsOrientableClosedCensus);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsOrientableClosedCensus___geti);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsOrientableClosedCensus___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_ObsOrientableCuspedCensus);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Obsolete);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Obsolete_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Obstruction_class_has_wrong_leng);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Opens_browser_window_with_a_gra);
  Py_CLEAR(clear_module_state->__pyx_n_s_Orbifold1);
  Py_CLEAR(clear_module_state->__pyx_n_s_Orientability);
  Py_CLEAR(clear_module_state->__pyx_n_s_Orientable);
  Py_CLEAR(clear_module_state->__pyx_n_s_Orientable_lengths);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Out_of_memory);
  Py_CLEAR(clear_module_state->__pyx_n_s_PD_code);
  Py_CLEAR(clear_module_state->__pyx_kp_s_PLink_was_not_imported);
  Py_CLEAR(clear_module_state->__pyx_kp_s_P_crossings_0_9_P_alternation_a);
  Py_CLEAR(clear_module_state->__pyx_kp_s_P_crossings_0_9_P_components_0);
  Py_CLEAR(clear_module_state->__pyx_kp_s_P_crossings_0_9___P_index_0_9_P);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Perform_random_Pachner_moves_on);
  Py_CLEAR(clear_module_state->__pyx_n_s_PermutationGroup);
  Py_CLEAR(clear_module_state->__pyx_n_s_PickleError);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Please_specify_a_file_name);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Please_specify_filled_or_complet);
  Py_CLEAR(clear_module_state->__pyx_n_s_PolyhedronViewer);
  Py_CLEAR(clear_module_state->__pyx_n_s_PreImage);
  Py_CLEAR(clear_module_state->__pyx_n_s_PresentationMatrix);
  Py_CLEAR(clear_module_state->__pyx_n_s_PresentationMatrix___reduce_cyth);
  Py_CLEAR(clear_module_state->__pyx_n_s_PresentationMatrix___setstate_cy);
  Py_CLEAR(clear_module_state->__pyx_n_s_PresentationMatrix_add_rows);
  Py_CLEAR(clear_module_state->__pyx_n_s_PresentationMatrix_explode);
  Py_CLEAR(clear_module_state->__pyx_n_s_PresentationMatrix_get_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_PresentationMatrix_row_op);
  Py_CLEAR(clear_module_state->__pyx_n_s_PresentationMatrix_simplified_ma);
  Py_CLEAR(clear_module_state->__pyx_n_s_PresentationMatrix_simplify);
  Py_CLEAR(clear_module_state->__pyx_n_s_Q);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Q_s_A_s);
  Py_CLEAR(clear_module_state->__pyx_n_s_R);
  Py_CLEAR(clear_module_state->__pyx_n_s_RawNumber);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Removing_any_finite_vertices_by);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Represents_an_isometry_from_one);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Result_is_symplectic_up_to_facto);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_a_HolonomyGroup_represen);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_a_detailed_list_of_all_t);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_a_list_of_info_objects_d);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_a_new_Manifold_where_the);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_a_new_manifold_where_the);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_a_reasonably_short_byte);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_a_string_containing_the);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_the_Dowker_Thistlethwait);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_the_abelianization_of_th);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_the_center_of_the_symmet);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_the_commutator_subgroup);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_the_current_generators_i);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_the_letters_representing);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_the_name_of_the_triangul);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_the_number_of_tetrahedra);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_the_order_of_the_symmetr);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_the_original_geometric_g);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_the_total_number_of_cusp);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_whether_a_one_cusped_has);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_whether_the_SymmetryGrou);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_whether_the_full_symmetr);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_whether_the_manifold_has);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_whether_the_symmetry_gro);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_whether_the_symmetry_gro_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Return_whether_the_underlying_3);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_True_if_M_and_N_are_iso);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_True_if_and_only_if_the);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_True_if_and_only_if_the_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_Dehn_filling_descript);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_DirichletDomain_objec);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_FundamentalGroup_obje);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_Manifold_computed_dir);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_Triangulation_compute);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_Triangulation_represe);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_compact_text_represen);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_complete_list_of_comb);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_copy_of_the_manifold);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_copy_of_the_triangula);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_dictionary_whose_keys);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_list_of_geodesics_wit);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_list_of_meridian_long);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_list_of_the_O31Matric);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_list_of_variables_and);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_string_which_will_def);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_word_representing_a_c);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_a_word_representing_a_c_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_an_AbelianGroup_represe);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_an_info_object_containi);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_an_info_object_containi_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_information_about_the_c);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_self_as_a_Triangulation);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_the_Chern_Simons_invari);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_the_number_of_fake_cusp);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_the_obstruction_classes);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_the_product_of_group_el);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_the_type_of_the_current);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Returns_the_volume_of_the_curre);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Reverses_the_orientation_of_the);
  Py_CLEAR(clear_module_state->__pyx_n_s_RuntimeError);
  Py_CLEAR(clear_module_state->__pyx_n_s_S5);
  Py_CLEAR(clear_module_state->__pyx_n_s_SC);
  Py_CLEAR(clear_module_state->__pyx_n_s_SL2C);
  Py_CLEAR(clear_module_state->__pyx_n_s_SNAPPEA_MANIFOLD_DIRECTORY);
  Py_CLEAR(clear_module_state->__pyx_n_s_SageNotAvailable);
  Py_CLEAR(clear_module_state->__pyx_n_s_SageObject);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Save_Triangulation);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Save_the_Dirichlet_domain_as_a);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Save_the_triangulation_as_a_Sna);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Searches_for_connected_closed_n);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Send_to_SnapPy);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Set_the_Dehn_filling_coefficien);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Set_the_Dehn_filling_coefficien_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_ShapeInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_ShapeInfo___repr);
  Py_CLEAR(clear_module_state->__pyx_n_s_ShortMatrixParity);
  Py_CLEAR(clear_module_state->__pyx_n_s_SnapPeaFatalError);
  Py_CLEAR(clear_module_state->__pyx_n_s_SnapPea_KLPProjection);
  Py_CLEAR(clear_module_state->__pyx_kp_s_SnapPea_crashed_in_function_s_de);
  Py_CLEAR(clear_module_state->__pyx_kp_s_SnapPea_failed_to_compute_any_pa);
  Py_CLEAR(clear_module_state->__pyx_kp_s_SnapPea_failed_to_find_the_canon);
  Py_CLEAR(clear_module_state->__pyx_kp_s_SnapPea_failed_to_read_the_censu);
  Py_CLEAR(clear_module_state->__pyx_n_s_SnapPea_interrupt);
  Py_CLEAR(clear_module_state->__pyx_kp_s_SnapPea_kernel_failed_when_compu);
  Py_CLEAR(clear_module_state->__pyx_kp_s_SnapPea_kernel_failed_when_compu_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_SnapPea_kernel_failed_when_split);
  Py_CLEAR(clear_module_state->__pyx_kp_s_SnapPea_kernel_style_estimation);
  Py_CLEAR(clear_module_state->__pyx_kp_s_SnapPea_only_found_d_surfaces_bu);
  Py_CLEAR(clear_module_state->__pyx_n_s_SnapPy);
  Py_CLEAR(clear_module_state->__pyx_n_s_SnapPyCache);
  Py_CLEAR(clear_module_state->__pyx_kp_s_SnapPy_has_no_data_on_links_with);
  Py_CLEAR(clear_module_state->__pyx_n_s_SolutionType);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Solution_type_is_s);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Split_the_manifold_open_along_a);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Splitting_S__1_0_b1_A0_a0_B1);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Splitting_S__d_d);
  Py_CLEAR(clear_module_state->__pyx_n_s_Stabilizer);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Starting_the_link_editor_Select);
  Py_CLEAR(clear_module_state->__pyx_n_s_StopIteration);
  Py_CLEAR(clear_module_state->__pyx_n_s_StrLongestLen);
  Py_CLEAR(clear_module_state->__pyx_n_s_StrLongestLen_locals_genexpr);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Supply_a_manifold_or_generators);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Supported_cover_types_are_all_an);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Supported_methods_are_low_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_Surface);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup___reduce_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup___setstate_cython);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup_abelian_descriptio);
  Py_CLEAR(clear_module_state->__pyx_kp_u_SymmetryGroup_abelian_descriptio_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup_abelianization);
  Py_CLEAR(clear_module_state->__pyx_kp_u_SymmetryGroup_abelianization_lin);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup_center);
  Py_CLEAR(clear_module_state->__pyx_kp_u_SymmetryGroup_center_line_256);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup_commutator_subgrou);
  Py_CLEAR(clear_module_state->__pyx_kp_u_SymmetryGroup_commutator_subgrou_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup_direct_product_des);
  Py_CLEAR(clear_module_state->__pyx_kp_u_SymmetryGroup_direct_product_des_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup_is_S5);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup_is_abelian);
  Py_CLEAR(clear_module_state->__pyx_kp_u_SymmetryGroup_is_abelian_line_72);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup_is_amphicheiral);
  Py_CLEAR(clear_module_state->__pyx_kp_u_SymmetryGroup_is_amphicheiral_li);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup_is_dihedral);
  Py_CLEAR(clear_module_state->__pyx_kp_u_SymmetryGroup_is_dihedral_line_1);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup_is_direct_product);
  Py_CLEAR(clear_module_state->__pyx_kp_u_SymmetryGroup_is_direct_product_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup_is_full_group);
  Py_CLEAR(clear_module_state->__pyx_kp_u_SymmetryGroup_is_full_group_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup_is_invertible_knot);
  Py_CLEAR(clear_module_state->__pyx_kp_u_SymmetryGroup_is_invertible_knot_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup_is_polyhedral);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup_isometries);
  Py_CLEAR(clear_module_state->__pyx_kp_u_SymmetryGroup_isometries_line_29);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup_multiply_elements);
  Py_CLEAR(clear_module_state->__pyx_kp_u_SymmetryGroup_multiply_elements_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup_order);
  Py_CLEAR(clear_module_state->__pyx_kp_u_SymmetryGroup_order_line_62);
  Py_CLEAR(clear_module_state->__pyx_n_s_SymmetryGroup_polyhedral_descrip);
  Py_CLEAR(clear_module_state->__pyx_n_s_T);
  Py_CLEAR(clear_module_state->__pyx_n_s_TEXT);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Tetrahedra_data_appears_invalid);
  Py_CLEAR(clear_module_state->__pyx_kp_s_That_Magma_type_not_recognized);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_Chern_Simons_invariant_isn_t);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_Dehn_filling_coefficients_mu);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_Dirichlet_Domain_was_compute);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_Dirichlet_Domain_was_not_com);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_Dirichlet_construction_faile);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_Dirichlet_domain_could_not_b);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_Ford_domain_construction_fai);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_HoroballViewer_class_was_not);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_Manifold_is_not_orientable_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_MorwenLinks_class_has_been_r);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_Morwen_8_tetrahedra_manifold);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_PolyhedronViewer_class_was_n);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_SnapPea_kernel_couldn_t_comp);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_SnapPea_kernel_was_not_able);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_Triangulation_is_already_ori);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_Triangulation_is_empty);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_Triangulation_is_empty_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_Triangulation_must_be_empty);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_amount_of_data_given_is_not);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_braid_word_is_invalid);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_census_knot_s_was_not_found);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_curve_is_not_isotopic_to_a_g);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_cusp_neighborhood_constructi);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_data_given_do_not_have_the_r);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_data_provided_are_invalid_fo);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_data_provided_does_not_give);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_data_provided_does_not_give_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_drilling_curve_requested_is);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_elementary_divisors_must_for);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_empty_triangulation_has_no_n);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_full_symmetry_group_is_not_k);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_full_symmetry_group_not_know);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_generator_data_does_not_star);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_homomorphism_image_is_not_a);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_horoball_construction_failed);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_link_complement_s_was_not_fo);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_manifold_file_s_was_not_foun);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_method_must_be_fold_or_layer);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_number_of_fillings_specified);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_peripheral_data_d_d_d_d_is_n);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_peripheral_data_s_is_not_acc);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_permutation_list_is_invalid);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_solution_type_is_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_specified_cusp_s_does_not_ex);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_specified_edge_index_s_is_in);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_specified_face_index_s_is_in);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_specified_indices_to_be_fill);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_specified_tetrahedron_s_does);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_symmetry_group_has_only_d_el);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_symmetry_group_is_not_a_nont);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_symmetry_group_is_not_abelia);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_symmetry_group_is_not_polyhe);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_triangulation_construction_f);
  Py_CLEAR(clear_module_state->__pyx_kp_s_The_word_contains_a_non_generato);
  Py_CLEAR(clear_module_state->__pyx_kp_s_There_are_only_201_census_knots);
  Py_CLEAR(clear_module_state->__pyx_kp_s_This_census_does_not_support_man);
  Py_CLEAR(clear_module_state->__pyx_kp_s_To_permanently_fill_a_cusp_the_D);
  Py_CLEAR(clear_module_state->__pyx_kp_b_Triangulation);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Triangulation);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_DT_code);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_DT_code_line_1076);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation___reduce);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation___reduce___line_86);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__covers_gap);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__covers_low_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__covers_magma);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__covers_snappea);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__empty_save);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__from_bytes);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation__from_bytes_line_7);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__from_isosig);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation__from_isosig_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__from_pickle);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__from_string);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation__from_string_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__from_tetrahedra_g);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation__from_tetrahedra_g_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__get_cusp_indices);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__get_from_link_dat);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__get_tetrahedra_gl);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__is_symplectic);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__marked_tetrahedra);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__num_fake_cusps);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation__num_fake_cusps_li);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__polish_hyperbolic);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__presentation_matr);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__ptolemy_equations);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__ptolemy_equations_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__ptolemy_equations_3);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__ptolemy_equations_4);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__ptolemy_equations_5);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__ptolemy_equations_6);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__reindex_cusps);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation__reindex_cusps_lin);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__remove_finite_ver);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation__remove_finite_ver_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__set_DTcode);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__set_PDcode);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__symplectic_form);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__three_to_two);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__to_bytes);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation__to_bytes_line_699);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__to_string);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation__to_string_line_65);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__two_to_three);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation__unsimplified_fill);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation__unsimplified_fill_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Triangulation_and_text_files);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Triangulation_contains_cusps_onl);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_copy);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_copy_line_442);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_cover);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_cover_info);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_cover_line_2360);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_covers);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_covers_line_2460);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_cusp_info);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_cusp_info_line_119);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_dehn_fill);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_dehn_fill_line_112);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_edge_valences);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_edge_valences_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_filled_triangulati);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_filled_triangulati_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_from_Manifold);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_fundamental_group);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_fundamental_group_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_gluing_equations);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_gluing_equations_l);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_gluing_equations_p);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_gluing_equations_p_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_has_finite_vertice);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_has_finite_vertice_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_homology);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_homology_line_2278);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_is_orientable);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_is_orientable_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_isomorphisms_to);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_isomorphisms_to_li);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_link);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_name);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_name_line_1049);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_num_cusps);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_num_cusps_line_363);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_num_tetrahedra);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_num_tetrahedra_lin);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Triangulation_or_Manifold);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_orientation_cover);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_orientation_cover_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_pickle);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_plink);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_plink_line_319);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_ptolemy_generalize);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_ptolemy_generalize_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_ptolemy_obstructio);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_ptolemy_obstructio_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_ptolemy_variety);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_ptolemy_variety_li);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_randomize);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_randomize_line_459);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_reverse_orientatio);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_reverse_orientatio_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_save);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_save_line_629);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_set_name);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_set_name_line_1061);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_set_peripheral_cur);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_simplify);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_simplify_line_473);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_symplectic_basis);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_symplectic_basis_l);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_triangulation_isos);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_triangulation_isos_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_Triangulation_with_hyperbolic_st);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Triangulation_with_hyperbolic_st_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Try_to_simplify_the_triangulati);
  Py_CLEAR(clear_module_state->__pyx_n_s_Type);
  Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
  Py_CLEAR(clear_module_state->__pyx_n_s_UI_callback);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Used_by_pickle_dumps_from_pickl);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Used_by_the_pickle_module_to_pi);
  Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Verified_and_arbitrary_precision);
  Py_CLEAR(clear_module_state->__pyx_n_s_ViewerWindow);
  Py_CLEAR(clear_module_state->__pyx_kp_u_WARNING_Users_should_not_use_th);
  Py_CLEAR(clear_module_state->__pyx_kp_u_WARNING_Users_should_not_use_th_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_WARNING_Users_should_not_use_th_3);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Warning_Result_is_not_symplectic);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Words_must_be_represented_as_Pyt);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Wrong_equation_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_X);
  Py_CLEAR(clear_module_state->__pyx_n_s_Xbackward_neighbor);
  Py_CLEAR(clear_module_state->__pyx_n_s_Xbackward_strand);
  Py_CLEAR(clear_module_state->__pyx_n_s_Xcomponent);
  Py_CLEAR(clear_module_state->__pyx_n_s_Xforward_neighbor);
  Py_CLEAR(clear_module_state->__pyx_n_s_Xforward_strand);
  Py_CLEAR(clear_module_state->__pyx_n_s_Y);
  Py_CLEAR(clear_module_state->__pyx_n_s_Ybackward_neighbor);
  Py_CLEAR(clear_module_state->__pyx_n_s_Ybackward_strand);
  Py_CLEAR(clear_module_state->__pyx_n_s_Ycomponent);
  Py_CLEAR(clear_module_state->__pyx_n_s_Yforward_neighbor);
  Py_CLEAR(clear_module_state->__pyx_n_s_Yforward_strand);
  Py_CLEAR(clear_module_state->__pyx_kp_s_You_have_specified_a_Hoste_Thist);
  Py_CLEAR(clear_module_state->__pyx_kp_s_You_must_apply_fillings_to_all_o);
  Py_CLEAR(clear_module_state->__pyx_kp_s_You_must_apply_shortest_to_all_o);
  Py_CLEAR(clear_module_state->__pyx_kp_s_You_provided_filling_data_for_to);
  Py_CLEAR(clear_module_state->__pyx_kp_s_You_provided_more_peripheral_dat);
  Py_CLEAR(clear_module_state->__pyx_kp_s_You_tried_to_create_an_empty_Sym);
  Py_CLEAR(clear_module_state->__pyx_n_s_Z);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Z_d);
  Py_CLEAR(clear_module_state->__pyx_kp_s__111);
  Py_CLEAR(clear_module_state->__pyx_kp_s__114);
  Py_CLEAR(clear_module_state->__pyx_kp_s__115);
  Py_CLEAR(clear_module_state->__pyx_kp_s__116);
  Py_CLEAR(clear_module_state->__pyx_kp_s__117);
  Py_CLEAR(clear_module_state->__pyx_kp_s__118);
  Py_CLEAR(clear_module_state->__pyx_kp_s__12);
  Py_CLEAR(clear_module_state->__pyx_kp_s__13);
  Py_CLEAR(clear_module_state->__pyx_kp_b__144);
  Py_CLEAR(clear_module_state->__pyx_n_s__150);
  Py_CLEAR(clear_module_state->__pyx_kp_s__16);
  Py_CLEAR(clear_module_state->__pyx_kp_s__17);
  Py_CLEAR(clear_module_state->__pyx_kp_s__170);
  Py_CLEAR(clear_module_state->__pyx_kp_u__170);
  Py_CLEAR(clear_module_state->__pyx_kp_s__18);
  Py_CLEAR(clear_module_state->__pyx_kp_s__2);
  Py_CLEAR(clear_module_state->__pyx_kp_s__23);
  Py_CLEAR(clear_module_state->__pyx_kp_s__29);
  Py_CLEAR(clear_module_state->__pyx_kp_s__30);
  Py_CLEAR(clear_module_state->__pyx_kp_s__32);
  Py_CLEAR(clear_module_state->__pyx_kp_s__33);
  Py_CLEAR(clear_module_state->__pyx_kp_s__38);
  Py_CLEAR(clear_module_state->__pyx_kp_s__653);
  Py_CLEAR(clear_module_state->__pyx_kp_s__7);
  Py_CLEAR(clear_module_state->__pyx_n_s__726);
  Py_CLEAR(clear_module_state->__pyx_kp_s__8);
  Py_CLEAR(clear_module_state->__pyx_kp_b__9);
  Py_CLEAR(clear_module_state->__pyx_kp_s__9);
  Py_CLEAR(clear_module_state->__pyx_kp_s_a);
  Py_CLEAR(clear_module_state->__pyx_n_s_a_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_a_il);
  Py_CLEAR(clear_module_state->__pyx_kp_s_a_zA_Z0_9);
  Py_CLEAR(clear_module_state->__pyx_kp_s_abcABC__d_abcABC__d);
  Py_CLEAR(clear_module_state->__pyx_kp_s_abcdefghijklmnopqrstuvwxyzZYXWV);
  Py_CLEAR(clear_module_state->__pyx_n_s_abelian_description);
  Py_CLEAR(clear_module_state->__pyx_n_s_abelianization);
  Py_CLEAR(clear_module_state->__pyx_n_s_absImag);
  Py_CLEAR(clear_module_state->__pyx_n_s_abspath);
  Py_CLEAR(clear_module_state->__pyx_n_s_acc_log_im);
  Py_CLEAR(clear_module_state->__pyx_n_s_acc_log_re);
  Py_CLEAR(clear_module_state->__pyx_n_s_acc_rec_im);
  Py_CLEAR(clear_module_state->__pyx_n_s_acc_rec_re);
  Py_CLEAR(clear_module_state->__pyx_n_s_accuracies);
  Py_CLEAR(clear_module_state->__pyx_n_s_accuracy);
  Py_CLEAR(clear_module_state->__pyx_n_s_add);
  Py_CLEAR(clear_module_state->__pyx_n_s_add_rows);
  Py_CLEAR(clear_module_state->__pyx_n_s_algorithm);
  Py_CLEAR(clear_module_state->__pyx_n_s_all);
  Py_CLEAR(clear_module_state->__pyx_n_s_all_tables);
  Py_CLEAR(clear_module_state->__pyx_kp_s_all_tetrahedra_positively_orient);
  Py_CLEAR(clear_module_state->__pyx_n_s_alpha);
  Py_CLEAR(clear_module_state->__pyx_kp_s_alternating_gz);
  Py_CLEAR(clear_module_state->__pyx_n_s_alternation);
  Py_CLEAR(clear_module_state->__pyx_n_s_ans);
  Py_CLEAR(clear_module_state->__pyx_n_s_append);
  Py_CLEAR(clear_module_state->__pyx_n_s_are_isometric);
  Py_CLEAR(clear_module_state->__pyx_n_s_args);
  Py_CLEAR(clear_module_state->__pyx_n_s_as_ideal);
  Py_CLEAR(clear_module_state->__pyx_n_s_as_int_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_as_string);
  Py_CLEAR(clear_module_state->__pyx_n_s_ascii);
  Py_CLEAR(clear_module_state->__pyx_n_s_ascii_lowercase);
  Py_CLEAR(clear_module_state->__pyx_n_s_asksaveasfile);
  Py_CLEAR(clear_module_state->__pyx_n_s_assignments);
  Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
  Py_CLEAR(clear_module_state->__pyx_kp_s_at_least);
  Py_CLEAR(clear_module_state->__pyx_n_s_atexit);
  Py_CLEAR(clear_module_state->__pyx_kp_s_b);
  Py_CLEAR(clear_module_state->__pyx_n_s_b_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_b_RL);
  Py_CLEAR(clear_module_state->__pyx_kp_s_b_RL_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_b_RRL);
  Py_CLEAR(clear_module_state->__pyx_kp_s_b_RRL_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_b_file_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_b_new_name);
  Py_CLEAR(clear_module_state->__pyx_kp_s_b_no_lLrR);
  Py_CLEAR(clear_module_state->__pyx_n_s_b_string);
  Py_CLEAR(clear_module_state->__pyx_n_s_ball);
  Py_CLEAR(clear_module_state->__pyx_n_s_base);
  Py_CLEAR(clear_module_state->__pyx_n_s_bases);
  Py_CLEAR(clear_module_state->__pyx_n_s_basis);
  Py_CLEAR(clear_module_state->__pyx_n_s_betti_number);
  Py_CLEAR(clear_module_state->__pyx_kp_s_binary);
  Py_CLEAR(clear_module_state->__pyx_kp_s_binary_dihedral_group_2_2_d);
  Py_CLEAR(clear_module_state->__pyx_n_s_bit);
  Py_CLEAR(clear_module_state->__pyx_n_s_bits_prec);
  Py_CLEAR(clear_module_state->__pyx_n_s_blowup_multiple);
  Py_CLEAR(clear_module_state->__pyx_n_s_browse);
  Py_CLEAR(clear_module_state->__pyx_n_s_browser);
  Py_CLEAR(clear_module_state->__pyx_n_s_bundle);
  Py_CLEAR(clear_module_state->__pyx_n_s_bundle_from_string);
  Py_CLEAR(clear_module_state->__pyx_n_s_byte);
  Py_CLEAR(clear_module_state->__pyx_n_s_bytearray_to_bytes);
  Py_CLEAR(clear_module_state->__pyx_n_s_byteseq);
  Py_CLEAR(clear_module_state->__pyx_n_s_bytestring);
  Py_CLEAR(clear_module_state->__pyx_n_s_c);
  Py_CLEAR(clear_module_state->__pyx_n_s_c0);
  Py_CLEAR(clear_module_state->__pyx_n_s_c1);
  Py_CLEAR(clear_module_state->__pyx_n_s_c2);
  Py_CLEAR(clear_module_state->__pyx_n_s_c3);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_abelianization);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_canonized_triangulation);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_center);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_comm_subgroup);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_core_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_cover_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_eqns);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_factor_0);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_factor_1);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_filled_tri);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_longitude);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_matrix);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_meridian);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_moves);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_new_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_new_tri);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_obstruction_class);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_opacities);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_representation);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_retriangulated_triangulation);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_string);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_symmetric_triangulation);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_target);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_terse);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_triangulation);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_vars);
  Py_CLEAR(clear_module_state->__pyx_n_s_c_word);
  Py_CLEAR(clear_module_state->__pyx_n_s_cache);
  Py_CLEAR(clear_module_state->__pyx_n_s_callback);
  Py_CLEAR(clear_module_state->__pyx_n_s_canonical);
  Py_CLEAR(clear_module_state->__pyx_n_s_canonical_cells_are_tetrahedra);
  Py_CLEAR(clear_module_state->__pyx_n_s_canonical_retriangulation);
  Py_CLEAR(clear_module_state->__pyx_n_s_canonize);
  Py_CLEAR(clear_module_state->__pyx_n_s_cb_menu);
  Py_CLEAR(clear_module_state->__pyx_n_s_census_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_census_knot_archive);
  Py_CLEAR(clear_module_state->__pyx_n_s_census_knot_numbers);
  Py_CLEAR(clear_module_state->__pyx_n_s_center);
  Py_CLEAR(clear_module_state->__pyx_n_s_centroid_at_origin);
  Py_CLEAR(clear_module_state->__pyx_n_s_certified_shapes);
  Py_CLEAR(clear_module_state->__pyx_n_s_character_variety);
  Py_CLEAR(clear_module_state->__pyx_n_s_character_variety_ideal);
  Py_CLEAR(clear_module_state->__pyx_n_s_character_variety_vars_and_polys);
  Py_CLEAR(clear_module_state->__pyx_n_s_check_SnapPea_memory);
  Py_CLEAR(clear_module_state->__pyx_n_s_check_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_chern_simons);
  Py_CLEAR(clear_module_state->__pyx_n_s_choose_generators);
  Py_CLEAR(clear_module_state->__pyx_n_s_choose_generators_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_circle);
  Py_CLEAR(clear_module_state->__pyx_n_s_class);
  Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem);
  Py_CLEAR(clear_module_state->__pyx_n_s_clear);
  Py_CLEAR(clear_module_state->__pyx_n_s_clear_marks);
  Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
  Py_CLEAR(clear_module_state->__pyx_n_s_close);
  Py_CLEAR(clear_module_state->__pyx_n_s_closed_census_directory);
  Py_CLEAR(clear_module_state->__pyx_n_s_closed_nonorientable);
  Py_CLEAR(clear_module_state->__pyx_n_s_closed_orientable);
  Py_CLEAR(clear_module_state->__pyx_n_s_closest);
  Py_CLEAR(clear_module_state->__pyx_n_s_cls);
  Py_CLEAR(clear_module_state->__pyx_n_s_cobs);
  Py_CLEAR(clear_module_state->__pyx_n_s_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_codec);
  Py_CLEAR(clear_module_state->__pyx_n_s_coefficient_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_coeffs);
  Py_CLEAR(clear_module_state->__pyx_n_s_col_support);
  Py_CLEAR(clear_module_state->__pyx_n_s_cols);
  Py_CLEAR(clear_module_state->__pyx_n_s_columns);
  Py_CLEAR(clear_module_state->__pyx_n_s_combinatorial);
  Py_CLEAR(clear_module_state->__pyx_n_s_comm_subgroup);
  Py_CLEAR(clear_module_state->__pyx_n_s_commutator_subgroup);
  Py_CLEAR(clear_module_state->__pyx_n_s_compile);
  Py_CLEAR(clear_module_state->__pyx_n_s_complete);
  Py_CLEAR(clear_module_state->__pyx_kp_s_complete_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_complete_length);
  Py_CLEAR(clear_module_state->__pyx_kp_s_complete_length_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_complete_shape_array);
  Py_CLEAR(clear_module_state->__pyx_n_s_complete_shapes);
  Py_CLEAR(clear_module_state->__pyx_n_s_complex);
  Py_CLEAR(clear_module_state->__pyx_n_s_complex_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_complex_volume);
  Py_CLEAR(clear_module_state->__pyx_n_s_complex_volume_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_components);
  Py_CLEAR(clear_module_state->__pyx_n_s_compute_corners);
  Py_CLEAR(clear_module_state->__pyx_n_s_compute_cusp_shapes);
  Py_CLEAR(clear_module_state->__pyx_n_s_compute_volume);
  Py_CLEAR(clear_module_state->__pyx_n_s_contains);
  Py_CLEAR(clear_module_state->__pyx_kp_s_contains_degenerate_tetrahedra);
  Py_CLEAR(clear_module_state->__pyx_kp_s_contains_flat_tetrahedra);
  Py_CLEAR(clear_module_state->__pyx_kp_s_contains_negatively_oriented_tet);
  Py_CLEAR(clear_module_state->__pyx_n_s_content);
  Py_CLEAR(clear_module_state->__pyx_n_s_copy);
  Py_CLEAR(clear_module_state->__pyx_n_s_copy_c_triangulation);
  Py_CLEAR(clear_module_state->__pyx_n_s_core_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_corners);
  Py_CLEAR(clear_module_state->__pyx_n_s_coset_action);
  Py_CLEAR(clear_module_state->__pyx_n_s_cover);
  Py_CLEAR(clear_module_state->__pyx_n_s_cover_c_triangulation);
  Py_CLEAR(clear_module_state->__pyx_n_s_cover_count);
  Py_CLEAR(clear_module_state->__pyx_n_s_cover_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_cover_locals_genexpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_cover_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_cover_types);
  Py_CLEAR(clear_module_state->__pyx_n_s_covers);
  Py_CLEAR(clear_module_state->__pyx_n_s_covers_gap);
  Py_CLEAR(clear_module_state->__pyx_n_s_covers_low_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_covers_low_index_locals_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_covers_magma);
  Py_CLEAR(clear_module_state->__pyx_n_s_covers_snappea);
  Py_CLEAR(clear_module_state->__pyx_n_s_crossings);
  Py_CLEAR(clear_module_state->__pyx_n_s_cs);
  Py_CLEAR(clear_module_state->__pyx_n_s_curdir);
  Py_CLEAR(clear_module_state->__pyx_n_s_current_modulus);
  Py_CLEAR(clear_module_state->__pyx_n_s_current_shape);
  Py_CLEAR(clear_module_state->__pyx_n_s_current_shape_accuracy);
  Py_CLEAR(clear_module_state->__pyx_n_s_curve_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_cusp_cross_section_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_cusp_images);
  Py_CLEAR(clear_module_state->__pyx_n_s_cusp_images_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_cusp_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_cusp_indices);
  Py_CLEAR(clear_module_state->__pyx_n_s_cusp_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_cusp_maps);
  Py_CLEAR(clear_module_state->__pyx_n_s_cusp_maps_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_cusp_neighborhood);
  Py_CLEAR(clear_module_state->__pyx_n_s_cusp_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_cusps);
  Py_CLEAR(clear_module_state->__pyx_n_s_cusps_to_fill);
  Py_CLEAR(clear_module_state->__pyx_n_s_cutoff);
  Py_CLEAR(clear_module_state->__pyx_n_s_cutoff_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_cutoff_radius);
  Py_CLEAR(clear_module_state->__pyx_n_s_cutout);
  Py_CLEAR(clear_module_state->__pyx_n_s_cy_eval);
  Py_CLEAR(clear_module_state->__pyx_n_s_cyclic);
  Py_CLEAR(clear_module_state->__pyx_kp_s_cython_core_abelian_group_pyx);
  Py_CLEAR(clear_module_state->__pyx_kp_s_cython_core_basic_pyx);
  Py_CLEAR(clear_module_state->__pyx_kp_s_cython_core_cusp_neighborhoods_p);
  Py_CLEAR(clear_module_state->__pyx_kp_s_cython_core_dirichlet_pyx);
  Py_CLEAR(clear_module_state->__pyx_kp_s_cython_core_fundamental_group_py);
  Py_CLEAR(clear_module_state->__pyx_kp_s_cython_core_manifold_pyx);
  Py_CLEAR(clear_module_state->__pyx_kp_s_cython_core_symmetry_group_pyx);
  Py_CLEAR(clear_module_state->__pyx_kp_s_cython_core_tail_pyx);
  Py_CLEAR(clear_module_state->__pyx_kp_s_cython_core_triangulation_pyx);
  Py_CLEAR(clear_module_state->__pyx_kp_s_d);
  Py_CLEAR(clear_module_state->__pyx_kp_s_dB);
  Py_CLEAR(clear_module_state->__pyx_n_s_dLQbcccdxwb);
  Py_CLEAR(clear_module_state->__pyx_kp_s_d_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_d_3);
  Py_CLEAR(clear_module_state->__pyx_n_s_d_4);
  Py_CLEAR(clear_module_state->__pyx_kp_s_d__d);
  Py_CLEAR(clear_module_state->__pyx_kp_s_d_d);
  Py_CLEAR(clear_module_state->__pyx_kp_s_d_d_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_d_d__d);
  Py_CLEAR(clear_module_state->__pyx_kp_s_d_finite_vertices_d_ideal_verti);
  Py_CLEAR(clear_module_state->__pyx_n_s_data);
  Py_CLEAR(clear_module_state->__pyx_kp_u_data_1_1_2_2_0_1_3_2_2_3_1_0_0);
  Py_CLEAR(clear_module_state->__pyx_n_s_data_ijk);
  Py_CLEAR(clear_module_state->__pyx_n_s_data_spec);
  Py_CLEAR(clear_module_state->__pyx_n_s_database);
  Py_CLEAR(clear_module_state->__pyx_n_s_datafile);
  Py_CLEAR(clear_module_state->__pyx_n_s_dec_prec);
  Py_CLEAR(clear_module_state->__pyx_n_s_decode);
  Py_CLEAR(clear_module_state->__pyx_n_s_decorated);
  Py_CLEAR(clear_module_state->__pyx_n_s_decorated_isosig);
  Py_CLEAR(clear_module_state->__pyx_n_s_decoration);
  Py_CLEAR(clear_module_state->__pyx_n_s_default_precision);
  Py_CLEAR(clear_module_state->__pyx_n_s_defaultextension);
  Py_CLEAR(clear_module_state->__pyx_n_s_degree);
  Py_CLEAR(clear_module_state->__pyx_n_s_dehn_fill);
  Py_CLEAR(clear_module_state->__pyx_n_s_delattr);
  Py_CLEAR(clear_module_state->__pyx_n_s_delitem);
  Py_CLEAR(clear_module_state->__pyx_n_s_desc);
  Py_CLEAR(clear_module_state->__pyx_n_s_det);
  Py_CLEAR(clear_module_state->__pyx_n_s_details);
  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_n_s_dict_3);
  Py_CLEAR(clear_module_state->__pyx_n_s_direct_product_description);
  Py_CLEAR(clear_module_state->__pyx_n_s_dirichlet_domain);
  Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
  Py_CLEAR(clear_module_state->__pyx_n_s_disp);
  Py_CLEAR(clear_module_state->__pyx_n_s_displacement);
  Py_CLEAR(clear_module_state->__pyx_n_s_distance);
  Py_CLEAR(clear_module_state->__pyx_n_s_doc);
  Py_CLEAR(clear_module_state->__pyx_n_s_domain);
  Py_CLEAR(clear_module_state->__pyx_n_s_drill);
  Py_CLEAR(clear_module_state->__pyx_n_s_dual_curves);
  Py_CLEAR(clear_module_state->__pyx_n_s_dual_rows);
  Py_CLEAR(clear_module_state->__pyx_n_s_e);
  Py_CLEAR(clear_module_state->__pyx_n_s_edge);
  Py_CLEAR(clear_module_state->__pyx_n_s_edge_class);
  Py_CLEAR(clear_module_state->__pyx_n_s_edge_image_indices);
  Py_CLEAR(clear_module_state->__pyx_n_s_edge_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_edge_indices);
  Py_CLEAR(clear_module_state->__pyx_n_s_edge_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_edge_orientations);
  Py_CLEAR(clear_module_state->__pyx_n_s_edge_to_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_edge_to_index_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_edge_valences);
  Py_CLEAR(clear_module_state->__pyx_n_s_edges);
  Py_CLEAR(clear_module_state->__pyx_n_s_eight_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_elementary_divisors);
  Py_CLEAR(clear_module_state->__pyx_n_s_eliminate_fixed_ptolemys);
  Py_CLEAR(clear_module_state->__pyx_n_s_elt);
  Py_CLEAR(clear_module_state->__pyx_n_s_empty);
  Py_CLEAR(clear_module_state->__pyx_n_s_empty_save);
  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_end);
  Py_CLEAR(clear_module_state->__pyx_n_s_endpoints);
  Py_CLEAR(clear_module_state->__pyx_n_s_engine);
  Py_CLEAR(clear_module_state->__pyx_n_s_enter);
  Py_CLEAR(clear_module_state->__pyx_n_s_entries);
  Py_CLEAR(clear_module_state->__pyx_n_s_enum);
  Py_CLEAR(clear_module_state->__pyx_n_s_enumerate);
  Py_CLEAR(clear_module_state->__pyx_n_s_environ);
  Py_CLEAR(clear_module_state->__pyx_n_s_eqn);
  Py_CLEAR(clear_module_state->__pyx_n_s_eqns);
  Py_CLEAR(clear_module_state->__pyx_n_s_equation_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_equations);
  Py_CLEAR(clear_module_state->__pyx_n_s_euler);
  Py_CLEAR(clear_module_state->__pyx_n_s_eval);
  Py_CLEAR(clear_module_state->__pyx_n_s_exceptions);
  Py_CLEAR(clear_module_state->__pyx_n_s_exit);
  Py_CLEAR(clear_module_state->__pyx_n_s_exit_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_expand_until_certified);
  Py_CLEAR(clear_module_state->__pyx_n_s_explain_cols);
  Py_CLEAR(clear_module_state->__pyx_n_s_explain_columns);
  Py_CLEAR(clear_module_state->__pyx_n_s_explain_rows);
  Py_CLEAR(clear_module_state->__pyx_n_s_explode);
  Py_CLEAR(clear_module_state->__pyx_n_s_export_stl);
  Py_CLEAR(clear_module_state->__pyx_n_s_extends_to_link);
  Py_CLEAR(clear_module_state->__pyx_n_s_extends_to_link_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_extract_HT_knot);
  Py_CLEAR(clear_module_state->__pyx_n_s_extractfile);
  Py_CLEAR(clear_module_state->__pyx_n_s_f);
  Py_CLEAR(clear_module_state->__pyx_n_s_face);
  Py_CLEAR(clear_module_state->__pyx_n_s_face0_gen);
  Py_CLEAR(clear_module_state->__pyx_n_s_face1_gen);
  Py_CLEAR(clear_module_state->__pyx_n_s_face2_gen);
  Py_CLEAR(clear_module_state->__pyx_n_s_face3_gen);
  Py_CLEAR(clear_module_state->__pyx_n_s_face_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_face_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_face_list_locals_genexpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_facedicts);
  Py_CLEAR(clear_module_state->__pyx_n_s_faces);
  Py_CLEAR(clear_module_state->__pyx_n_s_factor_0);
  Py_CLEAR(clear_module_state->__pyx_n_s_factor_1);
  Py_CLEAR(clear_module_state->__pyx_n_s_file);
  Py_CLEAR(clear_module_state->__pyx_n_s_file_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_filedata);
  Py_CLEAR(clear_module_state->__pyx_n_s_filedialog);
  Py_CLEAR(clear_module_state->__pyx_n_s_filename);
  Py_CLEAR(clear_module_state->__pyx_n_s_files);
  Py_CLEAR(clear_module_state->__pyx_n_s_filetypes);
  Py_CLEAR(clear_module_state->__pyx_n_s_fill);
  Py_CLEAR(clear_module_state->__pyx_n_s_fill_all);
  Py_CLEAR(clear_module_state->__pyx_n_s_fill_by_fold);
  Py_CLEAR(clear_module_state->__pyx_n_s_fill_cusp_spec);
  Py_CLEAR(clear_module_state->__pyx_n_s_filled);
  Py_CLEAR(clear_module_state->__pyx_n_s_filled_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_filled_length);
  Py_CLEAR(clear_module_state->__pyx_kp_s_filled_length_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_filled_shape_array);
  Py_CLEAR(clear_module_state->__pyx_n_s_filled_shapes);
  Py_CLEAR(clear_module_state->__pyx_n_s_filled_tri);
  Py_CLEAR(clear_module_state->__pyx_n_s_filled_triangulation);
  Py_CLEAR(clear_module_state->__pyx_n_s_filling);
  Py_CLEAR(clear_module_state->__pyx_kp_s_filling__d__d);
  Py_CLEAR(clear_module_state->__pyx_n_s_filling_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_fillings);
  Py_CLEAR(clear_module_state->__pyx_n_s_fillings_may_affect_generators);
  Py_CLEAR(clear_module_state->__pyx_n_s_find);
  Py_CLEAR(clear_module_state->__pyx_n_s_findall);
  Py_CLEAR(clear_module_state->__pyx_n_s_first_nybble);
  Py_CLEAR(clear_module_state->__pyx_n_s_five_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_five_tet_nonorientable);
  Py_CLEAR(clear_module_state->__pyx_n_s_five_tet_orientable);
  Py_CLEAR(clear_module_state->__pyx_n_s_fixed_alignment);
  Py_CLEAR(clear_module_state->__pyx_n_s_flips);
  Py_CLEAR(clear_module_state->__pyx_n_s_flush);
  Py_CLEAR(clear_module_state->__pyx_n_s_fold);
  Py_CLEAR(clear_module_state->__pyx_n_s_force_recompute);
  Py_CLEAR(clear_module_state->__pyx_n_s_form);
  Py_CLEAR(clear_module_state->__pyx_n_s_format);
  Py_CLEAR(clear_module_state->__pyx_n_s_format_explain_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_format_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_format_two_by_two);
  Py_CLEAR(clear_module_state->__pyx_n_s_from_bytes);
  Py_CLEAR(clear_module_state->__pyx_n_b_from_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_from_isosig);
  Py_CLEAR(clear_module_state->__pyx_n_s_from_pickle);
  Py_CLEAR(clear_module_state->__pyx_n_s_from_string);
  Py_CLEAR(clear_module_state->__pyx_n_s_from_tetrahedra_gluing_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_full_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_full_rigor);
  Py_CLEAR(clear_module_state->__pyx_n_s_func);
  Py_CLEAR(clear_module_state->__pyx_n_s_func_OK);
  Py_CLEAR(clear_module_state->__pyx_n_s_func_bad_input);
  Py_CLEAR(clear_module_state->__pyx_n_s_func_cancelled);
  Py_CLEAR(clear_module_state->__pyx_n_s_func_failed);
  Py_CLEAR(clear_module_state->__pyx_n_s_fundamental_group);
  Py_CLEAR(clear_module_state->__pyx_n_s_g);
  Py_CLEAR(clear_module_state->__pyx_n_s_g_eqns);
  Py_CLEAR(clear_module_state->__pyx_kp_s_g_g);
  Py_CLEAR(clear_module_state->__pyx_n_s_gap);
  Py_CLEAR(clear_module_state->__pyx_n_s_gap_image_gens);
  Py_CLEAR(clear_module_state->__pyx_n_s_gap_init);
  Py_CLEAR(clear_module_state->__pyx_n_s_gap_string);
  Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
  Py_CLEAR(clear_module_state->__pyx_n_s_gen);
  Py_CLEAR(clear_module_state->__pyx_n_s_gen_names);
  Py_CLEAR(clear_module_state->__pyx_n_s_generator_bytes);
  Py_CLEAR(clear_module_state->__pyx_n_s_generator_file);
  Py_CLEAR(clear_module_state->__pyx_n_s_generator_path);
  Py_CLEAR(clear_module_state->__pyx_n_s_generators);
  Py_CLEAR(clear_module_state->__pyx_n_s_generators_in_originals);
  Py_CLEAR(clear_module_state->__pyx_n_s_genexpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_gens);
  Py_CLEAR(clear_module_state->__pyx_n_s_geodesics);
  Py_CLEAR(clear_module_state->__pyx_n_s_get);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_HT_knot_DT);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_HT_knot_by_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_cusp_indices_and_peripheral);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_displacement);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_from_link_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_generalized_ptolemy_obstruct);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_ptolemy_obstruction_classes);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_ptolemy_variety);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_tetrahedra_gluing_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_tetrahedra_shapes);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_tie);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_triangulation_tester);
  Py_CLEAR(clear_module_state->__pyx_kp_u_get_triangulation_tester_doctes);
  Py_CLEAR(clear_module_state->__pyx_kp_u_get_triangulation_tester_line_11);
  Py_CLEAR(clear_module_state->__pyx_n_s_getitem);
  Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_gluing);
  Py_CLEAR(clear_module_state->__pyx_n_s_gluing_equations);
  Py_CLEAR(clear_module_state->__pyx_n_s_gluing_equations_pgl);
  Py_CLEAR(clear_module_state->__pyx_n_s_gluings);
  Py_CLEAR(clear_module_state->__pyx_n_s_group);
  Py_CLEAR(clear_module_state->__pyx_n_s_grouped);
  Py_CLEAR(clear_module_state->__pyx_n_s_groups);
  Py_CLEAR(clear_module_state->__pyx_n_s_gui);
  Py_CLEAR(clear_module_state->__pyx_n_s_gzip);
  Py_CLEAR(clear_module_state->__pyx_n_s_handles);
  Py_CLEAR(clear_module_state->__pyx_n_s_has_finite_vertices);
  Py_CLEAR(clear_module_state->__pyx_n_s_header);
  Py_CLEAR(clear_module_state->__pyx_n_s_high_precision);
  Py_CLEAR(clear_module_state->__pyx_n_s_holonomies);
  Py_CLEAR(clear_module_state->__pyx_n_s_holonomy_accuracy);
  Py_CLEAR(clear_module_state->__pyx_kp_s_holonomy_precision);
  Py_CLEAR(clear_module_state->__pyx_n_s_homology);
  Py_CLEAR(clear_module_state->__pyx_n_s_horoball_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_horoballs);
  Py_CLEAR(clear_module_state->__pyx_n_s_horoviewer);
  Py_CLEAR(clear_module_state->__pyx_n_s_hue);
  Py_CLEAR(clear_module_state->__pyx_kp_s_hyperbolic_data__sa_gz);
  Py_CLEAR(clear_module_state->__pyx_kp_s_hyperbolic_data__sn_gz);
  Py_CLEAR(clear_module_state->__pyx_n_s_i);
  Py_CLEAR(clear_module_state->__pyx_kp_s_icosohedral_group);
  Py_CLEAR(clear_module_state->__pyx_n_s_ideal);
  Py_CLEAR(clear_module_state->__pyx_n_s_identify);
  Py_CLEAR(clear_module_state->__pyx_n_s_identify_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_ignore_curve_orientations);
  Py_CLEAR(clear_module_state->__pyx_n_s_ignore_cusp_ordering);
  Py_CLEAR(clear_module_state->__pyx_n_s_ignore_orientation);
  Py_CLEAR(clear_module_state->__pyx_n_s_ignore_solution_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_imag);
  Py_CLEAR(clear_module_state->__pyx_n_s_images);
  Py_CLEAR(clear_module_state->__pyx_n_s_immutable);
  Py_CLEAR(clear_module_state->__pyx_n_s_import);
  Py_CLEAR(clear_module_state->__pyx_kp_u_import_itertools_M_Manifold_L14);
  Py_CLEAR(clear_module_state->__pyx_n_s_in_radius);
  Py_CLEAR(clear_module_state->__pyx_n_s_include_words);
  Py_CLEAR(clear_module_state->__pyx_n_s_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_index_within_crossings);
  Py_CLEAR(clear_module_state->__pyx_n_s_indices);
  Py_CLEAR(clear_module_state->__pyx_n_s_infinite);
  Py_CLEAR(clear_module_state->__pyx_n_s_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_init);
  Py_CLEAR(clear_module_state->__pyx_n_s_init_hyperbolic_structure);
  Py_CLEAR(clear_module_state->__pyx_n_s_init_subclass);
  Py_CLEAR(clear_module_state->__pyx_n_s_initial_modulus);
  Py_CLEAR(clear_module_state->__pyx_n_s_initial_shape);
  Py_CLEAR(clear_module_state->__pyx_n_s_initial_shape_accuracy);
  Py_CLEAR(clear_module_state->__pyx_n_s_initialize_structure);
  Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
  Py_CLEAR(clear_module_state->__pyx_n_s_input_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_int_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_integer);
  Py_CLEAR(clear_module_state->__pyx_n_s_internal);
  Py_CLEAR(clear_module_state->__pyx_n_s_interrupted);
  Py_CLEAR(clear_module_state->__pyx_n_s_intervals);
  Py_CLEAR(clear_module_state->__pyx_n_s_inverse_list_word);
  Py_CLEAR(clear_module_state->__pyx_n_s_irregular);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_GapElement);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_HT_knot);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_MagmaElement);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_PermutationGroupElement);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_S5);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_abelian);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_alpha_DT_exterior);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_amphicheiral);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_binary_group);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_braid_complement);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_complete);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_decorated_isosig);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_dihedral);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_direct_product);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_full_group);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_geometric);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_int_DT_exterior);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_invertible_knot);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_isometric_to);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_isosig);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_link_complement1);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_link_complement1_pat);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_link_complement2);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_link_complement2_pat);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_link_complement3);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_link_complement3_pat);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_orientable);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_polyhedral);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_symplectic);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_torus_bundle);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_twister_bundle);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_twister_splitting);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_two_bridge);
  Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
  Py_CLEAR(clear_module_state->__pyx_n_s_isfile);
  Py_CLEAR(clear_module_state->__pyx_n_s_islower);
  Py_CLEAR(clear_module_state->__pyx_n_s_isometries);
  Py_CLEAR(clear_module_state->__pyx_n_s_isomorphisms_to);
  Py_CLEAR(clear_module_state->__pyx_n_s_isosig);
  Py_CLEAR(clear_module_state->__pyx_n_s_isosig_pattern);
  Py_CLEAR(clear_module_state->__pyx_n_s_item);
  Py_CLEAR(clear_module_state->__pyx_n_s_items);
  Py_CLEAR(clear_module_state->__pyx_n_s_iter);
  Py_CLEAR(clear_module_state->__pyx_n_s_its_matrix);
  Py_CLEAR(clear_module_state->__pyx_n_s_j);
  Py_CLEAR(clear_module_state->__pyx_n_s_join);
  Py_CLEAR(clear_module_state->__pyx_n_s_k);
  Py_CLEAR(clear_module_state->__pyx_n_s_key);
  Py_CLEAR(clear_module_state->__pyx_n_s_keys);
  Py_CLEAR(clear_module_state->__pyx_n_s_kl);
  Py_CLEAR(clear_module_state->__pyx_n_s_klein);
  Py_CLEAR(clear_module_state->__pyx_n_s_klp);
  Py_CLEAR(clear_module_state->__pyx_n_s_kwargs);
  Py_CLEAR(clear_module_state->__pyx_n_s_l);
  Py_CLEAR(clear_module_state->__pyx_n_s_l0);
  Py_CLEAR(clear_module_state->__pyx_n_s_l1);
  Py_CLEAR(clear_module_state->__pyx_n_s_l2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_lL_P_components_0_9_1_P_crossin);
  Py_CLEAR(clear_module_state->__pyx_n_s_layered);
  Py_CLEAR(clear_module_state->__pyx_n_s_layered_and_marked);
  Py_CLEAR(clear_module_state->__pyx_n_s_lazy);
  Py_CLEAR(clear_module_state->__pyx_n_s_left);
  Py_CLEAR(clear_module_state->__pyx_n_s_left_pad_string);
  Py_CLEAR(clear_module_state->__pyx_n_s_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_lenStr);
  Py_CLEAR(clear_module_state->__pyx_n_s_len_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_length);
  Py_CLEAR(clear_module_state->__pyx_kp_s_length_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_length_spectrum);
  Py_CLEAR(clear_module_state->__pyx_n_s_length_spectrum_dicts);
  Py_CLEAR(clear_module_state->__pyx_n_s_letter);
  Py_CLEAR(clear_module_state->__pyx_n_s_letter_seperator);
  Py_CLEAR(clear_module_state->__pyx_n_s_line);
  Py_CLEAR(clear_module_state->__pyx_n_s_line0);
  Py_CLEAR(clear_module_state->__pyx_n_s_line1);
  Py_CLEAR(clear_module_state->__pyx_n_s_line2);
  Py_CLEAR(clear_module_state->__pyx_n_s_line3);
  Py_CLEAR(clear_module_state->__pyx_n_s_link);
  Py_CLEAR(clear_module_state->__pyx_n_s_link_archive);
  Py_CLEAR(clear_module_state->__pyx_n_s_link_directory);
  Py_CLEAR(clear_module_state->__pyx_n_s_list_as_word);
  Py_CLEAR(clear_module_state->__pyx_n_s_list_as_word_locals_genexpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_ljust);
  Py_CLEAR(clear_module_state->__pyx_n_s_log);
  Py_CLEAR(clear_module_state->__pyx_n_s_log_im);
  Py_CLEAR(clear_module_state->__pyx_n_s_log_re);
  Py_CLEAR(clear_module_state->__pyx_n_s_log_shape);
  Py_CLEAR(clear_module_state->__pyx_n_s_long_relators);
  Py_CLEAR(clear_module_state->__pyx_n_s_longitude);
  Py_CLEAR(clear_module_state->__pyx_kp_s_longitude__d__d);
  Py_CLEAR(clear_module_state->__pyx_n_s_longitude_accuracy);
  Py_CLEAR(clear_module_state->__pyx_n_s_lookup);
  Py_CLEAR(clear_module_state->__pyx_n_s_low_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_low_index_version);
  Py_CLEAR(clear_module_state->__pyx_n_s_lower);
  Py_CLEAR(clear_module_state->__pyx_n_s_m);
  Py_CLEAR(clear_module_state->__pyx_n_s_m003);
  Py_CLEAR(clear_module_state->__pyx_n_s_m004);
  Py_CLEAR(clear_module_state->__pyx_n_s_magma);
  Py_CLEAR(clear_module_state->__pyx_n_s_magma_init);
  Py_CLEAR(clear_module_state->__pyx_n_s_magma_string);
  Py_CLEAR(clear_module_state->__pyx_n_s_main);
  Py_CLEAR(clear_module_state->__pyx_n_s_major);
  Py_CLEAR(clear_module_state->__pyx_n_s_manifold);
  Py_CLEAR(clear_module_state->__pyx_n_s_manifoldMethods);
  Py_CLEAR(clear_module_state->__pyx_n_s_manifold_class);
  Py_CLEAR(clear_module_state->__pyx_n_s_manifold_class_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_manifold_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_manifold_path);
  Py_CLEAR(clear_module_state->__pyx_n_s_manifold_paths);
  Py_CLEAR(clear_module_state->__pyx_n_s_manifolds);
  Py_CLEAR(clear_module_state->__pyx_n_s_map);
  Py_CLEAR(clear_module_state->__pyx_n_s_maps);
  Py_CLEAR(clear_module_state->__pyx_n_s_mark_solid_tori);
  Py_CLEAR(clear_module_state->__pyx_n_s_marked);
  Py_CLEAR(clear_module_state->__pyx_n_s_marked_tetrahedra);
  Py_CLEAR(clear_module_state->__pyx_n_s_mask);
  Py_CLEAR(clear_module_state->__pyx_n_s_mat);
  Py_CLEAR(clear_module_state->__pyx_n_s_match);
  Py_CLEAR(clear_module_state->__pyx_n_s_math);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrices);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrices_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_matrix);
  Py_CLEAR(clear_module_state->__pyx_n_s_matsnf);
  Py_CLEAR(clear_module_state->__pyx_n_s_max);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_crossings);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_reach);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_segments);
  Py_CLEAR(clear_module_state->__pyx_n_s_maximize_injectivity_radius);
  Py_CLEAR(clear_module_state->__pyx_n_s_meridian);
  Py_CLEAR(clear_module_state->__pyx_kp_s_meridian__d__d);
  Py_CLEAR(clear_module_state->__pyx_n_s_meridian_accuracy);
  Py_CLEAR(clear_module_state->__pyx_n_s_message);
  Py_CLEAR(clear_module_state->__pyx_n_s_metaclass);
  Py_CLEAR(clear_module_state->__pyx_n_s_method);
  Py_CLEAR(clear_module_state->__pyx_n_s_minimize_number_of_generators);
  Py_CLEAR(clear_module_state->__pyx_kp_s_mirrored_arc);
  Py_CLEAR(clear_module_state->__pyx_n_s_mode);
  Py_CLEAR(clear_module_state->__pyx_n_s_model);
  Py_CLEAR(clear_module_state->__pyx_n_s_module);
  Py_CLEAR(clear_module_state->__pyx_n_s_modulus);
  Py_CLEAR(clear_module_state->__pyx_n_s_monodromy);
  Py_CLEAR(clear_module_state->__pyx_kp_s_morwen8);
  Py_CLEAR(clear_module_state->__pyx_kp_s_morwen8_tgz);
  Py_CLEAR(clear_module_state->__pyx_n_s_morwen_link_directory);
  Py_CLEAR(clear_module_state->__pyx_n_s_moves);
  Py_CLEAR(clear_module_state->__pyx_n_s_mro_entries);
  Py_CLEAR(clear_module_state->__pyx_n_s_msg_stream);
  Py_CLEAR(clear_module_state->__pyx_n_s_mult);
  Py_CLEAR(clear_module_state->__pyx_n_s_multiplicities);
  Py_CLEAR(clear_module_state->__pyx_n_s_multiplicity);
  Py_CLEAR(clear_module_state->__pyx_n_s_multiply_elements);
  Py_CLEAR(clear_module_state->__pyx_n_s_myslice);
  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_ncols);
  Py_CLEAR(clear_module_state->__pyx_n_s_neighbor);
  Py_CLEAR(clear_module_state->__pyx_n_s_neighbor0_idx);
  Py_CLEAR(clear_module_state->__pyx_n_s_neighbor1_idx);
  Py_CLEAR(clear_module_state->__pyx_n_s_neighbor2_idx);
  Py_CLEAR(clear_module_state->__pyx_n_s_neighbor3_idx);
  Py_CLEAR(clear_module_state->__pyx_n_s_neighbor_end);
  Py_CLEAR(clear_module_state->__pyx_n_s_neighbors);
  Py_CLEAR(clear_module_state->__pyx_n_s_new);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_displacement);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_tie);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_tri);
  Py_CLEAR(clear_module_state->__pyx_n_s_next);
  Py_CLEAR(clear_module_state->__pyx_n_s_next_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_no_arcs);
  Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
  Py_CLEAR(clear_module_state->__pyx_kp_s_no_solution_found);
  Py_CLEAR(clear_module_state->__pyx_n_s_non_peripheral);
  Py_CLEAR(clear_module_state->__pyx_kp_s_nonabelian_group_of_order_d);
  Py_CLEAR(clear_module_state->__pyx_kp_s_nonalternating_gz);
  Py_CLEAR(clear_module_state->__pyx_n_s_nonorientable);
  Py_CLEAR(clear_module_state->__pyx_n_s_nonzeros);
  Py_CLEAR(clear_module_state->__pyx_kp_s_not_attempted);
  Py_CLEAR(clear_module_state->__pyx_n_s_nrows);
  Py_CLEAR(clear_module_state->__pyx_n_s_num);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_cols);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_components);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_crossings);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_curves);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_cusps);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_edges);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_faces);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_fake_cusps);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_finite_vertices);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_gen);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_generators);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_gens);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_ideal_vertices);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_lengths);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_links);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_nonor_cusps);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_or_cusps);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_orig_gens);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_original_generators);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_relations);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_relators);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_rows);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_subdivisions);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_surfaces);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_tet);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_tetrahedra);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_threads);
  Py_CLEAR(clear_module_state->__pyx_n_s_num_vertices);
  Py_CLEAR(clear_module_state->__pyx_n_s_number);
  Py_CLEAR(clear_module_state->__pyx_n_s_number_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_number_to_native_number);
  Py_CLEAR(clear_module_state->__pyx_n_s_o31);
  Py_CLEAR(clear_module_state->__pyx_n_s_obsolete);
  Py_CLEAR(clear_module_state->__pyx_n_s_obstruction_class);
  Py_CLEAR(clear_module_state->__pyx_kp_s_octahedral_group);
  Py_CLEAR(clear_module_state->__pyx_n_s_of_link);
  Py_CLEAR(clear_module_state->__pyx_n_s_offset);
  Py_CLEAR(clear_module_state->__pyx_n_s_old);
  Py_CLEAR(clear_module_state->__pyx_n_s_omega);
  Py_CLEAR(clear_module_state->__pyx_n_s_one_manifold);
  Py_CLEAR(clear_module_state->__pyx_kp_s_one_sided);
  Py_CLEAR(clear_module_state->__pyx_n_s_one_tet_lengths);
  Py_CLEAR(clear_module_state->__pyx_n_s_one_tet_tilts);
  Py_CLEAR(clear_module_state->__pyx_n_s_one_vertex_lengths);
  Py_CLEAR(clear_module_state->__pyx_n_s_opacities);
  Py_CLEAR(clear_module_state->__pyx_n_s_open);
  Py_CLEAR(clear_module_state->__pyx_n_s_operator);
  Py_CLEAR(clear_module_state->__pyx_n_s_order);
  Py_CLEAR(clear_module_state->__pyx_n_s_orient);
  Py_CLEAR(clear_module_state->__pyx_n_s_orientability);
  Py_CLEAR(clear_module_state->__pyx_n_s_orientable);
  Py_CLEAR(clear_module_state->__pyx_n_s_orientation_cover);
  Py_CLEAR(clear_module_state->__pyx_kp_s_orientation_preserving);
  Py_CLEAR(clear_module_state->__pyx_kp_s_orientation_reversing);
  Py_CLEAR(clear_module_state->__pyx_n_s_orig_gens);
  Py_CLEAR(clear_module_state->__pyx_n_s_original_generators);
  Py_CLEAR(clear_module_state->__pyx_n_s_original_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_os);
  Py_CLEAR(clear_module_state->__pyx_n_s_other);
  Py_CLEAR(clear_module_state->__pyx_n_s_out_radius);
  Py_CLEAR(clear_module_state->__pyx_n_s_output);
  Py_CLEAR(clear_module_state->__pyx_n_s_output_file);
  Py_CLEAR(clear_module_state->__pyx_n_s_owns_c_symmetry_group);
  Py_CLEAR(clear_module_state->__pyx_n_s_p);
  Py_CLEAR(clear_module_state->__pyx_n_s_pad);
  Py_CLEAR(clear_module_state->__pyx_n_s_pair);
  Py_CLEAR(clear_module_state->__pyx_n_s_pairing_matrices);
  Py_CLEAR(clear_module_state->__pyx_n_s_pairing_words);
  Py_CLEAR(clear_module_state->__pyx_n_s_pari);
  Py_CLEAR(clear_module_state->__pyx_n_s_parity);
  Py_CLEAR(clear_module_state->__pyx_n_s_part);
  Py_CLEAR(clear_module_state->__pyx_n_s_parts);
  Py_CLEAR(clear_module_state->__pyx_n_s_passes_at_fours);
  Py_CLEAR(clear_module_state->__pyx_n_s_path);
  Py_CLEAR(clear_module_state->__pyx_n_s_path_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_peripheral);
  Py_CLEAR(clear_module_state->__pyx_n_s_peripheral_curves);
  Py_CLEAR(clear_module_state->__pyx_n_s_peripheral_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_perm);
  Py_CLEAR(clear_module_state->__pyx_n_s_perm0);
  Py_CLEAR(clear_module_state->__pyx_n_s_perm1);
  Py_CLEAR(clear_module_state->__pyx_n_s_perm2);
  Py_CLEAR(clear_module_state->__pyx_n_s_perm3);
  Py_CLEAR(clear_module_state->__pyx_n_s_perms);
  Py_CLEAR(clear_module_state->__pyx_n_s_permutation);
  Py_CLEAR(clear_module_state->__pyx_n_s_permutation_rep);
  Py_CLEAR(clear_module_state->__pyx_n_s_permutation_reps);
  Py_CLEAR(clear_module_state->__pyx_kp_b_pickle);
  Py_CLEAR(clear_module_state->__pyx_n_b_pickle_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_pickle_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_pieces);
  Py_CLEAR(clear_module_state->__pyx_n_s_plink);
  Py_CLEAR(clear_module_state->__pyx_n_s_plink_callback);
  Py_CLEAR(clear_module_state->__pyx_n_s_plink_callback_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_polish_hyperbolic_structures);
  Py_CLEAR(clear_module_state->__pyx_n_s_polished_tetrahedra_shapes);
  Py_CLEAR(clear_module_state->__pyx_n_s_polyhedral_description);
  Py_CLEAR(clear_module_state->__pyx_n_s_polyviewer);
  Py_CLEAR(clear_module_state->__pyx_n_s_pop);
  Py_CLEAR(clear_module_state->__pyx_n_s_popitem);
  Py_CLEAR(clear_module_state->__pyx_n_s_position);
  Py_CLEAR(clear_module_state->__pyx_n_s_precision);
  Py_CLEAR(clear_module_state->__pyx_n_s_prefix);
  Py_CLEAR(clear_module_state->__pyx_n_s_prepare);
  Py_CLEAR(clear_module_state->__pyx_n_s_presentation);
  Py_CLEAR(clear_module_state->__pyx_n_s_presentation_matrix);
  Py_CLEAR(clear_module_state->__pyx_n_s_print);
  Py_CLEAR(clear_module_state->__pyx_n_s_protocol);
  Py_CLEAR(clear_module_state->__pyx_n_s_ptolemy);
  Py_CLEAR(clear_module_state->__pyx_n_s_ptolemyManifoldMethods);
  Py_CLEAR(clear_module_state->__pyx_n_s_ptolemy_equations_action_by_dec);
  Py_CLEAR(clear_module_state->__pyx_n_s_ptolemy_equations_boundary_map);
  Py_CLEAR(clear_module_state->__pyx_n_s_ptolemy_equations_boundary_map_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_ptolemy_equations_boundary_map_3);
  Py_CLEAR(clear_module_state->__pyx_n_s_ptolemy_equations_identified_co);
  Py_CLEAR(clear_module_state->__pyx_n_s_ptolemy_equations_identified_fa);
  Py_CLEAR(clear_module_state->__pyx_n_s_ptolemy_generalized_obstruction);
  Py_CLEAR(clear_module_state->__pyx_n_s_ptolemy_obstruction_classes);
  Py_CLEAR(clear_module_state->__pyx_n_s_ptolemy_variety);
  Py_CLEAR(clear_module_state->__pyx_n_s_python_major_version);
  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_PresentationMatri);
  Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable);
  Py_CLEAR(clear_module_state->__pyx_n_s_q);
  Py_CLEAR(clear_module_state->__pyx_n_s_qualname);
  Py_CLEAR(clear_module_state->__pyx_n_s_r);
  Py_CLEAR(clear_module_state->__pyx_kp_s_r_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_radius);
  Py_CLEAR(clear_module_state->__pyx_n_s_randomize);
  Py_CLEAR(clear_module_state->__pyx_n_s_range);
  Py_CLEAR(clear_module_state->__pyx_n_s_rank);
  Py_CLEAR(clear_module_state->__pyx_n_s_raw_form);
  Py_CLEAR(clear_module_state->__pyx_n_s_rb);
  Py_CLEAR(clear_module_state->__pyx_n_s_re);
  Py_CLEAR(clear_module_state->__pyx_n_s_reach);
  Py_CLEAR(clear_module_state->__pyx_n_s_read);
  Py_CLEAR(clear_module_state->__pyx_n_s_readline);
  Py_CLEAR(clear_module_state->__pyx_n_s_readlines);
  Py_CLEAR(clear_module_state->__pyx_n_s_real);
  Py_CLEAR(clear_module_state->__pyx_n_s_real_coerced_to_bits_prec);
  Py_CLEAR(clear_module_state->__pyx_n_s_recompute);
  Py_CLEAR(clear_module_state->__pyx_n_s_record);
  Py_CLEAR(clear_module_state->__pyx_n_s_rect);
  Py_CLEAR(clear_module_state->__pyx_n_s_rect_im);
  Py_CLEAR(clear_module_state->__pyx_n_s_rect_re);
  Py_CLEAR(clear_module_state->__pyx_n_s_rect_shape);
  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_reduce_list_word);
  Py_CLEAR(clear_module_state->__pyx_n_s_regular);
  Py_CLEAR(clear_module_state->__pyx_n_s_reindex_cusps);
  Py_CLEAR(clear_module_state->__pyx_n_s_rel);
  Py_CLEAR(clear_module_state->__pyx_n_s_relation);
  Py_CLEAR(clear_module_state->__pyx_n_s_relation_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_relators);
  Py_CLEAR(clear_module_state->__pyx_n_s_rels);
  Py_CLEAR(clear_module_state->__pyx_n_s_remove);
  Py_CLEAR(clear_module_state->__pyx_n_s_remove_finite_vertices);
  Py_CLEAR(clear_module_state->__pyx_n_s_remove_finite_vertices_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_reopen);
  Py_CLEAR(clear_module_state->__pyx_n_s_rep);
  Py_CLEAR(clear_module_state->__pyx_n_s_replace);
  Py_CLEAR(clear_module_state->__pyx_n_s_repr);
  Py_CLEAR(clear_module_state->__pyx_n_s_repr_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_reps);
  Py_CLEAR(clear_module_state->__pyx_n_s_result);
  Py_CLEAR(clear_module_state->__pyx_n_s_result_curves);
  Py_CLEAR(clear_module_state->__pyx_n_s_result_cusp_indices);
  Py_CLEAR(clear_module_state->__pyx_n_s_return_isometries);
  Py_CLEAR(clear_module_state->__pyx_n_s_return_matrices);
  Py_CLEAR(clear_module_state->__pyx_n_s_return_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_retval);
  Py_CLEAR(clear_module_state->__pyx_n_s_rev_spec_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_reverse_orientation);
  Py_CLEAR(clear_module_state->__pyx_n_s_right);
  Py_CLEAR(clear_module_state->__pyx_n_s_rings);
  Py_CLEAR(clear_module_state->__pyx_n_s_rjust);
  Py_CLEAR(clear_module_state->__pyx_n_s_rolfsen_link_regexs);
  Py_CLEAR(clear_module_state->__pyx_n_s_round);
  Py_CLEAR(clear_module_state->__pyx_n_s_row);
  Py_CLEAR(clear_module_state->__pyx_n_s_row_entries);
  Py_CLEAR(clear_module_state->__pyx_n_s_row_op);
  Py_CLEAR(clear_module_state->__pyx_n_s_rows);
  Py_CLEAR(clear_module_state->__pyx_n_s_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_s_2);
  Py_CLEAR(clear_module_state->__pyx_kp_s_s_3);
  Py_CLEAR(clear_module_state->__pyx_kp_s_s_4);
  Py_CLEAR(clear_module_state->__pyx_kp_s_s_F_d);
  Py_CLEAR(clear_module_state->__pyx_kp_s_s_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_s_s_explain_columns_s_explain_r);
  Py_CLEAR(clear_module_state->__pyx_kp_s_s_s_with_euler_s);
  Py_CLEAR(clear_module_state->__pyx_kp_s_s_x_s);
  Py_CLEAR(clear_module_state->__pyx_n_s_sage);
  Py_CLEAR(clear_module_state->__pyx_n_s_sage_all);
  Py_CLEAR(clear_module_state->__pyx_n_s_sage_groups_free_group);
  Py_CLEAR(clear_module_state->__pyx_n_s_sage_groups_perm_gps_permgroup);
  Py_CLEAR(clear_module_state->__pyx_n_s_sage_groups_perm_gps_permgroup_e);
  Py_CLEAR(clear_module_state->__pyx_n_s_sage_helper);
  Py_CLEAR(clear_module_state->__pyx_n_s_sage_interfaces_abc);
  Py_CLEAR(clear_module_state->__pyx_n_s_sage_interfaces_gap);
  Py_CLEAR(clear_module_state->__pyx_n_s_sage_interfaces_magma);
  Py_CLEAR(clear_module_state->__pyx_n_s_sage_matrix);
  Py_CLEAR(clear_module_state->__pyx_n_s_sage_matrix_constructor);
  Py_CLEAR(clear_module_state->__pyx_n_s_sage_object);
  Py_CLEAR(clear_module_state->__pyx_n_s_sage_structure_sage_object);
  Py_CLEAR(clear_module_state->__pyx_n_s_save);
  Py_CLEAR(clear_module_state->__pyx_n_s_savefile);
  Py_CLEAR(clear_module_state->__pyx_n_s_second_char);
  Py_CLEAR(clear_module_state->__pyx_n_s_second_nybble);
  Py_CLEAR(clear_module_state->__pyx_n_s_seed);
  Py_CLEAR(clear_module_state->__pyx_n_s_seek);
  Py_CLEAR(clear_module_state->__pyx_n_s_segment);
  Py_CLEAR(clear_module_state->__pyx_n_s_segment_list);
  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_sep);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_DTcode);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_PDcode);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_displacement);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_name_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_peripheral_curves);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_peripheral_from_decoration);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_rand_seed);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_target_holonomy);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_test_flag);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_tetrahedra_shapes);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_tie);
  Py_CLEAR(clear_module_state->__pyx_n_s_setattr);
  Py_CLEAR(clear_module_state->__pyx_n_s_setitem);
  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_seven_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_shape);
  Py_CLEAR(clear_module_state->__pyx_n_s_shape_accuracy);
  Py_CLEAR(clear_module_state->__pyx_kp_s_shape_precision);
  Py_CLEAR(clear_module_state->__pyx_n_s_shapes);
  Py_CLEAR(clear_module_state->__pyx_n_s_short_relators);
  Py_CLEAR(clear_module_state->__pyx_n_s_shortest);
  Py_CLEAR(clear_module_state->__pyx_n_s_shortest_longitudes);
  Py_CLEAR(clear_module_state->__pyx_n_s_shortest_meridians);
  Py_CLEAR(clear_module_state->__pyx_n_s_show_uAcknowledge);
  Py_CLEAR(clear_module_state->__pyx_n_s_shrink_factor);
  Py_CLEAR(clear_module_state->__pyx_n_s_side);
  Py_CLEAR(clear_module_state->__pyx_n_s_side_lengths);
  Py_CLEAR(clear_module_state->__pyx_n_s_sided);
  Py_CLEAR(clear_module_state->__pyx_n_s_sign);
  Py_CLEAR(clear_module_state->__pyx_n_s_signs);
  Py_CLEAR(clear_module_state->__pyx_n_s_signtype);
  Py_CLEAR(clear_module_state->__pyx_n_s_simplified_matrix);
  Py_CLEAR(clear_module_state->__pyx_n_s_simplify);
  Py_CLEAR(clear_module_state->__pyx_n_s_simplify_presentation);
  Py_CLEAR(clear_module_state->__pyx_n_s_singularity_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_six_length);
  Py_CLEAR(clear_module_state->__pyx_n_s_size);
  Py_CLEAR(clear_module_state->__pyx_n_s_sl2);
  Py_CLEAR(clear_module_state->__pyx_n_s_smith_form);
  Py_CLEAR(clear_module_state->__pyx_n_s_snap);
  Py_CLEAR(clear_module_state->__pyx_n_s_snapPea);
  Py_CLEAR(clear_module_state->__pyx_n_s_snappea);
  Py_CLEAR(clear_module_state->__pyx_n_s_snappy);
  Py_CLEAR(clear_module_state->__pyx_n_s_so_far);
  Py_CLEAR(clear_module_state->__pyx_n_s_soln);
  Py_CLEAR(clear_module_state->__pyx_n_s_solution_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_sorted);
  Py_CLEAR(clear_module_state->__pyx_n_s_spec);
  Py_CLEAR(clear_module_state->__pyx_n_s_spec_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_specs);
  Py_CLEAR(clear_module_state->__pyx_n_s_spectrum);
  Py_CLEAR(clear_module_state->__pyx_n_s_spherogram);
  Py_CLEAR(clear_module_state->__pyx_n_s_spin_short);
  Py_CLEAR(clear_module_state->__pyx_n_s_spine_radius);
  Py_CLEAR(clear_module_state->__pyx_n_s_split);
  Py_CLEAR(clear_module_state->__pyx_n_s_split_filling_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_splitting);
  Py_CLEAR(clear_module_state->__pyx_n_s_splitting_from_string);
  Py_CLEAR(clear_module_state->__pyx_n_s_splitting_surfaces);
  Py_CLEAR(clear_module_state->__pyx_n_s_start);
  Py_CLEAR(clear_module_state->__pyx_n_s_startswith);
  Py_CLEAR(clear_module_state->__pyx_n_s_state);
  Py_CLEAR(clear_module_state->__pyx_n_s_staticmethod);
  Py_CLEAR(clear_module_state->__pyx_n_s_stderr);
  Py_CLEAR(clear_module_state->__pyx_n_s_stdout);
  Py_CLEAR(clear_module_state->__pyx_n_s_step);
  Py_CLEAR(clear_module_state->__pyx_n_s_stl);
  Py_CLEAR(clear_module_state->__pyx_n_s_stop);
  Py_CLEAR(clear_module_state->__pyx_n_s_stopper);
  Py_CLEAR(clear_module_state->__pyx_n_s_stopping_displacement);
  Py_CLEAR(clear_module_state->__pyx_n_s_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_strandtype);
  Py_CLEAR(clear_module_state->__pyx_n_s_strategy);
  Py_CLEAR(clear_module_state->__pyx_n_s_string);
  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_strline);
  Py_CLEAR(clear_module_state->__pyx_n_s_struct);
  Py_CLEAR(clear_module_state->__pyx_n_s_structure);
  Py_CLEAR(clear_module_state->__pyx_n_s_subgroup);
  Py_CLEAR(clear_module_state->__pyx_n_s_sum);
  Py_CLEAR(clear_module_state->__pyx_n_s_super);
  Py_CLEAR(clear_module_state->__pyx_n_s_surface);
  Py_CLEAR(clear_module_state->__pyx_n_s_surfaces);
  Py_CLEAR(clear_module_state->__pyx_n_s_symmetric_triangulation);
  Py_CLEAR(clear_module_state->__pyx_n_s_symmetries_of_link);
  Py_CLEAR(clear_module_state->__pyx_n_s_symmetries_of_manifold);
  Py_CLEAR(clear_module_state->__pyx_n_s_symmetry_group);
  Py_CLEAR(clear_module_state->__pyx_n_s_symplectic_basis);
  Py_CLEAR(clear_module_state->__pyx_n_s_symplectic_form);
  Py_CLEAR(clear_module_state->__pyx_n_s_sys);
  Py_CLEAR(clear_module_state->__pyx_n_s_t);
  Py_CLEAR(clear_module_state->__pyx_n_s_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_table_directory);
  Py_CLEAR(clear_module_state->__pyx_n_s_tail);
  Py_CLEAR(clear_module_state->__pyx_n_s_tail_vertex_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_tarfile);
  Py_CLEAR(clear_module_state->__pyx_n_s_target);
  Py_CLEAR(clear_module_state->__pyx_n_s_tarpath);
  Py_CLEAR(clear_module_state->__pyx_n_s_temp);
  Py_CLEAR(clear_module_state->__pyx_n_s_tempfile);
  Py_CLEAR(clear_module_state->__pyx_n_s_test);
  Py_CLEAR(clear_module_state->__pyx_n_s_tet);
  Py_CLEAR(clear_module_state->__pyx_n_s_tet_num);
  Py_CLEAR(clear_module_state->__pyx_n_s_tetrahedra_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_tetrahedra_shapes);
  Py_CLEAR(clear_module_state->__pyx_kp_s_tetrahedra_shapes_were_inserted);
  Py_CLEAR(clear_module_state->__pyx_kp_s_tetrahedral_group);
  Py_CLEAR(clear_module_state->__pyx_kp_s_the_gap_method_for_covers_requir);
  Py_CLEAR(clear_module_state->__pyx_kp_s_the_magma_method_for_covers_requ);
  Py_CLEAR(clear_module_state->__pyx_n_s_three_to_two);
  Py_CLEAR(clear_module_state->__pyx_n_s_throw);
  Py_CLEAR(clear_module_state->__pyx_n_s_tilts);
  Py_CLEAR(clear_module_state->__pyx_n_s_time);
  Py_CLEAR(clear_module_state->__pyx_n_s_tip);
  Py_CLEAR(clear_module_state->__pyx_n_s_tip_vertex_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_title);
  Py_CLEAR(clear_module_state->__pyx_n_s_to_byte_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_to_bytes);
  Py_CLEAR(clear_module_state->__pyx_n_s_to_do);
  Py_CLEAR(clear_module_state->__pyx_n_s_to_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_to_string);
  Py_CLEAR(clear_module_state->__pyx_n_s_to_string_locals_genexpr);
  Py_CLEAR(clear_module_state->__pyx_n_s_topology);
  Py_CLEAR(clear_module_state->__pyx_kp_s_torus_cusp);
  Py_CLEAR(clear_module_state->__pyx_n_s_total);
  Py_CLEAR(clear_module_state->__pyx_n_s_translations);
  Py_CLEAR(clear_module_state->__pyx_kp_s_tri);
  Py_CLEAR(clear_module_state->__pyx_kp_s_tri_txt);
  Py_CLEAR(clear_module_state->__pyx_n_s_triangulation);
  Py_CLEAR(clear_module_state->__pyx_n_s_triangulation_class);
  Py_CLEAR(clear_module_state->__pyx_n_s_triangulation_help);
  Py_CLEAR(clear_module_state->__pyx_n_s_triangulation_isosig);
  Py_CLEAR(clear_module_state->__pyx_n_s_try_hard_to_shorten_relators);
  Py_CLEAR(clear_module_state->__pyx_n_s_twister);
  Py_CLEAR(clear_module_state->__pyx_n_s_twister_word);
  Py_CLEAR(clear_module_state->__pyx_n_s_two_sided);
  Py_CLEAR(clear_module_state->__pyx_kp_s_two_sided_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_two_to_three);
  Py_CLEAR(clear_module_state->__pyx_n_s_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_type_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_types);
  Py_CLEAR(clear_module_state->__pyx_n_s_u);
  Py_CLEAR(clear_module_state->__pyx_n_s_unit);
  Py_CLEAR(clear_module_state->__pyx_n_s_unknown);
  Py_CLEAR(clear_module_state->__pyx_n_s_unnamed);
  Py_CLEAR(clear_module_state->__pyx_kp_s_unnamed_link);
  Py_CLEAR(clear_module_state->__pyx_n_s_unpack);
  Py_CLEAR(clear_module_state->__pyx_n_s_unpickle_dirichlet_domain);
  Py_CLEAR(clear_module_state->__pyx_kp_s_unrecognized_solution_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_unsimplified_filled_triangulati);
  Py_CLEAR(clear_module_state->__pyx_n_s_unsimplified_filled_triangulati_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_update);
  Py_CLEAR(clear_module_state->__pyx_n_s_upper);
  Py_CLEAR(clear_module_state->__pyx_n_s_use_field_conversion);
  Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate);
  Py_CLEAR(clear_module_state->__pyx_n_s_user_radius);
  Py_CLEAR(clear_module_state->__pyx_kp_s_utf_8);
  Py_CLEAR(clear_module_state->__pyx_n_s_v);
  Py_CLEAR(clear_module_state->__pyx_kp_s_v1205_2_3);
  Py_CLEAR(clear_module_state->__pyx_n_s_valid_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_value);
  Py_CLEAR(clear_module_state->__pyx_n_s_values);
  Py_CLEAR(clear_module_state->__pyx_n_s_verbose_form);
  Py_CLEAR(clear_module_state->__pyx_n_s_verified);
  Py_CLEAR(clear_module_state->__pyx_n_s_verify);
  Py_CLEAR(clear_module_state->__pyx_n_s_verify_complex_volume);
  Py_CLEAR(clear_module_state->__pyx_n_s_version);
  Py_CLEAR(clear_module_state->__pyx_n_s_version_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_vertex);
  Py_CLEAR(clear_module_state->__pyx_n_s_vertex_class);
  Py_CLEAR(clear_module_state->__pyx_n_s_vertex_data_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_vertex_epsilon);
  Py_CLEAR(clear_module_state->__pyx_n_s_vertex_image_indices);
  Py_CLEAR(clear_module_state->__pyx_n_s_vertex_indices);
  Py_CLEAR(clear_module_state->__pyx_n_s_vertex_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_vertex_list_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_vertex_to_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_vertex_to_index_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_vertices);
  Py_CLEAR(clear_module_state->__pyx_n_s_view);
  Py_CLEAR(clear_module_state->__pyx_n_s_vol);
  Py_CLEAR(clear_module_state->__pyx_n_s_volume);
  Py_CLEAR(clear_module_state->__pyx_n_s_w);
  Py_CLEAR(clear_module_state->__pyx_n_s_w0);
  Py_CLEAR(clear_module_state->__pyx_n_s_w1);
  Py_CLEAR(clear_module_state->__pyx_n_s_wb);
  Py_CLEAR(clear_module_state->__pyx_n_s_where_to_resume);
  Py_CLEAR(clear_module_state->__pyx_n_s_which_curve);
  Py_CLEAR(clear_module_state->__pyx_n_s_which_cusp);
  Py_CLEAR(clear_module_state->__pyx_n_s_which_solution);
  Py_CLEAR(clear_module_state->__pyx_n_s_which_surface);
  Py_CLEAR(clear_module_state->__pyx_n_s_with_hyperbolic_structure);
  Py_CLEAR(clear_module_state->__pyx_n_s_within_sage);
  Py_CLEAR(clear_module_state->__pyx_n_s_without_hyperbolic_structure);
  Py_CLEAR(clear_module_state->__pyx_n_s_word);
  Py_CLEAR(clear_module_state->__pyx_n_s_word_as_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_word_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_word_moves);
  Py_CLEAR(clear_module_state->__pyx_n_s_words);
  Py_CLEAR(clear_module_state->__pyx_n_s_write);
  Py_CLEAR(clear_module_state->__pyx_n_s_x);
  Py_CLEAR(clear_module_state->__pyx_n_s_x012);
  Py_CLEAR(clear_module_state->__pyx_kp_s_xX_d);
  Py_CLEAR(clear_module_state->__pyx_kp_s_x_d_1);
  Py_CLEAR(clear_module_state->__pyx_n_s_y);
  Py_CLEAR(clear_module_state->__pyx_n_s_y123);
  Py_CLEAR(clear_module_state->__pyx_n_s_z);
  Py_CLEAR(clear_module_state->__pyx_n_s_zeros);
  Py_CLEAR(clear_module_state->__pyx_float_0_0);
  Py_CLEAR(clear_module_state->__pyx_float_0_1);
  Py_CLEAR(clear_module_state->__pyx_float_0_2);
  Py_CLEAR(clear_module_state->__pyx_float_0_9);
  Py_CLEAR(clear_module_state->__pyx_float_1_0);
  Py_CLEAR(clear_module_state->__pyx_float_1eneg_9);
  Py_CLEAR(clear_module_state->__pyx_int_0);
  Py_CLEAR(clear_module_state->__pyx_int_1);
  Py_CLEAR(clear_module_state->__pyx_int_2);
  Py_CLEAR(clear_module_state->__pyx_int_3);
  Py_CLEAR(clear_module_state->__pyx_int_4);
  Py_CLEAR(clear_module_state->__pyx_int_5);
  Py_CLEAR(clear_module_state->__pyx_int_6);
  Py_CLEAR(clear_module_state->__pyx_int_7);
  Py_CLEAR(clear_module_state->__pyx_int_8);
  Py_CLEAR(clear_module_state->__pyx_int_9);
  Py_CLEAR(clear_module_state->__pyx_int_10);
  Py_CLEAR(clear_module_state->__pyx_int_11);
  Py_CLEAR(clear_module_state->__pyx_int_12);
  Py_CLEAR(clear_module_state->__pyx_int_13);
  Py_CLEAR(clear_module_state->__pyx_int_14);
  Py_CLEAR(clear_module_state->__pyx_int_15);
  Py_CLEAR(clear_module_state->__pyx_int_16);
  Py_CLEAR(clear_module_state->__pyx_int_17);
  Py_CLEAR(clear_module_state->__pyx_int_18);
  Py_CLEAR(clear_module_state->__pyx_int_19);
  Py_CLEAR(clear_module_state->__pyx_int_20);
  Py_CLEAR(clear_module_state->__pyx_int_21);
  Py_CLEAR(clear_module_state->__pyx_int_22);
  Py_CLEAR(clear_module_state->__pyx_int_23);
  Py_CLEAR(clear_module_state->__pyx_int_24);
  Py_CLEAR(clear_module_state->__pyx_int_25);
  Py_CLEAR(clear_module_state->__pyx_int_26);
  Py_CLEAR(clear_module_state->__pyx_int_27);
  Py_CLEAR(clear_module_state->__pyx_int_28);
  Py_CLEAR(clear_module_state->__pyx_int_29);
  Py_CLEAR(clear_module_state->__pyx_int_30);
  Py_CLEAR(clear_module_state->__pyx_int_31);
  Py_CLEAR(clear_module_state->__pyx_int_32);
  Py_CLEAR(clear_module_state->__pyx_int_33);
  Py_CLEAR(clear_module_state->__pyx_int_34);
  Py_CLEAR(clear_module_state->__pyx_int_35);
  Py_CLEAR(clear_module_state->__pyx_int_36);
  Py_CLEAR(clear_module_state->__pyx_int_37);
  Py_CLEAR(clear_module_state->__pyx_int_38);
  Py_CLEAR(clear_module_state->__pyx_int_39);
  Py_CLEAR(clear_module_state->__pyx_int_40);
  Py_CLEAR(clear_module_state->__pyx_int_41);
  Py_CLEAR(clear_module_state->__pyx_int_42);
  Py_CLEAR(clear_module_state->__pyx_int_43);
  Py_CLEAR(clear_module_state->__pyx_int_44);
  Py_CLEAR(clear_module_state->__pyx_int_45);
  Py_CLEAR(clear_module_state->__pyx_int_46);
  Py_CLEAR(clear_module_state->__pyx_int_47);
  Py_CLEAR(clear_module_state->__pyx_int_48);
  Py_CLEAR(clear_module_state->__pyx_int_49);
  Py_CLEAR(clear_module_state->__pyx_int_50);
  Py_CLEAR(clear_module_state->__pyx_int_51);
  Py_CLEAR(clear_module_state->__pyx_int_52);
  Py_CLEAR(clear_module_state->__pyx_int_53);
  Py_CLEAR(clear_module_state->__pyx_int_54);
  Py_CLEAR(clear_module_state->__pyx_int_55);
  Py_CLEAR(clear_module_state->__pyx_int_56);
  Py_CLEAR(clear_module_state->__pyx_int_57);
  Py_CLEAR(clear_module_state->__pyx_int_58);
  Py_CLEAR(clear_module_state->__pyx_int_59);
  Py_CLEAR(clear_module_state->__pyx_int_60);
  Py_CLEAR(clear_module_state->__pyx_int_61);
  Py_CLEAR(clear_module_state->__pyx_int_62);
  Py_CLEAR(clear_module_state->__pyx_int_63);
  Py_CLEAR(clear_module_state->__pyx_int_64);
  Py_CLEAR(clear_module_state->__pyx_int_65);
  Py_CLEAR(clear_module_state->__pyx_int_66);
  Py_CLEAR(clear_module_state->__pyx_int_67);
  Py_CLEAR(clear_module_state->__pyx_int_68);
  Py_CLEAR(clear_module_state->__pyx_int_69);
  Py_CLEAR(clear_module_state->__pyx_int_70);
  Py_CLEAR(clear_module_state->__pyx_int_71);
  Py_CLEAR(clear_module_state->__pyx_int_72);
  Py_CLEAR(clear_module_state->__pyx_int_73);
  Py_CLEAR(clear_module_state->__pyx_int_74);
  Py_CLEAR(clear_module_state->__pyx_int_75);
  Py_CLEAR(clear_module_state->__pyx_int_76);
  Py_CLEAR(clear_module_state->__pyx_int_77);
  Py_CLEAR(clear_module_state->__pyx_int_78);
  Py_CLEAR(clear_module_state->__pyx_int_79);
  Py_CLEAR(clear_module_state->__pyx_int_80);
  Py_CLEAR(clear_module_state->__pyx_int_81);
  Py_CLEAR(clear_module_state->__pyx_int_82);
  Py_CLEAR(clear_module_state->__pyx_int_83);
  Py_CLEAR(clear_module_state->__pyx_int_84);
  Py_CLEAR(clear_module_state->__pyx_int_85);
  Py_CLEAR(clear_module_state->__pyx_int_86);
  Py_CLEAR(clear_module_state->__pyx_int_87);
  Py_CLEAR(clear_module_state->__pyx_int_88);
  Py_CLEAR(clear_module_state->__pyx_int_89);
  Py_CLEAR(clear_module_state->__pyx_int_90);
  Py_CLEAR(clear_module_state->__pyx_int_91);
  Py_CLEAR(clear_module_state->__pyx_int_92);
  Py_CLEAR(clear_module_state->__pyx_int_93);
  Py_CLEAR(clear_module_state->__pyx_int_94);
  Py_CLEAR(clear_module_state->__pyx_int_95);
  Py_CLEAR(clear_module_state->__pyx_int_96);
  Py_CLEAR(clear_module_state->__pyx_int_97);
  Py_CLEAR(clear_module_state->__pyx_int_98);
  Py_CLEAR(clear_module_state->__pyx_int_99);
  Py_CLEAR(clear_module_state->__pyx_int_100);
  Py_CLEAR(clear_module_state->__pyx_int_101);
  Py_CLEAR(clear_module_state->__pyx_int_102);
  Py_CLEAR(clear_module_state->__pyx_int_103);
  Py_CLEAR(clear_module_state->__pyx_int_104);
  Py_CLEAR(clear_module_state->__pyx_int_105);
  Py_CLEAR(clear_module_state->__pyx_int_106);
  Py_CLEAR(clear_module_state->__pyx_int_107);
  Py_CLEAR(clear_module_state->__pyx_int_108);
  Py_CLEAR(clear_module_state->__pyx_int_109);
  Py_CLEAR(clear_module_state->__pyx_int_110);
  Py_CLEAR(clear_module_state->__pyx_int_111);
  Py_CLEAR(clear_module_state->__pyx_int_112);
  Py_CLEAR(clear_module_state->__pyx_int_113);
  Py_CLEAR(clear_module_state->__pyx_int_114);
  Py_CLEAR(clear_module_state->__pyx_int_115);
  Py_CLEAR(clear_module_state->__pyx_int_116);
  Py_CLEAR(clear_module_state->__pyx_int_117);
  Py_CLEAR(clear_module_state->__pyx_int_118);
  Py_CLEAR(clear_module_state->__pyx_int_119);
  Py_CLEAR(clear_module_state->__pyx_int_120);
  Py_CLEAR(clear_module_state->__pyx_int_121);
  Py_CLEAR(clear_module_state->__pyx_int_122);
  Py_CLEAR(clear_module_state->__pyx_int_123);
  Py_CLEAR(clear_module_state->__pyx_int_124);
  Py_CLEAR(clear_module_state->__pyx_int_125);
  Py_CLEAR(clear_module_state->__pyx_int_126);
  Py_CLEAR(clear_module_state->__pyx_int_127);
  Py_CLEAR(clear_module_state->__pyx_int_128);
  Py_CLEAR(clear_module_state->__pyx_int_129);
  Py_CLEAR(clear_module_state->__pyx_int_130);
  Py_CLEAR(clear_module_state->__pyx_int_131);
  Py_CLEAR(clear_module_state->__pyx_int_132);
  Py_CLEAR(clear_module_state->__pyx_int_133);
  Py_CLEAR(clear_module_state->__pyx_int_134);
  Py_CLEAR(clear_module_state->__pyx_int_135);
  Py_CLEAR(clear_module_state->__pyx_int_136);
  Py_CLEAR(clear_module_state->__pyx_int_137);
  Py_CLEAR(clear_module_state->__pyx_int_138);
  Py_CLEAR(clear_module_state->__pyx_int_139);
  Py_CLEAR(clear_module_state->__pyx_int_140);
  Py_CLEAR(clear_module_state->__pyx_int_141);
  Py_CLEAR(clear_module_state->__pyx_int_142);
  Py_CLEAR(clear_module_state->__pyx_int_143);
  Py_CLEAR(clear_module_state->__pyx_int_144);
  Py_CLEAR(clear_module_state->__pyx_int_145);
  Py_CLEAR(clear_module_state->__pyx_int_146);
  Py_CLEAR(clear_module_state->__pyx_int_147);
  Py_CLEAR(clear_module_state->__pyx_int_148);
  Py_CLEAR(clear_module_state->__pyx_int_149);
  Py_CLEAR(clear_module_state->__pyx_int_150);
  Py_CLEAR(clear_module_state->__pyx_int_151);
  Py_CLEAR(clear_module_state->__pyx_int_152);
  Py_CLEAR(clear_module_state->__pyx_int_153);
  Py_CLEAR(clear_module_state->__pyx_int_154);
  Py_CLEAR(clear_module_state->__pyx_int_155);
  Py_CLEAR(clear_module_state->__pyx_int_156);
  Py_CLEAR(clear_module_state->__pyx_int_157);
  Py_CLEAR(clear_module_state->__pyx_int_158);
  Py_CLEAR(clear_module_state->__pyx_int_159);
  Py_CLEAR(clear_module_state->__pyx_int_160);
  Py_CLEAR(clear_module_state->__pyx_int_161);
  Py_CLEAR(clear_module_state->__pyx_int_162);
  Py_CLEAR(clear_module_state->__pyx_int_163);
  Py_CLEAR(clear_module_state->__pyx_int_164);
  Py_CLEAR(clear_module_state->__pyx_int_165);
  Py_CLEAR(clear_module_state->__pyx_int_166);
  Py_CLEAR(clear_module_state->__pyx_int_167);
  Py_CLEAR(clear_module_state->__pyx_int_168);
  Py_CLEAR(clear_module_state->__pyx_int_169);
  Py_CLEAR(clear_module_state->__pyx_int_170);
  Py_CLEAR(clear_module_state->__pyx_int_171);
  Py_CLEAR(clear_module_state->__pyx_int_172);
  Py_CLEAR(clear_module_state->__pyx_int_173);
  Py_CLEAR(clear_module_state->__pyx_int_174);
  Py_CLEAR(clear_module_state->__pyx_int_175);
  Py_CLEAR(clear_module_state->__pyx_int_176);
  Py_CLEAR(clear_module_state->__pyx_int_177);
  Py_CLEAR(clear_module_state->__pyx_int_178);
  Py_CLEAR(clear_module_state->__pyx_int_179);
  Py_CLEAR(clear_module_state->__pyx_int_180);
  Py_CLEAR(clear_module_state->__pyx_int_181);
  Py_CLEAR(clear_module_state->__pyx_int_182);
  Py_CLEAR(clear_module_state->__pyx_int_183);
  Py_CLEAR(clear_module_state->__pyx_int_184);
  Py_CLEAR(clear_module_state->__pyx_int_185);
  Py_CLEAR(clear_module_state->__pyx_int_186);
  Py_CLEAR(clear_module_state->__pyx_int_187);
  Py_CLEAR(clear_module_state->__pyx_int_188);
  Py_CLEAR(clear_module_state->__pyx_int_189);
  Py_CLEAR(clear_module_state->__pyx_int_190);
  Py_CLEAR(clear_module_state->__pyx_int_191);
  Py_CLEAR(clear_module_state->__pyx_int_192);
  Py_CLEAR(clear_module_state->__pyx_int_193);
  Py_CLEAR(clear_module_state->__pyx_int_194);
  Py_CLEAR(clear_module_state->__pyx_int_195);
  Py_CLEAR(clear_module_state->__pyx_int_196);
  Py_CLEAR(clear_module_state->__pyx_int_197);
  Py_CLEAR(clear_module_state->__pyx_int_198);
  Py_CLEAR(clear_module_state->__pyx_int_199);
  Py_CLEAR(clear_module_state->__pyx_int_200);
  Py_CLEAR(clear_module_state->__pyx_int_201);
  Py_CLEAR(clear_module_state->__pyx_int_202);
  Py_CLEAR(clear_module_state->__pyx_int_203);
  Py_CLEAR(clear_module_state->__pyx_int_204);
  Py_CLEAR(clear_module_state->__pyx_int_205);
  Py_CLEAR(clear_module_state->__pyx_int_206);
  Py_CLEAR(clear_module_state->__pyx_int_207);
  Py_CLEAR(clear_module_state->__pyx_int_208);
  Py_CLEAR(clear_module_state->__pyx_int_209);
  Py_CLEAR(clear_module_state->__pyx_int_210);
  Py_CLEAR(clear_module_state->__pyx_int_211);
  Py_CLEAR(clear_module_state->__pyx_int_212);
  Py_CLEAR(clear_module_state->__pyx_int_213);
  Py_CLEAR(clear_module_state->__pyx_int_214);
  Py_CLEAR(clear_module_state->__pyx_int_215);
  Py_CLEAR(clear_module_state->__pyx_int_216);
  Py_CLEAR(clear_module_state->__pyx_int_217);
  Py_CLEAR(clear_module_state->__pyx_int_218);
  Py_CLEAR(clear_module_state->__pyx_int_219);
  Py_CLEAR(clear_module_state->__pyx_int_220);
  Py_CLEAR(clear_module_state->__pyx_int_221);
  Py_CLEAR(clear_module_state->__pyx_int_222);
  Py_CLEAR(clear_module_state->__pyx_int_223);
  Py_CLEAR(clear_module_state->__pyx_int_224);
  Py_CLEAR(clear_module_state->__pyx_int_225);
  Py_CLEAR(clear_module_state->__pyx_int_226);
  Py_CLEAR(clear_module_state->__pyx_int_227);
  Py_CLEAR(clear_module_state->__pyx_int_228);
  Py_CLEAR(clear_module_state->__pyx_int_229);
  Py_CLEAR(clear_module_state->__pyx_int_230);
  Py_CLEAR(clear_module_state->__pyx_int_231);
  Py_CLEAR(clear_module_state->__pyx_int_232);
  Py_CLEAR(clear_module_state->__pyx_int_233);
  Py_CLEAR(clear_module_state->__pyx_int_234);
  Py_CLEAR(clear_module_state->__pyx_int_235);
  Py_CLEAR(clear_module_state->__pyx_int_236);
  Py_CLEAR(clear_module_state->__pyx_int_237);
  Py_CLEAR(clear_module_state->__pyx_int_238);
  Py_CLEAR(clear_module_state->__pyx_int_239);
  Py_CLEAR(clear_module_state->__pyx_int_240);
  Py_CLEAR(clear_module_state->__pyx_int_241);
  Py_CLEAR(clear_module_state->__pyx_int_242);
  Py_CLEAR(clear_module_state->__pyx_int_243);
  Py_CLEAR(clear_module_state->__pyx_int_244);
  Py_CLEAR(clear_module_state->__pyx_int_245);
  Py_CLEAR(clear_module_state->__pyx_int_246);
  Py_CLEAR(clear_module_state->__pyx_int_247);
  Py_CLEAR(clear_module_state->__pyx_int_248);
  Py_CLEAR(clear_module_state->__pyx_int_249);
  Py_CLEAR(clear_module_state->__pyx_int_250);
  Py_CLEAR(clear_module_state->__pyx_int_251);
  Py_CLEAR(clear_module_state->__pyx_int_252);
  Py_CLEAR(clear_module_state->__pyx_int_253);
  Py_CLEAR(clear_module_state->__pyx_int_254);
  Py_CLEAR(clear_module_state->__pyx_int_255);
  Py_CLEAR(clear_module_state->__pyx_int_256);
  Py_CLEAR(clear_module_state->__pyx_int_257);
  Py_CLEAR(clear_module_state->__pyx_int_258);
  Py_CLEAR(clear_module_state->__pyx_int_259);
  Py_CLEAR(clear_module_state->__pyx_int_260);
  Py_CLEAR(clear_module_state->__pyx_int_261);
  Py_CLEAR(clear_module_state->__pyx_int_262);
  Py_CLEAR(clear_module_state->__pyx_int_263);
  Py_CLEAR(clear_module_state->__pyx_int_264);
  Py_CLEAR(clear_module_state->__pyx_int_265);
  Py_CLEAR(clear_module_state->__pyx_int_266);
  Py_CLEAR(clear_module_state->__pyx_int_267);
  Py_CLEAR(clear_module_state->__pyx_int_268);
  Py_CLEAR(clear_module_state->__pyx_int_269);
  Py_CLEAR(clear_module_state->__pyx_int_270);
  Py_CLEAR(clear_module_state->__pyx_int_271);
  Py_CLEAR(clear_module_state->__pyx_int_272);
  Py_CLEAR(clear_module_state->__pyx_int_273);
  Py_CLEAR(clear_module_state->__pyx_int_274);
  Py_CLEAR(clear_module_state->__pyx_int_275);
  Py_CLEAR(clear_module_state->__pyx_int_276);
  Py_CLEAR(clear_module_state->__pyx_int_277);
  Py_CLEAR(clear_module_state->__pyx_int_278);
  Py_CLEAR(clear_module_state->__pyx_int_279);
  Py_CLEAR(clear_module_state->__pyx_int_280);
  Py_CLEAR(clear_module_state->__pyx_int_281);
  Py_CLEAR(clear_module_state->__pyx_int_282);
  Py_CLEAR(clear_module_state->__pyx_int_283);
  Py_CLEAR(clear_module_state->__pyx_int_284);
  Py_CLEAR(clear_module_state->__pyx_int_285);
  Py_CLEAR(clear_module_state->__pyx_int_286);
  Py_CLEAR(clear_module_state->__pyx_int_287);
  Py_CLEAR(clear_module_state->__pyx_int_288);
  Py_CLEAR(clear_module_state->__pyx_int_289);
  Py_CLEAR(clear_module_state->__pyx_int_290);
  Py_CLEAR(clear_module_state->__pyx_int_291);
  Py_CLEAR(clear_module_state->__pyx_int_292);
  Py_CLEAR(clear_module_state->__pyx_int_293);
  Py_CLEAR(clear_module_state->__pyx_int_294);
  Py_CLEAR(clear_module_state->__pyx_int_295);
  Py_CLEAR(clear_module_state->__pyx_int_296);
  Py_CLEAR(clear_module_state->__pyx_int_297);
  Py_CLEAR(clear_module_state->__pyx_int_298);
  Py_CLEAR(clear_module_state->__pyx_int_299);
  Py_CLEAR(clear_module_state->__pyx_int_300);
  Py_CLEAR(clear_module_state->__pyx_int_301);
  Py_CLEAR(clear_module_state->__pyx_int_302);
  Py_CLEAR(clear_module_state->__pyx_int_303);
  Py_CLEAR(clear_module_state->__pyx_int_304);
  Py_CLEAR(clear_module_state->__pyx_int_305);
  Py_CLEAR(clear_module_state->__pyx_int_306);
  Py_CLEAR(clear_module_state->__pyx_int_307);
  Py_CLEAR(clear_module_state->__pyx_int_308);
  Py_CLEAR(clear_module_state->__pyx_int_309);
  Py_CLEAR(clear_module_state->__pyx_int_310);
  Py_CLEAR(clear_module_state->__pyx_int_311);
  Py_CLEAR(clear_module_state->__pyx_int_312);
  Py_CLEAR(clear_module_state->__pyx_int_313);
  Py_CLEAR(clear_module_state->__pyx_int_314);
  Py_CLEAR(clear_module_state->__pyx_int_315);
  Py_CLEAR(clear_module_state->__pyx_int_316);
  Py_CLEAR(clear_module_state->__pyx_int_317);
  Py_CLEAR(clear_module_state->__pyx_int_318);
  Py_CLEAR(clear_module_state->__pyx_int_319);
  Py_CLEAR(clear_module_state->__pyx_int_320);
  Py_CLEAR(clear_module_state->__pyx_int_321);
  Py_CLEAR(clear_module_state->__pyx_int_322);
  Py_CLEAR(clear_module_state->__pyx_int_323);
  Py_CLEAR(clear_module_state->__pyx_int_324);
  Py_CLEAR(clear_module_state->__pyx_int_325);
  Py_CLEAR(clear_module_state->__pyx_int_326);
  Py_CLEAR(clear_module_state->__pyx_int_327);
  Py_CLEAR(clear_module_state->__pyx_int_328);
  Py_CLEAR(clear_module_state->__pyx_int_329);
  Py_CLEAR(clear_module_state->__pyx_int_330);
  Py_CLEAR(clear_module_state->__pyx_int_331);
  Py_CLEAR(clear_module_state->__pyx_int_332);
  Py_CLEAR(clear_module_state->__pyx_int_333);
  Py_CLEAR(clear_module_state->__pyx_int_334);
  Py_CLEAR(clear_module_state->__pyx_int_335);
  Py_CLEAR(clear_module_state->__pyx_int_336);
  Py_CLEAR(clear_module_state->__pyx_int_337);
  Py_CLEAR(clear_module_state->__pyx_int_338);
  Py_CLEAR(clear_module_state->__pyx_int_339);
  Py_CLEAR(clear_module_state->__pyx_int_340);
  Py_CLEAR(clear_module_state->__pyx_int_341);
  Py_CLEAR(clear_module_state->__pyx_int_342);
  Py_CLEAR(clear_module_state->__pyx_int_343);
  Py_CLEAR(clear_module_state->__pyx_int_344);
  Py_CLEAR(clear_module_state->__pyx_int_345);
  Py_CLEAR(clear_module_state->__pyx_int_346);
  Py_CLEAR(clear_module_state->__pyx_int_347);
  Py_CLEAR(clear_module_state->__pyx_int_348);
  Py_CLEAR(clear_module_state->__pyx_int_349);
  Py_CLEAR(clear_module_state->__pyx_int_350);
  Py_CLEAR(clear_module_state->__pyx_int_351);
  Py_CLEAR(clear_module_state->__pyx_int_352);
  Py_CLEAR(clear_module_state->__pyx_int_353);
  Py_CLEAR(clear_module_state->__pyx_int_354);
  Py_CLEAR(clear_module_state->__pyx_int_355);
  Py_CLEAR(clear_module_state->__pyx_int_356);
  Py_CLEAR(clear_module_state->__pyx_int_357);
  Py_CLEAR(clear_module_state->__pyx_int_358);
  Py_CLEAR(clear_module_state->__pyx_int_359);
  Py_CLEAR(clear_module_state->__pyx_int_360);
  Py_CLEAR(clear_module_state->__pyx_int_361);
  Py_CLEAR(clear_module_state->__pyx_int_362);
  Py_CLEAR(clear_module_state->__pyx_int_363);
  Py_CLEAR(clear_module_state->__pyx_int_364);
  Py_CLEAR(clear_module_state->__pyx_int_365);
  Py_CLEAR(clear_module_state->__pyx_int_366);
  Py_CLEAR(clear_module_state->__pyx_int_367);
  Py_CLEAR(clear_module_state->__pyx_int_368);
  Py_CLEAR(clear_module_state->__pyx_int_369);
  Py_CLEAR(clear_module_state->__pyx_int_370);
  Py_CLEAR(clear_module_state->__pyx_int_371);
  Py_CLEAR(clear_module_state->__pyx_int_372);
  Py_CLEAR(clear_module_state->__pyx_int_373);
  Py_CLEAR(clear_module_state->__pyx_int_374);
  Py_CLEAR(clear_module_state->__pyx_int_375);
  Py_CLEAR(clear_module_state->__pyx_int_376);
  Py_CLEAR(clear_module_state->__pyx_int_377);
  Py_CLEAR(clear_module_state->__pyx_int_378);
  Py_CLEAR(clear_module_state->__pyx_int_379);
  Py_CLEAR(clear_module_state->__pyx_int_380);
  Py_CLEAR(clear_module_state->__pyx_int_381);
  Py_CLEAR(clear_module_state->__pyx_int_382);
  Py_CLEAR(clear_module_state->__pyx_int_383);
  Py_CLEAR(clear_module_state->__pyx_int_384);
  Py_CLEAR(clear_module_state->__pyx_int_385);
  Py_CLEAR(clear_module_state->__pyx_int_386);
  Py_CLEAR(clear_module_state->__pyx_int_387);
  Py_CLEAR(clear_module_state->__pyx_int_388);
  Py_CLEAR(clear_module_state->__pyx_int_389);
  Py_CLEAR(clear_module_state->__pyx_int_390);
  Py_CLEAR(clear_module_state->__pyx_int_391);
  Py_CLEAR(clear_module_state->__pyx_int_392);
  Py_CLEAR(clear_module_state->__pyx_int_393);
  Py_CLEAR(clear_module_state->__pyx_int_394);
  Py_CLEAR(clear_module_state->__pyx_int_395);
  Py_CLEAR(clear_module_state->__pyx_int_396);
  Py_CLEAR(clear_module_state->__pyx_int_397);
  Py_CLEAR(clear_module_state->__pyx_int_398);
  Py_CLEAR(clear_module_state->__pyx_int_399);
  Py_CLEAR(clear_module_state->__pyx_int_400);
  Py_CLEAR(clear_module_state->__pyx_int_401);
  Py_CLEAR(clear_module_state->__pyx_int_402);
  Py_CLEAR(clear_module_state->__pyx_int_403);
  Py_CLEAR(clear_module_state->__pyx_int_404);
  Py_CLEAR(clear_module_state->__pyx_int_405);
  Py_CLEAR(clear_module_state->__pyx_int_406);
  Py_CLEAR(clear_module_state->__pyx_int_407);
  Py_CLEAR(clear_module_state->__pyx_int_408);
  Py_CLEAR(clear_module_state->__pyx_int_409);
  Py_CLEAR(clear_module_state->__pyx_int_410);
  Py_CLEAR(clear_module_state->__pyx_int_411);
  Py_CLEAR(clear_module_state->__pyx_int_412);
  Py_CLEAR(clear_module_state->__pyx_int_413);
  Py_CLEAR(clear_module_state->__pyx_int_414);
  Py_CLEAR(clear_module_state->__pyx_int_552);
  Py_CLEAR(clear_module_state->__pyx_int_887);
  Py_CLEAR(clear_module_state->__pyx_int_888);
  Py_CLEAR(clear_module_state->__pyx_int_962);
  Py_CLEAR(clear_module_state->__pyx_int_1260);
  Py_CLEAR(clear_module_state->__pyx_int_1288);
  Py_CLEAR(clear_module_state->__pyx_int_3552);
  Py_CLEAR(clear_module_state->__pyx_int_4878);
  Py_CLEAR(clear_module_state->__pyx_int_5110);
  Py_CLEAR(clear_module_state->__pyx_int_10000);
  Py_CLEAR(clear_module_state->__pyx_int_11031);
  Py_CLEAR(clear_module_state->__pyx_int_12846);
  Py_CLEAR(clear_module_state->__pyx_int_17661);
  Py_CLEAR(clear_module_state->__pyx_int_19536);
  Py_CLEAR(clear_module_state->__pyx_int_27436);
  Py_CLEAR(clear_module_state->__pyx_int_32768);
  Py_CLEAR(clear_module_state->__pyx_int_85263);
  Py_CLEAR(clear_module_state->__pyx_int_168030);
  Py_CLEAR(clear_module_state->__pyx_int_379799);
  Py_CLEAR(clear_module_state->__pyx_int_1008906);
  Py_CLEAR(clear_module_state->__pyx_int_60959262);
  Py_CLEAR(clear_module_state->__pyx_int_64961464);
  Py_CLEAR(clear_module_state->__pyx_int_94173347);
  Py_CLEAR(clear_module_state->__pyx_int_neg_1);
  Py_CLEAR(clear_module_state->__pyx_int_neg_3);
  Py_CLEAR(clear_module_state->__pyx_k__85);
  Py_CLEAR(clear_module_state->__pyx_k__108);
  Py_CLEAR(clear_module_state->__pyx_k__130);
  Py_CLEAR(clear_module_state->__pyx_slice__3);
  Py_CLEAR(clear_module_state->__pyx_slice__4);
  Py_CLEAR(clear_module_state->__pyx_tuple__5);
  Py_CLEAR(clear_module_state->__pyx_slice__34);
  Py_CLEAR(clear_module_state->__pyx_slice__92);
  Py_CLEAR(clear_module_state->__pyx_tuple__10);
  Py_CLEAR(clear_module_state->__pyx_tuple__11);
  Py_CLEAR(clear_module_state->__pyx_tuple__14);
  Py_CLEAR(clear_module_state->__pyx_tuple__15);
  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__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__31);
  Py_CLEAR(clear_module_state->__pyx_tuple__35);
  Py_CLEAR(clear_module_state->__pyx_tuple__36);
  Py_CLEAR(clear_module_state->__pyx_tuple__37);
  Py_CLEAR(clear_module_state->__pyx_tuple__39);
  Py_CLEAR(clear_module_state->__pyx_tuple__40);
  Py_CLEAR(clear_module_state->__pyx_tuple__41);
  Py_CLEAR(clear_module_state->__pyx_tuple__42);
  Py_CLEAR(clear_module_state->__pyx_tuple__43);
  Py_CLEAR(clear_module_state->__pyx_tuple__44);
  Py_CLEAR(clear_module_state->__pyx_tuple__45);
  Py_CLEAR(clear_module_state->__pyx_tuple__46);
  Py_CLEAR(clear_module_state->__pyx_tuple__47);
  Py_CLEAR(clear_module_state->__pyx_tuple__48);
  Py_CLEAR(clear_module_state->__pyx_tuple__49);
  Py_CLEAR(clear_module_state->__pyx_tuple__50);
  Py_CLEAR(clear_module_state->__pyx_tuple__51);
  Py_CLEAR(clear_module_state->__pyx_tuple__52);
  Py_CLEAR(clear_module_state->__pyx_tuple__53);
  Py_CLEAR(clear_module_state->__pyx_tuple__54);
  Py_CLEAR(clear_module_state->__pyx_tuple__55);
  Py_CLEAR(clear_module_state->__pyx_tuple__56);
  Py_CLEAR(clear_module_state->__pyx_tuple__57);
  Py_CLEAR(clear_module_state->__pyx_tuple__58);
  Py_CLEAR(clear_module_state->__pyx_tuple__59);
  Py_CLEAR(clear_module_state->__pyx_tuple__60);
  Py_CLEAR(clear_module_state->__pyx_tuple__61);
  Py_CLEAR(clear_module_state->__pyx_tuple__62);
  Py_CLEAR(clear_module_state->__pyx_tuple__63);
  Py_CLEAR(clear_module_state->__pyx_tuple__64);
  Py_CLEAR(clear_module_state->__pyx_tuple__65);
  Py_CLEAR(clear_module_state->__pyx_tuple__66);
  Py_CLEAR(clear_module_state->__pyx_tuple__67);
  Py_CLEAR(clear_module_state->__pyx_tuple__68);
  Py_CLEAR(clear_module_state->__pyx_tuple__69);
  Py_CLEAR(clear_module_state->__pyx_tuple__71);
  Py_CLEAR(clear_module_state->__pyx_tuple__72);
  Py_CLEAR(clear_module_state->__pyx_tuple__73);
  Py_CLEAR(clear_module_state->__pyx_tuple__74);
  Py_CLEAR(clear_module_state->__pyx_tuple__75);
  Py_CLEAR(clear_module_state->__pyx_tuple__76);
  Py_CLEAR(clear_module_state->__pyx_tuple__77);
  Py_CLEAR(clear_module_state->__pyx_tuple__78);
  Py_CLEAR(clear_module_state->__pyx_tuple__79);
  Py_CLEAR(clear_module_state->__pyx_tuple__80);
  Py_CLEAR(clear_module_state->__pyx_tuple__81);
  Py_CLEAR(clear_module_state->__pyx_tuple__82);
  Py_CLEAR(clear_module_state->__pyx_tuple__83);
  Py_CLEAR(clear_module_state->__pyx_tuple__84);
  Py_CLEAR(clear_module_state->__pyx_tuple__86);
  Py_CLEAR(clear_module_state->__pyx_tuple__87);
  Py_CLEAR(clear_module_state->__pyx_tuple__88);
  Py_CLEAR(clear_module_state->__pyx_tuple__89);
  Py_CLEAR(clear_module_state->__pyx_tuple__90);
  Py_CLEAR(clear_module_state->__pyx_tuple__91);
  Py_CLEAR(clear_module_state->__pyx_tuple__93);
  Py_CLEAR(clear_module_state->__pyx_tuple__94);
  Py_CLEAR(clear_module_state->__pyx_tuple__95);
  Py_CLEAR(clear_module_state->__pyx_tuple__96);
  Py_CLEAR(clear_module_state->__pyx_tuple__97);
  Py_CLEAR(clear_module_state->__pyx_tuple__98);
  Py_CLEAR(clear_module_state->__pyx_tuple__99);
  Py_CLEAR(clear_module_state->__pyx_codeobj__6);
  Py_CLEAR(clear_module_state->__pyx_slice__110);
  Py_CLEAR(clear_module_state->__pyx_slice__128);
  Py_CLEAR(clear_module_state->__pyx_tuple__100);
  Py_CLEAR(clear_module_state->__pyx_tuple__101);
  Py_CLEAR(clear_module_state->__pyx_tuple__102);
  Py_CLEAR(clear_module_state->__pyx_tuple__103);
  Py_CLEAR(clear_module_state->__pyx_tuple__104);
  Py_CLEAR(clear_module_state->__pyx_tuple__105);
  Py_CLEAR(clear_module_state->__pyx_tuple__106);
  Py_CLEAR(clear_module_state->__pyx_tuple__107);
  Py_CLEAR(clear_module_state->__pyx_tuple__109);
  Py_CLEAR(clear_module_state->__pyx_tuple__112);
  Py_CLEAR(clear_module_state->__pyx_tuple__113);
  Py_CLEAR(clear_module_state->__pyx_tuple__119);
  Py_CLEAR(clear_module_state->__pyx_tuple__120);
  Py_CLEAR(clear_module_state->__pyx_tuple__121);
  Py_CLEAR(clear_module_state->__pyx_tuple__122);
  Py_CLEAR(clear_module_state->__pyx_tuple__123);
  Py_CLEAR(clear_module_state->__pyx_tuple__124);
  Py_CLEAR(clear_module_state->__pyx_tuple__125);
  Py_CLEAR(clear_module_state->__pyx_tuple__126);
  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__132);
  Py_CLEAR(clear_module_state->__pyx_tuple__133);
  Py_CLEAR(clear_module_state->__pyx_tuple__134);
  Py_CLEAR(clear_module_state->__pyx_tuple__135);
  Py_CLEAR(clear_module_state->__pyx_tuple__136);
  Py_CLEAR(clear_module_state->__pyx_tuple__137);
  Py_CLEAR(clear_module_state->__pyx_tuple__138);
  Py_CLEAR(clear_module_state->__pyx_tuple__139);
  Py_CLEAR(clear_module_state->__pyx_tuple__140);
  Py_CLEAR(clear_module_state->__pyx_tuple__141);
  Py_CLEAR(clear_module_state->__pyx_tuple__142);
  Py_CLEAR(clear_module_state->__pyx_tuple__143);
  Py_CLEAR(clear_module_state->__pyx_tuple__145);
  Py_CLEAR(clear_module_state->__pyx_tuple__146);
  Py_CLEAR(clear_module_state->__pyx_tuple__147);
  Py_CLEAR(clear_module_state->__pyx_tuple__148);
  Py_CLEAR(clear_module_state->__pyx_tuple__149);
  Py_CLEAR(clear_module_state->__pyx_tuple__151);
  Py_CLEAR(clear_module_state->__pyx_tuple__152);
  Py_CLEAR(clear_module_state->__pyx_tuple__153);
  Py_CLEAR(clear_module_state->__pyx_tuple__154);
  Py_CLEAR(clear_module_state->__pyx_tuple__155);
  Py_CLEAR(clear_module_state->__pyx_tuple__156);
  Py_CLEAR(clear_module_state->__pyx_tuple__157);
  Py_CLEAR(clear_module_state->__pyx_tuple__158);
  Py_CLEAR(clear_module_state->__pyx_tuple__159);
  Py_CLEAR(clear_module_state->__pyx_tuple__160);
  Py_CLEAR(clear_module_state->__pyx_tuple__161);
  Py_CLEAR(clear_module_state->__pyx_tuple__162);
  Py_CLEAR(clear_module_state->__pyx_tuple__163);
  Py_CLEAR(clear_module_state->__pyx_tuple__164);
  Py_CLEAR(clear_module_state->__pyx_tuple__165);
  Py_CLEAR(clear_module_state->__pyx_tuple__166);
  Py_CLEAR(clear_module_state->__pyx_tuple__167);
  Py_CLEAR(clear_module_state->__pyx_tuple__168);
  Py_CLEAR(clear_module_state->__pyx_tuple__169);
  Py_CLEAR(clear_module_state->__pyx_tuple__171);
  Py_CLEAR(clear_module_state->__pyx_tuple__172);
  Py_CLEAR(clear_module_state->__pyx_tuple__173);
  Py_CLEAR(clear_module_state->__pyx_tuple__176);
  Py_CLEAR(clear_module_state->__pyx_tuple__178);
  Py_CLEAR(clear_module_state->__pyx_tuple__180);
  Py_CLEAR(clear_module_state->__pyx_tuple__182);
  Py_CLEAR(clear_module_state->__pyx_tuple__185);
  Py_CLEAR(clear_module_state->__pyx_tuple__189);
  Py_CLEAR(clear_module_state->__pyx_tuple__192);
  Py_CLEAR(clear_module_state->__pyx_tuple__194);
  Py_CLEAR(clear_module_state->__pyx_tuple__196);
  Py_CLEAR(clear_module_state->__pyx_tuple__198);
  Py_CLEAR(clear_module_state->__pyx_tuple__201);
  Py_CLEAR(clear_module_state->__pyx_tuple__203);
  Py_CLEAR(clear_module_state->__pyx_tuple__208);
  Py_CLEAR(clear_module_state->__pyx_tuple__210);
  Py_CLEAR(clear_module_state->__pyx_tuple__213);
  Py_CLEAR(clear_module_state->__pyx_tuple__215);
  Py_CLEAR(clear_module_state->__pyx_tuple__217);
  Py_CLEAR(clear_module_state->__pyx_tuple__219);
  Py_CLEAR(clear_module_state->__pyx_tuple__221);
  Py_CLEAR(clear_module_state->__pyx_tuple__227);
  Py_CLEAR(clear_module_state->__pyx_tuple__229);
  Py_CLEAR(clear_module_state->__pyx_tuple__231);
  Py_CLEAR(clear_module_state->__pyx_tuple__233);
  Py_CLEAR(clear_module_state->__pyx_tuple__234);
  Py_CLEAR(clear_module_state->__pyx_tuple__236);
  Py_CLEAR(clear_module_state->__pyx_tuple__238);
  Py_CLEAR(clear_module_state->__pyx_tuple__241);
  Py_CLEAR(clear_module_state->__pyx_tuple__244);
  Py_CLEAR(clear_module_state->__pyx_tuple__246);
  Py_CLEAR(clear_module_state->__pyx_tuple__248);
  Py_CLEAR(clear_module_state->__pyx_tuple__250);
  Py_CLEAR(clear_module_state->__pyx_tuple__252);
  Py_CLEAR(clear_module_state->__pyx_tuple__254);
  Py_CLEAR(clear_module_state->__pyx_tuple__256);
  Py_CLEAR(clear_module_state->__pyx_tuple__257);
  Py_CLEAR(clear_module_state->__pyx_tuple__259);
  Py_CLEAR(clear_module_state->__pyx_tuple__260);
  Py_CLEAR(clear_module_state->__pyx_tuple__262);
  Py_CLEAR(clear_module_state->__pyx_tuple__266);
  Py_CLEAR(clear_module_state->__pyx_tuple__268);
  Py_CLEAR(clear_module_state->__pyx_tuple__270);
  Py_CLEAR(clear_module_state->__pyx_tuple__271);
  Py_CLEAR(clear_module_state->__pyx_tuple__273);
  Py_CLEAR(clear_module_state->__pyx_tuple__275);
  Py_CLEAR(clear_module_state->__pyx_tuple__277);
  Py_CLEAR(clear_module_state->__pyx_tuple__279);
  Py_CLEAR(clear_module_state->__pyx_tuple__281);
  Py_CLEAR(clear_module_state->__pyx_tuple__283);
  Py_CLEAR(clear_module_state->__pyx_tuple__284);
  Py_CLEAR(clear_module_state->__pyx_tuple__288);
  Py_CLEAR(clear_module_state->__pyx_tuple__290);
  Py_CLEAR(clear_module_state->__pyx_tuple__292);
  Py_CLEAR(clear_module_state->__pyx_tuple__294);
  Py_CLEAR(clear_module_state->__pyx_tuple__297);
  Py_CLEAR(clear_module_state->__pyx_tuple__299);
  Py_CLEAR(clear_module_state->__pyx_tuple__301);
  Py_CLEAR(clear_module_state->__pyx_tuple__302);
  Py_CLEAR(clear_module_state->__pyx_tuple__304);
  Py_CLEAR(clear_module_state->__pyx_tuple__307);
  Py_CLEAR(clear_module_state->__pyx_tuple__309);
  Py_CLEAR(clear_module_state->__pyx_tuple__312);
  Py_CLEAR(clear_module_state->__pyx_tuple__314);
  Py_CLEAR(clear_module_state->__pyx_tuple__316);
  Py_CLEAR(clear_module_state->__pyx_tuple__317);
  Py_CLEAR(clear_module_state->__pyx_tuple__319);
  Py_CLEAR(clear_module_state->__pyx_tuple__320);
  Py_CLEAR(clear_module_state->__pyx_tuple__322);
  Py_CLEAR(clear_module_state->__pyx_tuple__324);
  Py_CLEAR(clear_module_state->__pyx_tuple__325);
  Py_CLEAR(clear_module_state->__pyx_tuple__327);
  Py_CLEAR(clear_module_state->__pyx_tuple__329);
  Py_CLEAR(clear_module_state->__pyx_tuple__331);
  Py_CLEAR(clear_module_state->__pyx_tuple__336);
  Py_CLEAR(clear_module_state->__pyx_tuple__338);
  Py_CLEAR(clear_module_state->__pyx_tuple__340);
  Py_CLEAR(clear_module_state->__pyx_tuple__341);
  Py_CLEAR(clear_module_state->__pyx_tuple__343);
  Py_CLEAR(clear_module_state->__pyx_tuple__345);
  Py_CLEAR(clear_module_state->__pyx_tuple__347);
  Py_CLEAR(clear_module_state->__pyx_tuple__349);
  Py_CLEAR(clear_module_state->__pyx_tuple__350);
  Py_CLEAR(clear_module_state->__pyx_tuple__352);
  Py_CLEAR(clear_module_state->__pyx_tuple__354);
  Py_CLEAR(clear_module_state->__pyx_tuple__355);
  Py_CLEAR(clear_module_state->__pyx_tuple__357);
  Py_CLEAR(clear_module_state->__pyx_tuple__358);
  Py_CLEAR(clear_module_state->__pyx_tuple__361);
  Py_CLEAR(clear_module_state->__pyx_tuple__363);
  Py_CLEAR(clear_module_state->__pyx_tuple__365);
  Py_CLEAR(clear_module_state->__pyx_tuple__367);
  Py_CLEAR(clear_module_state->__pyx_tuple__369);
  Py_CLEAR(clear_module_state->__pyx_tuple__370);
  Py_CLEAR(clear_module_state->__pyx_tuple__372);
  Py_CLEAR(clear_module_state->__pyx_tuple__374);
  Py_CLEAR(clear_module_state->__pyx_tuple__376);
  Py_CLEAR(clear_module_state->__pyx_tuple__378);
  Py_CLEAR(clear_module_state->__pyx_tuple__380);
  Py_CLEAR(clear_module_state->__pyx_tuple__382);
  Py_CLEAR(clear_module_state->__pyx_tuple__384);
  Py_CLEAR(clear_module_state->__pyx_tuple__386);
  Py_CLEAR(clear_module_state->__pyx_tuple__388);
  Py_CLEAR(clear_module_state->__pyx_tuple__390);
  Py_CLEAR(clear_module_state->__pyx_tuple__392);
  Py_CLEAR(clear_module_state->__pyx_tuple__394);
  Py_CLEAR(clear_module_state->__pyx_tuple__397);
  Py_CLEAR(clear_module_state->__pyx_tuple__400);
  Py_CLEAR(clear_module_state->__pyx_tuple__402);
  Py_CLEAR(clear_module_state->__pyx_tuple__404);
  Py_CLEAR(clear_module_state->__pyx_tuple__407);
  Py_CLEAR(clear_module_state->__pyx_tuple__409);
  Py_CLEAR(clear_module_state->__pyx_tuple__411);
  Py_CLEAR(clear_module_state->__pyx_tuple__413);
  Py_CLEAR(clear_module_state->__pyx_tuple__415);
  Py_CLEAR(clear_module_state->__pyx_tuple__416);
  Py_CLEAR(clear_module_state->__pyx_tuple__420);
  Py_CLEAR(clear_module_state->__pyx_tuple__422);
  Py_CLEAR(clear_module_state->__pyx_tuple__423);
  Py_CLEAR(clear_module_state->__pyx_tuple__425);
  Py_CLEAR(clear_module_state->__pyx_tuple__427);
  Py_CLEAR(clear_module_state->__pyx_tuple__429);
  Py_CLEAR(clear_module_state->__pyx_tuple__431);
  Py_CLEAR(clear_module_state->__pyx_tuple__432);
  Py_CLEAR(clear_module_state->__pyx_tuple__434);
  Py_CLEAR(clear_module_state->__pyx_tuple__435);
  Py_CLEAR(clear_module_state->__pyx_tuple__437);
  Py_CLEAR(clear_module_state->__pyx_tuple__439);
  Py_CLEAR(clear_module_state->__pyx_tuple__441);
  Py_CLEAR(clear_module_state->__pyx_tuple__443);
  Py_CLEAR(clear_module_state->__pyx_tuple__444);
  Py_CLEAR(clear_module_state->__pyx_tuple__446);
  Py_CLEAR(clear_module_state->__pyx_tuple__448);
  Py_CLEAR(clear_module_state->__pyx_tuple__450);
  Py_CLEAR(clear_module_state->__pyx_tuple__452);
  Py_CLEAR(clear_module_state->__pyx_tuple__454);
  Py_CLEAR(clear_module_state->__pyx_tuple__456);
  Py_CLEAR(clear_module_state->__pyx_tuple__458);
  Py_CLEAR(clear_module_state->__pyx_tuple__460);
  Py_CLEAR(clear_module_state->__pyx_tuple__465);
  Py_CLEAR(clear_module_state->__pyx_tuple__467);
  Py_CLEAR(clear_module_state->__pyx_tuple__471);
  Py_CLEAR(clear_module_state->__pyx_tuple__473);
  Py_CLEAR(clear_module_state->__pyx_tuple__475);
  Py_CLEAR(clear_module_state->__pyx_tuple__477);
  Py_CLEAR(clear_module_state->__pyx_tuple__479);
  Py_CLEAR(clear_module_state->__pyx_tuple__481);
  Py_CLEAR(clear_module_state->__pyx_tuple__483);
  Py_CLEAR(clear_module_state->__pyx_tuple__485);
  Py_CLEAR(clear_module_state->__pyx_tuple__487);
  Py_CLEAR(clear_module_state->__pyx_tuple__489);
  Py_CLEAR(clear_module_state->__pyx_tuple__491);
  Py_CLEAR(clear_module_state->__pyx_tuple__496);
  Py_CLEAR(clear_module_state->__pyx_tuple__498);
  Py_CLEAR(clear_module_state->__pyx_tuple__500);
  Py_CLEAR(clear_module_state->__pyx_tuple__501);
  Py_CLEAR(clear_module_state->__pyx_tuple__503);
  Py_CLEAR(clear_module_state->__pyx_tuple__505);
  Py_CLEAR(clear_module_state->__pyx_tuple__507);
  Py_CLEAR(clear_module_state->__pyx_tuple__509);
  Py_CLEAR(clear_module_state->__pyx_tuple__511);
  Py_CLEAR(clear_module_state->__pyx_tuple__514);
  Py_CLEAR(clear_module_state->__pyx_tuple__517);
  Py_CLEAR(clear_module_state->__pyx_tuple__519);
  Py_CLEAR(clear_module_state->__pyx_tuple__521);
  Py_CLEAR(clear_module_state->__pyx_tuple__525);
  Py_CLEAR(clear_module_state->__pyx_tuple__527);
  Py_CLEAR(clear_module_state->__pyx_tuple__536);
  Py_CLEAR(clear_module_state->__pyx_tuple__538);
  Py_CLEAR(clear_module_state->__pyx_tuple__542);
  Py_CLEAR(clear_module_state->__pyx_tuple__546);
  Py_CLEAR(clear_module_state->__pyx_tuple__550);
  Py_CLEAR(clear_module_state->__pyx_tuple__552);
  Py_CLEAR(clear_module_state->__pyx_tuple__554);
  Py_CLEAR(clear_module_state->__pyx_tuple__556);
  Py_CLEAR(clear_module_state->__pyx_tuple__558);
  Py_CLEAR(clear_module_state->__pyx_tuple__568);
  Py_CLEAR(clear_module_state->__pyx_tuple__572);
  Py_CLEAR(clear_module_state->__pyx_tuple__574);
  Py_CLEAR(clear_module_state->__pyx_tuple__575);
  Py_CLEAR(clear_module_state->__pyx_tuple__577);
  Py_CLEAR(clear_module_state->__pyx_tuple__580);
  Py_CLEAR(clear_module_state->__pyx_tuple__582);
  Py_CLEAR(clear_module_state->__pyx_tuple__584);
  Py_CLEAR(clear_module_state->__pyx_tuple__586);
  Py_CLEAR(clear_module_state->__pyx_tuple__591);
  Py_CLEAR(clear_module_state->__pyx_tuple__593);
  Py_CLEAR(clear_module_state->__pyx_tuple__595);
  Py_CLEAR(clear_module_state->__pyx_tuple__597);
  Py_CLEAR(clear_module_state->__pyx_tuple__599);
  Py_CLEAR(clear_module_state->__pyx_tuple__601);
  Py_CLEAR(clear_module_state->__pyx_tuple__603);
  Py_CLEAR(clear_module_state->__pyx_tuple__605);
  Py_CLEAR(clear_module_state->__pyx_tuple__606);
  Py_CLEAR(clear_module_state->__pyx_tuple__609);
  Py_CLEAR(clear_module_state->__pyx_tuple__611);
  Py_CLEAR(clear_module_state->__pyx_tuple__613);
  Py_CLEAR(clear_module_state->__pyx_tuple__616);
  Py_CLEAR(clear_module_state->__pyx_tuple__618);
  Py_CLEAR(clear_module_state->__pyx_tuple__620);
  Py_CLEAR(clear_module_state->__pyx_tuple__624);
  Py_CLEAR(clear_module_state->__pyx_tuple__626);
  Py_CLEAR(clear_module_state->__pyx_tuple__629);
  Py_CLEAR(clear_module_state->__pyx_tuple__631);
  Py_CLEAR(clear_module_state->__pyx_tuple__633);
  Py_CLEAR(clear_module_state->__pyx_tuple__635);
  Py_CLEAR(clear_module_state->__pyx_tuple__637);
  Py_CLEAR(clear_module_state->__pyx_tuple__638);
  Py_CLEAR(clear_module_state->__pyx_tuple__640);
  Py_CLEAR(clear_module_state->__pyx_tuple__642);
  Py_CLEAR(clear_module_state->__pyx_tuple__644);
  Py_CLEAR(clear_module_state->__pyx_tuple__647);
  Py_CLEAR(clear_module_state->__pyx_tuple__648);
  Py_CLEAR(clear_module_state->__pyx_tuple__649);
  Py_CLEAR(clear_module_state->__pyx_tuple__650);
  Py_CLEAR(clear_module_state->__pyx_tuple__651);
  Py_CLEAR(clear_module_state->__pyx_tuple__652);
  Py_CLEAR(clear_module_state->__pyx_tuple__654);
  Py_CLEAR(clear_module_state->__pyx_tuple__655);
  Py_CLEAR(clear_module_state->__pyx_tuple__657);
  Py_CLEAR(clear_module_state->__pyx_tuple__659);
  Py_CLEAR(clear_module_state->__pyx_tuple__660);
  Py_CLEAR(clear_module_state->__pyx_tuple__661);
  Py_CLEAR(clear_module_state->__pyx_tuple__662);
  Py_CLEAR(clear_module_state->__pyx_tuple__663);
  Py_CLEAR(clear_module_state->__pyx_tuple__664);
  Py_CLEAR(clear_module_state->__pyx_tuple__665);
  Py_CLEAR(clear_module_state->__pyx_tuple__667);
  Py_CLEAR(clear_module_state->__pyx_tuple__669);
  Py_CLEAR(clear_module_state->__pyx_tuple__671);
  Py_CLEAR(clear_module_state->__pyx_tuple__673);
  Py_CLEAR(clear_module_state->__pyx_tuple__675);
  Py_CLEAR(clear_module_state->__pyx_tuple__677);
  Py_CLEAR(clear_module_state->__pyx_tuple__682);
  Py_CLEAR(clear_module_state->__pyx_tuple__683);
  Py_CLEAR(clear_module_state->__pyx_tuple__684);
  Py_CLEAR(clear_module_state->__pyx_tuple__685);
  Py_CLEAR(clear_module_state->__pyx_tuple__686);
  Py_CLEAR(clear_module_state->__pyx_tuple__689);
  Py_CLEAR(clear_module_state->__pyx_tuple__693);
  Py_CLEAR(clear_module_state->__pyx_tuple__695);
  Py_CLEAR(clear_module_state->__pyx_tuple__696);
  Py_CLEAR(clear_module_state->__pyx_tuple__698);
  Py_CLEAR(clear_module_state->__pyx_tuple__700);
  Py_CLEAR(clear_module_state->__pyx_tuple__707);
  Py_CLEAR(clear_module_state->__pyx_tuple__709);
  Py_CLEAR(clear_module_state->__pyx_tuple__711);
  Py_CLEAR(clear_module_state->__pyx_tuple__713);
  Py_CLEAR(clear_module_state->__pyx_tuple__715);
  Py_CLEAR(clear_module_state->__pyx_tuple__717);
  Py_CLEAR(clear_module_state->__pyx_tuple__719);
  Py_CLEAR(clear_module_state->__pyx_tuple__720);
  Py_CLEAR(clear_module_state->__pyx_tuple__722);
  Py_CLEAR(clear_module_state->__pyx_tuple__724);
  Py_CLEAR(clear_module_state->__pyx_codeobj__70);
  Py_CLEAR(clear_module_state->__pyx_codeobj__174);
  Py_CLEAR(clear_module_state->__pyx_codeobj__175);
  Py_CLEAR(clear_module_state->__pyx_codeobj__177);
  Py_CLEAR(clear_module_state->__pyx_codeobj__179);
  Py_CLEAR(clear_module_state->__pyx_codeobj__181);
  Py_CLEAR(clear_module_state->__pyx_codeobj__183);
  Py_CLEAR(clear_module_state->__pyx_codeobj__184);
  Py_CLEAR(clear_module_state->__pyx_codeobj__186);
  Py_CLEAR(clear_module_state->__pyx_codeobj__187);
  Py_CLEAR(clear_module_state->__pyx_codeobj__188);
  Py_CLEAR(clear_module_state->__pyx_codeobj__190);
  Py_CLEAR(clear_module_state->__pyx_codeobj__191);
  Py_CLEAR(clear_module_state->__pyx_codeobj__193);
  Py_CLEAR(clear_module_state->__pyx_codeobj__195);
  Py_CLEAR(clear_module_state->__pyx_codeobj__197);
  Py_CLEAR(clear_module_state->__pyx_codeobj__199);
  Py_CLEAR(clear_module_state->__pyx_codeobj__200);
  Py_CLEAR(clear_module_state->__pyx_codeobj__202);
  Py_CLEAR(clear_module_state->__pyx_codeobj__204);
  Py_CLEAR(clear_module_state->__pyx_codeobj__205);
  Py_CLEAR(clear_module_state->__pyx_codeobj__206);
  Py_CLEAR(clear_module_state->__pyx_codeobj__207);
  Py_CLEAR(clear_module_state->__pyx_codeobj__209);
  Py_CLEAR(clear_module_state->__pyx_codeobj__211);
  Py_CLEAR(clear_module_state->__pyx_codeobj__212);
  Py_CLEAR(clear_module_state->__pyx_codeobj__214);
  Py_CLEAR(clear_module_state->__pyx_codeobj__216);
  Py_CLEAR(clear_module_state->__pyx_codeobj__218);
  Py_CLEAR(clear_module_state->__pyx_codeobj__220);
  Py_CLEAR(clear_module_state->__pyx_codeobj__222);
  Py_CLEAR(clear_module_state->__pyx_codeobj__223);
  Py_CLEAR(clear_module_state->__pyx_codeobj__224);
  Py_CLEAR(clear_module_state->__pyx_codeobj__225);
  Py_CLEAR(clear_module_state->__pyx_codeobj__226);
  Py_CLEAR(clear_module_state->__pyx_codeobj__228);
  Py_CLEAR(clear_module_state->__pyx_codeobj__230);
  Py_CLEAR(clear_module_state->__pyx_codeobj__232);
  Py_CLEAR(clear_module_state->__pyx_codeobj__235);
  Py_CLEAR(clear_module_state->__pyx_codeobj__237);
  Py_CLEAR(clear_module_state->__pyx_codeobj__239);
  Py_CLEAR(clear_module_state->__pyx_codeobj__240);
  Py_CLEAR(clear_module_state->__pyx_codeobj__242);
  Py_CLEAR(clear_module_state->__pyx_codeobj__243);
  Py_CLEAR(clear_module_state->__pyx_codeobj__245);
  Py_CLEAR(clear_module_state->__pyx_codeobj__247);
  Py_CLEAR(clear_module_state->__pyx_codeobj__249);
  Py_CLEAR(clear_module_state->__pyx_codeobj__251);
  Py_CLEAR(clear_module_state->__pyx_codeobj__253);
  Py_CLEAR(clear_module_state->__pyx_codeobj__255);
  Py_CLEAR(clear_module_state->__pyx_codeobj__258);
  Py_CLEAR(clear_module_state->__pyx_codeobj__261);
  Py_CLEAR(clear_module_state->__pyx_codeobj__263);
  Py_CLEAR(clear_module_state->__pyx_codeobj__264);
  Py_CLEAR(clear_module_state->__pyx_codeobj__265);
  Py_CLEAR(clear_module_state->__pyx_codeobj__267);
  Py_CLEAR(clear_module_state->__pyx_codeobj__269);
  Py_CLEAR(clear_module_state->__pyx_codeobj__272);
  Py_CLEAR(clear_module_state->__pyx_codeobj__274);
  Py_CLEAR(clear_module_state->__pyx_codeobj__276);
  Py_CLEAR(clear_module_state->__pyx_codeobj__278);
  Py_CLEAR(clear_module_state->__pyx_codeobj__280);
  Py_CLEAR(clear_module_state->__pyx_codeobj__282);
  Py_CLEAR(clear_module_state->__pyx_codeobj__285);
  Py_CLEAR(clear_module_state->__pyx_codeobj__286);
  Py_CLEAR(clear_module_state->__pyx_codeobj__287);
  Py_CLEAR(clear_module_state->__pyx_codeobj__289);
  Py_CLEAR(clear_module_state->__pyx_codeobj__291);
  Py_CLEAR(clear_module_state->__pyx_codeobj__293);
  Py_CLEAR(clear_module_state->__pyx_codeobj__295);
  Py_CLEAR(clear_module_state->__pyx_codeobj__296);
  Py_CLEAR(clear_module_state->__pyx_codeobj__298);
  Py_CLEAR(clear_module_state->__pyx_codeobj__300);
  Py_CLEAR(clear_module_state->__pyx_codeobj__303);
  Py_CLEAR(clear_module_state->__pyx_codeobj__305);
  Py_CLEAR(clear_module_state->__pyx_codeobj__306);
  Py_CLEAR(clear_module_state->__pyx_codeobj__308);
  Py_CLEAR(clear_module_state->__pyx_codeobj__310);
  Py_CLEAR(clear_module_state->__pyx_codeobj__311);
  Py_CLEAR(clear_module_state->__pyx_codeobj__313);
  Py_CLEAR(clear_module_state->__pyx_codeobj__315);
  Py_CLEAR(clear_module_state->__pyx_codeobj__318);
  Py_CLEAR(clear_module_state->__pyx_codeobj__321);
  Py_CLEAR(clear_module_state->__pyx_codeobj__323);
  Py_CLEAR(clear_module_state->__pyx_codeobj__326);
  Py_CLEAR(clear_module_state->__pyx_codeobj__328);
  Py_CLEAR(clear_module_state->__pyx_codeobj__330);
  Py_CLEAR(clear_module_state->__pyx_codeobj__332);
  Py_CLEAR(clear_module_state->__pyx_codeobj__333);
  Py_CLEAR(clear_module_state->__pyx_codeobj__334);
  Py_CLEAR(clear_module_state->__pyx_codeobj__335);
  Py_CLEAR(clear_module_state->__pyx_codeobj__337);
  Py_CLEAR(clear_module_state->__pyx_codeobj__339);
  Py_CLEAR(clear_module_state->__pyx_codeobj__342);
  Py_CLEAR(clear_module_state->__pyx_codeobj__344);
  Py_CLEAR(clear_module_state->__pyx_codeobj__346);
  Py_CLEAR(clear_module_state->__pyx_codeobj__348);
  Py_CLEAR(clear_module_state->__pyx_codeobj__351);
  Py_CLEAR(clear_module_state->__pyx_codeobj__353);
  Py_CLEAR(clear_module_state->__pyx_codeobj__356);
  Py_CLEAR(clear_module_state->__pyx_codeobj__359);
  Py_CLEAR(clear_module_state->__pyx_codeobj__360);
  Py_CLEAR(clear_module_state->__pyx_codeobj__362);
  Py_CLEAR(clear_module_state->__pyx_codeobj__364);
  Py_CLEAR(clear_module_state->__pyx_codeobj__366);
  Py_CLEAR(clear_module_state->__pyx_codeobj__368);
  Py_CLEAR(clear_module_state->__pyx_codeobj__371);
  Py_CLEAR(clear_module_state->__pyx_codeobj__373);
  Py_CLEAR(clear_module_state->__pyx_codeobj__375);
  Py_CLEAR(clear_module_state->__pyx_codeobj__377);
  Py_CLEAR(clear_module_state->__pyx_codeobj__379);
  Py_CLEAR(clear_module_state->__pyx_codeobj__381);
  Py_CLEAR(clear_module_state->__pyx_codeobj__383);
  Py_CLEAR(clear_module_state->__pyx_codeobj__385);
  Py_CLEAR(clear_module_state->__pyx_codeobj__387);
  Py_CLEAR(clear_module_state->__pyx_codeobj__389);
  Py_CLEAR(clear_module_state->__pyx_codeobj__391);
  Py_CLEAR(clear_module_state->__pyx_codeobj__393);
  Py_CLEAR(clear_module_state->__pyx_codeobj__395);
  Py_CLEAR(clear_module_state->__pyx_codeobj__396);
  Py_CLEAR(clear_module_state->__pyx_codeobj__398);
  Py_CLEAR(clear_module_state->__pyx_codeobj__399);
  Py_CLEAR(clear_module_state->__pyx_codeobj__401);
  Py_CLEAR(clear_module_state->__pyx_codeobj__403);
  Py_CLEAR(clear_module_state->__pyx_codeobj__405);
  Py_CLEAR(clear_module_state->__pyx_codeobj__406);
  Py_CLEAR(clear_module_state->__pyx_codeobj__408);
  Py_CLEAR(clear_module_state->__pyx_codeobj__410);
  Py_CLEAR(clear_module_state->__pyx_codeobj__412);
  Py_CLEAR(clear_module_state->__pyx_codeobj__414);
  Py_CLEAR(clear_module_state->__pyx_codeobj__417);
  Py_CLEAR(clear_module_state->__pyx_codeobj__418);
  Py_CLEAR(clear_module_state->__pyx_codeobj__419);
  Py_CLEAR(clear_module_state->__pyx_codeobj__421);
  Py_CLEAR(clear_module_state->__pyx_codeobj__424);
  Py_CLEAR(clear_module_state->__pyx_codeobj__426);
  Py_CLEAR(clear_module_state->__pyx_codeobj__428);
  Py_CLEAR(clear_module_state->__pyx_codeobj__430);
  Py_CLEAR(clear_module_state->__pyx_codeobj__433);
  Py_CLEAR(clear_module_state->__pyx_codeobj__436);
  Py_CLEAR(clear_module_state->__pyx_codeobj__438);
  Py_CLEAR(clear_module_state->__pyx_codeobj__440);
  Py_CLEAR(clear_module_state->__pyx_codeobj__442);
  Py_CLEAR(clear_module_state->__pyx_codeobj__445);
  Py_CLEAR(clear_module_state->__pyx_codeobj__447);
  Py_CLEAR(clear_module_state->__pyx_codeobj__449);
  Py_CLEAR(clear_module_state->__pyx_codeobj__451);
  Py_CLEAR(clear_module_state->__pyx_codeobj__453);
  Py_CLEAR(clear_module_state->__pyx_codeobj__455);
  Py_CLEAR(clear_module_state->__pyx_codeobj__457);
  Py_CLEAR(clear_module_state->__pyx_codeobj__459);
  Py_CLEAR(clear_module_state->__pyx_codeobj__461);
  Py_CLEAR(clear_module_state->__pyx_codeobj__462);
  Py_CLEAR(clear_module_state->__pyx_codeobj__463);
  Py_CLEAR(clear_module_state->__pyx_codeobj__464);
  Py_CLEAR(clear_module_state->__pyx_codeobj__466);
  Py_CLEAR(clear_module_state->__pyx_codeobj__468);
  Py_CLEAR(clear_module_state->__pyx_codeobj__469);
  Py_CLEAR(clear_module_state->__pyx_codeobj__470);
  Py_CLEAR(clear_module_state->__pyx_codeobj__472);
  Py_CLEAR(clear_module_state->__pyx_codeobj__474);
  Py_CLEAR(clear_module_state->__pyx_codeobj__476);
  Py_CLEAR(clear_module_state->__pyx_codeobj__478);
  Py_CLEAR(clear_module_state->__pyx_codeobj__480);
  Py_CLEAR(clear_module_state->__pyx_codeobj__482);
  Py_CLEAR(clear_module_state->__pyx_codeobj__484);
  Py_CLEAR(clear_module_state->__pyx_codeobj__486);
  Py_CLEAR(clear_module_state->__pyx_codeobj__488);
  Py_CLEAR(clear_module_state->__pyx_codeobj__490);
  Py_CLEAR(clear_module_state->__pyx_codeobj__492);
  Py_CLEAR(clear_module_state->__pyx_codeobj__493);
  Py_CLEAR(clear_module_state->__pyx_codeobj__494);
  Py_CLEAR(clear_module_state->__pyx_codeobj__495);
  Py_CLEAR(clear_module_state->__pyx_codeobj__497);
  Py_CLEAR(clear_module_state->__pyx_codeobj__499);
  Py_CLEAR(clear_module_state->__pyx_codeobj__502);
  Py_CLEAR(clear_module_state->__pyx_codeobj__504);
  Py_CLEAR(clear_module_state->__pyx_codeobj__506);
  Py_CLEAR(clear_module_state->__pyx_codeobj__508);
  Py_CLEAR(clear_module_state->__pyx_codeobj__510);
  Py_CLEAR(clear_module_state->__pyx_codeobj__512);
  Py_CLEAR(clear_module_state->__pyx_codeobj__513);
  Py_CLEAR(clear_module_state->__pyx_codeobj__515);
  Py_CLEAR(clear_module_state->__pyx_codeobj__516);
  Py_CLEAR(clear_module_state->__pyx_codeobj__518);
  Py_CLEAR(clear_module_state->__pyx_codeobj__520);
  Py_CLEAR(clear_module_state->__pyx_codeobj__522);
  Py_CLEAR(clear_module_state->__pyx_codeobj__523);
  Py_CLEAR(clear_module_state->__pyx_codeobj__524);
  Py_CLEAR(clear_module_state->__pyx_codeobj__526);
  Py_CLEAR(clear_module_state->__pyx_codeobj__528);
  Py_CLEAR(clear_module_state->__pyx_codeobj__529);
  Py_CLEAR(clear_module_state->__pyx_codeobj__530);
  Py_CLEAR(clear_module_state->__pyx_codeobj__531);
  Py_CLEAR(clear_module_state->__pyx_codeobj__532);
  Py_CLEAR(clear_module_state->__pyx_codeobj__533);
  Py_CLEAR(clear_module_state->__pyx_codeobj__534);
  Py_CLEAR(clear_module_state->__pyx_codeobj__535);
  Py_CLEAR(clear_module_state->__pyx_codeobj__537);
  Py_CLEAR(clear_module_state->__pyx_codeobj__539);
  Py_CLEAR(clear_module_state->__pyx_codeobj__540);
  Py_CLEAR(clear_module_state->__pyx_codeobj__541);
  Py_CLEAR(clear_module_state->__pyx_codeobj__543);
  Py_CLEAR(clear_module_state->__pyx_codeobj__544);
  Py_CLEAR(clear_module_state->__pyx_codeobj__545);
  Py_CLEAR(clear_module_state->__pyx_codeobj__547);
  Py_CLEAR(clear_module_state->__pyx_codeobj__548);
  Py_CLEAR(clear_module_state->__pyx_codeobj__549);
  Py_CLEAR(clear_module_state->__pyx_codeobj__551);
  Py_CLEAR(clear_module_state->__pyx_codeobj__553);
  Py_CLEAR(clear_module_state->__pyx_codeobj__555);
  Py_CLEAR(clear_module_state->__pyx_codeobj__557);
  Py_CLEAR(clear_module_state->__pyx_codeobj__559);
  Py_CLEAR(clear_module_state->__pyx_codeobj__560);
  Py_CLEAR(clear_module_state->__pyx_codeobj__561);
  Py_CLEAR(clear_module_state->__pyx_codeobj__562);
  Py_CLEAR(clear_module_state->__pyx_codeobj__563);
  Py_CLEAR(clear_module_state->__pyx_codeobj__564);
  Py_CLEAR(clear_module_state->__pyx_codeobj__565);
  Py_CLEAR(clear_module_state->__pyx_codeobj__566);
  Py_CLEAR(clear_module_state->__pyx_codeobj__567);
  Py_CLEAR(clear_module_state->__pyx_codeobj__569);
  Py_CLEAR(clear_module_state->__pyx_codeobj__570);
  Py_CLEAR(clear_module_state->__pyx_codeobj__571);
  Py_CLEAR(clear_module_state->__pyx_codeobj__573);
  Py_CLEAR(clear_module_state->__pyx_codeobj__576);
  Py_CLEAR(clear_module_state->__pyx_codeobj__578);
  Py_CLEAR(clear_module_state->__pyx_codeobj__579);
  Py_CLEAR(clear_module_state->__pyx_codeobj__581);
  Py_CLEAR(clear_module_state->__pyx_codeobj__583);
  Py_CLEAR(clear_module_state->__pyx_codeobj__585);
  Py_CLEAR(clear_module_state->__pyx_codeobj__587);
  Py_CLEAR(clear_module_state->__pyx_codeobj__588);
  Py_CLEAR(clear_module_state->__pyx_codeobj__589);
  Py_CLEAR(clear_module_state->__pyx_codeobj__590);
  Py_CLEAR(clear_module_state->__pyx_codeobj__592);
  Py_CLEAR(clear_module_state->__pyx_codeobj__594);
  Py_CLEAR(clear_module_state->__pyx_codeobj__596);
  Py_CLEAR(clear_module_state->__pyx_codeobj__598);
  Py_CLEAR(clear_module_state->__pyx_codeobj__600);
  Py_CLEAR(clear_module_state->__pyx_codeobj__602);
  Py_CLEAR(clear_module_state->__pyx_codeobj__604);
  Py_CLEAR(clear_module_state->__pyx_codeobj__607);
  Py_CLEAR(clear_module_state->__pyx_codeobj__608);
  Py_CLEAR(clear_module_state->__pyx_codeobj__610);
  Py_CLEAR(clear_module_state->__pyx_codeobj__612);
  Py_CLEAR(clear_module_state->__pyx_codeobj__614);
  Py_CLEAR(clear_module_state->__pyx_codeobj__615);
  Py_CLEAR(clear_module_state->__pyx_codeobj__617);
  Py_CLEAR(clear_module_state->__pyx_codeobj__619);
  Py_CLEAR(clear_module_state->__pyx_codeobj__621);
  Py_CLEAR(clear_module_state->__pyx_codeobj__622);
  Py_CLEAR(clear_module_state->__pyx_codeobj__623);
  Py_CLEAR(clear_module_state->__pyx_codeobj__625);
  Py_CLEAR(clear_module_state->__pyx_codeobj__627);
  Py_CLEAR(clear_module_state->__pyx_codeobj__628);
  Py_CLEAR(clear_module_state->__pyx_codeobj__630);
  Py_CLEAR(clear_module_state->__pyx_codeobj__632);
  Py_CLEAR(clear_module_state->__pyx_codeobj__634);
  Py_CLEAR(clear_module_state->__pyx_codeobj__636);
  Py_CLEAR(clear_module_state->__pyx_codeobj__639);
  Py_CLEAR(clear_module_state->__pyx_codeobj__641);
  Py_CLEAR(clear_module_state->__pyx_codeobj__643);
  Py_CLEAR(clear_module_state->__pyx_codeobj__645);
  Py_CLEAR(clear_module_state->__pyx_codeobj__646);
  Py_CLEAR(clear_module_state->__pyx_codeobj__656);
  Py_CLEAR(clear_module_state->__pyx_codeobj__658);
  Py_CLEAR(clear_module_state->__pyx_codeobj__666);
  Py_CLEAR(clear_module_state->__pyx_codeobj__668);
  Py_CLEAR(clear_module_state->__pyx_codeobj__670);
  Py_CLEAR(clear_module_state->__pyx_codeobj__672);
  Py_CLEAR(clear_module_state->__pyx_codeobj__674);
  Py_CLEAR(clear_module_state->__pyx_codeobj__676);
  Py_CLEAR(clear_module_state->__pyx_codeobj__678);
  Py_CLEAR(clear_module_state->__pyx_codeobj__679);
  Py_CLEAR(clear_module_state->__pyx_codeobj__680);
  Py_CLEAR(clear_module_state->__pyx_codeobj__681);
  Py_CLEAR(clear_module_state->__pyx_codeobj__687);
  Py_CLEAR(clear_module_state->__pyx_codeobj__688);
  Py_CLEAR(clear_module_state->__pyx_codeobj__690);
  Py_CLEAR(clear_module_state->__pyx_codeobj__691);
  Py_CLEAR(clear_module_state->__pyx_codeobj__692);
  Py_CLEAR(clear_module_state->__pyx_codeobj__694);
  Py_CLEAR(clear_module_state->__pyx_codeobj__697);
  Py_CLEAR(clear_module_state->__pyx_codeobj__699);
  Py_CLEAR(clear_module_state->__pyx_codeobj__701);
  Py_CLEAR(clear_module_state->__pyx_codeobj__702);
  Py_CLEAR(clear_module_state->__pyx_codeobj__703);
  Py_CLEAR(clear_module_state->__pyx_codeobj__704);
  Py_CLEAR(clear_module_state->__pyx_codeobj__705);
  Py_CLEAR(clear_module_state->__pyx_codeobj__706);
  Py_CLEAR(clear_module_state->__pyx_codeobj__708);
  Py_CLEAR(clear_module_state->__pyx_codeobj__710);
  Py_CLEAR(clear_module_state->__pyx_codeobj__712);
  Py_CLEAR(clear_module_state->__pyx_codeobj__714);
  Py_CLEAR(clear_module_state->__pyx_codeobj__716);
  Py_CLEAR(clear_module_state->__pyx_codeobj__718);
  Py_CLEAR(clear_module_state->__pyx_codeobj__721);
  Py_CLEAR(clear_module_state->__pyx_codeobj__723);
  Py_CLEAR(clear_module_state->__pyx_codeobj__725);
  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_6SnapPy_Triangulation);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy_Triangulation);
  Py_VISIT(traverse_module_state->__pyx_ptype_6SnapPy_Manifold);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy_Manifold);
  Py_VISIT(traverse_module_state->__pyx_ptype_6SnapPy_AbelianGroup);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy_AbelianGroup);
  Py_VISIT(traverse_module_state->__pyx_ptype_6SnapPy_PresentationMatrix);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy_PresentationMatrix);
  Py_VISIT(traverse_module_state->__pyx_ptype_6SnapPy_CFundamentalGroup);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy_CFundamentalGroup);
  Py_VISIT(traverse_module_state->__pyx_ptype_6SnapPy_CHolonomyGroup);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy_CHolonomyGroup);
  Py_VISIT(traverse_module_state->__pyx_ptype_6SnapPy_SymmetryGroup);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy_SymmetryGroup);
  Py_VISIT(traverse_module_state->__pyx_ptype_6SnapPy_CDirichletDomain);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy_CDirichletDomain);
  Py_VISIT(traverse_module_state->__pyx_ptype_6SnapPy_CCuspNeighborhood);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy_CCuspNeighborhood);
  Py_VISIT(traverse_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct__genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy___pyx_scope_struct__genexpr);
  Py_VISIT(traverse_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation);
  Py_VISIT(traverse_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct_2_genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy___pyx_scope_struct_2_genexpr);
  Py_VISIT(traverse_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct_3_genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy___pyx_scope_struct_3_genexpr);
  Py_VISIT(traverse_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct_4_list_as_word);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy___pyx_scope_struct_4_list_as_word);
  Py_VISIT(traverse_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct_5_genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy___pyx_scope_struct_5_genexpr);
  Py_VISIT(traverse_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct_6_face_list);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy___pyx_scope_struct_6_face_list);
  Py_VISIT(traverse_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct_7_genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy___pyx_scope_struct_7_genexpr);
  Py_VISIT(traverse_module_state->__pyx_ptype_6SnapPy___pyx_scope_struct_8_genexpr);
  Py_VISIT(traverse_module_state->__pyx_type_6SnapPy___pyx_scope_struct_8_genexpr);
  Py_VISIT(traverse_module_state->__pyx_kp_b_);
  Py_VISIT(traverse_module_state->__pyx_kp_s_);
  Py_VISIT(traverse_module_state->__pyx_kp_s_0);
  Py_VISIT(traverse_module_state->__pyx_kp_s_0_0);
  Py_VISIT(traverse_module_state->__pyx_kp_s_0_9_0_9);
  Py_VISIT(traverse_module_state->__pyx_kp_s_1);
  Py_VISIT(traverse_module_state->__pyx_kp_s_12n123);
  Py_VISIT(traverse_module_state->__pyx_kp_s_16_14f_I);
  Py_VISIT(traverse_module_state->__pyx_kp_s_16n1235);
  Py_VISIT(traverse_module_state->__pyx_kp_s_17_14f);
  Py_VISIT(traverse_module_state->__pyx_kp_s_18f);
  Py_VISIT(traverse_module_state->__pyx_kp_s_2_3_move);
  Py_VISIT(traverse_module_state->__pyx_kp_s_3_2_move);
  Py_VISIT(traverse_module_state->__pyx_kp_s_3d_s_curve_of_length_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_4s_40s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_5_2_1_3_4_1_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_6_1);
  Py_VISIT(traverse_module_state->__pyx_kp_s_6s_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_8_3_3);
  Py_VISIT(traverse_module_state->__pyx_n_s_A);
  Py_VISIT(traverse_module_state->__pyx_kp_s_A_CuspNeighborhood_object_repre);
  Py_VISIT(traverse_module_state->__pyx_kp_s_A_DirichletDomain_object_repres);
  Py_VISIT(traverse_module_state->__pyx_kp_s_A_FundamentalGroup_represents_a);
  Py_VISIT(traverse_module_state->__pyx_kp_s_A_FundamentalGroup_represents_a_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_A_non_existent_shape_data_type_w);
  Py_VISIT(traverse_module_state->__pyx_kp_s_A_s_is_specified_by_a_string_or);
  Py_VISIT(traverse_module_state->__pyx_n_s_AbelianGroup);
  Py_VISIT(traverse_module_state->__pyx_n_s_AbelianGroup___reduce);
  Py_VISIT(traverse_module_state->__pyx_kp_u_AbelianGroup___reduce___line_80);
  Py_VISIT(traverse_module_state->__pyx_n_s_AbelianGroup_betti_number);
  Py_VISIT(traverse_module_state->__pyx_n_s_AbelianGroup_elementary_divisors);
  Py_VISIT(traverse_module_state->__pyx_n_s_AbelianGroup_order);
  Py_VISIT(traverse_module_state->__pyx_n_s_AbelianGroup_rank);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Acceptable_cusp_types_are_all_or);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Add_a_possibly_degenerate_hyper);
  Py_VISIT(traverse_module_state->__pyx_kp_s_All_Dehn_filling_coefficients_mu);
  Py_VISIT(traverse_module_state->__pyx_kp_s_All_cusps_must_be_fillable);
  Py_VISIT(traverse_module_state->__pyx_kp_s_All_files);
  Py_VISIT(traverse_module_state->__pyx_kp_s_All_text_files);
  Py_VISIT(traverse_module_state->__pyx_n_s_Alphabet);
  Py_VISIT(traverse_module_state->__pyx_n_s_AlternatingKnotExteriors);
  Py_VISIT(traverse_module_state->__pyx_n_s_Alternating_numbers);
  Py_VISIT(traverse_module_state->__pyx_n_s_Alternating_offsets);
  Py_VISIT(traverse_module_state->__pyx_n_s_Alternating_table);
  Py_VISIT(traverse_module_state->__pyx_kp_s_An_empty_triangulation_was_gener);
  Py_VISIT(traverse_module_state->__pyx_n_s_AssertionError);
  Py_VISIT(traverse_module_state->__pyx_n_s_AttributeError);
  Py_VISIT(traverse_module_state->__pyx_n_s_B);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Base_class_for_Iterators_Sequen);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Base_class_for_Iterators_Sequen_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Base_class_for_manifold_Iterato);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Bb_raid_0_9);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Braid);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Braid_1_2_1_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Braids_must_have_at_least_2_stra);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Brings_up_a_link_editor_window);
  Py_VISIT(traverse_module_state->__pyx_n_s_Browser);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Browser_not_imported_Tk_CyOpenGL);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Bundle_S__1_1_a0_B1);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Bundle_S__d_d);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Byte_encoding_requires_complete);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_Ford_domain);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood___reduce_cytho);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood___setstate_cyt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood__number);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_check_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_get_displaceme);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_get_tie);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_horoballs);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_manifold);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_max_reach);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_num_cusps);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_original_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_reach);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_set_displaceme);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_set_tie);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_stopper);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_stopping_displ);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_topology);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_translations);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_triangulation);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_view);
  Py_VISIT(traverse_module_state->__pyx_kp_u_CCuspNeighborhood_view_line_289);
  Py_VISIT(traverse_module_state->__pyx_n_s_CCuspNeighborhood_volume);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain___reduce_ex);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain__edge_to_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain__number);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain__to_string);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain__vertex_data_li);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain__vertex_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain__vertex_to_inde);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_edge_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_export_stl);
  Py_VISIT(traverse_module_state->__pyx_kp_u_CDirichletDomain_export_stl_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_face_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_in_radius);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_length_spectrum);
  Py_VISIT(traverse_module_state->__pyx_kp_u_CDirichletDomain_length_spectrum_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_manifold);
  Py_VISIT(traverse_module_state->__pyx_kp_u_CDirichletDomain_manifold_line_5);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_num_edges);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_num_faces);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_num_finite_vert);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_num_ideal_verti);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_num_vertices);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_out_radius);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_pairing_matrice);
  Py_VISIT(traverse_module_state->__pyx_kp_u_CDirichletDomain_pairing_matrice_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_pairing_words);
  Py_VISIT(traverse_module_state->__pyx_kp_u_CDirichletDomain_pairing_words_l);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_save);
  Py_VISIT(traverse_module_state->__pyx_kp_u_CDirichletDomain_save_line_643);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_spine_radius);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_triangulation);
  Py_VISIT(traverse_module_state->__pyx_kp_u_CDirichletDomain_triangulation_l);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_vertex_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_view);
  Py_VISIT(traverse_module_state->__pyx_n_s_CDirichletDomain_volume);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup___reduce_cytho);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup___setstate_cyt);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup__gap_init);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup__magma_init);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup__word_moves);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup_character_vari);
  Py_VISIT(traverse_module_state->__pyx_kp_u_CFundamentalGroup_character_vari_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup_gap_string);
  Py_VISIT(traverse_module_state->__pyx_kp_u_CFundamentalGroup_gap_string_lin);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup_generators);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup_generators_in);
  Py_VISIT(traverse_module_state->__pyx_kp_u_CFundamentalGroup_generators_in_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_CFundamentalGroup_generators_lin);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup_longitude);
  Py_VISIT(traverse_module_state->__pyx_kp_u_CFundamentalGroup_longitude_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup_magma_string);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup_meridian);
  Py_VISIT(traverse_module_state->__pyx_kp_u_CFundamentalGroup_meridian_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup_num_generators);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup_num_original_g);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup_num_relators);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup_original_gener);
  Py_VISIT(traverse_module_state->__pyx_kp_u_CFundamentalGroup_original_gener_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup_peripheral_cur);
  Py_VISIT(traverse_module_state->__pyx_kp_u_CFundamentalGroup_peripheral_cur_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup_relators);
  Py_VISIT(traverse_module_state->__pyx_n_s_CFundamentalGroup_sage);
  Py_VISIT(traverse_module_state->__pyx_n_s_CHolonomyGroup);
  Py_VISIT(traverse_module_state->__pyx_n_s_CHolonomyGroup_O31);
  Py_VISIT(traverse_module_state->__pyx_n_s_CHolonomyGroup_SL2C);
  Py_VISIT(traverse_module_state->__pyx_n_s_CHolonomyGroup___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_CHolonomyGroup___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_CHolonomyGroup__matrices);
  Py_VISIT(traverse_module_state->__pyx_n_s_CHolonomyGroup_complex_length);
  Py_VISIT(traverse_module_state->__pyx_kp_s_CallFuncList_function_local_F_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Can_t_compare_triangulations_of);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Can_t_get_the_list_of_isometries);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_convert_s_to_a_Real);
  Py_VISIT(traverse_module_state->__pyx_n_s_Census);
  Py_VISIT(traverse_module_state->__pyx_kp_s_CensusKnots_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_CensusKnots_tgz);
  Py_VISIT(traverse_module_state->__pyx_n_s_Census_Knots);
  Py_VISIT(traverse_module_state->__pyx_n_s_Census_Morwen8);
  Py_VISIT(traverse_module_state->__pyx_n_s_Census___contains);
  Py_VISIT(traverse_module_state->__pyx_n_s_Census___getitem);
  Py_VISIT(traverse_module_state->__pyx_n_s_Census___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_Census___iter);
  Py_VISIT(traverse_module_state->__pyx_n_s_Census___len);
  Py_VISIT(traverse_module_state->__pyx_n_s_Census_next);
  Py_VISIT(traverse_module_state->__pyx_n_s_CertifiedShapesEngine);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Change_the_triangulation_to_an);
  Py_VISIT(traverse_module_state->__pyx_n_s_ChristyLinks);
  Py_VISIT(traverse_module_state->__pyx_kp_s_ChristyLinks_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_ChristyLinks_tgz);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Christy_census_of_s_component_li);
  Py_VISIT(traverse_module_state->__pyx_n_s_Christy_links);
  Py_VISIT(traverse_module_state->__pyx_n_s_ClosedCensusData);
  Py_VISIT(traverse_module_state->__pyx_kp_s_ClosedNonorientableDistinct_txt);
  Py_VISIT(traverse_module_state->__pyx_kp_s_ClosedOrientableDistinct_txt);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Communication_with_PLink_failed);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Constructs_a_reasonable_selecti);
  Py_VISIT(traverse_module_state->__pyx_n_s_CosetAction);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Could_not_allocate_a_crossing_ta);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Could_not_certify_shape_interval);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Could_not_create_the_triangulati);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Cover_degree_should_be_at_least);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Create_a_3D_picture_of_the_horo);
  Py_VISIT(traverse_module_state->__pyx_n_s_CuspInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_CuspInfo___repr);
  Py_VISIT(traverse_module_state->__pyx_n_s_CuspNeighborhood);
  Py_VISIT(traverse_module_state->__pyx_n_s_CuspTopology);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Cusp_2d_complete_s_of_shape_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Cusp_2d_s_not_filled);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Cusp_2d_s_with_Dehn_filling_coef);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Cusp_Neighborhood_with_d_cusp_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Cusp_neighborhood_s_of_s);
  Py_VISIT(traverse_module_state->__pyx_n_s_CuspedCensus);
  Py_VISIT(traverse_module_state->__pyx_n_s_CuspedCensus___getitem);
  Py_VISIT(traverse_module_state->__pyx_n_s_CuspedCensus___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_CuspedCensus_lookup);
  Py_VISIT(traverse_module_state->__pyx_n_s_D);
  Py_VISIT(traverse_module_state->__pyx_kp_s_DT);
  Py_VISIT(traverse_module_state->__pyx_kp_s_DT_0_9_01);
  Py_VISIT(traverse_module_state->__pyx_kp_s_DT_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DT_3);
  Py_VISIT(traverse_module_state->__pyx_kp_s_DT_4_6_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_DT_a_zA_Z_01);
  Py_VISIT(traverse_module_state->__pyx_n_s_DT_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_DT_codes);
  Py_VISIT(traverse_module_state->__pyx_kp_s_DT_s);
  Py_VISIT(traverse_module_state->__pyx_n_s_DTcodec);
  Py_VISIT(traverse_module_state->__pyx_kp_s_D_d);
  Py_VISIT(traverse_module_state->__pyx_n_s_DirichletDomain);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Dirichlet_Domain_of);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Does_not_extend_to_link);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Drills_out_the_specified_dual_c);
  Py_VISIT(traverse_module_state->__pyx_n_s_DualCurveInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_DualCurveInfo___repr);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Each_cusp_has_a_preferred_marki);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Elementary_divisors_must_be_give);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Elementary_divisors_must_be_non);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Empty_Triangulation);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Equations_are_available_in_log_a);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Export_the_Dirichlet_domain_as);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Extend_the_Neumann_Zagier_Matri);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Extends_to_link);
  Py_VISIT(traverse_module_state->__pyx_n_s_F);
  Py_VISIT(traverse_module_state->__pyx_n_s_FactorCosetAction);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Failed_to_allocate_memory_for_cu);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Failed_to_allocate_memory_for_te);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Failed_to_construct_permutation);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Fill_an_empty_manifold_from_a_b);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Fill_an_empty_triangulation_fro);
  Py_VISIT(traverse_module_state->__pyx_kp_u_For_a_Triangulation_that_descri);
  Py_VISIT(traverse_module_state->__pyx_kp_u_For_a_non_orientable_Triangulat);
  Py_VISIT(traverse_module_state->__pyx_n_s_Ford_domain);
  Py_VISIT(traverse_module_state->__pyx_n_s_FormatHomForSnapPea);
  Py_VISIT(traverse_module_state->__pyx_kp_s_FormatHomForSnapPea_function_f);
  Py_VISIT(traverse_module_state->__pyx_n_s_FreeGroup);
  Py_VISIT(traverse_module_state->__pyx_n_s_FuncResult);
  Py_VISIT(traverse_module_state->__pyx_n_s_FundamentalGroup);
  Py_VISIT(traverse_module_state->__pyx_n_s_G);
  Py_VISIT(traverse_module_state->__pyx_n_s_GG);
  Py_VISIT(traverse_module_state->__pyx_n_s_GapElement);
  Py_VISIT(traverse_module_state->__pyx_kp_b_Generators);
  Py_VISIT(traverse_module_state->__pyx_n_s_GeneratorsOfGroup);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Generators_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Generators_s_Relators_s);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Give_the_triangulation_a_new_na);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Gives_the_shapes_of_the_tetrahe);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Got_the_empty_link_from_PLink_a);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Group);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Group_elements_which_pair_the_f);
  Py_VISIT(traverse_module_state->__pyx_n_s_GrpFP);
  Py_VISIT(traverse_module_state->__pyx_n_s_GrpPerm);
  Py_VISIT(traverse_module_state->__pyx_n_s_H);
  Py_VISIT(traverse_module_state->__pyx_n_s_HTLinkExteriors);
  Py_VISIT(traverse_module_state->__pyx_n_s_HTWKnots);
  Py_VISIT(traverse_module_state->__pyx_kp_s_High_precision_shapes_must_be_co);
  Py_VISIT(traverse_module_state->__pyx_n_s_HolonomyGroup);
  Py_VISIT(traverse_module_state->__pyx_n_s_HolonomyGroup__number);
  Py_VISIT(traverse_module_state->__pyx_n_s_HomGrp);
  Py_VISIT(traverse_module_state->__pyx_n_s_HoroballViewer);
  Py_VISIT(traverse_module_state->__pyx_n_s_I);
  Py_VISIT(traverse_module_state->__pyx_n_s_IOError);
  Py_VISIT(traverse_module_state->__pyx_kp_u_If_the_SymmetryGroup_is_a_nontr);
  Py_VISIT(traverse_module_state->__pyx_kp_u_If_the_manifold_is_the_compleme);
  Py_VISIT(traverse_module_state->__pyx_kp_u_If_the_symmetry_group_is_abelia);
  Py_VISIT(traverse_module_state->__pyx_kp_s_If_there_is_more_than_one_cusp_y);
  Py_VISIT(traverse_module_state->__pyx_kp_u_If_this_triangulation_is_a_subd);
  Py_VISIT(traverse_module_state->__pyx_n_s_Image);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Immutable_dictionary_whose_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_ImportError);
  Py_VISIT(traverse_module_state->__pyx_kp_u_In_the_default_mode_this_functi);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
  Py_VISIT(traverse_module_state->__pyx_n_s_Index);
  Py_VISIT(traverse_module_state->__pyx_n_s_IndexError);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Index_is_out_of_range);
  Py_VISIT(traverse_module_state->__pyx_n_s_Info);
  Py_VISIT(traverse_module_state->__pyx_n_s_Info___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_Info__immutable);
  Py_VISIT(traverse_module_state->__pyx_n_s_Info_keys);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Info_objects_are_immutable);
  Py_VISIT(traverse_module_state->__pyx_n_s_Integer);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Invalid_generator_status);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Invalid_permutation_data);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Invalid_pickle_byte_sequence);
  Py_VISIT(traverse_module_state->__pyx_n_s_IsSubgroupFpGroup);
  Py_VISIT(traverse_module_state->__pyx_n_s_IsToPermGroupHomomorphismByImage);
  Py_VISIT(traverse_module_state->__pyx_n_s_Isometry);
  Py_VISIT(traverse_module_state->__pyx_n_s_Isometry___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_Isometry___repr);
  Py_VISIT(traverse_module_state->__pyx_n_s_Isometry_cusp_images);
  Py_VISIT(traverse_module_state->__pyx_n_s_Isometry_cusp_maps);
  Py_VISIT(traverse_module_state->__pyx_n_s_Isometry_extends_to_link);
  Py_VISIT(traverse_module_state->__pyx_n_s_Isometry_num_cusps);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Iterator_Sequence_for_Alternati);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Iterator_Sequence_for_nonAltern);
  Py_VISIT(traverse_module_state->__pyx_n_s_K7_1);
  Py_VISIT(traverse_module_state->__pyx_n_s_KLPProjection);
  Py_VISIT(traverse_module_state->__pyx_kp_s_K_s__s);
  Py_VISIT(traverse_module_state->__pyx_n_s_KeyError);
  Py_VISIT(traverse_module_state->__pyx_n_s_Klein);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Klein_bottle_cusp);
  Py_VISIT(traverse_module_state->__pyx_n_s_KnotExteriors);
  Py_VISIT(traverse_module_state->__pyx_n_s_KnotExteriors___getitem);
  Py_VISIT(traverse_module_state->__pyx_n_s_KnotExteriors___init);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Knots_in_S_3_which_appear_in_the);
  Py_VISIT(traverse_module_state->__pyx_n_s_L);
  Py_VISIT(traverse_module_state->__pyx_n_s_L104001);
  Py_VISIT(traverse_module_state->__pyx_n_s_L13n9331);
  Py_VISIT(traverse_module_state->__pyx_kp_s_L13n9331_3_4_2_3_2_1);
  Py_VISIT(traverse_module_state->__pyx_n_s_LE);
  Py_VISIT(traverse_module_state->__pyx_kp_s_L_d_2d_3d);
  Py_VISIT(traverse_module_state->__pyx_n_s_LengthSpectrum);
  Py_VISIT(traverse_module_state->__pyx_n_s_LengthSpectrumFormatString);
  Py_VISIT(traverse_module_state->__pyx_n_s_LengthSpectrumFormatStringBase);
  Py_VISIT(traverse_module_state->__pyx_n_s_LengthSpectrumFormatStringWithWo);
  Py_VISIT(traverse_module_state->__pyx_n_s_LengthSpectrumInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_LengthSpectrumInfo___repr);
  Py_VISIT(traverse_module_state->__pyx_n_s_LengthSpectrum___repr);
  Py_VISIT(traverse_module_state->__pyx_n_s_Link);
  Py_VISIT(traverse_module_state->__pyx_n_s_LinkEditor);
  Py_VISIT(traverse_module_state->__pyx_n_s_LinkExteriors);
  Py_VISIT(traverse_module_state->__pyx_n_s_LinkManager);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Link_Projection);
  Py_VISIT(traverse_module_state->__pyx_n_s_ListOnePerLine);
  Py_VISIT(traverse_module_state->__pyx_n_s_ListOnePerLine___repr);
  Py_VISIT(traverse_module_state->__pyx_n_s_LowIndexSubgroups);
  Py_VISIT(traverse_module_state->__pyx_n_s_LowIndexSubgroupsFpGroup);
  Py_VISIT(traverse_module_state->__pyx_n_s_M);
  Py_VISIT(traverse_module_state->__pyx_n_s_M0);
  Py_VISIT(traverse_module_state->__pyx_n_s_M1);
  Py_VISIT(traverse_module_state->__pyx_n_s_MTLinks);
  Py_VISIT(traverse_module_state->__pyx_kp_u_M_cover_permutation_rep_Returns);
  Py_VISIT(traverse_module_state->__pyx_kp_u_M_covers_degree_method_None_cov);
  Py_VISIT(traverse_module_state->__pyx_kp_u_M_covers_degree_method_None_cov_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_M_gluing_equations_pgl_N_2_equa);
  Py_VISIT(traverse_module_state->__pyx_kp_u_M_ptolemy_generalized_obstructi);
  Py_VISIT(traverse_module_state->__pyx_kp_u_M_ptolemy_variety_N_obstruction);
  Py_VISIT(traverse_module_state->__pyx_n_s_MagmaElement);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold__canonical_cells_are_te);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold__canonical_cells_are_te_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold__canonical_retriangulat);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold__canonical_retriangulat_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold__choose_generators);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold__choose_generators_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold__complex_volume);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold__cusp_cross_section_inf);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold__from_bytes);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold__from_bytes_line_272);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold__from_isosig);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold__from_string);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold__from_string_line_256);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold__get_tetrahedra_shapes);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold__identify);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold__number);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold__polish_hyperbolic_stru);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_browse);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_browse_line_375);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_canonize);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_canonize_line_145);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_chern_simons);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_chern_simons_line_807);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_copy);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_copy_line_297);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_cover);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_cover_line_535);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_covers);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_covers_line_607);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_cusp_info);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_cusp_info_line_1108);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_cusp_neighborhood);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_cusp_neighborhood_line);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Manifold_dehn_fill);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_dehn_fill_line_1231);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_dirichlet_domain);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_dirichlet_domain_line_3);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_drill);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_drill_line_1485);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_dual_curves);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_dual_curves_line_1383);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_filled_triangulation);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_filled_triangulation_li);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_from_Triangulation);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_fundamental_group);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_fundamental_group_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_init_hyperbolic_structu);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_is_isometric_to);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_is_isometric_to_line_15);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_is_two_bridge);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_is_two_bridge_line_1616);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_length_spectrum);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_length_spectrum_line_14);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Manifold_must_be_pickled_with__t);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Manifold_set_peripheral_curves);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_set_peripheral_curves_l);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_set_target_holonomy);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Manifold_set_tetrahedra_shapes);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_solution_type);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_solution_type_line_1048);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_split);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_split_line_1736);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_splitting_surfaces);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_splitting_surfaces_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_symmetric_triangulation);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_symmetric_triangulation_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_symmetry_group);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_tetrahedra_shapes);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_tetrahedra_shapes_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_use_field_conversion);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_volume);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_volume_line_714);
  Py_VISIT(traverse_module_state->__pyx_n_s_Manifold_without_hyperbolic_stru);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Manifold_without_hyperbolic_stru_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Manifolds_must_be_non_empty);
  Py_VISIT(traverse_module_state->__pyx_n_s_MatrixParity);
  Py_VISIT(traverse_module_state->__pyx_n_s_MatrixWithExplanations);
  Py_VISIT(traverse_module_state->__pyx_n_s_MatrixWithExplanations___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_MatrixWithExplanations___repr);
  Py_VISIT(traverse_module_state->__pyx_n_s_MatrixWithExplanations___repr_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_MorwenLinks);
  Py_VISIT(traverse_module_state->__pyx_n_s_MorwenLinks___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_MsgIO);
  Py_VISIT(traverse_module_state->__pyx_n_s_MsgIO___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_N);
  Py_VISIT(traverse_module_state->__pyx_kp_s_N_has_to_be_2_15);
  Py_VISIT(traverse_module_state->__pyx_n_s_NeumannZagierTypeEquations);
  Py_VISIT(traverse_module_state->__pyx_n_s_NeumannZagierTypeEquations___ini);
  Py_VISIT(traverse_module_state->__pyx_n_s_NeumannZagierTypeEquations___rep);
  Py_VISIT(traverse_module_state->__pyx_kp_s_New_triangulation_received_from);
  Py_VISIT(traverse_module_state->__pyx_kp_s_No_associated_link_known);
  Py_VISIT(traverse_module_state->__pyx_kp_s_No_tetrahedra_data_provided);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Non_orientable);
  Py_VISIT(traverse_module_state->__pyx_n_s_NonalternatingKnotExteriors);
  Py_VISIT(traverse_module_state->__pyx_n_s_NonalternatingKnotExteriors___in);
  Py_VISIT(traverse_module_state->__pyx_n_s_Nonalternating_numbers);
  Py_VISIT(traverse_module_state->__pyx_n_s_Nonalternating_offsets);
  Py_VISIT(traverse_module_state->__pyx_n_s_Nonalternating_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_Nonorientable_lengths);
  Py_VISIT(traverse_module_state->__pyx_n_s_NormalSurfaceInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_NormalSurfaceInfo___repr);
  Py_VISIT(traverse_module_state->__pyx_n_s_NotImplemented);
  Py_VISIT(traverse_module_state->__pyx_n_s_NotImplementedError);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Not_a_valid_permutation);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Not_within_Sage);
  Py_VISIT(traverse_module_state->__pyx_n_s_Num_Alternating);
  Py_VISIT(traverse_module_state->__pyx_n_s_Num_Nonalternating);
  Py_VISIT(traverse_module_state->__pyx_n_s_Number);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Number_of_opacities_does_not_mat);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Number_of_permutations_is_not_th);
  Py_VISIT(traverse_module_state->__pyx_n_s_O);
  Py_VISIT(traverse_module_state->__pyx_n_s_O31);
  Py_VISIT(traverse_module_state->__pyx_n_s_O31_generators);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsCensusKnots);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsCensusKnots___getitem);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsCensusKnots___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsCensusKnots___repr);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsLinkExteriors);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsLinkExteriors___getitem);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsLinkExteriors___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsLinkExteriors___repr);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsMorwenLinks);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsMorwenLinks___getitem);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsMorwenLinks___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsNonorientableClosedCensus);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsNonorientableClosedCensus___g);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsNonorientableClosedCensus___i);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsNonorientableCuspedCensus);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsNonorientableCuspedCensus___i);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsNonorientableCuspedCensus_loo);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsOrientableClosedCensus);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsOrientableClosedCensus___geti);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsOrientableClosedCensus___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_ObsOrientableCuspedCensus);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Obsolete);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Obsolete_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Obstruction_class_has_wrong_leng);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Opens_browser_window_with_a_gra);
  Py_VISIT(traverse_module_state->__pyx_n_s_Orbifold1);
  Py_VISIT(traverse_module_state->__pyx_n_s_Orientability);
  Py_VISIT(traverse_module_state->__pyx_n_s_Orientable);
  Py_VISIT(traverse_module_state->__pyx_n_s_Orientable_lengths);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Out_of_memory);
  Py_VISIT(traverse_module_state->__pyx_n_s_PD_code);
  Py_VISIT(traverse_module_state->__pyx_kp_s_PLink_was_not_imported);
  Py_VISIT(traverse_module_state->__pyx_kp_s_P_crossings_0_9_P_alternation_a);
  Py_VISIT(traverse_module_state->__pyx_kp_s_P_crossings_0_9_P_components_0);
  Py_VISIT(traverse_module_state->__pyx_kp_s_P_crossings_0_9___P_index_0_9_P);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Perform_random_Pachner_moves_on);
  Py_VISIT(traverse_module_state->__pyx_n_s_PermutationGroup);
  Py_VISIT(traverse_module_state->__pyx_n_s_PickleError);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Please_specify_a_file_name);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Please_specify_filled_or_complet);
  Py_VISIT(traverse_module_state->__pyx_n_s_PolyhedronViewer);
  Py_VISIT(traverse_module_state->__pyx_n_s_PreImage);
  Py_VISIT(traverse_module_state->__pyx_n_s_PresentationMatrix);
  Py_VISIT(traverse_module_state->__pyx_n_s_PresentationMatrix___reduce_cyth);
  Py_VISIT(traverse_module_state->__pyx_n_s_PresentationMatrix___setstate_cy);
  Py_VISIT(traverse_module_state->__pyx_n_s_PresentationMatrix_add_rows);
  Py_VISIT(traverse_module_state->__pyx_n_s_PresentationMatrix_explode);
  Py_VISIT(traverse_module_state->__pyx_n_s_PresentationMatrix_get_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_PresentationMatrix_row_op);
  Py_VISIT(traverse_module_state->__pyx_n_s_PresentationMatrix_simplified_ma);
  Py_VISIT(traverse_module_state->__pyx_n_s_PresentationMatrix_simplify);
  Py_VISIT(traverse_module_state->__pyx_n_s_Q);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Q_s_A_s);
  Py_VISIT(traverse_module_state->__pyx_n_s_R);
  Py_VISIT(traverse_module_state->__pyx_n_s_RawNumber);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Removing_any_finite_vertices_by);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Represents_an_isometry_from_one);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Result_is_symplectic_up_to_facto);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_a_HolonomyGroup_represen);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_a_detailed_list_of_all_t);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_a_list_of_info_objects_d);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_a_new_Manifold_where_the);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_a_new_manifold_where_the);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_a_reasonably_short_byte);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_a_string_containing_the);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_the_Dowker_Thistlethwait);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_the_abelianization_of_th);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_the_center_of_the_symmet);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_the_commutator_subgroup);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_the_current_generators_i);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_the_letters_representing);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_the_name_of_the_triangul);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_the_number_of_tetrahedra);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_the_order_of_the_symmetr);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_the_original_geometric_g);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_the_total_number_of_cusp);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_whether_a_one_cusped_has);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_whether_the_SymmetryGrou);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_whether_the_full_symmetr);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_whether_the_manifold_has);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_whether_the_symmetry_gro);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_whether_the_symmetry_gro_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Return_whether_the_underlying_3);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_True_if_M_and_N_are_iso);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_True_if_and_only_if_the);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_True_if_and_only_if_the_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_Dehn_filling_descript);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_DirichletDomain_objec);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_FundamentalGroup_obje);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_Manifold_computed_dir);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_Triangulation_compute);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_Triangulation_represe);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_compact_text_represen);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_complete_list_of_comb);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_copy_of_the_manifold);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_copy_of_the_triangula);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_dictionary_whose_keys);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_list_of_geodesics_wit);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_list_of_meridian_long);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_list_of_the_O31Matric);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_list_of_variables_and);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_string_which_will_def);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_word_representing_a_c);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_a_word_representing_a_c_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_an_AbelianGroup_represe);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_an_info_object_containi);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_an_info_object_containi_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_information_about_the_c);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_self_as_a_Triangulation);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_the_Chern_Simons_invari);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_the_number_of_fake_cusp);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_the_obstruction_classes);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_the_product_of_group_el);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_the_type_of_the_current);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Returns_the_volume_of_the_curre);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Reverses_the_orientation_of_the);
  Py_VISIT(traverse_module_state->__pyx_n_s_RuntimeError);
  Py_VISIT(traverse_module_state->__pyx_n_s_S5);
  Py_VISIT(traverse_module_state->__pyx_n_s_SC);
  Py_VISIT(traverse_module_state->__pyx_n_s_SL2C);
  Py_VISIT(traverse_module_state->__pyx_n_s_SNAPPEA_MANIFOLD_DIRECTORY);
  Py_VISIT(traverse_module_state->__pyx_n_s_SageNotAvailable);
  Py_VISIT(traverse_module_state->__pyx_n_s_SageObject);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Save_Triangulation);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Save_the_Dirichlet_domain_as_a);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Save_the_triangulation_as_a_Sna);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Searches_for_connected_closed_n);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Send_to_SnapPy);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Set_the_Dehn_filling_coefficien);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Set_the_Dehn_filling_coefficien_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_ShapeInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_ShapeInfo___repr);
  Py_VISIT(traverse_module_state->__pyx_n_s_ShortMatrixParity);
  Py_VISIT(traverse_module_state->__pyx_n_s_SnapPeaFatalError);
  Py_VISIT(traverse_module_state->__pyx_n_s_SnapPea_KLPProjection);
  Py_VISIT(traverse_module_state->__pyx_kp_s_SnapPea_crashed_in_function_s_de);
  Py_VISIT(traverse_module_state->__pyx_kp_s_SnapPea_failed_to_compute_any_pa);
  Py_VISIT(traverse_module_state->__pyx_kp_s_SnapPea_failed_to_find_the_canon);
  Py_VISIT(traverse_module_state->__pyx_kp_s_SnapPea_failed_to_read_the_censu);
  Py_VISIT(traverse_module_state->__pyx_n_s_SnapPea_interrupt);
  Py_VISIT(traverse_module_state->__pyx_kp_s_SnapPea_kernel_failed_when_compu);
  Py_VISIT(traverse_module_state->__pyx_kp_s_SnapPea_kernel_failed_when_compu_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_SnapPea_kernel_failed_when_split);
  Py_VISIT(traverse_module_state->__pyx_kp_s_SnapPea_kernel_style_estimation);
  Py_VISIT(traverse_module_state->__pyx_kp_s_SnapPea_only_found_d_surfaces_bu);
  Py_VISIT(traverse_module_state->__pyx_n_s_SnapPy);
  Py_VISIT(traverse_module_state->__pyx_n_s_SnapPyCache);
  Py_VISIT(traverse_module_state->__pyx_kp_s_SnapPy_has_no_data_on_links_with);
  Py_VISIT(traverse_module_state->__pyx_n_s_SolutionType);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Solution_type_is_s);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Split_the_manifold_open_along_a);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Splitting_S__1_0_b1_A0_a0_B1);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Splitting_S__d_d);
  Py_VISIT(traverse_module_state->__pyx_n_s_Stabilizer);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Starting_the_link_editor_Select);
  Py_VISIT(traverse_module_state->__pyx_n_s_StopIteration);
  Py_VISIT(traverse_module_state->__pyx_n_s_StrLongestLen);
  Py_VISIT(traverse_module_state->__pyx_n_s_StrLongestLen_locals_genexpr);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Supply_a_manifold_or_generators);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Supported_cover_types_are_all_an);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Supported_methods_are_low_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_Surface);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup___reduce_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup___setstate_cython);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup_abelian_descriptio);
  Py_VISIT(traverse_module_state->__pyx_kp_u_SymmetryGroup_abelian_descriptio_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup_abelianization);
  Py_VISIT(traverse_module_state->__pyx_kp_u_SymmetryGroup_abelianization_lin);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup_center);
  Py_VISIT(traverse_module_state->__pyx_kp_u_SymmetryGroup_center_line_256);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup_commutator_subgrou);
  Py_VISIT(traverse_module_state->__pyx_kp_u_SymmetryGroup_commutator_subgrou_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup_direct_product_des);
  Py_VISIT(traverse_module_state->__pyx_kp_u_SymmetryGroup_direct_product_des_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup_is_S5);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup_is_abelian);
  Py_VISIT(traverse_module_state->__pyx_kp_u_SymmetryGroup_is_abelian_line_72);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup_is_amphicheiral);
  Py_VISIT(traverse_module_state->__pyx_kp_u_SymmetryGroup_is_amphicheiral_li);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup_is_dihedral);
  Py_VISIT(traverse_module_state->__pyx_kp_u_SymmetryGroup_is_dihedral_line_1);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup_is_direct_product);
  Py_VISIT(traverse_module_state->__pyx_kp_u_SymmetryGroup_is_direct_product_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup_is_full_group);
  Py_VISIT(traverse_module_state->__pyx_kp_u_SymmetryGroup_is_full_group_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup_is_invertible_knot);
  Py_VISIT(traverse_module_state->__pyx_kp_u_SymmetryGroup_is_invertible_knot_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup_is_polyhedral);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup_isometries);
  Py_VISIT(traverse_module_state->__pyx_kp_u_SymmetryGroup_isometries_line_29);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup_multiply_elements);
  Py_VISIT(traverse_module_state->__pyx_kp_u_SymmetryGroup_multiply_elements_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup_order);
  Py_VISIT(traverse_module_state->__pyx_kp_u_SymmetryGroup_order_line_62);
  Py_VISIT(traverse_module_state->__pyx_n_s_SymmetryGroup_polyhedral_descrip);
  Py_VISIT(traverse_module_state->__pyx_n_s_T);
  Py_VISIT(traverse_module_state->__pyx_n_s_TEXT);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Tetrahedra_data_appears_invalid);
  Py_VISIT(traverse_module_state->__pyx_kp_s_That_Magma_type_not_recognized);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_Chern_Simons_invariant_isn_t);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_Dehn_filling_coefficients_mu);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_Dirichlet_Domain_was_compute);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_Dirichlet_Domain_was_not_com);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_Dirichlet_construction_faile);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_Dirichlet_domain_could_not_b);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_Ford_domain_construction_fai);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_HoroballViewer_class_was_not);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_Manifold_is_not_orientable_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_MorwenLinks_class_has_been_r);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_Morwen_8_tetrahedra_manifold);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_PolyhedronViewer_class_was_n);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_SnapPea_kernel_couldn_t_comp);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_SnapPea_kernel_was_not_able);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_Triangulation_is_already_ori);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_Triangulation_is_empty);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_Triangulation_is_empty_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_Triangulation_must_be_empty);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_amount_of_data_given_is_not);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_braid_word_is_invalid);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_census_knot_s_was_not_found);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_curve_is_not_isotopic_to_a_g);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_cusp_neighborhood_constructi);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_data_given_do_not_have_the_r);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_data_provided_are_invalid_fo);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_data_provided_does_not_give);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_data_provided_does_not_give_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_drilling_curve_requested_is);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_elementary_divisors_must_for);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_empty_triangulation_has_no_n);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_full_symmetry_group_is_not_k);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_full_symmetry_group_not_know);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_generator_data_does_not_star);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_homomorphism_image_is_not_a);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_horoball_construction_failed);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_link_complement_s_was_not_fo);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_manifold_file_s_was_not_foun);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_method_must_be_fold_or_layer);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_number_of_fillings_specified);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_peripheral_data_d_d_d_d_is_n);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_peripheral_data_s_is_not_acc);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_permutation_list_is_invalid);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_solution_type_is_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_specified_cusp_s_does_not_ex);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_specified_edge_index_s_is_in);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_specified_face_index_s_is_in);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_specified_indices_to_be_fill);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_specified_tetrahedron_s_does);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_symmetry_group_has_only_d_el);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_symmetry_group_is_not_a_nont);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_symmetry_group_is_not_abelia);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_symmetry_group_is_not_polyhe);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_triangulation_construction_f);
  Py_VISIT(traverse_module_state->__pyx_kp_s_The_word_contains_a_non_generato);
  Py_VISIT(traverse_module_state->__pyx_kp_s_There_are_only_201_census_knots);
  Py_VISIT(traverse_module_state->__pyx_kp_s_This_census_does_not_support_man);
  Py_VISIT(traverse_module_state->__pyx_kp_s_To_permanently_fill_a_cusp_the_D);
  Py_VISIT(traverse_module_state->__pyx_kp_b_Triangulation);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Triangulation);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_DT_code);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_DT_code_line_1076);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation___reduce);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation___reduce___line_86);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__covers_gap);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__covers_low_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__covers_magma);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__covers_snappea);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__empty_save);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__from_bytes);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation__from_bytes_line_7);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__from_isosig);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation__from_isosig_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__from_pickle);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__from_string);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation__from_string_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__from_tetrahedra_g);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation__from_tetrahedra_g_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__get_cusp_indices);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__get_from_link_dat);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__get_tetrahedra_gl);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__is_symplectic);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__marked_tetrahedra);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__num_fake_cusps);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation__num_fake_cusps_li);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__polish_hyperbolic);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__presentation_matr);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__ptolemy_equations);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__ptolemy_equations_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__ptolemy_equations_3);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__ptolemy_equations_4);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__ptolemy_equations_5);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__ptolemy_equations_6);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__reindex_cusps);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation__reindex_cusps_lin);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__remove_finite_ver);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation__remove_finite_ver_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__set_DTcode);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__set_PDcode);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__symplectic_form);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__three_to_two);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__to_bytes);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation__to_bytes_line_699);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__to_string);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation__to_string_line_65);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__two_to_three);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation__unsimplified_fill);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation__unsimplified_fill_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Triangulation_and_text_files);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Triangulation_contains_cusps_onl);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_copy);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_copy_line_442);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_cover);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_cover_info);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_cover_line_2360);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_covers);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_covers_line_2460);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_cusp_info);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_cusp_info_line_119);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_dehn_fill);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_dehn_fill_line_112);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_edge_valences);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_edge_valences_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_filled_triangulati);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_filled_triangulati_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_from_Manifold);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_fundamental_group);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_fundamental_group_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_gluing_equations);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_gluing_equations_l);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_gluing_equations_p);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_gluing_equations_p_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_has_finite_vertice);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_has_finite_vertice_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_homology);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_homology_line_2278);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_is_orientable);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_is_orientable_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_isomorphisms_to);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_isomorphisms_to_li);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_link);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_name);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_name_line_1049);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_num_cusps);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_num_cusps_line_363);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_num_tetrahedra);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_num_tetrahedra_lin);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Triangulation_or_Manifold);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_orientation_cover);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_orientation_cover_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_pickle);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_plink);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_plink_line_319);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_ptolemy_generalize);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_ptolemy_generalize_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_ptolemy_obstructio);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_ptolemy_obstructio_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_ptolemy_variety);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_ptolemy_variety_li);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_randomize);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_randomize_line_459);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_reverse_orientatio);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_reverse_orientatio_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_save);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_save_line_629);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_set_name);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_set_name_line_1061);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_set_peripheral_cur);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_simplify);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_simplify_line_473);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_symplectic_basis);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_symplectic_basis_l);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_triangulation_isos);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_triangulation_isos_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_Triangulation_with_hyperbolic_st);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Triangulation_with_hyperbolic_st_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Try_to_simplify_the_triangulati);
  Py_VISIT(traverse_module_state->__pyx_n_s_Type);
  Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
  Py_VISIT(traverse_module_state->__pyx_n_s_UI_callback);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Used_by_pickle_dumps_from_pickl);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Used_by_the_pickle_module_to_pi);
  Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Verified_and_arbitrary_precision);
  Py_VISIT(traverse_module_state->__pyx_n_s_ViewerWindow);
  Py_VISIT(traverse_module_state->__pyx_kp_u_WARNING_Users_should_not_use_th);
  Py_VISIT(traverse_module_state->__pyx_kp_u_WARNING_Users_should_not_use_th_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_WARNING_Users_should_not_use_th_3);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Warning_Result_is_not_symplectic);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Words_must_be_represented_as_Pyt);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Wrong_equation_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_X);
  Py_VISIT(traverse_module_state->__pyx_n_s_Xbackward_neighbor);
  Py_VISIT(traverse_module_state->__pyx_n_s_Xbackward_strand);
  Py_VISIT(traverse_module_state->__pyx_n_s_Xcomponent);
  Py_VISIT(traverse_module_state->__pyx_n_s_Xforward_neighbor);
  Py_VISIT(traverse_module_state->__pyx_n_s_Xforward_strand);
  Py_VISIT(traverse_module_state->__pyx_n_s_Y);
  Py_VISIT(traverse_module_state->__pyx_n_s_Ybackward_neighbor);
  Py_VISIT(traverse_module_state->__pyx_n_s_Ybackward_strand);
  Py_VISIT(traverse_module_state->__pyx_n_s_Ycomponent);
  Py_VISIT(traverse_module_state->__pyx_n_s_Yforward_neighbor);
  Py_VISIT(traverse_module_state->__pyx_n_s_Yforward_strand);
  Py_VISIT(traverse_module_state->__pyx_kp_s_You_have_specified_a_Hoste_Thist);
  Py_VISIT(traverse_module_state->__pyx_kp_s_You_must_apply_fillings_to_all_o);
  Py_VISIT(traverse_module_state->__pyx_kp_s_You_must_apply_shortest_to_all_o);
  Py_VISIT(traverse_module_state->__pyx_kp_s_You_provided_filling_data_for_to);
  Py_VISIT(traverse_module_state->__pyx_kp_s_You_provided_more_peripheral_dat);
  Py_VISIT(traverse_module_state->__pyx_kp_s_You_tried_to_create_an_empty_Sym);
  Py_VISIT(traverse_module_state->__pyx_n_s_Z);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Z_d);
  Py_VISIT(traverse_module_state->__pyx_kp_s__111);
  Py_VISIT(traverse_module_state->__pyx_kp_s__114);
  Py_VISIT(traverse_module_state->__pyx_kp_s__115);
  Py_VISIT(traverse_module_state->__pyx_kp_s__116);
  Py_VISIT(traverse_module_state->__pyx_kp_s__117);
  Py_VISIT(traverse_module_state->__pyx_kp_s__118);
  Py_VISIT(traverse_module_state->__pyx_kp_s__12);
  Py_VISIT(traverse_module_state->__pyx_kp_s__13);
  Py_VISIT(traverse_module_state->__pyx_kp_b__144);
  Py_VISIT(traverse_module_state->__pyx_n_s__150);
  Py_VISIT(traverse_module_state->__pyx_kp_s__16);
  Py_VISIT(traverse_module_state->__pyx_kp_s__17);
  Py_VISIT(traverse_module_state->__pyx_kp_s__170);
  Py_VISIT(traverse_module_state->__pyx_kp_u__170);
  Py_VISIT(traverse_module_state->__pyx_kp_s__18);
  Py_VISIT(traverse_module_state->__pyx_kp_s__2);
  Py_VISIT(traverse_module_state->__pyx_kp_s__23);
  Py_VISIT(traverse_module_state->__pyx_kp_s__29);
  Py_VISIT(traverse_module_state->__pyx_kp_s__30);
  Py_VISIT(traverse_module_state->__pyx_kp_s__32);
  Py_VISIT(traverse_module_state->__pyx_kp_s__33);
  Py_VISIT(traverse_module_state->__pyx_kp_s__38);
  Py_VISIT(traverse_module_state->__pyx_kp_s__653);
  Py_VISIT(traverse_module_state->__pyx_kp_s__7);
  Py_VISIT(traverse_module_state->__pyx_n_s__726);
  Py_VISIT(traverse_module_state->__pyx_kp_s__8);
  Py_VISIT(traverse_module_state->__pyx_kp_b__9);
  Py_VISIT(traverse_module_state->__pyx_kp_s__9);
  Py_VISIT(traverse_module_state->__pyx_kp_s_a);
  Py_VISIT(traverse_module_state->__pyx_n_s_a_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_a_il);
  Py_VISIT(traverse_module_state->__pyx_kp_s_a_zA_Z0_9);
  Py_VISIT(traverse_module_state->__pyx_kp_s_abcABC__d_abcABC__d);
  Py_VISIT(traverse_module_state->__pyx_kp_s_abcdefghijklmnopqrstuvwxyzZYXWV);
  Py_VISIT(traverse_module_state->__pyx_n_s_abelian_description);
  Py_VISIT(traverse_module_state->__pyx_n_s_abelianization);
  Py_VISIT(traverse_module_state->__pyx_n_s_absImag);
  Py_VISIT(traverse_module_state->__pyx_n_s_abspath);
  Py_VISIT(traverse_module_state->__pyx_n_s_acc_log_im);
  Py_VISIT(traverse_module_state->__pyx_n_s_acc_log_re);
  Py_VISIT(traverse_module_state->__pyx_n_s_acc_rec_im);
  Py_VISIT(traverse_module_state->__pyx_n_s_acc_rec_re);
  Py_VISIT(traverse_module_state->__pyx_n_s_accuracies);
  Py_VISIT(traverse_module_state->__pyx_n_s_accuracy);
  Py_VISIT(traverse_module_state->__pyx_n_s_add);
  Py_VISIT(traverse_module_state->__pyx_n_s_add_rows);
  Py_VISIT(traverse_module_state->__pyx_n_s_algorithm);
  Py_VISIT(traverse_module_state->__pyx_n_s_all);
  Py_VISIT(traverse_module_state->__pyx_n_s_all_tables);
  Py_VISIT(traverse_module_state->__pyx_kp_s_all_tetrahedra_positively_orient);
  Py_VISIT(traverse_module_state->__pyx_n_s_alpha);
  Py_VISIT(traverse_module_state->__pyx_kp_s_alternating_gz);
  Py_VISIT(traverse_module_state->__pyx_n_s_alternation);
  Py_VISIT(traverse_module_state->__pyx_n_s_ans);
  Py_VISIT(traverse_module_state->__pyx_n_s_append);
  Py_VISIT(traverse_module_state->__pyx_n_s_are_isometric);
  Py_VISIT(traverse_module_state->__pyx_n_s_args);
  Py_VISIT(traverse_module_state->__pyx_n_s_as_ideal);
  Py_VISIT(traverse_module_state->__pyx_n_s_as_int_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_as_string);
  Py_VISIT(traverse_module_state->__pyx_n_s_ascii);
  Py_VISIT(traverse_module_state->__pyx_n_s_ascii_lowercase);
  Py_VISIT(traverse_module_state->__pyx_n_s_asksaveasfile);
  Py_VISIT(traverse_module_state->__pyx_n_s_assignments);
  Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
  Py_VISIT(traverse_module_state->__pyx_kp_s_at_least);
  Py_VISIT(traverse_module_state->__pyx_n_s_atexit);
  Py_VISIT(traverse_module_state->__pyx_kp_s_b);
  Py_VISIT(traverse_module_state->__pyx_n_s_b_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_b_RL);
  Py_VISIT(traverse_module_state->__pyx_kp_s_b_RL_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_b_RRL);
  Py_VISIT(traverse_module_state->__pyx_kp_s_b_RRL_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_b_file_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_b_new_name);
  Py_VISIT(traverse_module_state->__pyx_kp_s_b_no_lLrR);
  Py_VISIT(traverse_module_state->__pyx_n_s_b_string);
  Py_VISIT(traverse_module_state->__pyx_n_s_ball);
  Py_VISIT(traverse_module_state->__pyx_n_s_base);
  Py_VISIT(traverse_module_state->__pyx_n_s_bases);
  Py_VISIT(traverse_module_state->__pyx_n_s_basis);
  Py_VISIT(traverse_module_state->__pyx_n_s_betti_number);
  Py_VISIT(traverse_module_state->__pyx_kp_s_binary);
  Py_VISIT(traverse_module_state->__pyx_kp_s_binary_dihedral_group_2_2_d);
  Py_VISIT(traverse_module_state->__pyx_n_s_bit);
  Py_VISIT(traverse_module_state->__pyx_n_s_bits_prec);
  Py_VISIT(traverse_module_state->__pyx_n_s_blowup_multiple);
  Py_VISIT(traverse_module_state->__pyx_n_s_browse);
  Py_VISIT(traverse_module_state->__pyx_n_s_browser);
  Py_VISIT(traverse_module_state->__pyx_n_s_bundle);
  Py_VISIT(traverse_module_state->__pyx_n_s_bundle_from_string);
  Py_VISIT(traverse_module_state->__pyx_n_s_byte);
  Py_VISIT(traverse_module_state->__pyx_n_s_bytearray_to_bytes);
  Py_VISIT(traverse_module_state->__pyx_n_s_byteseq);
  Py_VISIT(traverse_module_state->__pyx_n_s_bytestring);
  Py_VISIT(traverse_module_state->__pyx_n_s_c);
  Py_VISIT(traverse_module_state->__pyx_n_s_c0);
  Py_VISIT(traverse_module_state->__pyx_n_s_c1);
  Py_VISIT(traverse_module_state->__pyx_n_s_c2);
  Py_VISIT(traverse_module_state->__pyx_n_s_c3);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_abelianization);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_canonized_triangulation);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_center);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_comm_subgroup);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_core_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_cover_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_eqns);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_factor_0);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_factor_1);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_filled_tri);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_longitude);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_matrix);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_meridian);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_moves);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_new_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_new_tri);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_obstruction_class);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_opacities);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_representation);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_retriangulated_triangulation);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_string);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_symmetric_triangulation);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_target);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_terse);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_triangulation);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_vars);
  Py_VISIT(traverse_module_state->__pyx_n_s_c_word);
  Py_VISIT(traverse_module_state->__pyx_n_s_cache);
  Py_VISIT(traverse_module_state->__pyx_n_s_callback);
  Py_VISIT(traverse_module_state->__pyx_n_s_canonical);
  Py_VISIT(traverse_module_state->__pyx_n_s_canonical_cells_are_tetrahedra);
  Py_VISIT(traverse_module_state->__pyx_n_s_canonical_retriangulation);
  Py_VISIT(traverse_module_state->__pyx_n_s_canonize);
  Py_VISIT(traverse_module_state->__pyx_n_s_cb_menu);
  Py_VISIT(traverse_module_state->__pyx_n_s_census_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_census_knot_archive);
  Py_VISIT(traverse_module_state->__pyx_n_s_census_knot_numbers);
  Py_VISIT(traverse_module_state->__pyx_n_s_center);
  Py_VISIT(traverse_module_state->__pyx_n_s_centroid_at_origin);
  Py_VISIT(traverse_module_state->__pyx_n_s_certified_shapes);
  Py_VISIT(traverse_module_state->__pyx_n_s_character_variety);
  Py_VISIT(traverse_module_state->__pyx_n_s_character_variety_ideal);
  Py_VISIT(traverse_module_state->__pyx_n_s_character_variety_vars_and_polys);
  Py_VISIT(traverse_module_state->__pyx_n_s_check_SnapPea_memory);
  Py_VISIT(traverse_module_state->__pyx_n_s_check_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_chern_simons);
  Py_VISIT(traverse_module_state->__pyx_n_s_choose_generators);
  Py_VISIT(traverse_module_state->__pyx_n_s_choose_generators_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_circle);
  Py_VISIT(traverse_module_state->__pyx_n_s_class);
  Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem);
  Py_VISIT(traverse_module_state->__pyx_n_s_clear);
  Py_VISIT(traverse_module_state->__pyx_n_s_clear_marks);
  Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
  Py_VISIT(traverse_module_state->__pyx_n_s_close);
  Py_VISIT(traverse_module_state->__pyx_n_s_closed_census_directory);
  Py_VISIT(traverse_module_state->__pyx_n_s_closed_nonorientable);
  Py_VISIT(traverse_module_state->__pyx_n_s_closed_orientable);
  Py_VISIT(traverse_module_state->__pyx_n_s_closest);
  Py_VISIT(traverse_module_state->__pyx_n_s_cls);
  Py_VISIT(traverse_module_state->__pyx_n_s_cobs);
  Py_VISIT(traverse_module_state->__pyx_n_s_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_codec);
  Py_VISIT(traverse_module_state->__pyx_n_s_coefficient_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_coeffs);
  Py_VISIT(traverse_module_state->__pyx_n_s_col_support);
  Py_VISIT(traverse_module_state->__pyx_n_s_cols);
  Py_VISIT(traverse_module_state->__pyx_n_s_columns);
  Py_VISIT(traverse_module_state->__pyx_n_s_combinatorial);
  Py_VISIT(traverse_module_state->__pyx_n_s_comm_subgroup);
  Py_VISIT(traverse_module_state->__pyx_n_s_commutator_subgroup);
  Py_VISIT(traverse_module_state->__pyx_n_s_compile);
  Py_VISIT(traverse_module_state->__pyx_n_s_complete);
  Py_VISIT(traverse_module_state->__pyx_kp_s_complete_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_complete_length);
  Py_VISIT(traverse_module_state->__pyx_kp_s_complete_length_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_complete_shape_array);
  Py_VISIT(traverse_module_state->__pyx_n_s_complete_shapes);
  Py_VISIT(traverse_module_state->__pyx_n_s_complex);
  Py_VISIT(traverse_module_state->__pyx_n_s_complex_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_complex_volume);
  Py_VISIT(traverse_module_state->__pyx_n_s_complex_volume_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_components);
  Py_VISIT(traverse_module_state->__pyx_n_s_compute_corners);
  Py_VISIT(traverse_module_state->__pyx_n_s_compute_cusp_shapes);
  Py_VISIT(traverse_module_state->__pyx_n_s_compute_volume);
  Py_VISIT(traverse_module_state->__pyx_n_s_contains);
  Py_VISIT(traverse_module_state->__pyx_kp_s_contains_degenerate_tetrahedra);
  Py_VISIT(traverse_module_state->__pyx_kp_s_contains_flat_tetrahedra);
  Py_VISIT(traverse_module_state->__pyx_kp_s_contains_negatively_oriented_tet);
  Py_VISIT(traverse_module_state->__pyx_n_s_content);
  Py_VISIT(traverse_module_state->__pyx_n_s_copy);
  Py_VISIT(traverse_module_state->__pyx_n_s_copy_c_triangulation);
  Py_VISIT(traverse_module_state->__pyx_n_s_core_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_corners);
  Py_VISIT(traverse_module_state->__pyx_n_s_coset_action);
  Py_VISIT(traverse_module_state->__pyx_n_s_cover);
  Py_VISIT(traverse_module_state->__pyx_n_s_cover_c_triangulation);
  Py_VISIT(traverse_module_state->__pyx_n_s_cover_count);
  Py_VISIT(traverse_module_state->__pyx_n_s_cover_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_cover_locals_genexpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_cover_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_cover_types);
  Py_VISIT(traverse_module_state->__pyx_n_s_covers);
  Py_VISIT(traverse_module_state->__pyx_n_s_covers_gap);
  Py_VISIT(traverse_module_state->__pyx_n_s_covers_low_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_covers_low_index_locals_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_covers_magma);
  Py_VISIT(traverse_module_state->__pyx_n_s_covers_snappea);
  Py_VISIT(traverse_module_state->__pyx_n_s_crossings);
  Py_VISIT(traverse_module_state->__pyx_n_s_cs);
  Py_VISIT(traverse_module_state->__pyx_n_s_curdir);
  Py_VISIT(traverse_module_state->__pyx_n_s_current_modulus);
  Py_VISIT(traverse_module_state->__pyx_n_s_current_shape);
  Py_VISIT(traverse_module_state->__pyx_n_s_current_shape_accuracy);
  Py_VISIT(traverse_module_state->__pyx_n_s_curve_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_cusp_cross_section_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_cusp_images);
  Py_VISIT(traverse_module_state->__pyx_n_s_cusp_images_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_cusp_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_cusp_indices);
  Py_VISIT(traverse_module_state->__pyx_n_s_cusp_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_cusp_maps);
  Py_VISIT(traverse_module_state->__pyx_n_s_cusp_maps_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_cusp_neighborhood);
  Py_VISIT(traverse_module_state->__pyx_n_s_cusp_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_cusps);
  Py_VISIT(traverse_module_state->__pyx_n_s_cusps_to_fill);
  Py_VISIT(traverse_module_state->__pyx_n_s_cutoff);
  Py_VISIT(traverse_module_state->__pyx_n_s_cutoff_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_cutoff_radius);
  Py_VISIT(traverse_module_state->__pyx_n_s_cutout);
  Py_VISIT(traverse_module_state->__pyx_n_s_cy_eval);
  Py_VISIT(traverse_module_state->__pyx_n_s_cyclic);
  Py_VISIT(traverse_module_state->__pyx_kp_s_cython_core_abelian_group_pyx);
  Py_VISIT(traverse_module_state->__pyx_kp_s_cython_core_basic_pyx);
  Py_VISIT(traverse_module_state->__pyx_kp_s_cython_core_cusp_neighborhoods_p);
  Py_VISIT(traverse_module_state->__pyx_kp_s_cython_core_dirichlet_pyx);
  Py_VISIT(traverse_module_state->__pyx_kp_s_cython_core_fundamental_group_py);
  Py_VISIT(traverse_module_state->__pyx_kp_s_cython_core_manifold_pyx);
  Py_VISIT(traverse_module_state->__pyx_kp_s_cython_core_symmetry_group_pyx);
  Py_VISIT(traverse_module_state->__pyx_kp_s_cython_core_tail_pyx);
  Py_VISIT(traverse_module_state->__pyx_kp_s_cython_core_triangulation_pyx);
  Py_VISIT(traverse_module_state->__pyx_kp_s_d);
  Py_VISIT(traverse_module_state->__pyx_kp_s_dB);
  Py_VISIT(traverse_module_state->__pyx_n_s_dLQbcccdxwb);
  Py_VISIT(traverse_module_state->__pyx_kp_s_d_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_d_3);
  Py_VISIT(traverse_module_state->__pyx_n_s_d_4);
  Py_VISIT(traverse_module_state->__pyx_kp_s_d__d);
  Py_VISIT(traverse_module_state->__pyx_kp_s_d_d);
  Py_VISIT(traverse_module_state->__pyx_kp_s_d_d_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_d_d__d);
  Py_VISIT(traverse_module_state->__pyx_kp_s_d_finite_vertices_d_ideal_verti);
  Py_VISIT(traverse_module_state->__pyx_n_s_data);
  Py_VISIT(traverse_module_state->__pyx_kp_u_data_1_1_2_2_0_1_3_2_2_3_1_0_0);
  Py_VISIT(traverse_module_state->__pyx_n_s_data_ijk);
  Py_VISIT(traverse_module_state->__pyx_n_s_data_spec);
  Py_VISIT(traverse_module_state->__pyx_n_s_database);
  Py_VISIT(traverse_module_state->__pyx_n_s_datafile);
  Py_VISIT(traverse_module_state->__pyx_n_s_dec_prec);
  Py_VISIT(traverse_module_state->__pyx_n_s_decode);
  Py_VISIT(traverse_module_state->__pyx_n_s_decorated);
  Py_VISIT(traverse_module_state->__pyx_n_s_decorated_isosig);
  Py_VISIT(traverse_module_state->__pyx_n_s_decoration);
  Py_VISIT(traverse_module_state->__pyx_n_s_default_precision);
  Py_VISIT(traverse_module_state->__pyx_n_s_defaultextension);
  Py_VISIT(traverse_module_state->__pyx_n_s_degree);
  Py_VISIT(traverse_module_state->__pyx_n_s_dehn_fill);
  Py_VISIT(traverse_module_state->__pyx_n_s_delattr);
  Py_VISIT(traverse_module_state->__pyx_n_s_delitem);
  Py_VISIT(traverse_module_state->__pyx_n_s_desc);
  Py_VISIT(traverse_module_state->__pyx_n_s_det);
  Py_VISIT(traverse_module_state->__pyx_n_s_details);
  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_n_s_dict_3);
  Py_VISIT(traverse_module_state->__pyx_n_s_direct_product_description);
  Py_VISIT(traverse_module_state->__pyx_n_s_dirichlet_domain);
  Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
  Py_VISIT(traverse_module_state->__pyx_n_s_disp);
  Py_VISIT(traverse_module_state->__pyx_n_s_displacement);
  Py_VISIT(traverse_module_state->__pyx_n_s_distance);
  Py_VISIT(traverse_module_state->__pyx_n_s_doc);
  Py_VISIT(traverse_module_state->__pyx_n_s_domain);
  Py_VISIT(traverse_module_state->__pyx_n_s_drill);
  Py_VISIT(traverse_module_state->__pyx_n_s_dual_curves);
  Py_VISIT(traverse_module_state->__pyx_n_s_dual_rows);
  Py_VISIT(traverse_module_state->__pyx_n_s_e);
  Py_VISIT(traverse_module_state->__pyx_n_s_edge);
  Py_VISIT(traverse_module_state->__pyx_n_s_edge_class);
  Py_VISIT(traverse_module_state->__pyx_n_s_edge_image_indices);
  Py_VISIT(traverse_module_state->__pyx_n_s_edge_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_edge_indices);
  Py_VISIT(traverse_module_state->__pyx_n_s_edge_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_edge_orientations);
  Py_VISIT(traverse_module_state->__pyx_n_s_edge_to_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_edge_to_index_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_edge_valences);
  Py_VISIT(traverse_module_state->__pyx_n_s_edges);
  Py_VISIT(traverse_module_state->__pyx_n_s_eight_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_elementary_divisors);
  Py_VISIT(traverse_module_state->__pyx_n_s_eliminate_fixed_ptolemys);
  Py_VISIT(traverse_module_state->__pyx_n_s_elt);
  Py_VISIT(traverse_module_state->__pyx_n_s_empty);
  Py_VISIT(traverse_module_state->__pyx_n_s_empty_save);
  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_end);
  Py_VISIT(traverse_module_state->__pyx_n_s_endpoints);
  Py_VISIT(traverse_module_state->__pyx_n_s_engine);
  Py_VISIT(traverse_module_state->__pyx_n_s_enter);
  Py_VISIT(traverse_module_state->__pyx_n_s_entries);
  Py_VISIT(traverse_module_state->__pyx_n_s_enum);
  Py_VISIT(traverse_module_state->__pyx_n_s_enumerate);
  Py_VISIT(traverse_module_state->__pyx_n_s_environ);
  Py_VISIT(traverse_module_state->__pyx_n_s_eqn);
  Py_VISIT(traverse_module_state->__pyx_n_s_eqns);
  Py_VISIT(traverse_module_state->__pyx_n_s_equation_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_equations);
  Py_VISIT(traverse_module_state->__pyx_n_s_euler);
  Py_VISIT(traverse_module_state->__pyx_n_s_eval);
  Py_VISIT(traverse_module_state->__pyx_n_s_exceptions);
  Py_VISIT(traverse_module_state->__pyx_n_s_exit);
  Py_VISIT(traverse_module_state->__pyx_n_s_exit_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_expand_until_certified);
  Py_VISIT(traverse_module_state->__pyx_n_s_explain_cols);
  Py_VISIT(traverse_module_state->__pyx_n_s_explain_columns);
  Py_VISIT(traverse_module_state->__pyx_n_s_explain_rows);
  Py_VISIT(traverse_module_state->__pyx_n_s_explode);
  Py_VISIT(traverse_module_state->__pyx_n_s_export_stl);
  Py_VISIT(traverse_module_state->__pyx_n_s_extends_to_link);
  Py_VISIT(traverse_module_state->__pyx_n_s_extends_to_link_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_extract_HT_knot);
  Py_VISIT(traverse_module_state->__pyx_n_s_extractfile);
  Py_VISIT(traverse_module_state->__pyx_n_s_f);
  Py_VISIT(traverse_module_state->__pyx_n_s_face);
  Py_VISIT(traverse_module_state->__pyx_n_s_face0_gen);
  Py_VISIT(traverse_module_state->__pyx_n_s_face1_gen);
  Py_VISIT(traverse_module_state->__pyx_n_s_face2_gen);
  Py_VISIT(traverse_module_state->__pyx_n_s_face3_gen);
  Py_VISIT(traverse_module_state->__pyx_n_s_face_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_face_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_face_list_locals_genexpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_facedicts);
  Py_VISIT(traverse_module_state->__pyx_n_s_faces);
  Py_VISIT(traverse_module_state->__pyx_n_s_factor_0);
  Py_VISIT(traverse_module_state->__pyx_n_s_factor_1);
  Py_VISIT(traverse_module_state->__pyx_n_s_file);
  Py_VISIT(traverse_module_state->__pyx_n_s_file_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_filedata);
  Py_VISIT(traverse_module_state->__pyx_n_s_filedialog);
  Py_VISIT(traverse_module_state->__pyx_n_s_filename);
  Py_VISIT(traverse_module_state->__pyx_n_s_files);
  Py_VISIT(traverse_module_state->__pyx_n_s_filetypes);
  Py_VISIT(traverse_module_state->__pyx_n_s_fill);
  Py_VISIT(traverse_module_state->__pyx_n_s_fill_all);
  Py_VISIT(traverse_module_state->__pyx_n_s_fill_by_fold);
  Py_VISIT(traverse_module_state->__pyx_n_s_fill_cusp_spec);
  Py_VISIT(traverse_module_state->__pyx_n_s_filled);
  Py_VISIT(traverse_module_state->__pyx_n_s_filled_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_filled_length);
  Py_VISIT(traverse_module_state->__pyx_kp_s_filled_length_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_filled_shape_array);
  Py_VISIT(traverse_module_state->__pyx_n_s_filled_shapes);
  Py_VISIT(traverse_module_state->__pyx_n_s_filled_tri);
  Py_VISIT(traverse_module_state->__pyx_n_s_filled_triangulation);
  Py_VISIT(traverse_module_state->__pyx_n_s_filling);
  Py_VISIT(traverse_module_state->__pyx_kp_s_filling__d__d);
  Py_VISIT(traverse_module_state->__pyx_n_s_filling_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_fillings);
  Py_VISIT(traverse_module_state->__pyx_n_s_fillings_may_affect_generators);
  Py_VISIT(traverse_module_state->__pyx_n_s_find);
  Py_VISIT(traverse_module_state->__pyx_n_s_findall);
  Py_VISIT(traverse_module_state->__pyx_n_s_first_nybble);
  Py_VISIT(traverse_module_state->__pyx_n_s_five_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_five_tet_nonorientable);
  Py_VISIT(traverse_module_state->__pyx_n_s_five_tet_orientable);
  Py_VISIT(traverse_module_state->__pyx_n_s_fixed_alignment);
  Py_VISIT(traverse_module_state->__pyx_n_s_flips);
  Py_VISIT(traverse_module_state->__pyx_n_s_flush);
  Py_VISIT(traverse_module_state->__pyx_n_s_fold);
  Py_VISIT(traverse_module_state->__pyx_n_s_force_recompute);
  Py_VISIT(traverse_module_state->__pyx_n_s_form);
  Py_VISIT(traverse_module_state->__pyx_n_s_format);
  Py_VISIT(traverse_module_state->__pyx_n_s_format_explain_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_format_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_format_two_by_two);
  Py_VISIT(traverse_module_state->__pyx_n_s_from_bytes);
  Py_VISIT(traverse_module_state->__pyx_n_b_from_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_from_isosig);
  Py_VISIT(traverse_module_state->__pyx_n_s_from_pickle);
  Py_VISIT(traverse_module_state->__pyx_n_s_from_string);
  Py_VISIT(traverse_module_state->__pyx_n_s_from_tetrahedra_gluing_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_full_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_full_rigor);
  Py_VISIT(traverse_module_state->__pyx_n_s_func);
  Py_VISIT(traverse_module_state->__pyx_n_s_func_OK);
  Py_VISIT(traverse_module_state->__pyx_n_s_func_bad_input);
  Py_VISIT(traverse_module_state->__pyx_n_s_func_cancelled);
  Py_VISIT(traverse_module_state->__pyx_n_s_func_failed);
  Py_VISIT(traverse_module_state->__pyx_n_s_fundamental_group);
  Py_VISIT(traverse_module_state->__pyx_n_s_g);
  Py_VISIT(traverse_module_state->__pyx_n_s_g_eqns);
  Py_VISIT(traverse_module_state->__pyx_kp_s_g_g);
  Py_VISIT(traverse_module_state->__pyx_n_s_gap);
  Py_VISIT(traverse_module_state->__pyx_n_s_gap_image_gens);
  Py_VISIT(traverse_module_state->__pyx_n_s_gap_init);
  Py_VISIT(traverse_module_state->__pyx_n_s_gap_string);
  Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
  Py_VISIT(traverse_module_state->__pyx_n_s_gen);
  Py_VISIT(traverse_module_state->__pyx_n_s_gen_names);
  Py_VISIT(traverse_module_state->__pyx_n_s_generator_bytes);
  Py_VISIT(traverse_module_state->__pyx_n_s_generator_file);
  Py_VISIT(traverse_module_state->__pyx_n_s_generator_path);
  Py_VISIT(traverse_module_state->__pyx_n_s_generators);
  Py_VISIT(traverse_module_state->__pyx_n_s_generators_in_originals);
  Py_VISIT(traverse_module_state->__pyx_n_s_genexpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_gens);
  Py_VISIT(traverse_module_state->__pyx_n_s_geodesics);
  Py_VISIT(traverse_module_state->__pyx_n_s_get);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_HT_knot_DT);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_HT_knot_by_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_cusp_indices_and_peripheral);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_displacement);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_from_link_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_generalized_ptolemy_obstruct);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_ptolemy_obstruction_classes);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_ptolemy_variety);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_tetrahedra_gluing_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_tetrahedra_shapes);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_tie);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_triangulation_tester);
  Py_VISIT(traverse_module_state->__pyx_kp_u_get_triangulation_tester_doctes);
  Py_VISIT(traverse_module_state->__pyx_kp_u_get_triangulation_tester_line_11);
  Py_VISIT(traverse_module_state->__pyx_n_s_getitem);
  Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_gluing);
  Py_VISIT(traverse_module_state->__pyx_n_s_gluing_equations);
  Py_VISIT(traverse_module_state->__pyx_n_s_gluing_equations_pgl);
  Py_VISIT(traverse_module_state->__pyx_n_s_gluings);
  Py_VISIT(traverse_module_state->__pyx_n_s_group);
  Py_VISIT(traverse_module_state->__pyx_n_s_grouped);
  Py_VISIT(traverse_module_state->__pyx_n_s_groups);
  Py_VISIT(traverse_module_state->__pyx_n_s_gui);
  Py_VISIT(traverse_module_state->__pyx_n_s_gzip);
  Py_VISIT(traverse_module_state->__pyx_n_s_handles);
  Py_VISIT(traverse_module_state->__pyx_n_s_has_finite_vertices);
  Py_VISIT(traverse_module_state->__pyx_n_s_header);
  Py_VISIT(traverse_module_state->__pyx_n_s_high_precision);
  Py_VISIT(traverse_module_state->__pyx_n_s_holonomies);
  Py_VISIT(traverse_module_state->__pyx_n_s_holonomy_accuracy);
  Py_VISIT(traverse_module_state->__pyx_kp_s_holonomy_precision);
  Py_VISIT(traverse_module_state->__pyx_n_s_homology);
  Py_VISIT(traverse_module_state->__pyx_n_s_horoball_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_horoballs);
  Py_VISIT(traverse_module_state->__pyx_n_s_horoviewer);
  Py_VISIT(traverse_module_state->__pyx_n_s_hue);
  Py_VISIT(traverse_module_state->__pyx_kp_s_hyperbolic_data__sa_gz);
  Py_VISIT(traverse_module_state->__pyx_kp_s_hyperbolic_data__sn_gz);
  Py_VISIT(traverse_module_state->__pyx_n_s_i);
  Py_VISIT(traverse_module_state->__pyx_kp_s_icosohedral_group);
  Py_VISIT(traverse_module_state->__pyx_n_s_ideal);
  Py_VISIT(traverse_module_state->__pyx_n_s_identify);
  Py_VISIT(traverse_module_state->__pyx_n_s_identify_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_ignore_curve_orientations);
  Py_VISIT(traverse_module_state->__pyx_n_s_ignore_cusp_ordering);
  Py_VISIT(traverse_module_state->__pyx_n_s_ignore_orientation);
  Py_VISIT(traverse_module_state->__pyx_n_s_ignore_solution_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_imag);
  Py_VISIT(traverse_module_state->__pyx_n_s_images);
  Py_VISIT(traverse_module_state->__pyx_n_s_immutable);
  Py_VISIT(traverse_module_state->__pyx_n_s_import);
  Py_VISIT(traverse_module_state->__pyx_kp_u_import_itertools_M_Manifold_L14);
  Py_VISIT(traverse_module_state->__pyx_n_s_in_radius);
  Py_VISIT(traverse_module_state->__pyx_n_s_include_words);
  Py_VISIT(traverse_module_state->__pyx_n_s_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_index_within_crossings);
  Py_VISIT(traverse_module_state->__pyx_n_s_indices);
  Py_VISIT(traverse_module_state->__pyx_n_s_infinite);
  Py_VISIT(traverse_module_state->__pyx_n_s_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_init);
  Py_VISIT(traverse_module_state->__pyx_n_s_init_hyperbolic_structure);
  Py_VISIT(traverse_module_state->__pyx_n_s_init_subclass);
  Py_VISIT(traverse_module_state->__pyx_n_s_initial_modulus);
  Py_VISIT(traverse_module_state->__pyx_n_s_initial_shape);
  Py_VISIT(traverse_module_state->__pyx_n_s_initial_shape_accuracy);
  Py_VISIT(traverse_module_state->__pyx_n_s_initialize_structure);
  Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
  Py_VISIT(traverse_module_state->__pyx_n_s_input_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_int_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_integer);
  Py_VISIT(traverse_module_state->__pyx_n_s_internal);
  Py_VISIT(traverse_module_state->__pyx_n_s_interrupted);
  Py_VISIT(traverse_module_state->__pyx_n_s_intervals);
  Py_VISIT(traverse_module_state->__pyx_n_s_inverse_list_word);
  Py_VISIT(traverse_module_state->__pyx_n_s_irregular);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_GapElement);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_HT_knot);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_MagmaElement);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_PermutationGroupElement);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_S5);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_abelian);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_alpha_DT_exterior);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_amphicheiral);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_binary_group);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_braid_complement);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_complete);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_decorated_isosig);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_dihedral);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_direct_product);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_full_group);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_geometric);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_int_DT_exterior);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_invertible_knot);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_isometric_to);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_isosig);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_link_complement1);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_link_complement1_pat);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_link_complement2);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_link_complement2_pat);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_link_complement3);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_link_complement3_pat);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_orientable);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_polyhedral);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_symplectic);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_torus_bundle);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_twister_bundle);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_twister_splitting);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_two_bridge);
  Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
  Py_VISIT(traverse_module_state->__pyx_n_s_isfile);
  Py_VISIT(traverse_module_state->__pyx_n_s_islower);
  Py_VISIT(traverse_module_state->__pyx_n_s_isometries);
  Py_VISIT(traverse_module_state->__pyx_n_s_isomorphisms_to);
  Py_VISIT(traverse_module_state->__pyx_n_s_isosig);
  Py_VISIT(traverse_module_state->__pyx_n_s_isosig_pattern);
  Py_VISIT(traverse_module_state->__pyx_n_s_item);
  Py_VISIT(traverse_module_state->__pyx_n_s_items);
  Py_VISIT(traverse_module_state->__pyx_n_s_iter);
  Py_VISIT(traverse_module_state->__pyx_n_s_its_matrix);
  Py_VISIT(traverse_module_state->__pyx_n_s_j);
  Py_VISIT(traverse_module_state->__pyx_n_s_join);
  Py_VISIT(traverse_module_state->__pyx_n_s_k);
  Py_VISIT(traverse_module_state->__pyx_n_s_key);
  Py_VISIT(traverse_module_state->__pyx_n_s_keys);
  Py_VISIT(traverse_module_state->__pyx_n_s_kl);
  Py_VISIT(traverse_module_state->__pyx_n_s_klein);
  Py_VISIT(traverse_module_state->__pyx_n_s_klp);
  Py_VISIT(traverse_module_state->__pyx_n_s_kwargs);
  Py_VISIT(traverse_module_state->__pyx_n_s_l);
  Py_VISIT(traverse_module_state->__pyx_n_s_l0);
  Py_VISIT(traverse_module_state->__pyx_n_s_l1);
  Py_VISIT(traverse_module_state->__pyx_n_s_l2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_lL_P_components_0_9_1_P_crossin);
  Py_VISIT(traverse_module_state->__pyx_n_s_layered);
  Py_VISIT(traverse_module_state->__pyx_n_s_layered_and_marked);
  Py_VISIT(traverse_module_state->__pyx_n_s_lazy);
  Py_VISIT(traverse_module_state->__pyx_n_s_left);
  Py_VISIT(traverse_module_state->__pyx_n_s_left_pad_string);
  Py_VISIT(traverse_module_state->__pyx_n_s_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_lenStr);
  Py_VISIT(traverse_module_state->__pyx_n_s_len_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_length);
  Py_VISIT(traverse_module_state->__pyx_kp_s_length_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_length_spectrum);
  Py_VISIT(traverse_module_state->__pyx_n_s_length_spectrum_dicts);
  Py_VISIT(traverse_module_state->__pyx_n_s_letter);
  Py_VISIT(traverse_module_state->__pyx_n_s_letter_seperator);
  Py_VISIT(traverse_module_state->__pyx_n_s_line);
  Py_VISIT(traverse_module_state->__pyx_n_s_line0);
  Py_VISIT(traverse_module_state->__pyx_n_s_line1);
  Py_VISIT(traverse_module_state->__pyx_n_s_line2);
  Py_VISIT(traverse_module_state->__pyx_n_s_line3);
  Py_VISIT(traverse_module_state->__pyx_n_s_link);
  Py_VISIT(traverse_module_state->__pyx_n_s_link_archive);
  Py_VISIT(traverse_module_state->__pyx_n_s_link_directory);
  Py_VISIT(traverse_module_state->__pyx_n_s_list_as_word);
  Py_VISIT(traverse_module_state->__pyx_n_s_list_as_word_locals_genexpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_ljust);
  Py_VISIT(traverse_module_state->__pyx_n_s_log);
  Py_VISIT(traverse_module_state->__pyx_n_s_log_im);
  Py_VISIT(traverse_module_state->__pyx_n_s_log_re);
  Py_VISIT(traverse_module_state->__pyx_n_s_log_shape);
  Py_VISIT(traverse_module_state->__pyx_n_s_long_relators);
  Py_VISIT(traverse_module_state->__pyx_n_s_longitude);
  Py_VISIT(traverse_module_state->__pyx_kp_s_longitude__d__d);
  Py_VISIT(traverse_module_state->__pyx_n_s_longitude_accuracy);
  Py_VISIT(traverse_module_state->__pyx_n_s_lookup);
  Py_VISIT(traverse_module_state->__pyx_n_s_low_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_low_index_version);
  Py_VISIT(traverse_module_state->__pyx_n_s_lower);
  Py_VISIT(traverse_module_state->__pyx_n_s_m);
  Py_VISIT(traverse_module_state->__pyx_n_s_m003);
  Py_VISIT(traverse_module_state->__pyx_n_s_m004);
  Py_VISIT(traverse_module_state->__pyx_n_s_magma);
  Py_VISIT(traverse_module_state->__pyx_n_s_magma_init);
  Py_VISIT(traverse_module_state->__pyx_n_s_magma_string);
  Py_VISIT(traverse_module_state->__pyx_n_s_main);
  Py_VISIT(traverse_module_state->__pyx_n_s_major);
  Py_VISIT(traverse_module_state->__pyx_n_s_manifold);
  Py_VISIT(traverse_module_state->__pyx_n_s_manifoldMethods);
  Py_VISIT(traverse_module_state->__pyx_n_s_manifold_class);
  Py_VISIT(traverse_module_state->__pyx_n_s_manifold_class_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_manifold_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_manifold_path);
  Py_VISIT(traverse_module_state->__pyx_n_s_manifold_paths);
  Py_VISIT(traverse_module_state->__pyx_n_s_manifolds);
  Py_VISIT(traverse_module_state->__pyx_n_s_map);
  Py_VISIT(traverse_module_state->__pyx_n_s_maps);
  Py_VISIT(traverse_module_state->__pyx_n_s_mark_solid_tori);
  Py_VISIT(traverse_module_state->__pyx_n_s_marked);
  Py_VISIT(traverse_module_state->__pyx_n_s_marked_tetrahedra);
  Py_VISIT(traverse_module_state->__pyx_n_s_mask);
  Py_VISIT(traverse_module_state->__pyx_n_s_mat);
  Py_VISIT(traverse_module_state->__pyx_n_s_match);
  Py_VISIT(traverse_module_state->__pyx_n_s_math);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrices);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrices_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_matrix);
  Py_VISIT(traverse_module_state->__pyx_n_s_matsnf);
  Py_VISIT(traverse_module_state->__pyx_n_s_max);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_crossings);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_reach);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_segments);
  Py_VISIT(traverse_module_state->__pyx_n_s_maximize_injectivity_radius);
  Py_VISIT(traverse_module_state->__pyx_n_s_meridian);
  Py_VISIT(traverse_module_state->__pyx_kp_s_meridian__d__d);
  Py_VISIT(traverse_module_state->__pyx_n_s_meridian_accuracy);
  Py_VISIT(traverse_module_state->__pyx_n_s_message);
  Py_VISIT(traverse_module_state->__pyx_n_s_metaclass);
  Py_VISIT(traverse_module_state->__pyx_n_s_method);
  Py_VISIT(traverse_module_state->__pyx_n_s_minimize_number_of_generators);
  Py_VISIT(traverse_module_state->__pyx_kp_s_mirrored_arc);
  Py_VISIT(traverse_module_state->__pyx_n_s_mode);
  Py_VISIT(traverse_module_state->__pyx_n_s_model);
  Py_VISIT(traverse_module_state->__pyx_n_s_module);
  Py_VISIT(traverse_module_state->__pyx_n_s_modulus);
  Py_VISIT(traverse_module_state->__pyx_n_s_monodromy);
  Py_VISIT(traverse_module_state->__pyx_kp_s_morwen8);
  Py_VISIT(traverse_module_state->__pyx_kp_s_morwen8_tgz);
  Py_VISIT(traverse_module_state->__pyx_n_s_morwen_link_directory);
  Py_VISIT(traverse_module_state->__pyx_n_s_moves);
  Py_VISIT(traverse_module_state->__pyx_n_s_mro_entries);
  Py_VISIT(traverse_module_state->__pyx_n_s_msg_stream);
  Py_VISIT(traverse_module_state->__pyx_n_s_mult);
  Py_VISIT(traverse_module_state->__pyx_n_s_multiplicities);
  Py_VISIT(traverse_module_state->__pyx_n_s_multiplicity);
  Py_VISIT(traverse_module_state->__pyx_n_s_multiply_elements);
  Py_VISIT(traverse_module_state->__pyx_n_s_myslice);
  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_ncols);
  Py_VISIT(traverse_module_state->__pyx_n_s_neighbor);
  Py_VISIT(traverse_module_state->__pyx_n_s_neighbor0_idx);
  Py_VISIT(traverse_module_state->__pyx_n_s_neighbor1_idx);
  Py_VISIT(traverse_module_state->__pyx_n_s_neighbor2_idx);
  Py_VISIT(traverse_module_state->__pyx_n_s_neighbor3_idx);
  Py_VISIT(traverse_module_state->__pyx_n_s_neighbor_end);
  Py_VISIT(traverse_module_state->__pyx_n_s_neighbors);
  Py_VISIT(traverse_module_state->__pyx_n_s_new);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_displacement);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_tie);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_tri);
  Py_VISIT(traverse_module_state->__pyx_n_s_next);
  Py_VISIT(traverse_module_state->__pyx_n_s_next_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_no_arcs);
  Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
  Py_VISIT(traverse_module_state->__pyx_kp_s_no_solution_found);
  Py_VISIT(traverse_module_state->__pyx_n_s_non_peripheral);
  Py_VISIT(traverse_module_state->__pyx_kp_s_nonabelian_group_of_order_d);
  Py_VISIT(traverse_module_state->__pyx_kp_s_nonalternating_gz);
  Py_VISIT(traverse_module_state->__pyx_n_s_nonorientable);
  Py_VISIT(traverse_module_state->__pyx_n_s_nonzeros);
  Py_VISIT(traverse_module_state->__pyx_kp_s_not_attempted);
  Py_VISIT(traverse_module_state->__pyx_n_s_nrows);
  Py_VISIT(traverse_module_state->__pyx_n_s_num);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_cols);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_components);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_crossings);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_curves);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_cusps);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_edges);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_faces);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_fake_cusps);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_finite_vertices);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_gen);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_generators);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_gens);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_ideal_vertices);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_lengths);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_links);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_nonor_cusps);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_or_cusps);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_orig_gens);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_original_generators);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_relations);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_relators);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_rows);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_subdivisions);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_surfaces);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_tet);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_tetrahedra);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_threads);
  Py_VISIT(traverse_module_state->__pyx_n_s_num_vertices);
  Py_VISIT(traverse_module_state->__pyx_n_s_number);
  Py_VISIT(traverse_module_state->__pyx_n_s_number_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_number_to_native_number);
  Py_VISIT(traverse_module_state->__pyx_n_s_o31);
  Py_VISIT(traverse_module_state->__pyx_n_s_obsolete);
  Py_VISIT(traverse_module_state->__pyx_n_s_obstruction_class);
  Py_VISIT(traverse_module_state->__pyx_kp_s_octahedral_group);
  Py_VISIT(traverse_module_state->__pyx_n_s_of_link);
  Py_VISIT(traverse_module_state->__pyx_n_s_offset);
  Py_VISIT(traverse_module_state->__pyx_n_s_old);
  Py_VISIT(traverse_module_state->__pyx_n_s_omega);
  Py_VISIT(traverse_module_state->__pyx_n_s_one_manifold);
  Py_VISIT(traverse_module_state->__pyx_kp_s_one_sided);
  Py_VISIT(traverse_module_state->__pyx_n_s_one_tet_lengths);
  Py_VISIT(traverse_module_state->__pyx_n_s_one_tet_tilts);
  Py_VISIT(traverse_module_state->__pyx_n_s_one_vertex_lengths);
  Py_VISIT(traverse_module_state->__pyx_n_s_opacities);
  Py_VISIT(traverse_module_state->__pyx_n_s_open);
  Py_VISIT(traverse_module_state->__pyx_n_s_operator);
  Py_VISIT(traverse_module_state->__pyx_n_s_order);
  Py_VISIT(traverse_module_state->__pyx_n_s_orient);
  Py_VISIT(traverse_module_state->__pyx_n_s_orientability);
  Py_VISIT(traverse_module_state->__pyx_n_s_orientable);
  Py_VISIT(traverse_module_state->__pyx_n_s_orientation_cover);
  Py_VISIT(traverse_module_state->__pyx_kp_s_orientation_preserving);
  Py_VISIT(traverse_module_state->__pyx_kp_s_orientation_reversing);
  Py_VISIT(traverse_module_state->__pyx_n_s_orig_gens);
  Py_VISIT(traverse_module_state->__pyx_n_s_original_generators);
  Py_VISIT(traverse_module_state->__pyx_n_s_original_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_os);
  Py_VISIT(traverse_module_state->__pyx_n_s_other);
  Py_VISIT(traverse_module_state->__pyx_n_s_out_radius);
  Py_VISIT(traverse_module_state->__pyx_n_s_output);
  Py_VISIT(traverse_module_state->__pyx_n_s_output_file);
  Py_VISIT(traverse_module_state->__pyx_n_s_owns_c_symmetry_group);
  Py_VISIT(traverse_module_state->__pyx_n_s_p);
  Py_VISIT(traverse_module_state->__pyx_n_s_pad);
  Py_VISIT(traverse_module_state->__pyx_n_s_pair);
  Py_VISIT(traverse_module_state->__pyx_n_s_pairing_matrices);
  Py_VISIT(traverse_module_state->__pyx_n_s_pairing_words);
  Py_VISIT(traverse_module_state->__pyx_n_s_pari);
  Py_VISIT(traverse_module_state->__pyx_n_s_parity);
  Py_VISIT(traverse_module_state->__pyx_n_s_part);
  Py_VISIT(traverse_module_state->__pyx_n_s_parts);
  Py_VISIT(traverse_module_state->__pyx_n_s_passes_at_fours);
  Py_VISIT(traverse_module_state->__pyx_n_s_path);
  Py_VISIT(traverse_module_state->__pyx_n_s_path_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_peripheral);
  Py_VISIT(traverse_module_state->__pyx_n_s_peripheral_curves);
  Py_VISIT(traverse_module_state->__pyx_n_s_peripheral_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_perm);
  Py_VISIT(traverse_module_state->__pyx_n_s_perm0);
  Py_VISIT(traverse_module_state->__pyx_n_s_perm1);
  Py_VISIT(traverse_module_state->__pyx_n_s_perm2);
  Py_VISIT(traverse_module_state->__pyx_n_s_perm3);
  Py_VISIT(traverse_module_state->__pyx_n_s_perms);
  Py_VISIT(traverse_module_state->__pyx_n_s_permutation);
  Py_VISIT(traverse_module_state->__pyx_n_s_permutation_rep);
  Py_VISIT(traverse_module_state->__pyx_n_s_permutation_reps);
  Py_VISIT(traverse_module_state->__pyx_kp_b_pickle);
  Py_VISIT(traverse_module_state->__pyx_n_b_pickle_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_pickle_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_pieces);
  Py_VISIT(traverse_module_state->__pyx_n_s_plink);
  Py_VISIT(traverse_module_state->__pyx_n_s_plink_callback);
  Py_VISIT(traverse_module_state->__pyx_n_s_plink_callback_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_polish_hyperbolic_structures);
  Py_VISIT(traverse_module_state->__pyx_n_s_polished_tetrahedra_shapes);
  Py_VISIT(traverse_module_state->__pyx_n_s_polyhedral_description);
  Py_VISIT(traverse_module_state->__pyx_n_s_polyviewer);
  Py_VISIT(traverse_module_state->__pyx_n_s_pop);
  Py_VISIT(traverse_module_state->__pyx_n_s_popitem);
  Py_VISIT(traverse_module_state->__pyx_n_s_position);
  Py_VISIT(traverse_module_state->__pyx_n_s_precision);
  Py_VISIT(traverse_module_state->__pyx_n_s_prefix);
  Py_VISIT(traverse_module_state->__pyx_n_s_prepare);
  Py_VISIT(traverse_module_state->__pyx_n_s_presentation);
  Py_VISIT(traverse_module_state->__pyx_n_s_presentation_matrix);
  Py_VISIT(traverse_module_state->__pyx_n_s_print);
  Py_VISIT(traverse_module_state->__pyx_n_s_protocol);
  Py_VISIT(traverse_module_state->__pyx_n_s_ptolemy);
  Py_VISIT(traverse_module_state->__pyx_n_s_ptolemyManifoldMethods);
  Py_VISIT(traverse_module_state->__pyx_n_s_ptolemy_equations_action_by_dec);
  Py_VISIT(traverse_module_state->__pyx_n_s_ptolemy_equations_boundary_map);
  Py_VISIT(traverse_module_state->__pyx_n_s_ptolemy_equations_boundary_map_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_ptolemy_equations_boundary_map_3);
  Py_VISIT(traverse_module_state->__pyx_n_s_ptolemy_equations_identified_co);
  Py_VISIT(traverse_module_state->__pyx_n_s_ptolemy_equations_identified_fa);
  Py_VISIT(traverse_module_state->__pyx_n_s_ptolemy_generalized_obstruction);
  Py_VISIT(traverse_module_state->__pyx_n_s_ptolemy_obstruction_classes);
  Py_VISIT(traverse_module_state->__pyx_n_s_ptolemy_variety);
  Py_VISIT(traverse_module_state->__pyx_n_s_python_major_version);
  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_PresentationMatri);
  Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable);
  Py_VISIT(traverse_module_state->__pyx_n_s_q);
  Py_VISIT(traverse_module_state->__pyx_n_s_qualname);
  Py_VISIT(traverse_module_state->__pyx_n_s_r);
  Py_VISIT(traverse_module_state->__pyx_kp_s_r_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_radius);
  Py_VISIT(traverse_module_state->__pyx_n_s_randomize);
  Py_VISIT(traverse_module_state->__pyx_n_s_range);
  Py_VISIT(traverse_module_state->__pyx_n_s_rank);
  Py_VISIT(traverse_module_state->__pyx_n_s_raw_form);
  Py_VISIT(traverse_module_state->__pyx_n_s_rb);
  Py_VISIT(traverse_module_state->__pyx_n_s_re);
  Py_VISIT(traverse_module_state->__pyx_n_s_reach);
  Py_VISIT(traverse_module_state->__pyx_n_s_read);
  Py_VISIT(traverse_module_state->__pyx_n_s_readline);
  Py_VISIT(traverse_module_state->__pyx_n_s_readlines);
  Py_VISIT(traverse_module_state->__pyx_n_s_real);
  Py_VISIT(traverse_module_state->__pyx_n_s_real_coerced_to_bits_prec);
  Py_VISIT(traverse_module_state->__pyx_n_s_recompute);
  Py_VISIT(traverse_module_state->__pyx_n_s_record);
  Py_VISIT(traverse_module_state->__pyx_n_s_rect);
  Py_VISIT(traverse_module_state->__pyx_n_s_rect_im);
  Py_VISIT(traverse_module_state->__pyx_n_s_rect_re);
  Py_VISIT(traverse_module_state->__pyx_n_s_rect_shape);
  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_reduce_list_word);
  Py_VISIT(traverse_module_state->__pyx_n_s_regular);
  Py_VISIT(traverse_module_state->__pyx_n_s_reindex_cusps);
  Py_VISIT(traverse_module_state->__pyx_n_s_rel);
  Py_VISIT(traverse_module_state->__pyx_n_s_relation);
  Py_VISIT(traverse_module_state->__pyx_n_s_relation_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_relators);
  Py_VISIT(traverse_module_state->__pyx_n_s_rels);
  Py_VISIT(traverse_module_state->__pyx_n_s_remove);
  Py_VISIT(traverse_module_state->__pyx_n_s_remove_finite_vertices);
  Py_VISIT(traverse_module_state->__pyx_n_s_remove_finite_vertices_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_reopen);
  Py_VISIT(traverse_module_state->__pyx_n_s_rep);
  Py_VISIT(traverse_module_state->__pyx_n_s_replace);
  Py_VISIT(traverse_module_state->__pyx_n_s_repr);
  Py_VISIT(traverse_module_state->__pyx_n_s_repr_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_reps);
  Py_VISIT(traverse_module_state->__pyx_n_s_result);
  Py_VISIT(traverse_module_state->__pyx_n_s_result_curves);
  Py_VISIT(traverse_module_state->__pyx_n_s_result_cusp_indices);
  Py_VISIT(traverse_module_state->__pyx_n_s_return_isometries);
  Py_VISIT(traverse_module_state->__pyx_n_s_return_matrices);
  Py_VISIT(traverse_module_state->__pyx_n_s_return_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_retval);
  Py_VISIT(traverse_module_state->__pyx_n_s_rev_spec_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_reverse_orientation);
  Py_VISIT(traverse_module_state->__pyx_n_s_right);
  Py_VISIT(traverse_module_state->__pyx_n_s_rings);
  Py_VISIT(traverse_module_state->__pyx_n_s_rjust);
  Py_VISIT(traverse_module_state->__pyx_n_s_rolfsen_link_regexs);
  Py_VISIT(traverse_module_state->__pyx_n_s_round);
  Py_VISIT(traverse_module_state->__pyx_n_s_row);
  Py_VISIT(traverse_module_state->__pyx_n_s_row_entries);
  Py_VISIT(traverse_module_state->__pyx_n_s_row_op);
  Py_VISIT(traverse_module_state->__pyx_n_s_rows);
  Py_VISIT(traverse_module_state->__pyx_n_s_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_s_2);
  Py_VISIT(traverse_module_state->__pyx_kp_s_s_3);
  Py_VISIT(traverse_module_state->__pyx_kp_s_s_4);
  Py_VISIT(traverse_module_state->__pyx_kp_s_s_F_d);
  Py_VISIT(traverse_module_state->__pyx_kp_s_s_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_s_s_explain_columns_s_explain_r);
  Py_VISIT(traverse_module_state->__pyx_kp_s_s_s_with_euler_s);
  Py_VISIT(traverse_module_state->__pyx_kp_s_s_x_s);
  Py_VISIT(traverse_module_state->__pyx_n_s_sage);
  Py_VISIT(traverse_module_state->__pyx_n_s_sage_all);
  Py_VISIT(traverse_module_state->__pyx_n_s_sage_groups_free_group);
  Py_VISIT(traverse_module_state->__pyx_n_s_sage_groups_perm_gps_permgroup);
  Py_VISIT(traverse_module_state->__pyx_n_s_sage_groups_perm_gps_permgroup_e);
  Py_VISIT(traverse_module_state->__pyx_n_s_sage_helper);
  Py_VISIT(traverse_module_state->__pyx_n_s_sage_interfaces_abc);
  Py_VISIT(traverse_module_state->__pyx_n_s_sage_interfaces_gap);
  Py_VISIT(traverse_module_state->__pyx_n_s_sage_interfaces_magma);
  Py_VISIT(traverse_module_state->__pyx_n_s_sage_matrix);
  Py_VISIT(traverse_module_state->__pyx_n_s_sage_matrix_constructor);
  Py_VISIT(traverse_module_state->__pyx_n_s_sage_object);
  Py_VISIT(traverse_module_state->__pyx_n_s_sage_structure_sage_object);
  Py_VISIT(traverse_module_state->__pyx_n_s_save);
  Py_VISIT(traverse_module_state->__pyx_n_s_savefile);
  Py_VISIT(traverse_module_state->__pyx_n_s_second_char);
  Py_VISIT(traverse_module_state->__pyx_n_s_second_nybble);
  Py_VISIT(traverse_module_state->__pyx_n_s_seed);
  Py_VISIT(traverse_module_state->__pyx_n_s_seek);
  Py_VISIT(traverse_module_state->__pyx_n_s_segment);
  Py_VISIT(traverse_module_state->__pyx_n_s_segment_list);
  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_sep);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_DTcode);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_PDcode);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_displacement);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_name_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_peripheral_curves);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_peripheral_from_decoration);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_rand_seed);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_target_holonomy);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_test_flag);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_tetrahedra_shapes);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_tie);
  Py_VISIT(traverse_module_state->__pyx_n_s_setattr);
  Py_VISIT(traverse_module_state->__pyx_n_s_setitem);
  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_seven_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_shape);
  Py_VISIT(traverse_module_state->__pyx_n_s_shape_accuracy);
  Py_VISIT(traverse_module_state->__pyx_kp_s_shape_precision);
  Py_VISIT(traverse_module_state->__pyx_n_s_shapes);
  Py_VISIT(traverse_module_state->__pyx_n_s_short_relators);
  Py_VISIT(traverse_module_state->__pyx_n_s_shortest);
  Py_VISIT(traverse_module_state->__pyx_n_s_shortest_longitudes);
  Py_VISIT(traverse_module_state->__pyx_n_s_shortest_meridians);
  Py_VISIT(traverse_module_state->__pyx_n_s_show_uAcknowledge);
  Py_VISIT(traverse_module_state->__pyx_n_s_shrink_factor);
  Py_VISIT(traverse_module_state->__pyx_n_s_side);
  Py_VISIT(traverse_module_state->__pyx_n_s_side_lengths);
  Py_VISIT(traverse_module_state->__pyx_n_s_sided);
  Py_VISIT(traverse_module_state->__pyx_n_s_sign);
  Py_VISIT(traverse_module_state->__pyx_n_s_signs);
  Py_VISIT(traverse_module_state->__pyx_n_s_signtype);
  Py_VISIT(traverse_module_state->__pyx_n_s_simplified_matrix);
  Py_VISIT(traverse_module_state->__pyx_n_s_simplify);
  Py_VISIT(traverse_module_state->__pyx_n_s_simplify_presentation);
  Py_VISIT(traverse_module_state->__pyx_n_s_singularity_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_six_length);
  Py_VISIT(traverse_module_state->__pyx_n_s_size);
  Py_VISIT(traverse_module_state->__pyx_n_s_sl2);
  Py_VISIT(traverse_module_state->__pyx_n_s_smith_form);
  Py_VISIT(traverse_module_state->__pyx_n_s_snap);
  Py_VISIT(traverse_module_state->__pyx_n_s_snapPea);
  Py_VISIT(traverse_module_state->__pyx_n_s_snappea);
  Py_VISIT(traverse_module_state->__pyx_n_s_snappy);
  Py_VISIT(traverse_module_state->__pyx_n_s_so_far);
  Py_VISIT(traverse_module_state->__pyx_n_s_soln);
  Py_VISIT(traverse_module_state->__pyx_n_s_solution_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_sorted);
  Py_VISIT(traverse_module_state->__pyx_n_s_spec);
  Py_VISIT(traverse_module_state->__pyx_n_s_spec_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_specs);
  Py_VISIT(traverse_module_state->__pyx_n_s_spectrum);
  Py_VISIT(traverse_module_state->__pyx_n_s_spherogram);
  Py_VISIT(traverse_module_state->__pyx_n_s_spin_short);
  Py_VISIT(traverse_module_state->__pyx_n_s_spine_radius);
  Py_VISIT(traverse_module_state->__pyx_n_s_split);
  Py_VISIT(traverse_module_state->__pyx_n_s_split_filling_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_splitting);
  Py_VISIT(traverse_module_state->__pyx_n_s_splitting_from_string);
  Py_VISIT(traverse_module_state->__pyx_n_s_splitting_surfaces);
  Py_VISIT(traverse_module_state->__pyx_n_s_start);
  Py_VISIT(traverse_module_state->__pyx_n_s_startswith);
  Py_VISIT(traverse_module_state->__pyx_n_s_state);
  Py_VISIT(traverse_module_state->__pyx_n_s_staticmethod);
  Py_VISIT(traverse_module_state->__pyx_n_s_stderr);
  Py_VISIT(traverse_module_state->__pyx_n_s_stdout);
  Py_VISIT(traverse_module_state->__pyx_n_s_step);
  Py_VISIT(traverse_module_state->__pyx_n_s_stl);
  Py_VISIT(traverse_module_state->__pyx_n_s_stop);
  Py_VISIT(traverse_module_state->__pyx_n_s_stopper);
  Py_VISIT(traverse_module_state->__pyx_n_s_stopping_displacement);
  Py_VISIT(traverse_module_state->__pyx_n_s_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_strandtype);
  Py_VISIT(traverse_module_state->__pyx_n_s_strategy);
  Py_VISIT(traverse_module_state->__pyx_n_s_string);
  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_strline);
  Py_VISIT(traverse_module_state->__pyx_n_s_struct);
  Py_VISIT(traverse_module_state->__pyx_n_s_structure);
  Py_VISIT(traverse_module_state->__pyx_n_s_subgroup);
  Py_VISIT(traverse_module_state->__pyx_n_s_sum);
  Py_VISIT(traverse_module_state->__pyx_n_s_super);
  Py_VISIT(traverse_module_state->__pyx_n_s_surface);
  Py_VISIT(traverse_module_state->__pyx_n_s_surfaces);
  Py_VISIT(traverse_module_state->__pyx_n_s_symmetric_triangulation);
  Py_VISIT(traverse_module_state->__pyx_n_s_symmetries_of_link);
  Py_VISIT(traverse_module_state->__pyx_n_s_symmetries_of_manifold);
  Py_VISIT(traverse_module_state->__pyx_n_s_symmetry_group);
  Py_VISIT(traverse_module_state->__pyx_n_s_symplectic_basis);
  Py_VISIT(traverse_module_state->__pyx_n_s_symplectic_form);
  Py_VISIT(traverse_module_state->__pyx_n_s_sys);
  Py_VISIT(traverse_module_state->__pyx_n_s_t);
  Py_VISIT(traverse_module_state->__pyx_n_s_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_table_directory);
  Py_VISIT(traverse_module_state->__pyx_n_s_tail);
  Py_VISIT(traverse_module_state->__pyx_n_s_tail_vertex_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_tarfile);
  Py_VISIT(traverse_module_state->__pyx_n_s_target);
  Py_VISIT(traverse_module_state->__pyx_n_s_tarpath);
  Py_VISIT(traverse_module_state->__pyx_n_s_temp);
  Py_VISIT(traverse_module_state->__pyx_n_s_tempfile);
  Py_VISIT(traverse_module_state->__pyx_n_s_test);
  Py_VISIT(traverse_module_state->__pyx_n_s_tet);
  Py_VISIT(traverse_module_state->__pyx_n_s_tet_num);
  Py_VISIT(traverse_module_state->__pyx_n_s_tetrahedra_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_tetrahedra_shapes);
  Py_VISIT(traverse_module_state->__pyx_kp_s_tetrahedra_shapes_were_inserted);
  Py_VISIT(traverse_module_state->__pyx_kp_s_tetrahedral_group);
  Py_VISIT(traverse_module_state->__pyx_kp_s_the_gap_method_for_covers_requir);
  Py_VISIT(traverse_module_state->__pyx_kp_s_the_magma_method_for_covers_requ);
  Py_VISIT(traverse_module_state->__pyx_n_s_three_to_two);
  Py_VISIT(traverse_module_state->__pyx_n_s_throw);
  Py_VISIT(traverse_module_state->__pyx_n_s_tilts);
  Py_VISIT(traverse_module_state->__pyx_n_s_time);
  Py_VISIT(traverse_module_state->__pyx_n_s_tip);
  Py_VISIT(traverse_module_state->__pyx_n_s_tip_vertex_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_title);
  Py_VISIT(traverse_module_state->__pyx_n_s_to_byte_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_to_bytes);
  Py_VISIT(traverse_module_state->__pyx_n_s_to_do);
  Py_VISIT(traverse_module_state->__pyx_n_s_to_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_to_string);
  Py_VISIT(traverse_module_state->__pyx_n_s_to_string_locals_genexpr);
  Py_VISIT(traverse_module_state->__pyx_n_s_topology);
  Py_VISIT(traverse_module_state->__pyx_kp_s_torus_cusp);
  Py_VISIT(traverse_module_state->__pyx_n_s_total);
  Py_VISIT(traverse_module_state->__pyx_n_s_translations);
  Py_VISIT(traverse_module_state->__pyx_kp_s_tri);
  Py_VISIT(traverse_module_state->__pyx_kp_s_tri_txt);
  Py_VISIT(traverse_module_state->__pyx_n_s_triangulation);
  Py_VISIT(traverse_module_state->__pyx_n_s_triangulation_class);
  Py_VISIT(traverse_module_state->__pyx_n_s_triangulation_help);
  Py_VISIT(traverse_module_state->__pyx_n_s_triangulation_isosig);
  Py_VISIT(traverse_module_state->__pyx_n_s_try_hard_to_shorten_relators);
  Py_VISIT(traverse_module_state->__pyx_n_s_twister);
  Py_VISIT(traverse_module_state->__pyx_n_s_twister_word);
  Py_VISIT(traverse_module_state->__pyx_n_s_two_sided);
  Py_VISIT(traverse_module_state->__pyx_kp_s_two_sided_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_two_to_three);
  Py_VISIT(traverse_module_state->__pyx_n_s_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_type_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_types);
  Py_VISIT(traverse_module_state->__pyx_n_s_u);
  Py_VISIT(traverse_module_state->__pyx_n_s_unit);
  Py_VISIT(traverse_module_state->__pyx_n_s_unknown);
  Py_VISIT(traverse_module_state->__pyx_n_s_unnamed);
  Py_VISIT(traverse_module_state->__pyx_kp_s_unnamed_link);
  Py_VISIT(traverse_module_state->__pyx_n_s_unpack);
  Py_VISIT(traverse_module_state->__pyx_n_s_unpickle_dirichlet_domain);
  Py_VISIT(traverse_module_state->__pyx_kp_s_unrecognized_solution_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_unsimplified_filled_triangulati);
  Py_VISIT(traverse_module_state->__pyx_n_s_unsimplified_filled_triangulati_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_update);
  Py_VISIT(traverse_module_state->__pyx_n_s_upper);
  Py_VISIT(traverse_module_state->__pyx_n_s_use_field_conversion);
  Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate);
  Py_VISIT(traverse_module_state->__pyx_n_s_user_radius);
  Py_VISIT(traverse_module_state->__pyx_kp_s_utf_8);
  Py_VISIT(traverse_module_state->__pyx_n_s_v);
  Py_VISIT(traverse_module_state->__pyx_kp_s_v1205_2_3);
  Py_VISIT(traverse_module_state->__pyx_n_s_valid_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_value);
  Py_VISIT(traverse_module_state->__pyx_n_s_values);
  Py_VISIT(traverse_module_state->__pyx_n_s_verbose_form);
  Py_VISIT(traverse_module_state->__pyx_n_s_verified);
  Py_VISIT(traverse_module_state->__pyx_n_s_verify);
  Py_VISIT(traverse_module_state->__pyx_n_s_verify_complex_volume);
  Py_VISIT(traverse_module_state->__pyx_n_s_version);
  Py_VISIT(traverse_module_state->__pyx_n_s_version_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_vertex);
  Py_VISIT(traverse_module_state->__pyx_n_s_vertex_class);
  Py_VISIT(traverse_module_state->__pyx_n_s_vertex_data_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_vertex_epsilon);
  Py_VISIT(traverse_module_state->__pyx_n_s_vertex_image_indices);
  Py_VISIT(traverse_module_state->__pyx_n_s_vertex_indices);
  Py_VISIT(traverse_module_state->__pyx_n_s_vertex_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_vertex_list_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_vertex_to_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_vertex_to_index_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_vertices);
  Py_VISIT(traverse_module_state->__pyx_n_s_view);
  Py_VISIT(traverse_module_state->__pyx_n_s_vol);
  Py_VISIT(traverse_module_state->__pyx_n_s_volume);
  Py_VISIT(traverse_module_state->__pyx_n_s_w);
  Py_VISIT(traverse_module_state->__pyx_n_s_w0);
  Py_VISIT(traverse_module_state->__pyx_n_s_w1);
  Py_VISIT(traverse_module_state->__pyx_n_s_wb);
  Py_VISIT(traverse_module_state->__pyx_n_s_where_to_resume);
  Py_VISIT(traverse_module_state->__pyx_n_s_which_curve);
  Py_VISIT(traverse_module_state->__pyx_n_s_which_cusp);
  Py_VISIT(traverse_module_state->__pyx_n_s_which_solution);
  Py_VISIT(traverse_module_state->__pyx_n_s_which_surface);
  Py_VISIT(traverse_module_state->__pyx_n_s_with_hyperbolic_structure);
  Py_VISIT(traverse_module_state->__pyx_n_s_within_sage);
  Py_VISIT(traverse_module_state->__pyx_n_s_without_hyperbolic_structure);
  Py_VISIT(traverse_module_state->__pyx_n_s_word);
  Py_VISIT(traverse_module_state->__pyx_n_s_word_as_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_word_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_word_moves);
  Py_VISIT(traverse_module_state->__pyx_n_s_words);
  Py_VISIT(traverse_module_state->__pyx_n_s_write);
  Py_VISIT(traverse_module_state->__pyx_n_s_x);
  Py_VISIT(traverse_module_state->__pyx_n_s_x012);
  Py_VISIT(traverse_module_state->__pyx_kp_s_xX_d);
  Py_VISIT(traverse_module_state->__pyx_kp_s_x_d_1);
  Py_VISIT(traverse_module_state->__pyx_n_s_y);
  Py_VISIT(traverse_module_state->__pyx_n_s_y123);
  Py_VISIT(traverse_module_state->__pyx_n_s_z);
  Py_VISIT(traverse_module_state->__pyx_n_s_zeros);
  Py_VISIT(traverse_module_state->__pyx_float_0_0);
  Py_VISIT(traverse_module_state->__pyx_float_0_1);
  Py_VISIT(traverse_module_state->__pyx_float_0_2);
  Py_VISIT(traverse_module_state->__pyx_float_0_9);
  Py_VISIT(traverse_module_state->__pyx_float_1_0);
  Py_VISIT(traverse_module_state->__pyx_float_1eneg_9);
  Py_VISIT(traverse_module_state->__pyx_int_0);
  Py_VISIT(traverse_module_state->__pyx_int_1);
  Py_VISIT(traverse_module_state->__pyx_int_2);
  Py_VISIT(traverse_module_state->__pyx_int_3);
  Py_VISIT(traverse_module_state->__pyx_int_4);
  Py_VISIT(traverse_module_state->__pyx_int_5);
  Py_VISIT(traverse_module_state->__pyx_int_6);
  Py_VISIT(traverse_module_state->__pyx_int_7);
  Py_VISIT(traverse_module_state->__pyx_int_8);
  Py_VISIT(traverse_module_state->__pyx_int_9);
  Py_VISIT(traverse_module_state->__pyx_int_10);
  Py_VISIT(traverse_module_state->__pyx_int_11);
  Py_VISIT(traverse_module_state->__pyx_int_12);
  Py_VISIT(traverse_module_state->__pyx_int_13);
  Py_VISIT(traverse_module_state->__pyx_int_14);
  Py_VISIT(traverse_module_state->__pyx_int_15);
  Py_VISIT(traverse_module_state->__pyx_int_16);
  Py_VISIT(traverse_module_state->__pyx_int_17);
  Py_VISIT(traverse_module_state->__pyx_int_18);
  Py_VISIT(traverse_module_state->__pyx_int_19);
  Py_VISIT(traverse_module_state->__pyx_int_20);
  Py_VISIT(traverse_module_state->__pyx_int_21);
  Py_VISIT(traverse_module_state->__pyx_int_22);
  Py_VISIT(traverse_module_state->__pyx_int_23);
  Py_VISIT(traverse_module_state->__pyx_int_24);
  Py_VISIT(traverse_module_state->__pyx_int_25);
  Py_VISIT(traverse_module_state->__pyx_int_26);
  Py_VISIT(traverse_module_state->__pyx_int_27);
  Py_VISIT(traverse_module_state->__pyx_int_28);
  Py_VISIT(traverse_module_state->__pyx_int_29);
  Py_VISIT(traverse_module_state->__pyx_int_30);
  Py_VISIT(traverse_module_state->__pyx_int_31);
  Py_VISIT(traverse_module_state->__pyx_int_32);
  Py_VISIT(traverse_module_state->__pyx_int_33);
  Py_VISIT(traverse_module_state->__pyx_int_34);
  Py_VISIT(traverse_module_state->__pyx_int_35);
  Py_VISIT(traverse_module_state->__pyx_int_36);
  Py_VISIT(traverse_module_state->__pyx_int_37);
  Py_VISIT(traverse_module_state->__pyx_int_38);
  Py_VISIT(traverse_module_state->__pyx_int_39);
  Py_VISIT(traverse_module_state->__pyx_int_40);
  Py_VISIT(traverse_module_state->__pyx_int_41);
  Py_VISIT(traverse_module_state->__pyx_int_42);
  Py_VISIT(traverse_module_state->__pyx_int_43);
  Py_VISIT(traverse_module_state->__pyx_int_44);
  Py_VISIT(traverse_module_state->__pyx_int_45);
  Py_VISIT(traverse_module_state->__pyx_int_46);
  Py_VISIT(traverse_module_state->__pyx_int_47);
  Py_VISIT(traverse_module_state->__pyx_int_48);
  Py_VISIT(traverse_module_state->__pyx_int_49);
  Py_VISIT(traverse_module_state->__pyx_int_50);
  Py_VISIT(traverse_module_state->__pyx_int_51);
  Py_VISIT(traverse_module_state->__pyx_int_52);
  Py_VISIT(traverse_module_state->__pyx_int_53);
  Py_VISIT(traverse_module_state->__pyx_int_54);
  Py_VISIT(traverse_module_state->__pyx_int_55);
  Py_VISIT(traverse_module_state->__pyx_int_56);
  Py_VISIT(traverse_module_state->__pyx_int_57);
  Py_VISIT(traverse_module_state->__pyx_int_58);
  Py_VISIT(traverse_module_state->__pyx_int_59);
  Py_VISIT(traverse_module_state->__pyx_int_60);
  Py_VISIT(traverse_module_state->__pyx_int_61);
  Py_VISIT(traverse_module_state->__pyx_int_62);
  Py_VISIT(traverse_module_state->__pyx_int_63);
  Py_VISIT(traverse_module_state->__pyx_int_64);
  Py_VISIT(traverse_module_state->__pyx_int_65);
  Py_VISIT(traverse_module_state->__pyx_int_66);
  Py_VISIT(traverse_module_state->__pyx_int_67);
  Py_VISIT(traverse_module_state->__pyx_int_68);
  Py_VISIT(traverse_module_state->__pyx_int_69);
  Py_VISIT(traverse_module_state->__pyx_int_70);
  Py_VISIT(traverse_module_state->__pyx_int_71);
  Py_VISIT(traverse_module_state->__pyx_int_72);
  Py_VISIT(traverse_module_state->__pyx_int_73);
  Py_VISIT(traverse_module_state->__pyx_int_74);
  Py_VISIT(traverse_module_state->__pyx_int_75);
  Py_VISIT(traverse_module_state->__pyx_int_76);
  Py_VISIT(traverse_module_state->__pyx_int_77);
  Py_VISIT(traverse_module_state->__pyx_int_78);
  Py_VISIT(traverse_module_state->__pyx_int_79);
  Py_VISIT(traverse_module_state->__pyx_int_80);
  Py_VISIT(traverse_module_state->__pyx_int_81);
  Py_VISIT(traverse_module_state->__pyx_int_82);
  Py_VISIT(traverse_module_state->__pyx_int_83);
  Py_VISIT(traverse_module_state->__pyx_int_84);
  Py_VISIT(traverse_module_state->__pyx_int_85);
  Py_VISIT(traverse_module_state->__pyx_int_86);
  Py_VISIT(traverse_module_state->__pyx_int_87);
  Py_VISIT(traverse_module_state->__pyx_int_88);
  Py_VISIT(traverse_module_state->__pyx_int_89);
  Py_VISIT(traverse_module_state->__pyx_int_90);
  Py_VISIT(traverse_module_state->__pyx_int_91);
  Py_VISIT(traverse_module_state->__pyx_int_92);
  Py_VISIT(traverse_module_state->__pyx_int_93);
  Py_VISIT(traverse_module_state->__pyx_int_94);
  Py_VISIT(traverse_module_state->__pyx_int_95);
  Py_VISIT(traverse_module_state->__pyx_int_96);
  Py_VISIT(traverse_module_state->__pyx_int_97);
  Py_VISIT(traverse_module_state->__pyx_int_98);
  Py_VISIT(traverse_module_state->__pyx_int_99);
  Py_VISIT(traverse_module_state->__pyx_int_100);
  Py_VISIT(traverse_module_state->__pyx_int_101);
  Py_VISIT(traverse_module_state->__pyx_int_102);
  Py_VISIT(traverse_module_state->__pyx_int_103);
  Py_VISIT(traverse_module_state->__pyx_int_104);
  Py_VISIT(traverse_module_state->__pyx_int_105);
  Py_VISIT(traverse_module_state->__pyx_int_106);
  Py_VISIT(traverse_module_state->__pyx_int_107);
  Py_VISIT(traverse_module_state->__pyx_int_108);
  Py_VISIT(traverse_module_state->__pyx_int_109);
  Py_VISIT(traverse_module_state->__pyx_int_110);
  Py_VISIT(traverse_module_state->__pyx_int_111);
  Py_VISIT(traverse_module_state->__pyx_int_112);
  Py_VISIT(traverse_module_state->__pyx_int_113);
  Py_VISIT(traverse_module_state->__pyx_int_114);
  Py_VISIT(traverse_module_state->__pyx_int_115);
  Py_VISIT(traverse_module_state->__pyx_int_116);
  Py_VISIT(traverse_module_state->__pyx_int_117);
  Py_VISIT(traverse_module_state->__pyx_int_118);
  Py_VISIT(traverse_module_state->__pyx_int_119);
  Py_VISIT(traverse_module_state->__pyx_int_120);
  Py_VISIT(traverse_module_state->__pyx_int_121);
  Py_VISIT(traverse_module_state->__pyx_int_122);
  Py_VISIT(traverse_module_state->__pyx_int_123);
  Py_VISIT(traverse_module_state->__pyx_int_124);
  Py_VISIT(traverse_module_state->__pyx_int_125);
  Py_VISIT(traverse_module_state->__pyx_int_126);
  Py_VISIT(traverse_module_state->__pyx_int_127);
  Py_VISIT(traverse_module_state->__pyx_int_128);
  Py_VISIT(traverse_module_state->__pyx_int_129);
  Py_VISIT(traverse_module_state->__pyx_int_130);
  Py_VISIT(traverse_module_state->__pyx_int_131);
  Py_VISIT(traverse_module_state->__pyx_int_132);
  Py_VISIT(traverse_module_state->__pyx_int_133);
  Py_VISIT(traverse_module_state->__pyx_int_134);
  Py_VISIT(traverse_module_state->__pyx_int_135);
  Py_VISIT(traverse_module_state->__pyx_int_136);
  Py_VISIT(traverse_module_state->__pyx_int_137);
  Py_VISIT(traverse_module_state->__pyx_int_138);
  Py_VISIT(traverse_module_state->__pyx_int_139);
  Py_VISIT(traverse_module_state->__pyx_int_140);
  Py_VISIT(traverse_module_state->__pyx_int_141);
  Py_VISIT(traverse_module_state->__pyx_int_142);
  Py_VISIT(traverse_module_state->__pyx_int_143);
  Py_VISIT(traverse_module_state->__pyx_int_144);
  Py_VISIT(traverse_module_state->__pyx_int_145);
  Py_VISIT(traverse_module_state->__pyx_int_146);
  Py_VISIT(traverse_module_state->__pyx_int_147);
  Py_VISIT(traverse_module_state->__pyx_int_148);
  Py_VISIT(traverse_module_state->__pyx_int_149);
  Py_VISIT(traverse_module_state->__pyx_int_150);
  Py_VISIT(traverse_module_state->__pyx_int_151);
  Py_VISIT(traverse_module_state->__pyx_int_152);
  Py_VISIT(traverse_module_state->__pyx_int_153);
  Py_VISIT(traverse_module_state->__pyx_int_154);
  Py_VISIT(traverse_module_state->__pyx_int_155);
  Py_VISIT(traverse_module_state->__pyx_int_156);
  Py_VISIT(traverse_module_state->__pyx_int_157);
  Py_VISIT(traverse_module_state->__pyx_int_158);
  Py_VISIT(traverse_module_state->__pyx_int_159);
  Py_VISIT(traverse_module_state->__pyx_int_160);
  Py_VISIT(traverse_module_state->__pyx_int_161);
  Py_VISIT(traverse_module_state->__pyx_int_162);
  Py_VISIT(traverse_module_state->__pyx_int_163);
  Py_VISIT(traverse_module_state->__pyx_int_164);
  Py_VISIT(traverse_module_state->__pyx_int_165);
  Py_VISIT(traverse_module_state->__pyx_int_166);
  Py_VISIT(traverse_module_state->__pyx_int_167);
  Py_VISIT(traverse_module_state->__pyx_int_168);
  Py_VISIT(traverse_module_state->__pyx_int_169);
  Py_VISIT(traverse_module_state->__pyx_int_170);
  Py_VISIT(traverse_module_state->__pyx_int_171);
  Py_VISIT(traverse_module_state->__pyx_int_172);
  Py_VISIT(traverse_module_state->__pyx_int_173);
  Py_VISIT(traverse_module_state->__pyx_int_174);
  Py_VISIT(traverse_module_state->__pyx_int_175);
  Py_VISIT(traverse_module_state->__pyx_int_176);
  Py_VISIT(traverse_module_state->__pyx_int_177);
  Py_VISIT(traverse_module_state->__pyx_int_178);
  Py_VISIT(traverse_module_state->__pyx_int_179);
  Py_VISIT(traverse_module_state->__pyx_int_180);
  Py_VISIT(traverse_module_state->__pyx_int_181);
  Py_VISIT(traverse_module_state->__pyx_int_182);
  Py_VISIT(traverse_module_state->__pyx_int_183);
  Py_VISIT(traverse_module_state->__pyx_int_184);
  Py_VISIT(traverse_module_state->__pyx_int_185);
  Py_VISIT(traverse_module_state->__pyx_int_186);
  Py_VISIT(traverse_module_state->__pyx_int_187);
  Py_VISIT(traverse_module_state->__pyx_int_188);
  Py_VISIT(traverse_module_state->__pyx_int_189);
  Py_VISIT(traverse_module_state->__pyx_int_190);
  Py_VISIT(traverse_module_state->__pyx_int_191);
  Py_VISIT(traverse_module_state->__pyx_int_192);
  Py_VISIT(traverse_module_state->__pyx_int_193);
  Py_VISIT(traverse_module_state->__pyx_int_194);
  Py_VISIT(traverse_module_state->__pyx_int_195);
  Py_VISIT(traverse_module_state->__pyx_int_196);
  Py_VISIT(traverse_module_state->__pyx_int_197);
  Py_VISIT(traverse_module_state->__pyx_int_198);
  Py_VISIT(traverse_module_state->__pyx_int_199);
  Py_VISIT(traverse_module_state->__pyx_int_200);
  Py_VISIT(traverse_module_state->__pyx_int_201);
  Py_VISIT(traverse_module_state->__pyx_int_202);
  Py_VISIT(traverse_module_state->__pyx_int_203);
  Py_VISIT(traverse_module_state->__pyx_int_204);
  Py_VISIT(traverse_module_state->__pyx_int_205);
  Py_VISIT(traverse_module_state->__pyx_int_206);
  Py_VISIT(traverse_module_state->__pyx_int_207);
  Py_VISIT(traverse_module_state->__pyx_int_208);
  Py_VISIT(traverse_module_state->__pyx_int_209);
  Py_VISIT(traverse_module_state->__pyx_int_210);
  Py_VISIT(traverse_module_state->__pyx_int_211);
  Py_VISIT(traverse_module_state->__pyx_int_212);
  Py_VISIT(traverse_module_state->__pyx_int_213);
  Py_VISIT(traverse_module_state->__pyx_int_214);
  Py_VISIT(traverse_module_state->__pyx_int_215);
  Py_VISIT(traverse_module_state->__pyx_int_216);
  Py_VISIT(traverse_module_state->__pyx_int_217);
  Py_VISIT(traverse_module_state->__pyx_int_218);
  Py_VISIT(traverse_module_state->__pyx_int_219);
  Py_VISIT(traverse_module_state->__pyx_int_220);
  Py_VISIT(traverse_module_state->__pyx_int_221);
  Py_VISIT(traverse_module_state->__pyx_int_222);
  Py_VISIT(traverse_module_state->__pyx_int_223);
  Py_VISIT(traverse_module_state->__pyx_int_224);
  Py_VISIT(traverse_module_state->__pyx_int_225);
  Py_VISIT(traverse_module_state->__pyx_int_226);
  Py_VISIT(traverse_module_state->__pyx_int_227);
  Py_VISIT(traverse_module_state->__pyx_int_228);
  Py_VISIT(traverse_module_state->__pyx_int_229);
  Py_VISIT(traverse_module_state->__pyx_int_230);
  Py_VISIT(traverse_module_state->__pyx_int_231);
  Py_VISIT(traverse_module_state->__pyx_int_232);
  Py_VISIT(traverse_module_state->__pyx_int_233);
  Py_VISIT(traverse_module_state->__pyx_int_234);
  Py_VISIT(traverse_module_state->__pyx_int_235);
  Py_VISIT(traverse_module_state->__pyx_int_236);
  Py_VISIT(traverse_module_state->__pyx_int_237);
  Py_VISIT(traverse_module_state->__pyx_int_238);
  Py_VISIT(traverse_module_state->__pyx_int_239);
  Py_VISIT(traverse_module_state->__pyx_int_240);
  Py_VISIT(traverse_module_state->__pyx_int_241);
  Py_VISIT(traverse_module_state->__pyx_int_242);
  Py_VISIT(traverse_module_state->__pyx_int_243);
  Py_VISIT(traverse_module_state->__pyx_int_244);
  Py_VISIT(traverse_module_state->__pyx_int_245);
  Py_VISIT(traverse_module_state->__pyx_int_246);
  Py_VISIT(traverse_module_state->__pyx_int_247);
  Py_VISIT(traverse_module_state->__pyx_int_248);
  Py_VISIT(traverse_module_state->__pyx_int_249);
  Py_VISIT(traverse_module_state->__pyx_int_250);
  Py_VISIT(traverse_module_state->__pyx_int_251);
  Py_VISIT(traverse_module_state->__pyx_int_252);
  Py_VISIT(traverse_module_state->__pyx_int_253);
  Py_VISIT(traverse_module_state->__pyx_int_254);
  Py_VISIT(traverse_module_state->__pyx_int_255);
  Py_VISIT(traverse_module_state->__pyx_int_256);
  Py_VISIT(traverse_module_state->__pyx_int_257);
  Py_VISIT(traverse_module_state->__pyx_int_258);
  Py_VISIT(traverse_module_state->__pyx_int_259);
  Py_VISIT(traverse_module_state->__pyx_int_260);
  Py_VISIT(traverse_module_state->__pyx_int_261);
  Py_VISIT(traverse_module_state->__pyx_int_262);
  Py_VISIT(traverse_module_state->__pyx_int_263);
  Py_VISIT(traverse_module_state->__pyx_int_264);
  Py_VISIT(traverse_module_state->__pyx_int_265);
  Py_VISIT(traverse_module_state->__pyx_int_266);
  Py_VISIT(traverse_module_state->__pyx_int_267);
  Py_VISIT(traverse_module_state->__pyx_int_268);
  Py_VISIT(traverse_module_state->__pyx_int_269);
  Py_VISIT(traverse_module_state->__pyx_int_270);
  Py_VISIT(traverse_module_state->__pyx_int_271);
  Py_VISIT(traverse_module_state->__pyx_int_272);
  Py_VISIT(traverse_module_state->__pyx_int_273);
  Py_VISIT(traverse_module_state->__pyx_int_274);
  Py_VISIT(traverse_module_state->__pyx_int_275);
  Py_VISIT(traverse_module_state->__pyx_int_276);
  Py_VISIT(traverse_module_state->__pyx_int_277);
  Py_VISIT(traverse_module_state->__pyx_int_278);
  Py_VISIT(traverse_module_state->__pyx_int_279);
  Py_VISIT(traverse_module_state->__pyx_int_280);
  Py_VISIT(traverse_module_state->__pyx_int_281);
  Py_VISIT(traverse_module_state->__pyx_int_282);
  Py_VISIT(traverse_module_state->__pyx_int_283);
  Py_VISIT(traverse_module_state->__pyx_int_284);
  Py_VISIT(traverse_module_state->__pyx_int_285);
  Py_VISIT(traverse_module_state->__pyx_int_286);
  Py_VISIT(traverse_module_state->__pyx_int_287);
  Py_VISIT(traverse_module_state->__pyx_int_288);
  Py_VISIT(traverse_module_state->__pyx_int_289);
  Py_VISIT(traverse_module_state->__pyx_int_290);
  Py_VISIT(traverse_module_state->__pyx_int_291);
  Py_VISIT(traverse_module_state->__pyx_int_292);
  Py_VISIT(traverse_module_state->__pyx_int_293);
  Py_VISIT(traverse_module_state->__pyx_int_294);
  Py_VISIT(traverse_module_state->__pyx_int_295);
  Py_VISIT(traverse_module_state->__pyx_int_296);
  Py_VISIT(traverse_module_state->__pyx_int_297);
  Py_VISIT(traverse_module_state->__pyx_int_298);
  Py_VISIT(traverse_module_state->__pyx_int_299);
  Py_VISIT(traverse_module_state->__pyx_int_300);
  Py_VISIT(traverse_module_state->__pyx_int_301);
  Py_VISIT(traverse_module_state->__pyx_int_302);
  Py_VISIT(traverse_module_state->__pyx_int_303);
  Py_VISIT(traverse_module_state->__pyx_int_304);
  Py_VISIT(traverse_module_state->__pyx_int_305);
  Py_VISIT(traverse_module_state->__pyx_int_306);
  Py_VISIT(traverse_module_state->__pyx_int_307);
  Py_VISIT(traverse_module_state->__pyx_int_308);
  Py_VISIT(traverse_module_state->__pyx_int_309);
  Py_VISIT(traverse_module_state->__pyx_int_310);
  Py_VISIT(traverse_module_state->__pyx_int_311);
  Py_VISIT(traverse_module_state->__pyx_int_312);
  Py_VISIT(traverse_module_state->__pyx_int_313);
  Py_VISIT(traverse_module_state->__pyx_int_314);
  Py_VISIT(traverse_module_state->__pyx_int_315);
  Py_VISIT(traverse_module_state->__pyx_int_316);
  Py_VISIT(traverse_module_state->__pyx_int_317);
  Py_VISIT(traverse_module_state->__pyx_int_318);
  Py_VISIT(traverse_module_state->__pyx_int_319);
  Py_VISIT(traverse_module_state->__pyx_int_320);
  Py_VISIT(traverse_module_state->__pyx_int_321);
  Py_VISIT(traverse_module_state->__pyx_int_322);
  Py_VISIT(traverse_module_state->__pyx_int_323);
  Py_VISIT(traverse_module_state->__pyx_int_324);
  Py_VISIT(traverse_module_state->__pyx_int_325);
  Py_VISIT(traverse_module_state->__pyx_int_326);
  Py_VISIT(traverse_module_state->__pyx_int_327);
  Py_VISIT(traverse_module_state->__pyx_int_328);
  Py_VISIT(traverse_module_state->__pyx_int_329);
  Py_VISIT(traverse_module_state->__pyx_int_330);
  Py_VISIT(traverse_module_state->__pyx_int_331);
  Py_VISIT(traverse_module_state->__pyx_int_332);
  Py_VISIT(traverse_module_state->__pyx_int_333);
  Py_VISIT(traverse_module_state->__pyx_int_334);
  Py_VISIT(traverse_module_state->__pyx_int_335);
  Py_VISIT(traverse_module_state->__pyx_int_336);
  Py_VISIT(traverse_module_state->__pyx_int_337);
  Py_VISIT(traverse_module_state->__pyx_int_338);
  Py_VISIT(traverse_module_state->__pyx_int_339);
  Py_VISIT(traverse_module_state->__pyx_int_340);
  Py_VISIT(traverse_module_state->__pyx_int_341);
  Py_VISIT(traverse_module_state->__pyx_int_342);
  Py_VISIT(traverse_module_state->__pyx_int_343);
  Py_VISIT(traverse_module_state->__pyx_int_344);
  Py_VISIT(traverse_module_state->__pyx_int_345);
  Py_VISIT(traverse_module_state->__pyx_int_346);
  Py_VISIT(traverse_module_state->__pyx_int_347);
  Py_VISIT(traverse_module_state->__pyx_int_348);
  Py_VISIT(traverse_module_state->__pyx_int_349);
  Py_VISIT(traverse_module_state->__pyx_int_350);
  Py_VISIT(traverse_module_state->__pyx_int_351);
  Py_VISIT(traverse_module_state->__pyx_int_352);
  Py_VISIT(traverse_module_state->__pyx_int_353);
  Py_VISIT(traverse_module_state->__pyx_int_354);
  Py_VISIT(traverse_module_state->__pyx_int_355);
  Py_VISIT(traverse_module_state->__pyx_int_356);
  Py_VISIT(traverse_module_state->__pyx_int_357);
  Py_VISIT(traverse_module_state->__pyx_int_358);
  Py_VISIT(traverse_module_state->__pyx_int_359);
  Py_VISIT(traverse_module_state->__pyx_int_360);
  Py_VISIT(traverse_module_state->__pyx_int_361);
  Py_VISIT(traverse_module_state->__pyx_int_362);
  Py_VISIT(traverse_module_state->__pyx_int_363);
  Py_VISIT(traverse_module_state->__pyx_int_364);
  Py_VISIT(traverse_module_state->__pyx_int_365);
  Py_VISIT(traverse_module_state->__pyx_int_366);
  Py_VISIT(traverse_module_state->__pyx_int_367);
  Py_VISIT(traverse_module_state->__pyx_int_368);
  Py_VISIT(traverse_module_state->__pyx_int_369);
  Py_VISIT(traverse_module_state->__pyx_int_370);
  Py_VISIT(traverse_module_state->__pyx_int_371);
  Py_VISIT(traverse_module_state->__pyx_int_372);
  Py_VISIT(traverse_module_state->__pyx_int_373);
  Py_VISIT(traverse_module_state->__pyx_int_374);
  Py_VISIT(traverse_module_state->__pyx_int_375);
  Py_VISIT(traverse_module_state->__pyx_int_376);
  Py_VISIT(traverse_module_state->__pyx_int_377);
  Py_VISIT(traverse_module_state->__pyx_int_378);
  Py_VISIT(traverse_module_state->__pyx_int_379);
  Py_VISIT(traverse_module_state->__pyx_int_380);
  Py_VISIT(traverse_module_state->__pyx_int_381);
  Py_VISIT(traverse_module_state->__pyx_int_382);
  Py_VISIT(traverse_module_state->__pyx_int_383);
  Py_VISIT(traverse_module_state->__pyx_int_384);
  Py_VISIT(traverse_module_state->__pyx_int_385);
  Py_VISIT(traverse_module_state->__pyx_int_386);
  Py_VISIT(traverse_module_state->__pyx_int_387);
  Py_VISIT(traverse_module_state->__pyx_int_388);
  Py_VISIT(traverse_module_state->__pyx_int_389);
  Py_VISIT(traverse_module_state->__pyx_int_390);
  Py_VISIT(traverse_module_state->__pyx_int_391);
  Py_VISIT(traverse_module_state->__pyx_int_392);
  Py_VISIT(traverse_module_state->__pyx_int_393);
  Py_VISIT(traverse_module_state->__pyx_int_394);
  Py_VISIT(traverse_module_state->__pyx_int_395);
  Py_VISIT(traverse_module_state->__pyx_int_396);
  Py_VISIT(traverse_module_state->__pyx_int_397);
  Py_VISIT(traverse_module_state->__pyx_int_398);
  Py_VISIT(traverse_module_state->__pyx_int_399);
  Py_VISIT(traverse_module_state->__pyx_int_400);
  Py_VISIT(traverse_module_state->__pyx_int_401);
  Py_VISIT(traverse_module_state->__pyx_int_402);
  Py_VISIT(traverse_module_state->__pyx_int_403);
  Py_VISIT(traverse_module_state->__pyx_int_404);
  Py_VISIT(traverse_module_state->__pyx_int_405);
  Py_VISIT(traverse_module_state->__pyx_int_406);
  Py_VISIT(traverse_module_state->__pyx_int_407);
  Py_VISIT(traverse_module_state->__pyx_int_408);
  Py_VISIT(traverse_module_state->__pyx_int_409);
  Py_VISIT(traverse_module_state->__pyx_int_410);
  Py_VISIT(traverse_module_state->__pyx_int_411);
  Py_VISIT(traverse_module_state->__pyx_int_412);
  Py_VISIT(traverse_module_state->__pyx_int_413);
  Py_VISIT(traverse_module_state->__pyx_int_414);
  Py_VISIT(traverse_module_state->__pyx_int_552);
  Py_VISIT(traverse_module_state->__pyx_int_887);
  Py_VISIT(traverse_module_state->__pyx_int_888);
  Py_VISIT(traverse_module_state->__pyx_int_962);
  Py_VISIT(traverse_module_state->__pyx_int_1260);
  Py_VISIT(traverse_module_state->__pyx_int_1288);
  Py_VISIT(traverse_module_state->__pyx_int_3552);
  Py_VISIT(traverse_module_state->__pyx_int_4878);
  Py_VISIT(traverse_module_state->__pyx_int_5110);
  Py_VISIT(traverse_module_state->__pyx_int_10000);
  Py_VISIT(traverse_module_state->__pyx_int_11031);
  Py_VISIT(traverse_module_state->__pyx_int_12846);
  Py_VISIT(traverse_module_state->__pyx_int_17661);
  Py_VISIT(traverse_module_state->__pyx_int_19536);
  Py_VISIT(traverse_module_state->__pyx_int_27436);
  Py_VISIT(traverse_module_state->__pyx_int_32768);
  Py_VISIT(traverse_module_state->__pyx_int_85263);
  Py_VISIT(traverse_module_state->__pyx_int_168030);
  Py_VISIT(traverse_module_state->__pyx_int_379799);
  Py_VISIT(traverse_module_state->__pyx_int_1008906);
  Py_VISIT(traverse_module_state->__pyx_int_60959262);
  Py_VISIT(traverse_module_state->__pyx_int_64961464);
  Py_VISIT(traverse_module_state->__pyx_int_94173347);
  Py_VISIT(traverse_module_state->__pyx_int_neg_1);
  Py_VISIT(traverse_module_state->__pyx_int_neg_3);
  Py_VISIT(traverse_module_state->__pyx_k__85);
  Py_VISIT(traverse_module_state->__pyx_k__108);
  Py_VISIT(traverse_module_state->__pyx_k__130);
  Py_VISIT(traverse_module_state->__pyx_slice__3);
  Py_VISIT(traverse_module_state->__pyx_slice__4);
  Py_VISIT(traverse_module_state->__pyx_tuple__5);
  Py_VISIT(traverse_module_state->__pyx_slice__34);
  Py_VISIT(traverse_module_state->__pyx_slice__92);
  Py_VISIT(traverse_module_state->__pyx_tuple__10);
  Py_VISIT(traverse_module_state->__pyx_tuple__11);
  Py_VISIT(traverse_module_state->__pyx_tuple__14);
  Py_VISIT(traverse_module_state->__pyx_tuple__15);
  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__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__31);
  Py_VISIT(traverse_module_state->__pyx_tuple__35);
  Py_VISIT(traverse_module_state->__pyx_tuple__36);
  Py_VISIT(traverse_module_state->__pyx_tuple__37);
  Py_VISIT(traverse_module_state->__pyx_tuple__39);
  Py_VISIT(traverse_module_state->__pyx_tuple__40);
  Py_VISIT(traverse_module_state->__pyx_tuple__41);
  Py_VISIT(traverse_module_state->__pyx_tuple__42);
  Py_VISIT(traverse_module_state->__pyx_tuple__43);
  Py_VISIT(traverse_module_state->__pyx_tuple__44);
  Py_VISIT(traverse_module_state->__pyx_tuple__45);
  Py_VISIT(traverse_module_state->__pyx_tuple__46);
  Py_VISIT(traverse_module_state->__pyx_tuple__47);
  Py_VISIT(traverse_module_state->__pyx_tuple__48);
  Py_VISIT(traverse_module_state->__pyx_tuple__49);
  Py_VISIT(traverse_module_state->__pyx_tuple__50);
  Py_VISIT(traverse_module_state->__pyx_tuple__51);
  Py_VISIT(traverse_module_state->__pyx_tuple__52);
  Py_VISIT(traverse_module_state->__pyx_tuple__53);
  Py_VISIT(traverse_module_state->__pyx_tuple__54);
  Py_VISIT(traverse_module_state->__pyx_tuple__55);
  Py_VISIT(traverse_module_state->__pyx_tuple__56);
  Py_VISIT(traverse_module_state->__pyx_tuple__57);
  Py_VISIT(traverse_module_state->__pyx_tuple__58);
  Py_VISIT(traverse_module_state->__pyx_tuple__59);
  Py_VISIT(traverse_module_state->__pyx_tuple__60);
  Py_VISIT(traverse_module_state->__pyx_tuple__61);
  Py_VISIT(traverse_module_state->__pyx_tuple__62);
  Py_VISIT(traverse_module_state->__pyx_tuple__63);
  Py_VISIT(traverse_module_state->__pyx_tuple__64);
  Py_VISIT(traverse_module_state->__pyx_tuple__65);
  Py_VISIT(traverse_module_state->__pyx_tuple__66);
  Py_VISIT(traverse_module_state->__pyx_tuple__67);
  Py_VISIT(traverse_module_state->__pyx_tuple__68);
  Py_VISIT(traverse_module_state->__pyx_tuple__69);
  Py_VISIT(traverse_module_state->__pyx_tuple__71);
  Py_VISIT(traverse_module_state->__pyx_tuple__72);
  Py_VISIT(traverse_module_state->__pyx_tuple__73);
  Py_VISIT(traverse_module_state->__pyx_tuple__74);
  Py_VISIT(traverse_module_state->__pyx_tuple__75);
  Py_VISIT(traverse_module_state->__pyx_tuple__76);
  Py_VISIT(traverse_module_state->__pyx_tuple__77);
  Py_VISIT(traverse_module_state->__pyx_tuple__78);
  Py_VISIT(traverse_module_state->__pyx_tuple__79);
  Py_VISIT(traverse_module_state->__pyx_tuple__80);
  Py_VISIT(traverse_module_state->__pyx_tuple__81);
  Py_VISIT(traverse_module_state->__pyx_tuple__82);
  Py_VISIT(traverse_module_state->__pyx_tuple__83);
  Py_VISIT(traverse_module_state->__pyx_tuple__84);
  Py_VISIT(traverse_module_state->__pyx_tuple__86);
  Py_VISIT(traverse_module_state->__pyx_tuple__87);
  Py_VISIT(traverse_module_state->__pyx_tuple__88);
  Py_VISIT(traverse_module_state->__pyx_tuple__89);
  Py_VISIT(traverse_module_state->__pyx_tuple__90);
  Py_VISIT(traverse_module_state->__pyx_tuple__91);
  Py_VISIT(traverse_module_state->__pyx_tuple__93);
  Py_VISIT(traverse_module_state->__pyx_tuple__94);
  Py_VISIT(traverse_module_state->__pyx_tuple__95);
  Py_VISIT(traverse_module_state->__pyx_tuple__96);
  Py_VISIT(traverse_module_state->__pyx_tuple__97);
  Py_VISIT(traverse_module_state->__pyx_tuple__98);
  Py_VISIT(traverse_module_state->__pyx_tuple__99);
  Py_VISIT(traverse_module_state->__pyx_codeobj__6);
  Py_VISIT(traverse_module_state->__pyx_slice__110);
  Py_VISIT(traverse_module_state->__pyx_slice__128);
  Py_VISIT(traverse_module_state->__pyx_tuple__100);
  Py_VISIT(traverse_module_state->__pyx_tuple__101);
  Py_VISIT(traverse_module_state->__pyx_tuple__102);
  Py_VISIT(traverse_module_state->__pyx_tuple__103);
  Py_VISIT(traverse_module_state->__pyx_tuple__104);
  Py_VISIT(traverse_module_state->__pyx_tuple__105);
  Py_VISIT(traverse_module_state->__pyx_tuple__106);
  Py_VISIT(traverse_module_state->__pyx_tuple__107);
  Py_VISIT(traverse_module_state->__pyx_tuple__109);
  Py_VISIT(traverse_module_state->__pyx_tuple__112);
  Py_VISIT(traverse_module_state->__pyx_tuple__113);
  Py_VISIT(traverse_module_state->__pyx_tuple__119);
  Py_VISIT(traverse_module_state->__pyx_tuple__120);
  Py_VISIT(traverse_module_state->__pyx_tuple__121);
  Py_VISIT(traverse_module_state->__pyx_tuple__122);
  Py_VISIT(traverse_module_state->__pyx_tuple__123);
  Py_VISIT(traverse_module_state->__pyx_tuple__124);
  Py_VISIT(traverse_module_state->__pyx_tuple__125);
  Py_VISIT(traverse_module_state->__pyx_tuple__126);
  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__132);
  Py_VISIT(traverse_module_state->__pyx_tuple__133);
  Py_VISIT(traverse_module_state->__pyx_tuple__134);
  Py_VISIT(traverse_module_state->__pyx_tuple__135);
  Py_VISIT(traverse_module_state->__pyx_tuple__136);
  Py_VISIT(traverse_module_state->__pyx_tuple__137);
  Py_VISIT(traverse_module_state->__pyx_tuple__138);
  Py_VISIT(traverse_module_state->__pyx_tuple__139);
  Py_VISIT(traverse_module_state->__pyx_tuple__140);
  Py_VISIT(traverse_module_state->__pyx_tuple__141);
  Py_VISIT(traverse_module_state->__pyx_tuple__142);
  Py_VISIT(traverse_module_state->__pyx_tuple__143);
  Py_VISIT(traverse_module_state->__pyx_tuple__145);
  Py_VISIT(traverse_module_state->__pyx_tuple__146);
  Py_VISIT(traverse_module_state->__pyx_tuple__147);
  Py_VISIT(traverse_module_state->__pyx_tuple__148);
  Py_VISIT(traverse_module_state->__pyx_tuple__149);
  Py_VISIT(traverse_module_state->__pyx_tuple__151);
  Py_VISIT(traverse_module_state->__pyx_tuple__152);
  Py_VISIT(traverse_module_state->__pyx_tuple__153);
  Py_VISIT(traverse_module_state->__pyx_tuple__154);
  Py_VISIT(traverse_module_state->__pyx_tuple__155);
  Py_VISIT(traverse_module_state->__pyx_tuple__156);
  Py_VISIT(traverse_module_state->__pyx_tuple__157);
  Py_VISIT(traverse_module_state->__pyx_tuple__158);
  Py_VISIT(traverse_module_state->__pyx_tuple__159);
  Py_VISIT(traverse_module_state->__pyx_tuple__160);
  Py_VISIT(traverse_module_state->__pyx_tuple__161);
  Py_VISIT(traverse_module_state->__pyx_tuple__162);
  Py_VISIT(traverse_module_state->__pyx_tuple__163);
  Py_VISIT(traverse_module_state->__pyx_tuple__164);
  Py_VISIT(traverse_module_state->__pyx_tuple__165);
  Py_VISIT(traverse_module_state->__pyx_tuple__166);
  Py_VISIT(traverse_module_state->__pyx_tuple__167);
  Py_VISIT(traverse_module_state->__pyx_tuple__168);
  Py_VISIT(traverse_module_state->__pyx_tuple__169);
  Py_VISIT(traverse_module_state->__pyx_tuple__171);
  Py_VISIT(traverse_module_state->__pyx_tuple__172);
  Py_VISIT(traverse_module_state->__pyx_tuple__173);
  Py_VISIT(traverse_module_state->__pyx_tuple__176);
  Py_VISIT(traverse_module_state->__pyx_tuple__178);
  Py_VISIT(traverse_module_state->__pyx_tuple__180);
  Py_VISIT(traverse_module_state->__pyx_tuple__182);
  Py_VISIT(traverse_module_state->__pyx_tuple__185);
  Py_VISIT(traverse_module_state->__pyx_tuple__189);
  Py_VISIT(traverse_module_state->__pyx_tuple__192);
  Py_VISIT(traverse_module_state->__pyx_tuple__194);
  Py_VISIT(traverse_module_state->__pyx_tuple__196);
  Py_VISIT(traverse_module_state->__pyx_tuple__198);
  Py_VISIT(traverse_module_state->__pyx_tuple__201);
  Py_VISIT(traverse_module_state->__pyx_tuple__203);
  Py_VISIT(traverse_module_state->__pyx_tuple__208);
  Py_VISIT(traverse_module_state->__pyx_tuple__210);
  Py_VISIT(traverse_module_state->__pyx_tuple__213);
  Py_VISIT(traverse_module_state->__pyx_tuple__215);
  Py_VISIT(traverse_module_state->__pyx_tuple__217);
  Py_VISIT(traverse_module_state->__pyx_tuple__219);
  Py_VISIT(traverse_module_state->__pyx_tuple__221);
  Py_VISIT(traverse_module_state->__pyx_tuple__227);
  Py_VISIT(traverse_module_state->__pyx_tuple__229);
  Py_VISIT(traverse_module_state->__pyx_tuple__231);
  Py_VISIT(traverse_module_state->__pyx_tuple__233);
  Py_VISIT(traverse_module_state->__pyx_tuple__234);
  Py_VISIT(traverse_module_state->__pyx_tuple__236);
  Py_VISIT(traverse_module_state->__pyx_tuple__238);
  Py_VISIT(traverse_module_state->__pyx_tuple__241);
  Py_VISIT(traverse_module_state->__pyx_tuple__244);
  Py_VISIT(traverse_module_state->__pyx_tuple__246);
  Py_VISIT(traverse_module_state->__pyx_tuple__248);
  Py_VISIT(traverse_module_state->__pyx_tuple__250);
  Py_VISIT(traverse_module_state->__pyx_tuple__252);
  Py_VISIT(traverse_module_state->__pyx_tuple__254);
  Py_VISIT(traverse_module_state->__pyx_tuple__256);
  Py_VISIT(traverse_module_state->__pyx_tuple__257);
  Py_VISIT(traverse_module_state->__pyx_tuple__259);
  Py_VISIT(traverse_module_state->__pyx_tuple__260);
  Py_VISIT(traverse_module_state->__pyx_tuple__262);
  Py_VISIT(traverse_module_state->__pyx_tuple__266);
  Py_VISIT(traverse_module_state->__pyx_tuple__268);
  Py_VISIT(traverse_module_state->__pyx_tuple__270);
  Py_VISIT(traverse_module_state->__pyx_tuple__271);
  Py_VISIT(traverse_module_state->__pyx_tuple__273);
  Py_VISIT(traverse_module_state->__pyx_tuple__275);
  Py_VISIT(traverse_module_state->__pyx_tuple__277);
  Py_VISIT(traverse_module_state->__pyx_tuple__279);
  Py_VISIT(traverse_module_state->__pyx_tuple__281);
  Py_VISIT(traverse_module_state->__pyx_tuple__283);
  Py_VISIT(traverse_module_state->__pyx_tuple__284);
  Py_VISIT(traverse_module_state->__pyx_tuple__288);
  Py_VISIT(traverse_module_state->__pyx_tuple__290);
  Py_VISIT(traverse_module_state->__pyx_tuple__292);
  Py_VISIT(traverse_module_state->__pyx_tuple__294);
  Py_VISIT(traverse_module_state->__pyx_tuple__297);
  Py_VISIT(traverse_module_state->__pyx_tuple__299);
  Py_VISIT(traverse_module_state->__pyx_tuple__301);
  Py_VISIT(traverse_module_state->__pyx_tuple__302);
  Py_VISIT(traverse_module_state->__pyx_tuple__304);
  Py_VISIT(traverse_module_state->__pyx_tuple__307);
  Py_VISIT(traverse_module_state->__pyx_tuple__309);
  Py_VISIT(traverse_module_state->__pyx_tuple__312);
  Py_VISIT(traverse_module_state->__pyx_tuple__314);
  Py_VISIT(traverse_module_state->__pyx_tuple__316);
  Py_VISIT(traverse_module_state->__pyx_tuple__317);
  Py_VISIT(traverse_module_state->__pyx_tuple__319);
  Py_VISIT(traverse_module_state->__pyx_tuple__320);
  Py_VISIT(traverse_module_state->__pyx_tuple__322);
  Py_VISIT(traverse_module_state->__pyx_tuple__324);
  Py_VISIT(traverse_module_state->__pyx_tuple__325);
  Py_VISIT(traverse_module_state->__pyx_tuple__327);
  Py_VISIT(traverse_module_state->__pyx_tuple__329);
  Py_VISIT(traverse_module_state->__pyx_tuple__331);
  Py_VISIT(traverse_module_state->__pyx_tuple__336);
  Py_VISIT(traverse_module_state->__pyx_tuple__338);
  Py_VISIT(traverse_module_state->__pyx_tuple__340);
  Py_VISIT(traverse_module_state->__pyx_tuple__341);
  Py_VISIT(traverse_module_state->__pyx_tuple__343);
  Py_VISIT(traverse_module_state->__pyx_tuple__345);
  Py_VISIT(traverse_module_state->__pyx_tuple__347);
  Py_VISIT(traverse_module_state->__pyx_tuple__349);
  Py_VISIT(traverse_module_state->__pyx_tuple__350);
  Py_VISIT(traverse_module_state->__pyx_tuple__352);
  Py_VISIT(traverse_module_state->__pyx_tuple__354);
  Py_VISIT(traverse_module_state->__pyx_tuple__355);
  Py_VISIT(traverse_module_state->__pyx_tuple__357);
  Py_VISIT(traverse_module_state->__pyx_tuple__358);
  Py_VISIT(traverse_module_state->__pyx_tuple__361);
  Py_VISIT(traverse_module_state->__pyx_tuple__363);
  Py_VISIT(traverse_module_state->__pyx_tuple__365);
  Py_VISIT(traverse_module_state->__pyx_tuple__367);
  Py_VISIT(traverse_module_state->__pyx_tuple__369);
  Py_VISIT(traverse_module_state->__pyx_tuple__370);
  Py_VISIT(traverse_module_state->__pyx_tuple__372);
  Py_VISIT(traverse_module_state->__pyx_tuple__374);
  Py_VISIT(traverse_module_state->__pyx_tuple__376);
  Py_VISIT(traverse_module_state->__pyx_tuple__378);
  Py_VISIT(traverse_module_state->__pyx_tuple__380);
  Py_VISIT(traverse_module_state->__pyx_tuple__382);
  Py_VISIT(traverse_module_state->__pyx_tuple__384);
  Py_VISIT(traverse_module_state->__pyx_tuple__386);
  Py_VISIT(traverse_module_state->__pyx_tuple__388);
  Py_VISIT(traverse_module_state->__pyx_tuple__390);
  Py_VISIT(traverse_module_state->__pyx_tuple__392);
  Py_VISIT(traverse_module_state->__pyx_tuple__394);
  Py_VISIT(traverse_module_state->__pyx_tuple__397);
  Py_VISIT(traverse_module_state->__pyx_tuple__400);
  Py_VISIT(traverse_module_state->__pyx_tuple__402);
  Py_VISIT(traverse_module_state->__pyx_tuple__404);
  Py_VISIT(traverse_module_state->__pyx_tuple__407);
  Py_VISIT(traverse_module_state->__pyx_tuple__409);
  Py_VISIT(traverse_module_state->__pyx_tuple__411);
  Py_VISIT(traverse_module_state->__pyx_tuple__413);
  Py_VISIT(traverse_module_state->__pyx_tuple__415);
  Py_VISIT(traverse_module_state->__pyx_tuple__416);
  Py_VISIT(traverse_module_state->__pyx_tuple__420);
  Py_VISIT(traverse_module_state->__pyx_tuple__422);
  Py_VISIT(traverse_module_state->__pyx_tuple__423);
  Py_VISIT(traverse_module_state->__pyx_tuple__425);
  Py_VISIT(traverse_module_state->__pyx_tuple__427);
  Py_VISIT(traverse_module_state->__pyx_tuple__429);
  Py_VISIT(traverse_module_state->__pyx_tuple__431);
  Py_VISIT(traverse_module_state->__pyx_tuple__432);
  Py_VISIT(traverse_module_state->__pyx_tuple__434);
  Py_VISIT(traverse_module_state->__pyx_tuple__435);
  Py_VISIT(traverse_module_state->__pyx_tuple__437);
  Py_VISIT(traverse_module_state->__pyx_tuple__439);
  Py_VISIT(traverse_module_state->__pyx_tuple__441);
  Py_VISIT(traverse_module_state->__pyx_tuple__443);
  Py_VISIT(traverse_module_state->__pyx_tuple__444);
  Py_VISIT(traverse_module_state->__pyx_tuple__446);
  Py_VISIT(traverse_module_state->__pyx_tuple__448);
  Py_VISIT(traverse_module_state->__pyx_tuple__450);
  Py_VISIT(traverse_module_state->__pyx_tuple__452);
  Py_VISIT(traverse_module_state->__pyx_tuple__454);
  Py_VISIT(traverse_module_state->__pyx_tuple__456);
  Py_VISIT(traverse_module_state->__pyx_tuple__458);
  Py_VISIT(traverse_module_state->__pyx_tuple__460);
  Py_VISIT(traverse_module_state->__pyx_tuple__465);
  Py_VISIT(traverse_module_state->__pyx_tuple__467);
  Py_VISIT(traverse_module_state->__pyx_tuple__471);
  Py_VISIT(traverse_module_state->__pyx_tuple__473);
  Py_VISIT(traverse_module_state->__pyx_tuple__475);
  Py_VISIT(traverse_module_state->__pyx_tuple__477);
  Py_VISIT(traverse_module_state->__pyx_tuple__479);
  Py_VISIT(traverse_module_state->__pyx_tuple__481);
  Py_VISIT(traverse_module_state->__pyx_tuple__483);
  Py_VISIT(traverse_module_state->__pyx_tuple__485);
  Py_VISIT(traverse_module_state->__pyx_tuple__487);
  Py_VISIT(traverse_module_state->__pyx_tuple__489);
  Py_VISIT(traverse_module_state->__pyx_tuple__491);
  Py_VISIT(traverse_module_state->__pyx_tuple__496);
  Py_VISIT(traverse_module_state->__pyx_tuple__498);
  Py_VISIT(traverse_module_state->__pyx_tuple__500);
  Py_VISIT(traverse_module_state->__pyx_tuple__501);
  Py_VISIT(traverse_module_state->__pyx_tuple__503);
  Py_VISIT(traverse_module_state->__pyx_tuple__505);
  Py_VISIT(traverse_module_state->__pyx_tuple__507);
  Py_VISIT(traverse_module_state->__pyx_tuple__509);
  Py_VISIT(traverse_module_state->__pyx_tuple__511);
  Py_VISIT(traverse_module_state->__pyx_tuple__514);
  Py_VISIT(traverse_module_state->__pyx_tuple__517);
  Py_VISIT(traverse_module_state->__pyx_tuple__519);
  Py_VISIT(traverse_module_state->__pyx_tuple__521);
  Py_VISIT(traverse_module_state->__pyx_tuple__525);
  Py_VISIT(traverse_module_state->__pyx_tuple__527);
  Py_VISIT(traverse_module_state->__pyx_tuple__536);
  Py_VISIT(traverse_module_state->__pyx_tuple__538);
  Py_VISIT(traverse_module_state->__pyx_tuple__542);
  Py_VISIT(traverse_module_state->__pyx_tuple__546);
  Py_VISIT(traverse_module_state->__pyx_tuple__550);
  Py_VISIT(traverse_module_state->__pyx_tuple__552);
  Py_VISIT(traverse_module_state->__pyx_tuple__554);
  Py_VISIT(traverse_module_state->__pyx_tuple__556);
  Py_VISIT(traverse_module_state->__pyx_tuple__558);
  Py_VISIT(traverse_module_state->__pyx_tuple__568);
  Py_VISIT(traverse_module_state->__pyx_tuple__572);
  Py_VISIT(traverse_module_state->__pyx_tuple__574);
  Py_VISIT(traverse_module_state->__pyx_tuple__575);
  Py_VISIT(traverse_module_state->__pyx_tuple__577);
  Py_VISIT(traverse_module_state->__pyx_tuple__580);
  Py_VISIT(traverse_module_state->__pyx_tuple__582);
  Py_VISIT(traverse_module_state->__pyx_tuple__584);
  Py_VISIT(traverse_module_state->__pyx_tuple__586);
  Py_VISIT(traverse_module_state->__pyx_tuple__591);
  Py_VISIT(traverse_module_state->__pyx_tuple__593);
  Py_VISIT(traverse_module_state->__pyx_tuple__595);
  Py_VISIT(traverse_module_state->__pyx_tuple__597);
  Py_VISIT(traverse_module_state->__pyx_tuple__599);
  Py_VISIT(traverse_module_state->__pyx_tuple__601);
  Py_VISIT(traverse_module_state->__pyx_tuple__603);
  Py_VISIT(traverse_module_state->__pyx_tuple__605);
  Py_VISIT(traverse_module_state->__pyx_tuple__606);
  Py_VISIT(traverse_module_state->__pyx_tuple__609);
  Py_VISIT(traverse_module_state->__pyx_tuple__611);
  Py_VISIT(traverse_module_state->__pyx_tuple__613);
  Py_VISIT(traverse_module_state->__pyx_tuple__616);
  Py_VISIT(traverse_module_state->__pyx_tuple__618);
  Py_VISIT(traverse_module_state->__pyx_tuple__620);
  Py_VISIT(traverse_module_state->__pyx_tuple__624);
  Py_VISIT(traverse_module_state->__pyx_tuple__626);
  Py_VISIT(traverse_module_state->__pyx_tuple__629);
  Py_VISIT(traverse_module_state->__pyx_tuple__631);
  Py_VISIT(traverse_module_state->__pyx_tuple__633);
  Py_VISIT(traverse_module_state->__pyx_tuple__635);
  Py_VISIT(traverse_module_state->__pyx_tuple__637);
  Py_VISIT(traverse_module_state->__pyx_tuple__638);
  Py_VISIT(traverse_module_state->__pyx_tuple__640);
  Py_VISIT(traverse_module_state->__pyx_tuple__642);
  Py_VISIT(traverse_module_state->__pyx_tuple__644);
  Py_VISIT(traverse_module_state->__pyx_tuple__647);
  Py_VISIT(traverse_module_state->__pyx_tuple__648);
  Py_VISIT(traverse_module_state->__pyx_tuple__649);
  Py_VISIT(traverse_module_state->__pyx_tuple__650);
  Py_VISIT(traverse_module_state->__pyx_tuple__651);
  Py_VISIT(traverse_module_state->__pyx_tuple__652);
  Py_VISIT(traverse_module_state->__pyx_tuple__654);
  Py_VISIT(traverse_module_state->__pyx_tuple__655);
  Py_VISIT(traverse_module_state->__pyx_tuple__657);
  Py_VISIT(traverse_module_state->__pyx_tuple__659);
  Py_VISIT(traverse_module_state->__pyx_tuple__660);
  Py_VISIT(traverse_module_state->__pyx_tuple__661);
  Py_VISIT(traverse_module_state->__pyx_tuple__662);
  Py_VISIT(traverse_module_state->__pyx_tuple__663);
  Py_VISIT(traverse_module_state->__pyx_tuple__664);
  Py_VISIT(traverse_module_state->__pyx_tuple__665);
  Py_VISIT(traverse_module_state->__pyx_tuple__667);
  Py_VISIT(traverse_module_state->__pyx_tuple__669);
  Py_VISIT(traverse_module_state->__pyx_tuple__671);
  Py_VISIT(traverse_module_state->__pyx_tuple__673);
  Py_VISIT(traverse_module_state->__pyx_tuple__675);
  Py_VISIT(traverse_module_state->__pyx_tuple__677);
  Py_VISIT(traverse_module_state->__pyx_tuple__682);
  Py_VISIT(traverse_module_state->__pyx_tuple__683);
  Py_VISIT(traverse_module_state->__pyx_tuple__684);
  Py_VISIT(traverse_module_state->__pyx_tuple__685);
  Py_VISIT(traverse_module_state->__pyx_tuple__686);
  Py_VISIT(traverse_module_state->__pyx_tuple__689);
  Py_VISIT(traverse_module_state->__pyx_tuple__693);
  Py_VISIT(traverse_module_state->__pyx_tuple__695);
  Py_VISIT(traverse_module_state->__pyx_tuple__696);
  Py_VISIT(traverse_module_state->__pyx_tuple__698);
  Py_VISIT(traverse_module_state->__pyx_tuple__700);
  Py_VISIT(traverse_module_state->__pyx_tuple__707);
  Py_VISIT(traverse_module_state->__pyx_tuple__709);
  Py_VISIT(traverse_module_state->__pyx_tuple__711);
  Py_VISIT(traverse_module_state->__pyx_tuple__713);
  Py_VISIT(traverse_module_state->__pyx_tuple__715);
  Py_VISIT(traverse_module_state->__pyx_tuple__717);
  Py_VISIT(traverse_module_state->__pyx_tuple__719);
  Py_VISIT(traverse_module_state->__pyx_tuple__720);
  Py_VISIT(traverse_module_state->__pyx_tuple__722);
  Py_VISIT(traverse_module_state->__pyx_tuple__724);
  Py_VISIT(traverse_module_state->__pyx_codeobj__70);
  Py_VISIT(traverse_module_state->__pyx_codeobj__174);
  Py_VISIT(traverse_module_state->__pyx_codeobj__175);
  Py_VISIT(traverse_module_state->__pyx_codeobj__177);
  Py_VISIT(traverse_module_state->__pyx_codeobj__179);
  Py_VISIT(traverse_module_state->__pyx_codeobj__181);
  Py_VISIT(traverse_module_state->__pyx_codeobj__183);
  Py_VISIT(traverse_module_state->__pyx_codeobj__184);
  Py_VISIT(traverse_module_state->__pyx_codeobj__186);
  Py_VISIT(traverse_module_state->__pyx_codeobj__187);
  Py_VISIT(traverse_module_state->__pyx_codeobj__188);
  Py_VISIT(traverse_module_state->__pyx_codeobj__190);
  Py_VISIT(traverse_module_state->__pyx_codeobj__191);
  Py_VISIT(traverse_module_state->__pyx_codeobj__193);
  Py_VISIT(traverse_module_state->__pyx_codeobj__195);
  Py_VISIT(traverse_module_state->__pyx_codeobj__197);
  Py_VISIT(traverse_module_state->__pyx_codeobj__199);
  Py_VISIT(traverse_module_state->__pyx_codeobj__200);
  Py_VISIT(traverse_module_state->__pyx_codeobj__202);
  Py_VISIT(traverse_module_state->__pyx_codeobj__204);
  Py_VISIT(traverse_module_state->__pyx_codeobj__205);
  Py_VISIT(traverse_module_state->__pyx_codeobj__206);
  Py_VISIT(traverse_module_state->__pyx_codeobj__207);
  Py_VISIT(traverse_module_state->__pyx_codeobj__209);
  Py_VISIT(traverse_module_state->__pyx_codeobj__211);
  Py_VISIT(traverse_module_state->__pyx_codeobj__212);
  Py_VISIT(traverse_module_state->__pyx_codeobj__214);
  Py_VISIT(traverse_module_state->__pyx_codeobj__216);
  Py_VISIT(traverse_module_state->__pyx_codeobj__218);
  Py_VISIT(traverse_module_state->__pyx_codeobj__220);
  Py_VISIT(traverse_module_state->__pyx_codeobj__222);
  Py_VISIT(traverse_module_state->__pyx_codeobj__223);
  Py_VISIT(traverse_module_state->__pyx_codeobj__224);
  Py_VISIT(traverse_module_state->__pyx_codeobj__225);
  Py_VISIT(traverse_module_state->__pyx_codeobj__226);
  Py_VISIT(traverse_module_state->__pyx_codeobj__228);
  Py_VISIT(traverse_module_state->__pyx_codeobj__230);
  Py_VISIT(traverse_module_state->__pyx_codeobj__232);
  Py_VISIT(traverse_module_state->__pyx_codeobj__235);
  Py_VISIT(traverse_module_state->__pyx_codeobj__237);
  Py_VISIT(traverse_module_state->__pyx_codeobj__239);
  Py_VISIT(traverse_module_state->__pyx_codeobj__240);
  Py_VISIT(traverse_module_state->__pyx_codeobj__242);
  Py_VISIT(traverse_module_state->__pyx_codeobj__243);
  Py_VISIT(traverse_module_state->__pyx_codeobj__245);
  Py_VISIT(traverse_module_state->__pyx_codeobj__247);
  Py_VISIT(traverse_module_state->__pyx_codeobj__249);
  Py_VISIT(traverse_module_state->__pyx_codeobj__251);
  Py_VISIT(traverse_module_state->__pyx_codeobj__253);
  Py_VISIT(traverse_module_state->__pyx_codeobj__255);
  Py_VISIT(traverse_module_state->__pyx_codeobj__258);
  Py_VISIT(traverse_module_state->__pyx_codeobj__261);
  Py_VISIT(traverse_module_state->__pyx_codeobj__263);
  Py_VISIT(traverse_module_state->__pyx_codeobj__264);
  Py_VISIT(traverse_module_state->__pyx_codeobj__265);
  Py_VISIT(traverse_module_state->__pyx_codeobj__267);
  Py_VISIT(traverse_module_state->__pyx_codeobj__269);
  Py_VISIT(traverse_module_state->__pyx_codeobj__272);
  Py_VISIT(traverse_module_state->__pyx_codeobj__274);
  Py_VISIT(traverse_module_state->__pyx_codeobj__276);
  Py_VISIT(traverse_module_state->__pyx_codeobj__278);
  Py_VISIT(traverse_module_state->__pyx_codeobj__280);
  Py_VISIT(traverse_module_state->__pyx_codeobj__282);
  Py_VISIT(traverse_module_state->__pyx_codeobj__285);
  Py_VISIT(traverse_module_state->__pyx_codeobj__286);
  Py_VISIT(traverse_module_state->__pyx_codeobj__287);
  Py_VISIT(traverse_module_state->__pyx_codeobj__289);
  Py_VISIT(traverse_module_state->__pyx_codeobj__291);
  Py_VISIT(traverse_module_state->__pyx_codeobj__293);
  Py_VISIT(traverse_module_state->__pyx_codeobj__295);
  Py_VISIT(traverse_module_state->__pyx_codeobj__296);
  Py_VISIT(traverse_module_state->__pyx_codeobj__298);
  Py_VISIT(traverse_module_state->__pyx_codeobj__300);
  Py_VISIT(traverse_module_state->__pyx_codeobj__303);
  Py_VISIT(traverse_module_state->__pyx_codeobj__305);
  Py_VISIT(traverse_module_state->__pyx_codeobj__306);
  Py_VISIT(traverse_module_state->__pyx_codeobj__308);
  Py_VISIT(traverse_module_state->__pyx_codeobj__310);
  Py_VISIT(traverse_module_state->__pyx_codeobj__311);
  Py_VISIT(traverse_module_state->__pyx_codeobj__313);
  Py_VISIT(traverse_module_state->__pyx_codeobj__315);
  Py_VISIT(traverse_module_state->__pyx_codeobj__318);
  Py_VISIT(traverse_module_state->__pyx_codeobj__321);
  Py_VISIT(traverse_module_state->__pyx_codeobj__323);
  Py_VISIT(traverse_module_state->__pyx_codeobj__326);
  Py_VISIT(traverse_module_state->__pyx_codeobj__328);
  Py_VISIT(traverse_module_state->__pyx_codeobj__330);
  Py_VISIT(traverse_module_state->__pyx_codeobj__332);
  Py_VISIT(traverse_module_state->__pyx_codeobj__333);
  Py_VISIT(traverse_module_state->__pyx_codeobj__334);
  Py_VISIT(traverse_module_state->__pyx_codeobj__335);
  Py_VISIT(traverse_module_state->__pyx_codeobj__337);
  Py_VISIT(traverse_module_state->__pyx_codeobj__339);
  Py_VISIT(traverse_module_state->__pyx_codeobj__342);
  Py_VISIT(traverse_module_state->__pyx_codeobj__344);
  Py_VISIT(traverse_module_state->__pyx_codeobj__346);
  Py_VISIT(traverse_module_state->__pyx_codeobj__348);
  Py_VISIT(traverse_module_state->__pyx_codeobj__351);
  Py_VISIT(traverse_module_state->__pyx_codeobj__353);
  Py_VISIT(traverse_module_state->__pyx_codeobj__356);
  Py_VISIT(traverse_module_state->__pyx_codeobj__359);
  Py_VISIT(traverse_module_state->__pyx_codeobj__360);
  Py_VISIT(traverse_module_state->__pyx_codeobj__362);
  Py_VISIT(traverse_module_state->__pyx_codeobj__364);
  Py_VISIT(traverse_module_state->__pyx_codeobj__366);
  Py_VISIT(traverse_module_state->__pyx_codeobj__368);
  Py_VISIT(traverse_module_state->__pyx_codeobj__371);
  Py_VISIT(traverse_module_state->__pyx_codeobj__373);
  Py_VISIT(traverse_module_state->__pyx_codeobj__375);
  Py_VISIT(traverse_module_state->__pyx_codeobj__377);
  Py_VISIT(traverse_module_state->__pyx_codeobj__379);
  Py_VISIT(traverse_module_state->__pyx_codeobj__381);
  Py_VISIT(traverse_module_state->__pyx_codeobj__383);
  Py_VISIT(traverse_module_state->__pyx_codeobj__385);
  Py_VISIT(traverse_module_state->__pyx_codeobj__387);
  Py_VISIT(traverse_module_state->__pyx_codeobj__389);
  Py_VISIT(traverse_module_state->__pyx_codeobj__391);
  Py_VISIT(traverse_module_state->__pyx_codeobj__393);
  Py_VISIT(traverse_module_state->__pyx_codeobj__395);
  Py_VISIT(traverse_module_state->__pyx_codeobj__396);
  Py_VISIT(traverse_module_state->__pyx_codeobj__398);
  Py_VISIT(traverse_module_state->__pyx_codeobj__399);
  Py_VISIT(traverse_module_state->__pyx_codeobj__401);
  Py_VISIT(traverse_module_state->__pyx_codeobj__403);
  Py_VISIT(traverse_module_state->__pyx_codeobj__405);
  Py_VISIT(traverse_module_state->__pyx_codeobj__406);
  Py_VISIT(traverse_module_state->__pyx_codeobj__408);
  Py_VISIT(traverse_module_state->__pyx_codeobj__410);
  Py_VISIT(traverse_module_state->__pyx_codeobj__412);
  Py_VISIT(traverse_module_state->__pyx_codeobj__414);
  Py_VISIT(traverse_module_state->__pyx_codeobj__417);
  Py_VISIT(traverse_module_state->__pyx_codeobj__418);
  Py_VISIT(traverse_module_state->__pyx_codeobj__419);
  Py_VISIT(traverse_module_state->__pyx_codeobj__421);
  Py_VISIT(traverse_module_state->__pyx_codeobj__424);
  Py_VISIT(traverse_module_state->__pyx_codeobj__426);
  Py_VISIT(traverse_module_state->__pyx_codeobj__428);
  Py_VISIT(traverse_module_state->__pyx_codeobj__430);
  Py_VISIT(traverse_module_state->__pyx_codeobj__433);
  Py_VISIT(traverse_module_state->__pyx_codeobj__436);
  Py_VISIT(traverse_module_state->__pyx_codeobj__438);
  Py_VISIT(traverse_module_state->__pyx_codeobj__440);
  Py_VISIT(traverse_module_state->__pyx_codeobj__442);
  Py_VISIT(traverse_module_state->__pyx_codeobj__445);
  Py_VISIT(traverse_module_state->__pyx_codeobj__447);
  Py_VISIT(traverse_module_state->__pyx_codeobj__449);
  Py_VISIT(traverse_module_state->__pyx_codeobj__451);
  Py_VISIT(traverse_module_state->__pyx_codeobj__453);
  Py_VISIT(traverse_module_state->__pyx_codeobj__455);
  Py_VISIT(traverse_module_state->__pyx_codeobj__457);
  Py_VISIT(traverse_module_state->__pyx_codeobj__459);
  Py_VISIT(traverse_module_state->__pyx_codeobj__461);
  Py_VISIT(traverse_module_state->__pyx_codeobj__462);
  Py_VISIT(traverse_module_state->__pyx_codeobj__463);
  Py_VISIT(traverse_module_state->__pyx_codeobj__464);
  Py_VISIT(traverse_module_state->__pyx_codeobj__466);
  Py_VISIT(traverse_module_state->__pyx_codeobj__468);
  Py_VISIT(traverse_module_state->__pyx_codeobj__469);
  Py_VISIT(traverse_module_state->__pyx_codeobj__470);
  Py_VISIT(traverse_module_state->__pyx_codeobj__472);
  Py_VISIT(traverse_module_state->__pyx_codeobj__474);
  Py_VISIT(traverse_module_state->__pyx_codeobj__476);
  Py_VISIT(traverse_module_state->__pyx_codeobj__478);
  Py_VISIT(traverse_module_state->__pyx_codeobj__480);
  Py_VISIT(traverse_module_state->__pyx_codeobj__482);
  Py_VISIT(traverse_module_state->__pyx_codeobj__484);
  Py_VISIT(traverse_module_state->__pyx_codeobj__486);
  Py_VISIT(traverse_module_state->__pyx_codeobj__488);
  Py_VISIT(traverse_module_state->__pyx_codeobj__490);
  Py_VISIT(traverse_module_state->__pyx_codeobj__492);
  Py_VISIT(traverse_module_state->__pyx_codeobj__493);
  Py_VISIT(traverse_module_state->__pyx_codeobj__494);
  Py_VISIT(traverse_module_state->__pyx_codeobj__495);
  Py_VISIT(traverse_module_state->__pyx_codeobj__497);
  Py_VISIT(traverse_module_state->__pyx_codeobj__499);
  Py_VISIT(traverse_module_state->__pyx_codeobj__502);
  Py_VISIT(traverse_module_state->__pyx_codeobj__504);
  Py_VISIT(traverse_module_state->__pyx_codeobj__506);
  Py_VISIT(traverse_module_state->__pyx_codeobj__508);
  Py_VISIT(traverse_module_state->__pyx_codeobj__510);
  Py_VISIT(traverse_module_state->__pyx_codeobj__512);
  Py_VISIT(traverse_module_state->__pyx_codeobj__513);
  Py_VISIT(traverse_module_state->__pyx_codeobj__515);
  Py_VISIT(traverse_module_state->__pyx_codeobj__516);
  Py_VISIT(traverse_module_state->__pyx_codeobj__518);
  Py_VISIT(traverse_module_state->__pyx_codeobj__520);
  Py_VISIT(traverse_module_state->__pyx_codeobj__522);
  Py_VISIT(traverse_module_state->__pyx_codeobj__523);
  Py_VISIT(traverse_module_state->__pyx_codeobj__524);
  Py_VISIT(traverse_module_state->__pyx_codeobj__526);
  Py_VISIT(traverse_module_state->__pyx_codeobj__528);
  Py_VISIT(traverse_module_state->__pyx_codeobj__529);
  Py_VISIT(traverse_module_state->__pyx_codeobj__530);
  Py_VISIT(traverse_module_state->__pyx_codeobj__531);
  Py_VISIT(traverse_module_state->__pyx_codeobj__532);
  Py_VISIT(traverse_module_state->__pyx_codeobj__533);
  Py_VISIT(traverse_module_state->__pyx_codeobj__534);
  Py_VISIT(traverse_module_state->__pyx_codeobj__535);
  Py_VISIT(traverse_module_state->__pyx_codeobj__537);
  Py_VISIT(traverse_module_state->__pyx_codeobj__539);
  Py_VISIT(traverse_module_state->__pyx_codeobj__540);
  Py_VISIT(traverse_module_state->__pyx_codeobj__541);
  Py_VISIT(traverse_module_state->__pyx_codeobj__543);
  Py_VISIT(traverse_module_state->__pyx_codeobj__544);
  Py_VISIT(traverse_module_state->__pyx_codeobj__545);
  Py_VISIT(traverse_module_state->__pyx_codeobj__547);
  Py_VISIT(traverse_module_state->__pyx_codeobj__548);
  Py_VISIT(traverse_module_state->__pyx_codeobj__549);
  Py_VISIT(traverse_module_state->__pyx_codeobj__551);
  Py_VISIT(traverse_module_state->__pyx_codeobj__553);
  Py_VISIT(traverse_module_state->__pyx_codeobj__555);
  Py_VISIT(traverse_module_state->__pyx_codeobj__557);
  Py_VISIT(traverse_module_state->__pyx_codeobj__559);
  Py_VISIT(traverse_module_state->__pyx_codeobj__560);
  Py_VISIT(traverse_module_state->__pyx_codeobj__561);
  Py_VISIT(traverse_module_state->__pyx_codeobj__562);
  Py_VISIT(traverse_module_state->__pyx_codeobj__563);
  Py_VISIT(traverse_module_state->__pyx_codeobj__564);
  Py_VISIT(traverse_module_state->__pyx_codeobj__565);
  Py_VISIT(traverse_module_state->__pyx_codeobj__566);
  Py_VISIT(traverse_module_state->__pyx_codeobj__567);
  Py_VISIT(traverse_module_state->__pyx_codeobj__569);
  Py_VISIT(traverse_module_state->__pyx_codeobj__570);
  Py_VISIT(traverse_module_state->__pyx_codeobj__571);
  Py_VISIT(traverse_module_state->__pyx_codeobj__573);
  Py_VISIT(traverse_module_state->__pyx_codeobj__576);
  Py_VISIT(traverse_module_state->__pyx_codeobj__578);
  Py_VISIT(traverse_module_state->__pyx_codeobj__579);
  Py_VISIT(traverse_module_state->__pyx_codeobj__581);
  Py_VISIT(traverse_module_state->__pyx_codeobj__583);
  Py_VISIT(traverse_module_state->__pyx_codeobj__585);
  Py_VISIT(traverse_module_state->__pyx_codeobj__587);
  Py_VISIT(traverse_module_state->__pyx_codeobj__588);
  Py_VISIT(traverse_module_state->__pyx_codeobj__589);
  Py_VISIT(traverse_module_state->__pyx_codeobj__590);
  Py_VISIT(traverse_module_state->__pyx_codeobj__592);
  Py_VISIT(traverse_module_state->__pyx_codeobj__594);
  Py_VISIT(traverse_module_state->__pyx_codeobj__596);
  Py_VISIT(traverse_module_state->__pyx_codeobj__598);
  Py_VISIT(traverse_module_state->__pyx_codeobj__600);
  Py_VISIT(traverse_module_state->__pyx_codeobj__602);
  Py_VISIT(traverse_module_state->__pyx_codeobj__604);
  Py_VISIT(traverse_module_state->__pyx_codeobj__607);
  Py_VISIT(traverse_module_state->__pyx_codeobj__608);
  Py_VISIT(traverse_module_state->__pyx_codeobj__610);
  Py_VISIT(traverse_module_state->__pyx_codeobj__612);
  Py_VISIT(traverse_module_state->__pyx_codeobj__614);
  Py_VISIT(traverse_module_state->__pyx_codeobj__615);
  Py_VISIT(traverse_module_state->__pyx_codeobj__617);
  Py_VISIT(traverse_module_state->__pyx_codeobj__619);
  Py_VISIT(traverse_module_state->__pyx_codeobj__621);
  Py_VISIT(traverse_module_state->__pyx_codeobj__622);
  Py_VISIT(traverse_module_state->__pyx_codeobj__623);
  Py_VISIT(traverse_module_state->__pyx_codeobj__625);
  Py_VISIT(traverse_module_state->__pyx_codeobj__627);
  Py_VISIT(traverse_module_state->__pyx_codeobj__628);
  Py_VISIT(traverse_module_state->__pyx_codeobj__630);
  Py_VISIT(traverse_module_state->__pyx_codeobj__632);
  Py_VISIT(traverse_module_state->__pyx_codeobj__634);
  Py_VISIT(traverse_module_state->__pyx_codeobj__636);
  Py_VISIT(traverse_module_state->__pyx_codeobj__639);
  Py_VISIT(traverse_module_state->__pyx_codeobj__641);
  Py_VISIT(traverse_module_state->__pyx_codeobj__643);
  Py_VISIT(traverse_module_state->__pyx_codeobj__645);
  Py_VISIT(traverse_module_state->__pyx_codeobj__646);
  Py_VISIT(traverse_module_state->__pyx_codeobj__656);
  Py_VISIT(traverse_module_state->__pyx_codeobj__658);
  Py_VISIT(traverse_module_state->__pyx_codeobj__666);
  Py_VISIT(traverse_module_state->__pyx_codeobj__668);
  Py_VISIT(traverse_module_state->__pyx_codeobj__670);
  Py_VISIT(traverse_module_state->__pyx_codeobj__672);
  Py_VISIT(traverse_module_state->__pyx_codeobj__674);
  Py_VISIT(traverse_module_state->__pyx_codeobj__676);
  Py_VISIT(traverse_module_state->__pyx_codeobj__678);
  Py_VISIT(traverse_module_state->__pyx_codeobj__679);
  Py_VISIT(traverse_module_state->__pyx_codeobj__680);
  Py_VISIT(traverse_module_state->__pyx_codeobj__681);
  Py_VISIT(traverse_module_state->__pyx_codeobj__687);
  Py_VISIT(traverse_module_state->__pyx_codeobj__688);
  Py_VISIT(traverse_module_state->__pyx_codeobj__690);
  Py_VISIT(traverse_module_state->__pyx_codeobj__691);
  Py_VISIT(traverse_module_state->__pyx_codeobj__692);
  Py_VISIT(traverse_module_state->__pyx_codeobj__694);
  Py_VISIT(traverse_module_state->__pyx_codeobj__697);
  Py_VISIT(traverse_module_state->__pyx_codeobj__699);
  Py_VISIT(traverse_module_state->__pyx_codeobj__701);
  Py_VISIT(traverse_module_state->__pyx_codeobj__702);
  Py_VISIT(traverse_module_state->__pyx_codeobj__703);
  Py_VISIT(traverse_module_state->__pyx_codeobj__704);
  Py_VISIT(traverse_module_state->__pyx_codeobj__705);
  Py_VISIT(traverse_module_state->__pyx_codeobj__706);
  Py_VISIT(traverse_module_state->__pyx_codeobj__708);
  Py_VISIT(traverse_module_state->__pyx_codeobj__710);
  Py_VISIT(traverse_module_state->__pyx_codeobj__712);
  Py_VISIT(traverse_module_state->__pyx_codeobj__714);
  Py_VISIT(traverse_module_state->__pyx_codeobj__716);
  Py_VISIT(traverse_module_state->__pyx_codeobj__718);
  Py_VISIT(traverse_module_state->__pyx_codeobj__721);
  Py_VISIT(traverse_module_state->__pyx_codeobj__723);
  Py_VISIT(traverse_module_state->__pyx_codeobj__725);
  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
#define __pyx_type_6SnapPy_Triangulation __pyx_mstate_global->__pyx_type_6SnapPy_Triangulation
#define __pyx_type_6SnapPy_Manifold __pyx_mstate_global->__pyx_type_6SnapPy_Manifold
#define __pyx_type_6SnapPy_AbelianGroup __pyx_mstate_global->__pyx_type_6SnapPy_AbelianGroup
#define __pyx_type_6SnapPy_PresentationMatrix __pyx_mstate_global->__pyx_type_6SnapPy_PresentationMatrix
#define __pyx_type_6SnapPy_CFundamentalGroup __pyx_mstate_global->__pyx_type_6SnapPy_CFundamentalGroup
#define __pyx_type_6SnapPy_CHolonomyGroup __pyx_mstate_global->__pyx_type_6SnapPy_CHolonomyGroup
#define __pyx_type_6SnapPy_SymmetryGroup __pyx_mstate_global->__pyx_type_6SnapPy_SymmetryGroup
#define __pyx_type_6SnapPy_CDirichletDomain __pyx_mstate_global->__pyx_type_6SnapPy_CDirichletDomain
#define __pyx_type_6SnapPy_CCuspNeighborhood __pyx_mstate_global->__pyx_type_6SnapPy_CCuspNeighborhood
#define __pyx_type_6SnapPy___pyx_scope_struct__genexpr __pyx_mstate_global->__pyx_type_6SnapPy___pyx_scope_struct__genexpr
#define __pyx_type_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation __pyx_mstate_global->__pyx_type_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation
#define __pyx_type_6SnapPy___pyx_scope_struct_2_genexpr __pyx_mstate_global->__pyx_type_6SnapPy___pyx_scope_struct_2_genexpr
#define __pyx_type_6SnapPy___pyx_scope_struct_3_genexpr __pyx_mstate_global->__pyx_type_6SnapPy___pyx_scope_struct_3_genexpr
#define __pyx_type_6SnapPy___pyx_scope_struct_4_list_as_word __pyx_mstate_global->__pyx_type_6SnapPy___pyx_scope_struct_4_list_as_word
#define __pyx_type_6SnapPy___pyx_scope_struct_5_genexpr __pyx_mstate_global->__pyx_type_6SnapPy___pyx_scope_struct_5_genexpr
#define __pyx_type_6SnapPy___pyx_scope_struct_6_face_list __pyx_mstate_global->__pyx_type_6SnapPy___pyx_scope_struct_6_face_list
#define __pyx_type_6SnapPy___pyx_scope_struct_7_genexpr __pyx_mstate_global->__pyx_type_6SnapPy___pyx_scope_struct_7_genexpr
#define __pyx_type_6SnapPy___pyx_scope_struct_8_genexpr __pyx_mstate_global->__pyx_type_6SnapPy___pyx_scope_struct_8_genexpr
#endif
#define __pyx_ptype_6SnapPy_Triangulation __pyx_mstate_global->__pyx_ptype_6SnapPy_Triangulation
#define __pyx_ptype_6SnapPy_Manifold __pyx_mstate_global->__pyx_ptype_6SnapPy_Manifold
#define __pyx_ptype_6SnapPy_AbelianGroup __pyx_mstate_global->__pyx_ptype_6SnapPy_AbelianGroup
#define __pyx_ptype_6SnapPy_PresentationMatrix __pyx_mstate_global->__pyx_ptype_6SnapPy_PresentationMatrix
#define __pyx_ptype_6SnapPy_CFundamentalGroup __pyx_mstate_global->__pyx_ptype_6SnapPy_CFundamentalGroup
#define __pyx_ptype_6SnapPy_CHolonomyGroup __pyx_mstate_global->__pyx_ptype_6SnapPy_CHolonomyGroup
#define __pyx_ptype_6SnapPy_SymmetryGroup __pyx_mstate_global->__pyx_ptype_6SnapPy_SymmetryGroup
#define __pyx_ptype_6SnapPy_CDirichletDomain __pyx_mstate_global->__pyx_ptype_6SnapPy_CDirichletDomain
#define __pyx_ptype_6SnapPy_CCuspNeighborhood __pyx_mstate_global->__pyx_ptype_6SnapPy_CCuspNeighborhood
#define __pyx_ptype_6SnapPy___pyx_scope_struct__genexpr __pyx_mstate_global->__pyx_ptype_6SnapPy___pyx_scope_struct__genexpr
#define __pyx_ptype_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation __pyx_mstate_global->__pyx_ptype_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation
#define __pyx_ptype_6SnapPy___pyx_scope_struct_2_genexpr __pyx_mstate_global->__pyx_ptype_6SnapPy___pyx_scope_struct_2_genexpr
#define __pyx_ptype_6SnapPy___pyx_scope_struct_3_genexpr __pyx_mstate_global->__pyx_ptype_6SnapPy___pyx_scope_struct_3_genexpr
#define __pyx_ptype_6SnapPy___pyx_scope_struct_4_list_as_word __pyx_mstate_global->__pyx_ptype_6SnapPy___pyx_scope_struct_4_list_as_word
#define __pyx_ptype_6SnapPy___pyx_scope_struct_5_genexpr __pyx_mstate_global->__pyx_ptype_6SnapPy___pyx_scope_struct_5_genexpr
#define __pyx_ptype_6SnapPy___pyx_scope_struct_6_face_list __pyx_mstate_global->__pyx_ptype_6SnapPy___pyx_scope_struct_6_face_list
#define __pyx_ptype_6SnapPy___pyx_scope_struct_7_genexpr __pyx_mstate_global->__pyx_ptype_6SnapPy___pyx_scope_struct_7_genexpr
#define __pyx_ptype_6SnapPy___pyx_scope_struct_8_genexpr __pyx_mstate_global->__pyx_ptype_6SnapPy___pyx_scope_struct_8_genexpr
#define __pyx_kp_b_ __pyx_mstate_global->__pyx_kp_b_
#define __pyx_kp_s_ __pyx_mstate_global->__pyx_kp_s_
#define __pyx_kp_s_0 __pyx_mstate_global->__pyx_kp_s_0
#define __pyx_kp_s_0_0 __pyx_mstate_global->__pyx_kp_s_0_0
#define __pyx_kp_s_0_9_0_9 __pyx_mstate_global->__pyx_kp_s_0_9_0_9
#define __pyx_kp_s_1 __pyx_mstate_global->__pyx_kp_s_1
#define __pyx_kp_s_12n123 __pyx_mstate_global->__pyx_kp_s_12n123
#define __pyx_kp_s_16_14f_I __pyx_mstate_global->__pyx_kp_s_16_14f_I
#define __pyx_kp_s_16n1235 __pyx_mstate_global->__pyx_kp_s_16n1235
#define __pyx_kp_s_17_14f __pyx_mstate_global->__pyx_kp_s_17_14f
#define __pyx_kp_s_18f __pyx_mstate_global->__pyx_kp_s_18f
#define __pyx_kp_s_2_3_move __pyx_mstate_global->__pyx_kp_s_2_3_move
#define __pyx_kp_s_3_2_move __pyx_mstate_global->__pyx_kp_s_3_2_move
#define __pyx_kp_s_3d_s_curve_of_length_s __pyx_mstate_global->__pyx_kp_s_3d_s_curve_of_length_s
#define __pyx_kp_s_4s_40s __pyx_mstate_global->__pyx_kp_s_4s_40s
#define __pyx_kp_s_5_2_1_3_4_1_2 __pyx_mstate_global->__pyx_kp_s_5_2_1_3_4_1_2
#define __pyx_kp_s_6_1 __pyx_mstate_global->__pyx_kp_s_6_1
#define __pyx_kp_s_6s_s __pyx_mstate_global->__pyx_kp_s_6s_s
#define __pyx_kp_s_8_3_3 __pyx_mstate_global->__pyx_kp_s_8_3_3
#define __pyx_n_s_A __pyx_mstate_global->__pyx_n_s_A
#define __pyx_kp_s_A_CuspNeighborhood_object_repre __pyx_mstate_global->__pyx_kp_s_A_CuspNeighborhood_object_repre
#define __pyx_kp_s_A_DirichletDomain_object_repres __pyx_mstate_global->__pyx_kp_s_A_DirichletDomain_object_repres
#define __pyx_kp_s_A_FundamentalGroup_represents_a __pyx_mstate_global->__pyx_kp_s_A_FundamentalGroup_represents_a
#define __pyx_kp_s_A_FundamentalGroup_represents_a_2 __pyx_mstate_global->__pyx_kp_s_A_FundamentalGroup_represents_a_2
#define __pyx_kp_s_A_non_existent_shape_data_type_w __pyx_mstate_global->__pyx_kp_s_A_non_existent_shape_data_type_w
#define __pyx_kp_s_A_s_is_specified_by_a_string_or __pyx_mstate_global->__pyx_kp_s_A_s_is_specified_by_a_string_or
#define __pyx_n_s_AbelianGroup __pyx_mstate_global->__pyx_n_s_AbelianGroup
#define __pyx_n_s_AbelianGroup___reduce __pyx_mstate_global->__pyx_n_s_AbelianGroup___reduce
#define __pyx_kp_u_AbelianGroup___reduce___line_80 __pyx_mstate_global->__pyx_kp_u_AbelianGroup___reduce___line_80
#define __pyx_n_s_AbelianGroup_betti_number __pyx_mstate_global->__pyx_n_s_AbelianGroup_betti_number
#define __pyx_n_s_AbelianGroup_elementary_divisors __pyx_mstate_global->__pyx_n_s_AbelianGroup_elementary_divisors
#define __pyx_n_s_AbelianGroup_order __pyx_mstate_global->__pyx_n_s_AbelianGroup_order
#define __pyx_n_s_AbelianGroup_rank __pyx_mstate_global->__pyx_n_s_AbelianGroup_rank
#define __pyx_kp_s_Acceptable_cusp_types_are_all_or __pyx_mstate_global->__pyx_kp_s_Acceptable_cusp_types_are_all_or
#define __pyx_kp_u_Add_a_possibly_degenerate_hyper __pyx_mstate_global->__pyx_kp_u_Add_a_possibly_degenerate_hyper
#define __pyx_kp_s_All_Dehn_filling_coefficients_mu __pyx_mstate_global->__pyx_kp_s_All_Dehn_filling_coefficients_mu
#define __pyx_kp_s_All_cusps_must_be_fillable __pyx_mstate_global->__pyx_kp_s_All_cusps_must_be_fillable
#define __pyx_kp_s_All_files __pyx_mstate_global->__pyx_kp_s_All_files
#define __pyx_kp_s_All_text_files __pyx_mstate_global->__pyx_kp_s_All_text_files
#define __pyx_n_s_Alphabet __pyx_mstate_global->__pyx_n_s_Alphabet
#define __pyx_n_s_AlternatingKnotExteriors __pyx_mstate_global->__pyx_n_s_AlternatingKnotExteriors
#define __pyx_n_s_Alternating_numbers __pyx_mstate_global->__pyx_n_s_Alternating_numbers
#define __pyx_n_s_Alternating_offsets __pyx_mstate_global->__pyx_n_s_Alternating_offsets
#define __pyx_n_s_Alternating_table __pyx_mstate_global->__pyx_n_s_Alternating_table
#define __pyx_kp_s_An_empty_triangulation_was_gener __pyx_mstate_global->__pyx_kp_s_An_empty_triangulation_was_gener
#define __pyx_n_s_AssertionError __pyx_mstate_global->__pyx_n_s_AssertionError
#define __pyx_n_s_AttributeError __pyx_mstate_global->__pyx_n_s_AttributeError
#define __pyx_n_s_B __pyx_mstate_global->__pyx_n_s_B
#define __pyx_kp_s_Base_class_for_Iterators_Sequen __pyx_mstate_global->__pyx_kp_s_Base_class_for_Iterators_Sequen
#define __pyx_kp_s_Base_class_for_Iterators_Sequen_2 __pyx_mstate_global->__pyx_kp_s_Base_class_for_Iterators_Sequen_2
#define __pyx_kp_s_Base_class_for_manifold_Iterato __pyx_mstate_global->__pyx_kp_s_Base_class_for_manifold_Iterato
#define __pyx_kp_s_Bb_raid_0_9 __pyx_mstate_global->__pyx_kp_s_Bb_raid_0_9
#define __pyx_kp_s_Braid __pyx_mstate_global->__pyx_kp_s_Braid
#define __pyx_kp_s_Braid_1_2_1_2 __pyx_mstate_global->__pyx_kp_s_Braid_1_2_1_2
#define __pyx_kp_s_Braids_must_have_at_least_2_stra __pyx_mstate_global->__pyx_kp_s_Braids_must_have_at_least_2_stra
#define __pyx_kp_u_Brings_up_a_link_editor_window __pyx_mstate_global->__pyx_kp_u_Brings_up_a_link_editor_window
#define __pyx_n_s_Browser __pyx_mstate_global->__pyx_n_s_Browser
#define __pyx_kp_s_Browser_not_imported_Tk_CyOpenGL __pyx_mstate_global->__pyx_kp_s_Browser_not_imported_Tk_CyOpenGL
#define __pyx_kp_s_Bundle_S__1_1_a0_B1 __pyx_mstate_global->__pyx_kp_s_Bundle_S__1_1_a0_B1
#define __pyx_kp_s_Bundle_S__d_d __pyx_mstate_global->__pyx_kp_s_Bundle_S__d_d
#define __pyx_kp_s_Byte_encoding_requires_complete __pyx_mstate_global->__pyx_kp_s_Byte_encoding_requires_complete
#define __pyx_n_s_CCuspNeighborhood __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood
#define __pyx_n_s_CCuspNeighborhood_Ford_domain __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_Ford_domain
#define __pyx_n_s_CCuspNeighborhood___reduce_cytho __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood___reduce_cytho
#define __pyx_n_s_CCuspNeighborhood___setstate_cyt __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood___setstate_cyt
#define __pyx_n_s_CCuspNeighborhood__number __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood__number
#define __pyx_n_s_CCuspNeighborhood_check_index __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_check_index
#define __pyx_n_s_CCuspNeighborhood_get_displaceme __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_get_displaceme
#define __pyx_n_s_CCuspNeighborhood_get_tie __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_get_tie
#define __pyx_n_s_CCuspNeighborhood_horoballs __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_horoballs
#define __pyx_n_s_CCuspNeighborhood_manifold __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_manifold
#define __pyx_n_s_CCuspNeighborhood_max_reach __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_max_reach
#define __pyx_n_s_CCuspNeighborhood_num_cusps __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_num_cusps
#define __pyx_n_s_CCuspNeighborhood_original_index __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_original_index
#define __pyx_n_s_CCuspNeighborhood_reach __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_reach
#define __pyx_n_s_CCuspNeighborhood_set_displaceme __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_set_displaceme
#define __pyx_n_s_CCuspNeighborhood_set_tie __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_set_tie
#define __pyx_n_s_CCuspNeighborhood_stopper __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_stopper
#define __pyx_n_s_CCuspNeighborhood_stopping_displ __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_stopping_displ
#define __pyx_n_s_CCuspNeighborhood_topology __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_topology
#define __pyx_n_s_CCuspNeighborhood_translations __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_translations
#define __pyx_n_s_CCuspNeighborhood_triangulation __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_triangulation
#define __pyx_n_s_CCuspNeighborhood_view __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_view
#define __pyx_kp_u_CCuspNeighborhood_view_line_289 __pyx_mstate_global->__pyx_kp_u_CCuspNeighborhood_view_line_289
#define __pyx_n_s_CCuspNeighborhood_volume __pyx_mstate_global->__pyx_n_s_CCuspNeighborhood_volume
#define __pyx_n_s_CDirichletDomain __pyx_mstate_global->__pyx_n_s_CDirichletDomain
#define __pyx_n_s_CDirichletDomain___reduce_ex __pyx_mstate_global->__pyx_n_s_CDirichletDomain___reduce_ex
#define __pyx_n_s_CDirichletDomain__edge_to_index __pyx_mstate_global->__pyx_n_s_CDirichletDomain__edge_to_index
#define __pyx_n_s_CDirichletDomain__number __pyx_mstate_global->__pyx_n_s_CDirichletDomain__number
#define __pyx_n_s_CDirichletDomain__to_string __pyx_mstate_global->__pyx_n_s_CDirichletDomain__to_string
#define __pyx_n_s_CDirichletDomain__vertex_data_li __pyx_mstate_global->__pyx_n_s_CDirichletDomain__vertex_data_li
#define __pyx_n_s_CDirichletDomain__vertex_list __pyx_mstate_global->__pyx_n_s_CDirichletDomain__vertex_list
#define __pyx_n_s_CDirichletDomain__vertex_to_inde __pyx_mstate_global->__pyx_n_s_CDirichletDomain__vertex_to_inde
#define __pyx_n_s_CDirichletDomain_edge_list __pyx_mstate_global->__pyx_n_s_CDirichletDomain_edge_list
#define __pyx_n_s_CDirichletDomain_export_stl __pyx_mstate_global->__pyx_n_s_CDirichletDomain_export_stl
#define __pyx_kp_u_CDirichletDomain_export_stl_line __pyx_mstate_global->__pyx_kp_u_CDirichletDomain_export_stl_line
#define __pyx_n_s_CDirichletDomain_face_list __pyx_mstate_global->__pyx_n_s_CDirichletDomain_face_list
#define __pyx_n_s_CDirichletDomain_in_radius __pyx_mstate_global->__pyx_n_s_CDirichletDomain_in_radius
#define __pyx_n_s_CDirichletDomain_length_spectrum __pyx_mstate_global->__pyx_n_s_CDirichletDomain_length_spectrum
#define __pyx_kp_u_CDirichletDomain_length_spectrum_2 __pyx_mstate_global->__pyx_kp_u_CDirichletDomain_length_spectrum_2
#define __pyx_n_s_CDirichletDomain_manifold __pyx_mstate_global->__pyx_n_s_CDirichletDomain_manifold
#define __pyx_kp_u_CDirichletDomain_manifold_line_5 __pyx_mstate_global->__pyx_kp_u_CDirichletDomain_manifold_line_5
#define __pyx_n_s_CDirichletDomain_num_edges __pyx_mstate_global->__pyx_n_s_CDirichletDomain_num_edges
#define __pyx_n_s_CDirichletDomain_num_faces __pyx_mstate_global->__pyx_n_s_CDirichletDomain_num_faces
#define __pyx_n_s_CDirichletDomain_num_finite_vert __pyx_mstate_global->__pyx_n_s_CDirichletDomain_num_finite_vert
#define __pyx_n_s_CDirichletDomain_num_ideal_verti __pyx_mstate_global->__pyx_n_s_CDirichletDomain_num_ideal_verti
#define __pyx_n_s_CDirichletDomain_num_vertices __pyx_mstate_global->__pyx_n_s_CDirichletDomain_num_vertices
#define __pyx_n_s_CDirichletDomain_out_radius __pyx_mstate_global->__pyx_n_s_CDirichletDomain_out_radius
#define __pyx_n_s_CDirichletDomain_pairing_matrice __pyx_mstate_global->__pyx_n_s_CDirichletDomain_pairing_matrice
#define __pyx_kp_u_CDirichletDomain_pairing_matrice_2 __pyx_mstate_global->__pyx_kp_u_CDirichletDomain_pairing_matrice_2
#define __pyx_n_s_CDirichletDomain_pairing_words __pyx_mstate_global->__pyx_n_s_CDirichletDomain_pairing_words
#define __pyx_kp_u_CDirichletDomain_pairing_words_l __pyx_mstate_global->__pyx_kp_u_CDirichletDomain_pairing_words_l
#define __pyx_n_s_CDirichletDomain_save __pyx_mstate_global->__pyx_n_s_CDirichletDomain_save
#define __pyx_kp_u_CDirichletDomain_save_line_643 __pyx_mstate_global->__pyx_kp_u_CDirichletDomain_save_line_643
#define __pyx_n_s_CDirichletDomain_spine_radius __pyx_mstate_global->__pyx_n_s_CDirichletDomain_spine_radius
#define __pyx_n_s_CDirichletDomain_triangulation __pyx_mstate_global->__pyx_n_s_CDirichletDomain_triangulation
#define __pyx_kp_u_CDirichletDomain_triangulation_l __pyx_mstate_global->__pyx_kp_u_CDirichletDomain_triangulation_l
#define __pyx_n_s_CDirichletDomain_vertex_list __pyx_mstate_global->__pyx_n_s_CDirichletDomain_vertex_list
#define __pyx_n_s_CDirichletDomain_view __pyx_mstate_global->__pyx_n_s_CDirichletDomain_view
#define __pyx_n_s_CDirichletDomain_volume __pyx_mstate_global->__pyx_n_s_CDirichletDomain_volume
#define __pyx_n_s_CFundamentalGroup __pyx_mstate_global->__pyx_n_s_CFundamentalGroup
#define __pyx_n_s_CFundamentalGroup___reduce_cytho __pyx_mstate_global->__pyx_n_s_CFundamentalGroup___reduce_cytho
#define __pyx_n_s_CFundamentalGroup___setstate_cyt __pyx_mstate_global->__pyx_n_s_CFundamentalGroup___setstate_cyt
#define __pyx_n_s_CFundamentalGroup__gap_init __pyx_mstate_global->__pyx_n_s_CFundamentalGroup__gap_init
#define __pyx_n_s_CFundamentalGroup__magma_init __pyx_mstate_global->__pyx_n_s_CFundamentalGroup__magma_init
#define __pyx_n_s_CFundamentalGroup__word_moves __pyx_mstate_global->__pyx_n_s_CFundamentalGroup__word_moves
#define __pyx_n_s_CFundamentalGroup_character_vari __pyx_mstate_global->__pyx_n_s_CFundamentalGroup_character_vari
#define __pyx_kp_u_CFundamentalGroup_character_vari_2 __pyx_mstate_global->__pyx_kp_u_CFundamentalGroup_character_vari_2
#define __pyx_n_s_CFundamentalGroup_gap_string __pyx_mstate_global->__pyx_n_s_CFundamentalGroup_gap_string
#define __pyx_kp_u_CFundamentalGroup_gap_string_lin __pyx_mstate_global->__pyx_kp_u_CFundamentalGroup_gap_string_lin
#define __pyx_n_s_CFundamentalGroup_generators __pyx_mstate_global->__pyx_n_s_CFundamentalGroup_generators
#define __pyx_n_s_CFundamentalGroup_generators_in __pyx_mstate_global->__pyx_n_s_CFundamentalGroup_generators_in
#define __pyx_kp_u_CFundamentalGroup_generators_in_2 __pyx_mstate_global->__pyx_kp_u_CFundamentalGroup_generators_in_2
#define __pyx_kp_u_CFundamentalGroup_generators_lin __pyx_mstate_global->__pyx_kp_u_CFundamentalGroup_generators_lin
#define __pyx_n_s_CFundamentalGroup_longitude __pyx_mstate_global->__pyx_n_s_CFundamentalGroup_longitude
#define __pyx_kp_u_CFundamentalGroup_longitude_line __pyx_mstate_global->__pyx_kp_u_CFundamentalGroup_longitude_line
#define __pyx_n_s_CFundamentalGroup_magma_string __pyx_mstate_global->__pyx_n_s_CFundamentalGroup_magma_string
#define __pyx_n_s_CFundamentalGroup_meridian __pyx_mstate_global->__pyx_n_s_CFundamentalGroup_meridian
#define __pyx_kp_u_CFundamentalGroup_meridian_line __pyx_mstate_global->__pyx_kp_u_CFundamentalGroup_meridian_line
#define __pyx_n_s_CFundamentalGroup_num_generators __pyx_mstate_global->__pyx_n_s_CFundamentalGroup_num_generators
#define __pyx_n_s_CFundamentalGroup_num_original_g __pyx_mstate_global->__pyx_n_s_CFundamentalGroup_num_original_g
#define __pyx_n_s_CFundamentalGroup_num_relators __pyx_mstate_global->__pyx_n_s_CFundamentalGroup_num_relators
#define __pyx_n_s_CFundamentalGroup_original_gener __pyx_mstate_global->__pyx_n_s_CFundamentalGroup_original_gener
#define __pyx_kp_u_CFundamentalGroup_original_gener_2 __pyx_mstate_global->__pyx_kp_u_CFundamentalGroup_original_gener_2
#define __pyx_n_s_CFundamentalGroup_peripheral_cur __pyx_mstate_global->__pyx_n_s_CFundamentalGroup_peripheral_cur
#define __pyx_kp_u_CFundamentalGroup_peripheral_cur_2 __pyx_mstate_global->__pyx_kp_u_CFundamentalGroup_peripheral_cur_2
#define __pyx_n_s_CFundamentalGroup_relators __pyx_mstate_global->__pyx_n_s_CFundamentalGroup_relators
#define __pyx_n_s_CFundamentalGroup_sage __pyx_mstate_global->__pyx_n_s_CFundamentalGroup_sage
#define __pyx_n_s_CHolonomyGroup __pyx_mstate_global->__pyx_n_s_CHolonomyGroup
#define __pyx_n_s_CHolonomyGroup_O31 __pyx_mstate_global->__pyx_n_s_CHolonomyGroup_O31
#define __pyx_n_s_CHolonomyGroup_SL2C __pyx_mstate_global->__pyx_n_s_CHolonomyGroup_SL2C
#define __pyx_n_s_CHolonomyGroup___reduce_cython __pyx_mstate_global->__pyx_n_s_CHolonomyGroup___reduce_cython
#define __pyx_n_s_CHolonomyGroup___setstate_cython __pyx_mstate_global->__pyx_n_s_CHolonomyGroup___setstate_cython
#define __pyx_n_s_CHolonomyGroup__matrices __pyx_mstate_global->__pyx_n_s_CHolonomyGroup__matrices
#define __pyx_n_s_CHolonomyGroup_complex_length __pyx_mstate_global->__pyx_n_s_CHolonomyGroup_complex_length
#define __pyx_kp_s_CallFuncList_function_local_F_s __pyx_mstate_global->__pyx_kp_s_CallFuncList_function_local_F_s
#define __pyx_kp_s_Can_t_compare_triangulations_of __pyx_mstate_global->__pyx_kp_s_Can_t_compare_triangulations_of
#define __pyx_kp_s_Can_t_get_the_list_of_isometries __pyx_mstate_global->__pyx_kp_s_Can_t_get_the_list_of_isometries
#define __pyx_kp_s_Cannot_convert_s_to_a_Real __pyx_mstate_global->__pyx_kp_s_Cannot_convert_s_to_a_Real
#define __pyx_n_s_Census __pyx_mstate_global->__pyx_n_s_Census
#define __pyx_kp_s_CensusKnots_s __pyx_mstate_global->__pyx_kp_s_CensusKnots_s
#define __pyx_kp_s_CensusKnots_tgz __pyx_mstate_global->__pyx_kp_s_CensusKnots_tgz
#define __pyx_n_s_Census_Knots __pyx_mstate_global->__pyx_n_s_Census_Knots
#define __pyx_n_s_Census_Morwen8 __pyx_mstate_global->__pyx_n_s_Census_Morwen8
#define __pyx_n_s_Census___contains __pyx_mstate_global->__pyx_n_s_Census___contains
#define __pyx_n_s_Census___getitem __pyx_mstate_global->__pyx_n_s_Census___getitem
#define __pyx_n_s_Census___init __pyx_mstate_global->__pyx_n_s_Census___init
#define __pyx_n_s_Census___iter __pyx_mstate_global->__pyx_n_s_Census___iter
#define __pyx_n_s_Census___len __pyx_mstate_global->__pyx_n_s_Census___len
#define __pyx_n_s_Census_next __pyx_mstate_global->__pyx_n_s_Census_next
#define __pyx_n_s_CertifiedShapesEngine __pyx_mstate_global->__pyx_n_s_CertifiedShapesEngine
#define __pyx_kp_u_Change_the_triangulation_to_an __pyx_mstate_global->__pyx_kp_u_Change_the_triangulation_to_an
#define __pyx_n_s_ChristyLinks __pyx_mstate_global->__pyx_n_s_ChristyLinks
#define __pyx_kp_s_ChristyLinks_s __pyx_mstate_global->__pyx_kp_s_ChristyLinks_s
#define __pyx_kp_s_ChristyLinks_tgz __pyx_mstate_global->__pyx_kp_s_ChristyLinks_tgz
#define __pyx_kp_s_Christy_census_of_s_component_li __pyx_mstate_global->__pyx_kp_s_Christy_census_of_s_component_li
#define __pyx_n_s_Christy_links __pyx_mstate_global->__pyx_n_s_Christy_links
#define __pyx_n_s_ClosedCensusData __pyx_mstate_global->__pyx_n_s_ClosedCensusData
#define __pyx_kp_s_ClosedNonorientableDistinct_txt __pyx_mstate_global->__pyx_kp_s_ClosedNonorientableDistinct_txt
#define __pyx_kp_s_ClosedOrientableDistinct_txt __pyx_mstate_global->__pyx_kp_s_ClosedOrientableDistinct_txt
#define __pyx_kp_s_Communication_with_PLink_failed __pyx_mstate_global->__pyx_kp_s_Communication_with_PLink_failed
#define __pyx_kp_u_Constructs_a_reasonable_selecti __pyx_mstate_global->__pyx_kp_u_Constructs_a_reasonable_selecti
#define __pyx_n_s_CosetAction __pyx_mstate_global->__pyx_n_s_CosetAction
#define __pyx_kp_s_Could_not_allocate_a_crossing_ta __pyx_mstate_global->__pyx_kp_s_Could_not_allocate_a_crossing_ta
#define __pyx_kp_s_Could_not_certify_shape_interval __pyx_mstate_global->__pyx_kp_s_Could_not_certify_shape_interval
#define __pyx_kp_s_Could_not_create_the_triangulati __pyx_mstate_global->__pyx_kp_s_Could_not_create_the_triangulati
#define __pyx_kp_s_Cover_degree_should_be_at_least __pyx_mstate_global->__pyx_kp_s_Cover_degree_should_be_at_least
#define __pyx_kp_u_Create_a_3D_picture_of_the_horo __pyx_mstate_global->__pyx_kp_u_Create_a_3D_picture_of_the_horo
#define __pyx_n_s_CuspInfo __pyx_mstate_global->__pyx_n_s_CuspInfo
#define __pyx_n_s_CuspInfo___repr __pyx_mstate_global->__pyx_n_s_CuspInfo___repr
#define __pyx_n_s_CuspNeighborhood __pyx_mstate_global->__pyx_n_s_CuspNeighborhood
#define __pyx_n_s_CuspTopology __pyx_mstate_global->__pyx_n_s_CuspTopology
#define __pyx_kp_s_Cusp_2d_complete_s_of_shape_s __pyx_mstate_global->__pyx_kp_s_Cusp_2d_complete_s_of_shape_s
#define __pyx_kp_s_Cusp_2d_s_not_filled __pyx_mstate_global->__pyx_kp_s_Cusp_2d_s_not_filled
#define __pyx_kp_s_Cusp_2d_s_with_Dehn_filling_coef __pyx_mstate_global->__pyx_kp_s_Cusp_2d_s_with_Dehn_filling_coef
#define __pyx_kp_s_Cusp_Neighborhood_with_d_cusp_s __pyx_mstate_global->__pyx_kp_s_Cusp_Neighborhood_with_d_cusp_s
#define __pyx_kp_s_Cusp_neighborhood_s_of_s __pyx_mstate_global->__pyx_kp_s_Cusp_neighborhood_s_of_s
#define __pyx_n_s_CuspedCensus __pyx_mstate_global->__pyx_n_s_CuspedCensus
#define __pyx_n_s_CuspedCensus___getitem __pyx_mstate_global->__pyx_n_s_CuspedCensus___getitem
#define __pyx_n_s_CuspedCensus___init __pyx_mstate_global->__pyx_n_s_CuspedCensus___init
#define __pyx_n_s_CuspedCensus_lookup __pyx_mstate_global->__pyx_n_s_CuspedCensus_lookup
#define __pyx_n_s_D __pyx_mstate_global->__pyx_n_s_D
#define __pyx_kp_s_DT __pyx_mstate_global->__pyx_kp_s_DT
#define __pyx_kp_s_DT_0_9_01 __pyx_mstate_global->__pyx_kp_s_DT_0_9_01
#define __pyx_kp_s_DT_2 __pyx_mstate_global->__pyx_kp_s_DT_2
#define __pyx_n_s_DT_3 __pyx_mstate_global->__pyx_n_s_DT_3
#define __pyx_kp_s_DT_4_6_2 __pyx_mstate_global->__pyx_kp_s_DT_4_6_2
#define __pyx_kp_s_DT_a_zA_Z_01 __pyx_mstate_global->__pyx_kp_s_DT_a_zA_Z_01
#define __pyx_n_s_DT_code __pyx_mstate_global->__pyx_n_s_DT_code
#define __pyx_n_s_DT_codes __pyx_mstate_global->__pyx_n_s_DT_codes
#define __pyx_kp_s_DT_s __pyx_mstate_global->__pyx_kp_s_DT_s
#define __pyx_n_s_DTcodec __pyx_mstate_global->__pyx_n_s_DTcodec
#define __pyx_kp_s_D_d __pyx_mstate_global->__pyx_kp_s_D_d
#define __pyx_n_s_DirichletDomain __pyx_mstate_global->__pyx_n_s_DirichletDomain
#define __pyx_kp_u_Dirichlet_Domain_of __pyx_mstate_global->__pyx_kp_u_Dirichlet_Domain_of
#define __pyx_kp_s_Does_not_extend_to_link __pyx_mstate_global->__pyx_kp_s_Does_not_extend_to_link
#define __pyx_kp_u_Drills_out_the_specified_dual_c __pyx_mstate_global->__pyx_kp_u_Drills_out_the_specified_dual_c
#define __pyx_n_s_DualCurveInfo __pyx_mstate_global->__pyx_n_s_DualCurveInfo
#define __pyx_n_s_DualCurveInfo___repr __pyx_mstate_global->__pyx_n_s_DualCurveInfo___repr
#define __pyx_kp_u_Each_cusp_has_a_preferred_marki __pyx_mstate_global->__pyx_kp_u_Each_cusp_has_a_preferred_marki
#define __pyx_kp_s_Elementary_divisors_must_be_give __pyx_mstate_global->__pyx_kp_s_Elementary_divisors_must_be_give
#define __pyx_kp_s_Elementary_divisors_must_be_non __pyx_mstate_global->__pyx_kp_s_Elementary_divisors_must_be_non
#define __pyx_kp_s_Empty_Triangulation __pyx_mstate_global->__pyx_kp_s_Empty_Triangulation
#define __pyx_kp_s_Equations_are_available_in_log_a __pyx_mstate_global->__pyx_kp_s_Equations_are_available_in_log_a
#define __pyx_kp_u_Export_the_Dirichlet_domain_as __pyx_mstate_global->__pyx_kp_u_Export_the_Dirichlet_domain_as
#define __pyx_kp_u_Extend_the_Neumann_Zagier_Matri __pyx_mstate_global->__pyx_kp_u_Extend_the_Neumann_Zagier_Matri
#define __pyx_kp_s_Extends_to_link __pyx_mstate_global->__pyx_kp_s_Extends_to_link
#define __pyx_n_s_F __pyx_mstate_global->__pyx_n_s_F
#define __pyx_n_s_FactorCosetAction __pyx_mstate_global->__pyx_n_s_FactorCosetAction
#define __pyx_kp_s_Failed_to_allocate_memory_for_cu __pyx_mstate_global->__pyx_kp_s_Failed_to_allocate_memory_for_cu
#define __pyx_kp_s_Failed_to_allocate_memory_for_te __pyx_mstate_global->__pyx_kp_s_Failed_to_allocate_memory_for_te
#define __pyx_kp_s_Failed_to_construct_permutation __pyx_mstate_global->__pyx_kp_s_Failed_to_construct_permutation
#define __pyx_kp_u_Fill_an_empty_manifold_from_a_b __pyx_mstate_global->__pyx_kp_u_Fill_an_empty_manifold_from_a_b
#define __pyx_kp_u_Fill_an_empty_triangulation_fro __pyx_mstate_global->__pyx_kp_u_Fill_an_empty_triangulation_fro
#define __pyx_kp_u_For_a_Triangulation_that_descri __pyx_mstate_global->__pyx_kp_u_For_a_Triangulation_that_descri
#define __pyx_kp_u_For_a_non_orientable_Triangulat __pyx_mstate_global->__pyx_kp_u_For_a_non_orientable_Triangulat
#define __pyx_n_s_Ford_domain __pyx_mstate_global->__pyx_n_s_Ford_domain
#define __pyx_n_s_FormatHomForSnapPea __pyx_mstate_global->__pyx_n_s_FormatHomForSnapPea
#define __pyx_kp_s_FormatHomForSnapPea_function_f __pyx_mstate_global->__pyx_kp_s_FormatHomForSnapPea_function_f
#define __pyx_n_s_FreeGroup __pyx_mstate_global->__pyx_n_s_FreeGroup
#define __pyx_n_s_FuncResult __pyx_mstate_global->__pyx_n_s_FuncResult
#define __pyx_n_s_FundamentalGroup __pyx_mstate_global->__pyx_n_s_FundamentalGroup
#define __pyx_n_s_G __pyx_mstate_global->__pyx_n_s_G
#define __pyx_n_s_GG __pyx_mstate_global->__pyx_n_s_GG
#define __pyx_n_s_GapElement __pyx_mstate_global->__pyx_n_s_GapElement
#define __pyx_kp_b_Generators __pyx_mstate_global->__pyx_kp_b_Generators
#define __pyx_n_s_GeneratorsOfGroup __pyx_mstate_global->__pyx_n_s_GeneratorsOfGroup
#define __pyx_kp_s_Generators_s __pyx_mstate_global->__pyx_kp_s_Generators_s
#define __pyx_kp_s_Generators_s_Relators_s __pyx_mstate_global->__pyx_kp_s_Generators_s_Relators_s
#define __pyx_kp_u_Give_the_triangulation_a_new_na __pyx_mstate_global->__pyx_kp_u_Give_the_triangulation_a_new_na
#define __pyx_kp_u_Gives_the_shapes_of_the_tetrahe __pyx_mstate_global->__pyx_kp_u_Gives_the_shapes_of_the_tetrahe
#define __pyx_kp_s_Got_the_empty_link_from_PLink_a __pyx_mstate_global->__pyx_kp_s_Got_the_empty_link_from_PLink_a
#define __pyx_kp_s_Group __pyx_mstate_global->__pyx_kp_s_Group
#define __pyx_kp_u_Group_elements_which_pair_the_f __pyx_mstate_global->__pyx_kp_u_Group_elements_which_pair_the_f
#define __pyx_n_s_GrpFP __pyx_mstate_global->__pyx_n_s_GrpFP
#define __pyx_n_s_GrpPerm __pyx_mstate_global->__pyx_n_s_GrpPerm
#define __pyx_n_s_H __pyx_mstate_global->__pyx_n_s_H
#define __pyx_n_s_HTLinkExteriors __pyx_mstate_global->__pyx_n_s_HTLinkExteriors
#define __pyx_n_s_HTWKnots __pyx_mstate_global->__pyx_n_s_HTWKnots
#define __pyx_kp_s_High_precision_shapes_must_be_co __pyx_mstate_global->__pyx_kp_s_High_precision_shapes_must_be_co
#define __pyx_n_s_HolonomyGroup __pyx_mstate_global->__pyx_n_s_HolonomyGroup
#define __pyx_n_s_HolonomyGroup__number __pyx_mstate_global->__pyx_n_s_HolonomyGroup__number
#define __pyx_n_s_HomGrp __pyx_mstate_global->__pyx_n_s_HomGrp
#define __pyx_n_s_HoroballViewer __pyx_mstate_global->__pyx_n_s_HoroballViewer
#define __pyx_n_s_I __pyx_mstate_global->__pyx_n_s_I
#define __pyx_n_s_IOError __pyx_mstate_global->__pyx_n_s_IOError
#define __pyx_kp_u_If_the_SymmetryGroup_is_a_nontr __pyx_mstate_global->__pyx_kp_u_If_the_SymmetryGroup_is_a_nontr
#define __pyx_kp_u_If_the_manifold_is_the_compleme __pyx_mstate_global->__pyx_kp_u_If_the_manifold_is_the_compleme
#define __pyx_kp_u_If_the_symmetry_group_is_abelia __pyx_mstate_global->__pyx_kp_u_If_the_symmetry_group_is_abelia
#define __pyx_kp_s_If_there_is_more_than_one_cusp_y __pyx_mstate_global->__pyx_kp_s_If_there_is_more_than_one_cusp_y
#define __pyx_kp_u_If_this_triangulation_is_a_subd __pyx_mstate_global->__pyx_kp_u_If_this_triangulation_is_a_subd
#define __pyx_n_s_Image __pyx_mstate_global->__pyx_n_s_Image
#define __pyx_kp_s_Immutable_dictionary_whose_data __pyx_mstate_global->__pyx_kp_s_Immutable_dictionary_whose_data
#define __pyx_n_s_ImportError __pyx_mstate_global->__pyx_n_s_ImportError
#define __pyx_kp_u_In_the_default_mode_this_functi __pyx_mstate_global->__pyx_kp_u_In_the_default_mode_this_functi
#define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0
#define __pyx_n_s_Index __pyx_mstate_global->__pyx_n_s_Index
#define __pyx_n_s_IndexError __pyx_mstate_global->__pyx_n_s_IndexError
#define __pyx_kp_s_Index_is_out_of_range __pyx_mstate_global->__pyx_kp_s_Index_is_out_of_range
#define __pyx_n_s_Info __pyx_mstate_global->__pyx_n_s_Info
#define __pyx_n_s_Info___init __pyx_mstate_global->__pyx_n_s_Info___init
#define __pyx_n_s_Info__immutable __pyx_mstate_global->__pyx_n_s_Info__immutable
#define __pyx_n_s_Info_keys __pyx_mstate_global->__pyx_n_s_Info_keys
#define __pyx_kp_s_Info_objects_are_immutable __pyx_mstate_global->__pyx_kp_s_Info_objects_are_immutable
#define __pyx_n_s_Integer __pyx_mstate_global->__pyx_n_s_Integer
#define __pyx_kp_s_Invalid_generator_status __pyx_mstate_global->__pyx_kp_s_Invalid_generator_status
#define __pyx_kp_s_Invalid_permutation_data __pyx_mstate_global->__pyx_kp_s_Invalid_permutation_data
#define __pyx_kp_s_Invalid_pickle_byte_sequence __pyx_mstate_global->__pyx_kp_s_Invalid_pickle_byte_sequence
#define __pyx_n_s_IsSubgroupFpGroup __pyx_mstate_global->__pyx_n_s_IsSubgroupFpGroup
#define __pyx_n_s_IsToPermGroupHomomorphismByImage __pyx_mstate_global->__pyx_n_s_IsToPermGroupHomomorphismByImage
#define __pyx_n_s_Isometry __pyx_mstate_global->__pyx_n_s_Isometry
#define __pyx_n_s_Isometry___init __pyx_mstate_global->__pyx_n_s_Isometry___init
#define __pyx_n_s_Isometry___repr __pyx_mstate_global->__pyx_n_s_Isometry___repr
#define __pyx_n_s_Isometry_cusp_images __pyx_mstate_global->__pyx_n_s_Isometry_cusp_images
#define __pyx_n_s_Isometry_cusp_maps __pyx_mstate_global->__pyx_n_s_Isometry_cusp_maps
#define __pyx_n_s_Isometry_extends_to_link __pyx_mstate_global->__pyx_n_s_Isometry_extends_to_link
#define __pyx_n_s_Isometry_num_cusps __pyx_mstate_global->__pyx_n_s_Isometry_num_cusps
#define __pyx_kp_s_Iterator_Sequence_for_Alternati __pyx_mstate_global->__pyx_kp_s_Iterator_Sequence_for_Alternati
#define __pyx_kp_s_Iterator_Sequence_for_nonAltern __pyx_mstate_global->__pyx_kp_s_Iterator_Sequence_for_nonAltern
#define __pyx_n_s_K7_1 __pyx_mstate_global->__pyx_n_s_K7_1
#define __pyx_n_s_KLPProjection __pyx_mstate_global->__pyx_n_s_KLPProjection
#define __pyx_kp_s_K_s__s __pyx_mstate_global->__pyx_kp_s_K_s__s
#define __pyx_n_s_KeyError __pyx_mstate_global->__pyx_n_s_KeyError
#define __pyx_n_s_Klein __pyx_mstate_global->__pyx_n_s_Klein
#define __pyx_kp_s_Klein_bottle_cusp __pyx_mstate_global->__pyx_kp_s_Klein_bottle_cusp
#define __pyx_n_s_KnotExteriors __pyx_mstate_global->__pyx_n_s_KnotExteriors
#define __pyx_n_s_KnotExteriors___getitem __pyx_mstate_global->__pyx_n_s_KnotExteriors___getitem
#define __pyx_n_s_KnotExteriors___init __pyx_mstate_global->__pyx_n_s_KnotExteriors___init
#define __pyx_kp_s_Knots_in_S_3_which_appear_in_the __pyx_mstate_global->__pyx_kp_s_Knots_in_S_3_which_appear_in_the
#define __pyx_n_s_L __pyx_mstate_global->__pyx_n_s_L
#define __pyx_n_s_L104001 __pyx_mstate_global->__pyx_n_s_L104001
#define __pyx_n_s_L13n9331 __pyx_mstate_global->__pyx_n_s_L13n9331
#define __pyx_kp_s_L13n9331_3_4_2_3_2_1 __pyx_mstate_global->__pyx_kp_s_L13n9331_3_4_2_3_2_1
#define __pyx_n_s_LE __pyx_mstate_global->__pyx_n_s_LE
#define __pyx_kp_s_L_d_2d_3d __pyx_mstate_global->__pyx_kp_s_L_d_2d_3d
#define __pyx_n_s_LengthSpectrum __pyx_mstate_global->__pyx_n_s_LengthSpectrum
#define __pyx_n_s_LengthSpectrumFormatString __pyx_mstate_global->__pyx_n_s_LengthSpectrumFormatString
#define __pyx_n_s_LengthSpectrumFormatStringBase __pyx_mstate_global->__pyx_n_s_LengthSpectrumFormatStringBase
#define __pyx_n_s_LengthSpectrumFormatStringWithWo __pyx_mstate_global->__pyx_n_s_LengthSpectrumFormatStringWithWo
#define __pyx_n_s_LengthSpectrumInfo __pyx_mstate_global->__pyx_n_s_LengthSpectrumInfo
#define __pyx_n_s_LengthSpectrumInfo___repr __pyx_mstate_global->__pyx_n_s_LengthSpectrumInfo___repr
#define __pyx_n_s_LengthSpectrum___repr __pyx_mstate_global->__pyx_n_s_LengthSpectrum___repr
#define __pyx_n_s_Link __pyx_mstate_global->__pyx_n_s_Link
#define __pyx_n_s_LinkEditor __pyx_mstate_global->__pyx_n_s_LinkEditor
#define __pyx_n_s_LinkExteriors __pyx_mstate_global->__pyx_n_s_LinkExteriors
#define __pyx_n_s_LinkManager __pyx_mstate_global->__pyx_n_s_LinkManager
#define __pyx_kp_s_Link_Projection __pyx_mstate_global->__pyx_kp_s_Link_Projection
#define __pyx_n_s_ListOnePerLine __pyx_mstate_global->__pyx_n_s_ListOnePerLine
#define __pyx_n_s_ListOnePerLine___repr __pyx_mstate_global->__pyx_n_s_ListOnePerLine___repr
#define __pyx_n_s_LowIndexSubgroups __pyx_mstate_global->__pyx_n_s_LowIndexSubgroups
#define __pyx_n_s_LowIndexSubgroupsFpGroup __pyx_mstate_global->__pyx_n_s_LowIndexSubgroupsFpGroup
#define __pyx_n_s_M __pyx_mstate_global->__pyx_n_s_M
#define __pyx_n_s_M0 __pyx_mstate_global->__pyx_n_s_M0
#define __pyx_n_s_M1 __pyx_mstate_global->__pyx_n_s_M1
#define __pyx_n_s_MTLinks __pyx_mstate_global->__pyx_n_s_MTLinks
#define __pyx_kp_u_M_cover_permutation_rep_Returns __pyx_mstate_global->__pyx_kp_u_M_cover_permutation_rep_Returns
#define __pyx_kp_u_M_covers_degree_method_None_cov __pyx_mstate_global->__pyx_kp_u_M_covers_degree_method_None_cov
#define __pyx_kp_u_M_covers_degree_method_None_cov_2 __pyx_mstate_global->__pyx_kp_u_M_covers_degree_method_None_cov_2
#define __pyx_kp_u_M_gluing_equations_pgl_N_2_equa __pyx_mstate_global->__pyx_kp_u_M_gluing_equations_pgl_N_2_equa
#define __pyx_kp_u_M_ptolemy_generalized_obstructi __pyx_mstate_global->__pyx_kp_u_M_ptolemy_generalized_obstructi
#define __pyx_kp_u_M_ptolemy_variety_N_obstruction __pyx_mstate_global->__pyx_kp_u_M_ptolemy_variety_N_obstruction
#define __pyx_n_s_MagmaElement __pyx_mstate_global->__pyx_n_s_MagmaElement
#define __pyx_n_s_Manifold __pyx_mstate_global->__pyx_n_s_Manifold
#define __pyx_n_s_Manifold__canonical_cells_are_te __pyx_mstate_global->__pyx_n_s_Manifold__canonical_cells_are_te
#define __pyx_kp_u_Manifold__canonical_cells_are_te_2 __pyx_mstate_global->__pyx_kp_u_Manifold__canonical_cells_are_te_2
#define __pyx_n_s_Manifold__canonical_retriangulat __pyx_mstate_global->__pyx_n_s_Manifold__canonical_retriangulat
#define __pyx_kp_u_Manifold__canonical_retriangulat_2 __pyx_mstate_global->__pyx_kp_u_Manifold__canonical_retriangulat_2
#define __pyx_n_s_Manifold__choose_generators __pyx_mstate_global->__pyx_n_s_Manifold__choose_generators
#define __pyx_n_s_Manifold__choose_generators_info __pyx_mstate_global->__pyx_n_s_Manifold__choose_generators_info
#define __pyx_n_s_Manifold__complex_volume __pyx_mstate_global->__pyx_n_s_Manifold__complex_volume
#define __pyx_n_s_Manifold__cusp_cross_section_inf __pyx_mstate_global->__pyx_n_s_Manifold__cusp_cross_section_inf
#define __pyx_n_s_Manifold__from_bytes __pyx_mstate_global->__pyx_n_s_Manifold__from_bytes
#define __pyx_kp_u_Manifold__from_bytes_line_272 __pyx_mstate_global->__pyx_kp_u_Manifold__from_bytes_line_272
#define __pyx_n_s_Manifold__from_isosig __pyx_mstate_global->__pyx_n_s_Manifold__from_isosig
#define __pyx_n_s_Manifold__from_string __pyx_mstate_global->__pyx_n_s_Manifold__from_string
#define __pyx_kp_u_Manifold__from_string_line_256 __pyx_mstate_global->__pyx_kp_u_Manifold__from_string_line_256
#define __pyx_n_s_Manifold__get_tetrahedra_shapes __pyx_mstate_global->__pyx_n_s_Manifold__get_tetrahedra_shapes
#define __pyx_n_s_Manifold__identify __pyx_mstate_global->__pyx_n_s_Manifold__identify
#define __pyx_n_s_Manifold__number __pyx_mstate_global->__pyx_n_s_Manifold__number
#define __pyx_n_s_Manifold__polish_hyperbolic_stru __pyx_mstate_global->__pyx_n_s_Manifold__polish_hyperbolic_stru
#define __pyx_n_s_Manifold_browse __pyx_mstate_global->__pyx_n_s_Manifold_browse
#define __pyx_kp_u_Manifold_browse_line_375 __pyx_mstate_global->__pyx_kp_u_Manifold_browse_line_375
#define __pyx_n_s_Manifold_canonize __pyx_mstate_global->__pyx_n_s_Manifold_canonize
#define __pyx_kp_u_Manifold_canonize_line_145 __pyx_mstate_global->__pyx_kp_u_Manifold_canonize_line_145
#define __pyx_n_s_Manifold_chern_simons __pyx_mstate_global->__pyx_n_s_Manifold_chern_simons
#define __pyx_kp_u_Manifold_chern_simons_line_807 __pyx_mstate_global->__pyx_kp_u_Manifold_chern_simons_line_807
#define __pyx_n_s_Manifold_copy __pyx_mstate_global->__pyx_n_s_Manifold_copy
#define __pyx_kp_u_Manifold_copy_line_297 __pyx_mstate_global->__pyx_kp_u_Manifold_copy_line_297
#define __pyx_n_s_Manifold_cover __pyx_mstate_global->__pyx_n_s_Manifold_cover
#define __pyx_kp_u_Manifold_cover_line_535 __pyx_mstate_global->__pyx_kp_u_Manifold_cover_line_535
#define __pyx_n_s_Manifold_covers __pyx_mstate_global->__pyx_n_s_Manifold_covers
#define __pyx_kp_u_Manifold_covers_line_607 __pyx_mstate_global->__pyx_kp_u_Manifold_covers_line_607
#define __pyx_n_s_Manifold_cusp_info __pyx_mstate_global->__pyx_n_s_Manifold_cusp_info
#define __pyx_kp_u_Manifold_cusp_info_line_1108 __pyx_mstate_global->__pyx_kp_u_Manifold_cusp_info_line_1108
#define __pyx_n_s_Manifold_cusp_neighborhood __pyx_mstate_global->__pyx_n_s_Manifold_cusp_neighborhood
#define __pyx_kp_u_Manifold_cusp_neighborhood_line __pyx_mstate_global->__pyx_kp_u_Manifold_cusp_neighborhood_line
#define __pyx_kp_s_Manifold_dehn_fill __pyx_mstate_global->__pyx_kp_s_Manifold_dehn_fill
#define __pyx_kp_u_Manifold_dehn_fill_line_1231 __pyx_mstate_global->__pyx_kp_u_Manifold_dehn_fill_line_1231
#define __pyx_n_s_Manifold_dirichlet_domain __pyx_mstate_global->__pyx_n_s_Manifold_dirichlet_domain
#define __pyx_kp_u_Manifold_dirichlet_domain_line_3 __pyx_mstate_global->__pyx_kp_u_Manifold_dirichlet_domain_line_3
#define __pyx_n_s_Manifold_drill __pyx_mstate_global->__pyx_n_s_Manifold_drill
#define __pyx_kp_u_Manifold_drill_line_1485 __pyx_mstate_global->__pyx_kp_u_Manifold_drill_line_1485
#define __pyx_n_s_Manifold_dual_curves __pyx_mstate_global->__pyx_n_s_Manifold_dual_curves
#define __pyx_kp_u_Manifold_dual_curves_line_1383 __pyx_mstate_global->__pyx_kp_u_Manifold_dual_curves_line_1383
#define __pyx_n_s_Manifold_filled_triangulation __pyx_mstate_global->__pyx_n_s_Manifold_filled_triangulation
#define __pyx_kp_u_Manifold_filled_triangulation_li __pyx_mstate_global->__pyx_kp_u_Manifold_filled_triangulation_li
#define __pyx_n_s_Manifold_from_Triangulation __pyx_mstate_global->__pyx_n_s_Manifold_from_Triangulation
#define __pyx_n_s_Manifold_fundamental_group __pyx_mstate_global->__pyx_n_s_Manifold_fundamental_group
#define __pyx_kp_u_Manifold_fundamental_group_line __pyx_mstate_global->__pyx_kp_u_Manifold_fundamental_group_line
#define __pyx_n_s_Manifold_init_hyperbolic_structu __pyx_mstate_global->__pyx_n_s_Manifold_init_hyperbolic_structu
#define __pyx_n_s_Manifold_is_isometric_to __pyx_mstate_global->__pyx_n_s_Manifold_is_isometric_to
#define __pyx_kp_u_Manifold_is_isometric_to_line_15 __pyx_mstate_global->__pyx_kp_u_Manifold_is_isometric_to_line_15
#define __pyx_n_s_Manifold_is_two_bridge __pyx_mstate_global->__pyx_n_s_Manifold_is_two_bridge
#define __pyx_kp_u_Manifold_is_two_bridge_line_1616 __pyx_mstate_global->__pyx_kp_u_Manifold_is_two_bridge_line_1616
#define __pyx_n_s_Manifold_length_spectrum __pyx_mstate_global->__pyx_n_s_Manifold_length_spectrum
#define __pyx_kp_u_Manifold_length_spectrum_line_14 __pyx_mstate_global->__pyx_kp_u_Manifold_length_spectrum_line_14
#define __pyx_kp_s_Manifold_must_be_pickled_with__t __pyx_mstate_global->__pyx_kp_s_Manifold_must_be_pickled_with__t
#define __pyx_kp_s_Manifold_set_peripheral_curves __pyx_mstate_global->__pyx_kp_s_Manifold_set_peripheral_curves
#define __pyx_kp_u_Manifold_set_peripheral_curves_l __pyx_mstate_global->__pyx_kp_u_Manifold_set_peripheral_curves_l
#define __pyx_n_s_Manifold_set_target_holonomy __pyx_mstate_global->__pyx_n_s_Manifold_set_target_holonomy
#define __pyx_kp_s_Manifold_set_tetrahedra_shapes __pyx_mstate_global->__pyx_kp_s_Manifold_set_tetrahedra_shapes
#define __pyx_n_s_Manifold_solution_type __pyx_mstate_global->__pyx_n_s_Manifold_solution_type
#define __pyx_kp_u_Manifold_solution_type_line_1048 __pyx_mstate_global->__pyx_kp_u_Manifold_solution_type_line_1048
#define __pyx_n_s_Manifold_split __pyx_mstate_global->__pyx_n_s_Manifold_split
#define __pyx_kp_u_Manifold_split_line_1736 __pyx_mstate_global->__pyx_kp_u_Manifold_split_line_1736
#define __pyx_n_s_Manifold_splitting_surfaces __pyx_mstate_global->__pyx_n_s_Manifold_splitting_surfaces
#define __pyx_kp_u_Manifold_splitting_surfaces_line __pyx_mstate_global->__pyx_kp_u_Manifold_splitting_surfaces_line
#define __pyx_n_s_Manifold_symmetric_triangulation __pyx_mstate_global->__pyx_n_s_Manifold_symmetric_triangulation
#define __pyx_kp_u_Manifold_symmetric_triangulation_2 __pyx_mstate_global->__pyx_kp_u_Manifold_symmetric_triangulation_2
#define __pyx_n_s_Manifold_symmetry_group __pyx_mstate_global->__pyx_n_s_Manifold_symmetry_group
#define __pyx_n_s_Manifold_tetrahedra_shapes __pyx_mstate_global->__pyx_n_s_Manifold_tetrahedra_shapes
#define __pyx_kp_u_Manifold_tetrahedra_shapes_line __pyx_mstate_global->__pyx_kp_u_Manifold_tetrahedra_shapes_line
#define __pyx_n_s_Manifold_use_field_conversion __pyx_mstate_global->__pyx_n_s_Manifold_use_field_conversion
#define __pyx_n_s_Manifold_volume __pyx_mstate_global->__pyx_n_s_Manifold_volume
#define __pyx_kp_u_Manifold_volume_line_714 __pyx_mstate_global->__pyx_kp_u_Manifold_volume_line_714
#define __pyx_n_s_Manifold_without_hyperbolic_stru __pyx_mstate_global->__pyx_n_s_Manifold_without_hyperbolic_stru
#define __pyx_kp_u_Manifold_without_hyperbolic_stru_2 __pyx_mstate_global->__pyx_kp_u_Manifold_without_hyperbolic_stru_2
#define __pyx_kp_s_Manifolds_must_be_non_empty __pyx_mstate_global->__pyx_kp_s_Manifolds_must_be_non_empty
#define __pyx_n_s_MatrixParity __pyx_mstate_global->__pyx_n_s_MatrixParity
#define __pyx_n_s_MatrixWithExplanations __pyx_mstate_global->__pyx_n_s_MatrixWithExplanations
#define __pyx_n_s_MatrixWithExplanations___init __pyx_mstate_global->__pyx_n_s_MatrixWithExplanations___init
#define __pyx_n_s_MatrixWithExplanations___repr __pyx_mstate_global->__pyx_n_s_MatrixWithExplanations___repr
#define __pyx_n_s_MatrixWithExplanations___repr_2 __pyx_mstate_global->__pyx_n_s_MatrixWithExplanations___repr_2
#define __pyx_n_s_MorwenLinks __pyx_mstate_global->__pyx_n_s_MorwenLinks
#define __pyx_n_s_MorwenLinks___init __pyx_mstate_global->__pyx_n_s_MorwenLinks___init
#define __pyx_n_s_MsgIO __pyx_mstate_global->__pyx_n_s_MsgIO
#define __pyx_n_s_MsgIO___init __pyx_mstate_global->__pyx_n_s_MsgIO___init
#define __pyx_n_s_N __pyx_mstate_global->__pyx_n_s_N
#define __pyx_kp_s_N_has_to_be_2_15 __pyx_mstate_global->__pyx_kp_s_N_has_to_be_2_15
#define __pyx_n_s_NeumannZagierTypeEquations __pyx_mstate_global->__pyx_n_s_NeumannZagierTypeEquations
#define __pyx_n_s_NeumannZagierTypeEquations___ini __pyx_mstate_global->__pyx_n_s_NeumannZagierTypeEquations___ini
#define __pyx_n_s_NeumannZagierTypeEquations___rep __pyx_mstate_global->__pyx_n_s_NeumannZagierTypeEquations___rep
#define __pyx_kp_s_New_triangulation_received_from __pyx_mstate_global->__pyx_kp_s_New_triangulation_received_from
#define __pyx_kp_s_No_associated_link_known __pyx_mstate_global->__pyx_kp_s_No_associated_link_known
#define __pyx_kp_s_No_tetrahedra_data_provided __pyx_mstate_global->__pyx_kp_s_No_tetrahedra_data_provided
#define __pyx_kp_s_Non_orientable __pyx_mstate_global->__pyx_kp_s_Non_orientable
#define __pyx_n_s_NonalternatingKnotExteriors __pyx_mstate_global->__pyx_n_s_NonalternatingKnotExteriors
#define __pyx_n_s_NonalternatingKnotExteriors___in __pyx_mstate_global->__pyx_n_s_NonalternatingKnotExteriors___in
#define __pyx_n_s_Nonalternating_numbers __pyx_mstate_global->__pyx_n_s_Nonalternating_numbers
#define __pyx_n_s_Nonalternating_offsets __pyx_mstate_global->__pyx_n_s_Nonalternating_offsets
#define __pyx_n_s_Nonalternating_table __pyx_mstate_global->__pyx_n_s_Nonalternating_table
#define __pyx_n_s_Nonorientable_lengths __pyx_mstate_global->__pyx_n_s_Nonorientable_lengths
#define __pyx_n_s_NormalSurfaceInfo __pyx_mstate_global->__pyx_n_s_NormalSurfaceInfo
#define __pyx_n_s_NormalSurfaceInfo___repr __pyx_mstate_global->__pyx_n_s_NormalSurfaceInfo___repr
#define __pyx_n_s_NotImplemented __pyx_mstate_global->__pyx_n_s_NotImplemented
#define __pyx_n_s_NotImplementedError __pyx_mstate_global->__pyx_n_s_NotImplementedError
#define __pyx_kp_s_Not_a_valid_permutation __pyx_mstate_global->__pyx_kp_s_Not_a_valid_permutation
#define __pyx_kp_s_Not_within_Sage __pyx_mstate_global->__pyx_kp_s_Not_within_Sage
#define __pyx_n_s_Num_Alternating __pyx_mstate_global->__pyx_n_s_Num_Alternating
#define __pyx_n_s_Num_Nonalternating __pyx_mstate_global->__pyx_n_s_Num_Nonalternating
#define __pyx_n_s_Number __pyx_mstate_global->__pyx_n_s_Number
#define __pyx_kp_s_Number_of_opacities_does_not_mat __pyx_mstate_global->__pyx_kp_s_Number_of_opacities_does_not_mat
#define __pyx_kp_s_Number_of_permutations_is_not_th __pyx_mstate_global->__pyx_kp_s_Number_of_permutations_is_not_th
#define __pyx_n_s_O __pyx_mstate_global->__pyx_n_s_O
#define __pyx_n_s_O31 __pyx_mstate_global->__pyx_n_s_O31
#define __pyx_n_s_O31_generators __pyx_mstate_global->__pyx_n_s_O31_generators
#define __pyx_n_s_ObsCensusKnots __pyx_mstate_global->__pyx_n_s_ObsCensusKnots
#define __pyx_n_s_ObsCensusKnots___getitem __pyx_mstate_global->__pyx_n_s_ObsCensusKnots___getitem
#define __pyx_n_s_ObsCensusKnots___init __pyx_mstate_global->__pyx_n_s_ObsCensusKnots___init
#define __pyx_n_s_ObsCensusKnots___repr __pyx_mstate_global->__pyx_n_s_ObsCensusKnots___repr
#define __pyx_n_s_ObsLinkExteriors __pyx_mstate_global->__pyx_n_s_ObsLinkExteriors
#define __pyx_n_s_ObsLinkExteriors___getitem __pyx_mstate_global->__pyx_n_s_ObsLinkExteriors___getitem
#define __pyx_n_s_ObsLinkExteriors___init __pyx_mstate_global->__pyx_n_s_ObsLinkExteriors___init
#define __pyx_n_s_ObsLinkExteriors___repr __pyx_mstate_global->__pyx_n_s_ObsLinkExteriors___repr
#define __pyx_n_s_ObsMorwenLinks __pyx_mstate_global->__pyx_n_s_ObsMorwenLinks
#define __pyx_n_s_ObsMorwenLinks___getitem __pyx_mstate_global->__pyx_n_s_ObsMorwenLinks___getitem
#define __pyx_n_s_ObsMorwenLinks___init __pyx_mstate_global->__pyx_n_s_ObsMorwenLinks___init
#define __pyx_n_s_ObsNonorientableClosedCensus __pyx_mstate_global->__pyx_n_s_ObsNonorientableClosedCensus
#define __pyx_n_s_ObsNonorientableClosedCensus___g __pyx_mstate_global->__pyx_n_s_ObsNonorientableClosedCensus___g
#define __pyx_n_s_ObsNonorientableClosedCensus___i __pyx_mstate_global->__pyx_n_s_ObsNonorientableClosedCensus___i
#define __pyx_n_s_ObsNonorientableCuspedCensus __pyx_mstate_global->__pyx_n_s_ObsNonorientableCuspedCensus
#define __pyx_n_s_ObsNonorientableCuspedCensus___i __pyx_mstate_global->__pyx_n_s_ObsNonorientableCuspedCensus___i
#define __pyx_n_s_ObsNonorientableCuspedCensus_loo __pyx_mstate_global->__pyx_n_s_ObsNonorientableCuspedCensus_loo
#define __pyx_n_s_ObsOrientableClosedCensus __pyx_mstate_global->__pyx_n_s_ObsOrientableClosedCensus
#define __pyx_n_s_ObsOrientableClosedCensus___geti __pyx_mstate_global->__pyx_n_s_ObsOrientableClosedCensus___geti
#define __pyx_n_s_ObsOrientableClosedCensus___init __pyx_mstate_global->__pyx_n_s_ObsOrientableClosedCensus___init
#define __pyx_n_s_ObsOrientableCuspedCensus __pyx_mstate_global->__pyx_n_s_ObsOrientableCuspedCensus
#define __pyx_kp_s_Obsolete __pyx_mstate_global->__pyx_kp_s_Obsolete
#define __pyx_kp_s_Obsolete_2 __pyx_mstate_global->__pyx_kp_s_Obsolete_2
#define __pyx_kp_s_Obstruction_class_has_wrong_leng __pyx_mstate_global->__pyx_kp_s_Obstruction_class_has_wrong_leng
#define __pyx_kp_u_Opens_browser_window_with_a_gra __pyx_mstate_global->__pyx_kp_u_Opens_browser_window_with_a_gra
#define __pyx_n_s_Orbifold1 __pyx_mstate_global->__pyx_n_s_Orbifold1
#define __pyx_n_s_Orientability __pyx_mstate_global->__pyx_n_s_Orientability
#define __pyx_n_s_Orientable __pyx_mstate_global->__pyx_n_s_Orientable
#define __pyx_n_s_Orientable_lengths __pyx_mstate_global->__pyx_n_s_Orientable_lengths
#define __pyx_kp_s_Out_of_memory __pyx_mstate_global->__pyx_kp_s_Out_of_memory
#define __pyx_n_s_PD_code __pyx_mstate_global->__pyx_n_s_PD_code
#define __pyx_kp_s_PLink_was_not_imported __pyx_mstate_global->__pyx_kp_s_PLink_was_not_imported
#define __pyx_kp_s_P_crossings_0_9_P_alternation_a __pyx_mstate_global->__pyx_kp_s_P_crossings_0_9_P_alternation_a
#define __pyx_kp_s_P_crossings_0_9_P_components_0 __pyx_mstate_global->__pyx_kp_s_P_crossings_0_9_P_components_0
#define __pyx_kp_s_P_crossings_0_9___P_index_0_9_P __pyx_mstate_global->__pyx_kp_s_P_crossings_0_9___P_index_0_9_P
#define __pyx_kp_u_Perform_random_Pachner_moves_on __pyx_mstate_global->__pyx_kp_u_Perform_random_Pachner_moves_on
#define __pyx_n_s_PermutationGroup __pyx_mstate_global->__pyx_n_s_PermutationGroup
#define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError
#define __pyx_kp_s_Please_specify_a_file_name __pyx_mstate_global->__pyx_kp_s_Please_specify_a_file_name
#define __pyx_kp_s_Please_specify_filled_or_complet __pyx_mstate_global->__pyx_kp_s_Please_specify_filled_or_complet
#define __pyx_n_s_PolyhedronViewer __pyx_mstate_global->__pyx_n_s_PolyhedronViewer
#define __pyx_n_s_PreImage __pyx_mstate_global->__pyx_n_s_PreImage
#define __pyx_n_s_PresentationMatrix __pyx_mstate_global->__pyx_n_s_PresentationMatrix
#define __pyx_n_s_PresentationMatrix___reduce_cyth __pyx_mstate_global->__pyx_n_s_PresentationMatrix___reduce_cyth
#define __pyx_n_s_PresentationMatrix___setstate_cy __pyx_mstate_global->__pyx_n_s_PresentationMatrix___setstate_cy
#define __pyx_n_s_PresentationMatrix_add_rows __pyx_mstate_global->__pyx_n_s_PresentationMatrix_add_rows
#define __pyx_n_s_PresentationMatrix_explode __pyx_mstate_global->__pyx_n_s_PresentationMatrix_explode
#define __pyx_n_s_PresentationMatrix_get_data __pyx_mstate_global->__pyx_n_s_PresentationMatrix_get_data
#define __pyx_n_s_PresentationMatrix_row_op __pyx_mstate_global->__pyx_n_s_PresentationMatrix_row_op
#define __pyx_n_s_PresentationMatrix_simplified_ma __pyx_mstate_global->__pyx_n_s_PresentationMatrix_simplified_ma
#define __pyx_n_s_PresentationMatrix_simplify __pyx_mstate_global->__pyx_n_s_PresentationMatrix_simplify
#define __pyx_n_s_Q __pyx_mstate_global->__pyx_n_s_Q
#define __pyx_kp_s_Q_s_A_s __pyx_mstate_global->__pyx_kp_s_Q_s_A_s
#define __pyx_n_s_R __pyx_mstate_global->__pyx_n_s_R
#define __pyx_n_s_RawNumber __pyx_mstate_global->__pyx_n_s_RawNumber
#define __pyx_kp_u_Removing_any_finite_vertices_by __pyx_mstate_global->__pyx_kp_u_Removing_any_finite_vertices_by
#define __pyx_kp_s_Represents_an_isometry_from_one __pyx_mstate_global->__pyx_kp_s_Represents_an_isometry_from_one
#define __pyx_kp_s_Result_is_symplectic_up_to_facto __pyx_mstate_global->__pyx_kp_s_Result_is_symplectic_up_to_facto
#define __pyx_kp_u_Return_a_HolonomyGroup_represen __pyx_mstate_global->__pyx_kp_u_Return_a_HolonomyGroup_represen
#define __pyx_kp_u_Return_a_detailed_list_of_all_t __pyx_mstate_global->__pyx_kp_u_Return_a_detailed_list_of_all_t
#define __pyx_kp_u_Return_a_list_of_info_objects_d __pyx_mstate_global->__pyx_kp_u_Return_a_list_of_info_objects_d
#define __pyx_kp_u_Return_a_new_Manifold_where_the __pyx_mstate_global->__pyx_kp_u_Return_a_new_Manifold_where_the
#define __pyx_kp_u_Return_a_new_manifold_where_the __pyx_mstate_global->__pyx_kp_u_Return_a_new_manifold_where_the
#define __pyx_kp_u_Return_a_reasonably_short_byte __pyx_mstate_global->__pyx_kp_u_Return_a_reasonably_short_byte
#define __pyx_kp_u_Return_a_string_containing_the __pyx_mstate_global->__pyx_kp_u_Return_a_string_containing_the
#define __pyx_kp_u_Return_the_Dowker_Thistlethwait __pyx_mstate_global->__pyx_kp_u_Return_the_Dowker_Thistlethwait
#define __pyx_kp_u_Return_the_abelianization_of_th __pyx_mstate_global->__pyx_kp_u_Return_the_abelianization_of_th
#define __pyx_kp_u_Return_the_center_of_the_symmet __pyx_mstate_global->__pyx_kp_u_Return_the_center_of_the_symmet
#define __pyx_kp_u_Return_the_commutator_subgroup __pyx_mstate_global->__pyx_kp_u_Return_the_commutator_subgroup
#define __pyx_kp_u_Return_the_current_generators_i __pyx_mstate_global->__pyx_kp_u_Return_the_current_generators_i
#define __pyx_kp_u_Return_the_letters_representing __pyx_mstate_global->__pyx_kp_u_Return_the_letters_representing
#define __pyx_kp_u_Return_the_name_of_the_triangul __pyx_mstate_global->__pyx_kp_u_Return_the_name_of_the_triangul
#define __pyx_kp_u_Return_the_number_of_tetrahedra __pyx_mstate_global->__pyx_kp_u_Return_the_number_of_tetrahedra
#define __pyx_kp_u_Return_the_order_of_the_symmetr __pyx_mstate_global->__pyx_kp_u_Return_the_order_of_the_symmetr
#define __pyx_kp_u_Return_the_original_geometric_g __pyx_mstate_global->__pyx_kp_u_Return_the_original_geometric_g
#define __pyx_kp_u_Return_the_total_number_of_cusp __pyx_mstate_global->__pyx_kp_u_Return_the_total_number_of_cusp
#define __pyx_kp_u_Return_whether_a_one_cusped_has __pyx_mstate_global->__pyx_kp_u_Return_whether_a_one_cusped_has
#define __pyx_kp_u_Return_whether_the_SymmetryGrou __pyx_mstate_global->__pyx_kp_u_Return_whether_the_SymmetryGrou
#define __pyx_kp_u_Return_whether_the_full_symmetr __pyx_mstate_global->__pyx_kp_u_Return_whether_the_full_symmetr
#define __pyx_kp_u_Return_whether_the_manifold_has __pyx_mstate_global->__pyx_kp_u_Return_whether_the_manifold_has
#define __pyx_kp_u_Return_whether_the_symmetry_gro __pyx_mstate_global->__pyx_kp_u_Return_whether_the_symmetry_gro
#define __pyx_kp_u_Return_whether_the_symmetry_gro_2 __pyx_mstate_global->__pyx_kp_u_Return_whether_the_symmetry_gro_2
#define __pyx_kp_u_Return_whether_the_underlying_3 __pyx_mstate_global->__pyx_kp_u_Return_whether_the_underlying_3
#define __pyx_kp_u_Returns_True_if_M_and_N_are_iso __pyx_mstate_global->__pyx_kp_u_Returns_True_if_M_and_N_are_iso
#define __pyx_kp_u_Returns_True_if_and_only_if_the __pyx_mstate_global->__pyx_kp_u_Returns_True_if_and_only_if_the
#define __pyx_kp_u_Returns_True_if_and_only_if_the_2 __pyx_mstate_global->__pyx_kp_u_Returns_True_if_and_only_if_the_2
#define __pyx_kp_u_Returns_a_Dehn_filling_descript __pyx_mstate_global->__pyx_kp_u_Returns_a_Dehn_filling_descript
#define __pyx_kp_u_Returns_a_DirichletDomain_objec __pyx_mstate_global->__pyx_kp_u_Returns_a_DirichletDomain_objec
#define __pyx_kp_u_Returns_a_FundamentalGroup_obje __pyx_mstate_global->__pyx_kp_u_Returns_a_FundamentalGroup_obje
#define __pyx_kp_u_Returns_a_Manifold_computed_dir __pyx_mstate_global->__pyx_kp_u_Returns_a_Manifold_computed_dir
#define __pyx_kp_u_Returns_a_Triangulation_compute __pyx_mstate_global->__pyx_kp_u_Returns_a_Triangulation_compute
#define __pyx_kp_u_Returns_a_Triangulation_represe __pyx_mstate_global->__pyx_kp_u_Returns_a_Triangulation_represe
#define __pyx_kp_u_Returns_a_compact_text_represen __pyx_mstate_global->__pyx_kp_u_Returns_a_compact_text_represen
#define __pyx_kp_u_Returns_a_complete_list_of_comb __pyx_mstate_global->__pyx_kp_u_Returns_a_complete_list_of_comb
#define __pyx_kp_u_Returns_a_copy_of_the_manifold __pyx_mstate_global->__pyx_kp_u_Returns_a_copy_of_the_manifold
#define __pyx_kp_u_Returns_a_copy_of_the_triangula __pyx_mstate_global->__pyx_kp_u_Returns_a_copy_of_the_triangula
#define __pyx_kp_u_Returns_a_dictionary_whose_keys __pyx_mstate_global->__pyx_kp_u_Returns_a_dictionary_whose_keys
#define __pyx_kp_u_Returns_a_list_of_geodesics_wit __pyx_mstate_global->__pyx_kp_u_Returns_a_list_of_geodesics_wit
#define __pyx_kp_u_Returns_a_list_of_meridian_long __pyx_mstate_global->__pyx_kp_u_Returns_a_list_of_meridian_long
#define __pyx_kp_u_Returns_a_list_of_the_O31Matric __pyx_mstate_global->__pyx_kp_u_Returns_a_list_of_the_O31Matric
#define __pyx_kp_u_Returns_a_list_of_variables_and __pyx_mstate_global->__pyx_kp_u_Returns_a_list_of_variables_and
#define __pyx_kp_u_Returns_a_string_which_will_def __pyx_mstate_global->__pyx_kp_u_Returns_a_string_which_will_def
#define __pyx_kp_u_Returns_a_word_representing_a_c __pyx_mstate_global->__pyx_kp_u_Returns_a_word_representing_a_c
#define __pyx_kp_u_Returns_a_word_representing_a_c_2 __pyx_mstate_global->__pyx_kp_u_Returns_a_word_representing_a_c_2
#define __pyx_kp_u_Returns_an_AbelianGroup_represe __pyx_mstate_global->__pyx_kp_u_Returns_an_AbelianGroup_represe
#define __pyx_kp_u_Returns_an_info_object_containi __pyx_mstate_global->__pyx_kp_u_Returns_an_info_object_containi
#define __pyx_kp_u_Returns_an_info_object_containi_2 __pyx_mstate_global->__pyx_kp_u_Returns_an_info_object_containi_2
#define __pyx_kp_u_Returns_information_about_the_c __pyx_mstate_global->__pyx_kp_u_Returns_information_about_the_c
#define __pyx_kp_u_Returns_self_as_a_Triangulation __pyx_mstate_global->__pyx_kp_u_Returns_self_as_a_Triangulation
#define __pyx_kp_u_Returns_the_Chern_Simons_invari __pyx_mstate_global->__pyx_kp_u_Returns_the_Chern_Simons_invari
#define __pyx_kp_u_Returns_the_number_of_fake_cusp __pyx_mstate_global->__pyx_kp_u_Returns_the_number_of_fake_cusp
#define __pyx_kp_u_Returns_the_obstruction_classes __pyx_mstate_global->__pyx_kp_u_Returns_the_obstruction_classes
#define __pyx_kp_u_Returns_the_product_of_group_el __pyx_mstate_global->__pyx_kp_u_Returns_the_product_of_group_el
#define __pyx_kp_u_Returns_the_type_of_the_current __pyx_mstate_global->__pyx_kp_u_Returns_the_type_of_the_current
#define __pyx_kp_u_Returns_the_volume_of_the_curre __pyx_mstate_global->__pyx_kp_u_Returns_the_volume_of_the_curre
#define __pyx_kp_u_Reverses_the_orientation_of_the __pyx_mstate_global->__pyx_kp_u_Reverses_the_orientation_of_the
#define __pyx_n_s_RuntimeError __pyx_mstate_global->__pyx_n_s_RuntimeError
#define __pyx_n_s_S5 __pyx_mstate_global->__pyx_n_s_S5
#define __pyx_n_s_SC __pyx_mstate_global->__pyx_n_s_SC
#define __pyx_n_s_SL2C __pyx_mstate_global->__pyx_n_s_SL2C
#define __pyx_n_s_SNAPPEA_MANIFOLD_DIRECTORY __pyx_mstate_global->__pyx_n_s_SNAPPEA_MANIFOLD_DIRECTORY
#define __pyx_n_s_SageNotAvailable __pyx_mstate_global->__pyx_n_s_SageNotAvailable
#define __pyx_n_s_SageObject __pyx_mstate_global->__pyx_n_s_SageObject
#define __pyx_kp_s_Save_Triangulation __pyx_mstate_global->__pyx_kp_s_Save_Triangulation
#define __pyx_kp_u_Save_the_Dirichlet_domain_as_a __pyx_mstate_global->__pyx_kp_u_Save_the_Dirichlet_domain_as_a
#define __pyx_kp_u_Save_the_triangulation_as_a_Sna __pyx_mstate_global->__pyx_kp_u_Save_the_triangulation_as_a_Sna
#define __pyx_kp_u_Searches_for_connected_closed_n __pyx_mstate_global->__pyx_kp_u_Searches_for_connected_closed_n
#define __pyx_kp_s_Send_to_SnapPy __pyx_mstate_global->__pyx_kp_s_Send_to_SnapPy
#define __pyx_kp_u_Set_the_Dehn_filling_coefficien __pyx_mstate_global->__pyx_kp_u_Set_the_Dehn_filling_coefficien
#define __pyx_kp_u_Set_the_Dehn_filling_coefficien_2 __pyx_mstate_global->__pyx_kp_u_Set_the_Dehn_filling_coefficien_2
#define __pyx_n_s_ShapeInfo __pyx_mstate_global->__pyx_n_s_ShapeInfo
#define __pyx_n_s_ShapeInfo___repr __pyx_mstate_global->__pyx_n_s_ShapeInfo___repr
#define __pyx_n_s_ShortMatrixParity __pyx_mstate_global->__pyx_n_s_ShortMatrixParity
#define __pyx_n_s_SnapPeaFatalError __pyx_mstate_global->__pyx_n_s_SnapPeaFatalError
#define __pyx_n_s_SnapPea_KLPProjection __pyx_mstate_global->__pyx_n_s_SnapPea_KLPProjection
#define __pyx_kp_s_SnapPea_crashed_in_function_s_de __pyx_mstate_global->__pyx_kp_s_SnapPea_crashed_in_function_s_de
#define __pyx_kp_s_SnapPea_failed_to_compute_any_pa __pyx_mstate_global->__pyx_kp_s_SnapPea_failed_to_compute_any_pa
#define __pyx_kp_s_SnapPea_failed_to_find_the_canon __pyx_mstate_global->__pyx_kp_s_SnapPea_failed_to_find_the_canon
#define __pyx_kp_s_SnapPea_failed_to_read_the_censu __pyx_mstate_global->__pyx_kp_s_SnapPea_failed_to_read_the_censu
#define __pyx_n_s_SnapPea_interrupt __pyx_mstate_global->__pyx_n_s_SnapPea_interrupt
#define __pyx_kp_s_SnapPea_kernel_failed_when_compu __pyx_mstate_global->__pyx_kp_s_SnapPea_kernel_failed_when_compu
#define __pyx_kp_s_SnapPea_kernel_failed_when_compu_2 __pyx_mstate_global->__pyx_kp_s_SnapPea_kernel_failed_when_compu_2
#define __pyx_kp_s_SnapPea_kernel_failed_when_split __pyx_mstate_global->__pyx_kp_s_SnapPea_kernel_failed_when_split
#define __pyx_kp_s_SnapPea_kernel_style_estimation __pyx_mstate_global->__pyx_kp_s_SnapPea_kernel_style_estimation
#define __pyx_kp_s_SnapPea_only_found_d_surfaces_bu __pyx_mstate_global->__pyx_kp_s_SnapPea_only_found_d_surfaces_bu
#define __pyx_n_s_SnapPy __pyx_mstate_global->__pyx_n_s_SnapPy
#define __pyx_n_s_SnapPyCache __pyx_mstate_global->__pyx_n_s_SnapPyCache
#define __pyx_kp_s_SnapPy_has_no_data_on_links_with __pyx_mstate_global->__pyx_kp_s_SnapPy_has_no_data_on_links_with
#define __pyx_n_s_SolutionType __pyx_mstate_global->__pyx_n_s_SolutionType
#define __pyx_kp_s_Solution_type_is_s __pyx_mstate_global->__pyx_kp_s_Solution_type_is_s
#define __pyx_kp_u_Split_the_manifold_open_along_a __pyx_mstate_global->__pyx_kp_u_Split_the_manifold_open_along_a
#define __pyx_kp_s_Splitting_S__1_0_b1_A0_a0_B1 __pyx_mstate_global->__pyx_kp_s_Splitting_S__1_0_b1_A0_a0_B1
#define __pyx_kp_s_Splitting_S__d_d __pyx_mstate_global->__pyx_kp_s_Splitting_S__d_d
#define __pyx_n_s_Stabilizer __pyx_mstate_global->__pyx_n_s_Stabilizer
#define __pyx_kp_s_Starting_the_link_editor_Select __pyx_mstate_global->__pyx_kp_s_Starting_the_link_editor_Select
#define __pyx_n_s_StopIteration __pyx_mstate_global->__pyx_n_s_StopIteration
#define __pyx_n_s_StrLongestLen __pyx_mstate_global->__pyx_n_s_StrLongestLen
#define __pyx_n_s_StrLongestLen_locals_genexpr __pyx_mstate_global->__pyx_n_s_StrLongestLen_locals_genexpr
#define __pyx_kp_s_Supply_a_manifold_or_generators __pyx_mstate_global->__pyx_kp_s_Supply_a_manifold_or_generators
#define __pyx_kp_s_Supported_cover_types_are_all_an __pyx_mstate_global->__pyx_kp_s_Supported_cover_types_are_all_an
#define __pyx_kp_s_Supported_methods_are_low_index __pyx_mstate_global->__pyx_kp_s_Supported_methods_are_low_index
#define __pyx_n_s_Surface __pyx_mstate_global->__pyx_n_s_Surface
#define __pyx_n_s_SymmetryGroup __pyx_mstate_global->__pyx_n_s_SymmetryGroup
#define __pyx_n_s_SymmetryGroup___reduce_cython __pyx_mstate_global->__pyx_n_s_SymmetryGroup___reduce_cython
#define __pyx_n_s_SymmetryGroup___setstate_cython __pyx_mstate_global->__pyx_n_s_SymmetryGroup___setstate_cython
#define __pyx_n_s_SymmetryGroup_abelian_descriptio __pyx_mstate_global->__pyx_n_s_SymmetryGroup_abelian_descriptio
#define __pyx_kp_u_SymmetryGroup_abelian_descriptio_2 __pyx_mstate_global->__pyx_kp_u_SymmetryGroup_abelian_descriptio_2
#define __pyx_n_s_SymmetryGroup_abelianization __pyx_mstate_global->__pyx_n_s_SymmetryGroup_abelianization
#define __pyx_kp_u_SymmetryGroup_abelianization_lin __pyx_mstate_global->__pyx_kp_u_SymmetryGroup_abelianization_lin
#define __pyx_n_s_SymmetryGroup_center __pyx_mstate_global->__pyx_n_s_SymmetryGroup_center
#define __pyx_kp_u_SymmetryGroup_center_line_256 __pyx_mstate_global->__pyx_kp_u_SymmetryGroup_center_line_256
#define __pyx_n_s_SymmetryGroup_commutator_subgrou __pyx_mstate_global->__pyx_n_s_SymmetryGroup_commutator_subgrou
#define __pyx_kp_u_SymmetryGroup_commutator_subgrou_2 __pyx_mstate_global->__pyx_kp_u_SymmetryGroup_commutator_subgrou_2
#define __pyx_n_s_SymmetryGroup_direct_product_des __pyx_mstate_global->__pyx_n_s_SymmetryGroup_direct_product_des
#define __pyx_kp_u_SymmetryGroup_direct_product_des_2 __pyx_mstate_global->__pyx_kp_u_SymmetryGroup_direct_product_des_2
#define __pyx_n_s_SymmetryGroup_is_S5 __pyx_mstate_global->__pyx_n_s_SymmetryGroup_is_S5
#define __pyx_n_s_SymmetryGroup_is_abelian __pyx_mstate_global->__pyx_n_s_SymmetryGroup_is_abelian
#define __pyx_kp_u_SymmetryGroup_is_abelian_line_72 __pyx_mstate_global->__pyx_kp_u_SymmetryGroup_is_abelian_line_72
#define __pyx_n_s_SymmetryGroup_is_amphicheiral __pyx_mstate_global->__pyx_n_s_SymmetryGroup_is_amphicheiral
#define __pyx_kp_u_SymmetryGroup_is_amphicheiral_li __pyx_mstate_global->__pyx_kp_u_SymmetryGroup_is_amphicheiral_li
#define __pyx_n_s_SymmetryGroup_is_dihedral __pyx_mstate_global->__pyx_n_s_SymmetryGroup_is_dihedral
#define __pyx_kp_u_SymmetryGroup_is_dihedral_line_1 __pyx_mstate_global->__pyx_kp_u_SymmetryGroup_is_dihedral_line_1
#define __pyx_n_s_SymmetryGroup_is_direct_product __pyx_mstate_global->__pyx_n_s_SymmetryGroup_is_direct_product
#define __pyx_kp_u_SymmetryGroup_is_direct_product_2 __pyx_mstate_global->__pyx_kp_u_SymmetryGroup_is_direct_product_2
#define __pyx_n_s_SymmetryGroup_is_full_group __pyx_mstate_global->__pyx_n_s_SymmetryGroup_is_full_group
#define __pyx_kp_u_SymmetryGroup_is_full_group_line __pyx_mstate_global->__pyx_kp_u_SymmetryGroup_is_full_group_line
#define __pyx_n_s_SymmetryGroup_is_invertible_knot __pyx_mstate_global->__pyx_n_s_SymmetryGroup_is_invertible_knot
#define __pyx_kp_u_SymmetryGroup_is_invertible_knot_2 __pyx_mstate_global->__pyx_kp_u_SymmetryGroup_is_invertible_knot_2
#define __pyx_n_s_SymmetryGroup_is_polyhedral __pyx_mstate_global->__pyx_n_s_SymmetryGroup_is_polyhedral
#define __pyx_n_s_SymmetryGroup_isometries __pyx_mstate_global->__pyx_n_s_SymmetryGroup_isometries
#define __pyx_kp_u_SymmetryGroup_isometries_line_29 __pyx_mstate_global->__pyx_kp_u_SymmetryGroup_isometries_line_29
#define __pyx_n_s_SymmetryGroup_multiply_elements __pyx_mstate_global->__pyx_n_s_SymmetryGroup_multiply_elements
#define __pyx_kp_u_SymmetryGroup_multiply_elements_2 __pyx_mstate_global->__pyx_kp_u_SymmetryGroup_multiply_elements_2
#define __pyx_n_s_SymmetryGroup_order __pyx_mstate_global->__pyx_n_s_SymmetryGroup_order
#define __pyx_kp_u_SymmetryGroup_order_line_62 __pyx_mstate_global->__pyx_kp_u_SymmetryGroup_order_line_62
#define __pyx_n_s_SymmetryGroup_polyhedral_descrip __pyx_mstate_global->__pyx_n_s_SymmetryGroup_polyhedral_descrip
#define __pyx_n_s_T __pyx_mstate_global->__pyx_n_s_T
#define __pyx_n_s_TEXT __pyx_mstate_global->__pyx_n_s_TEXT
#define __pyx_kp_s_Tetrahedra_data_appears_invalid __pyx_mstate_global->__pyx_kp_s_Tetrahedra_data_appears_invalid
#define __pyx_kp_s_That_Magma_type_not_recognized __pyx_mstate_global->__pyx_kp_s_That_Magma_type_not_recognized
#define __pyx_kp_s_The_Chern_Simons_invariant_isn_t __pyx_mstate_global->__pyx_kp_s_The_Chern_Simons_invariant_isn_t
#define __pyx_kp_s_The_Dehn_filling_coefficients_mu __pyx_mstate_global->__pyx_kp_s_The_Dehn_filling_coefficients_mu
#define __pyx_kp_s_The_Dirichlet_Domain_was_compute __pyx_mstate_global->__pyx_kp_s_The_Dirichlet_Domain_was_compute
#define __pyx_kp_s_The_Dirichlet_Domain_was_not_com __pyx_mstate_global->__pyx_kp_s_The_Dirichlet_Domain_was_not_com
#define __pyx_kp_s_The_Dirichlet_construction_faile __pyx_mstate_global->__pyx_kp_s_The_Dirichlet_construction_faile
#define __pyx_kp_s_The_Dirichlet_domain_could_not_b __pyx_mstate_global->__pyx_kp_s_The_Dirichlet_domain_could_not_b
#define __pyx_kp_s_The_Ford_domain_construction_fai __pyx_mstate_global->__pyx_kp_s_The_Ford_domain_construction_fai
#define __pyx_kp_s_The_HoroballViewer_class_was_not __pyx_mstate_global->__pyx_kp_s_The_HoroballViewer_class_was_not
#define __pyx_kp_s_The_Manifold_is_not_orientable_s __pyx_mstate_global->__pyx_kp_s_The_Manifold_is_not_orientable_s
#define __pyx_kp_s_The_MorwenLinks_class_has_been_r __pyx_mstate_global->__pyx_kp_s_The_MorwenLinks_class_has_been_r
#define __pyx_kp_s_The_Morwen_8_tetrahedra_manifold __pyx_mstate_global->__pyx_kp_s_The_Morwen_8_tetrahedra_manifold
#define __pyx_kp_s_The_PolyhedronViewer_class_was_n __pyx_mstate_global->__pyx_kp_s_The_PolyhedronViewer_class_was_n
#define __pyx_kp_s_The_SnapPea_kernel_couldn_t_comp __pyx_mstate_global->__pyx_kp_s_The_SnapPea_kernel_couldn_t_comp
#define __pyx_kp_s_The_SnapPea_kernel_was_not_able __pyx_mstate_global->__pyx_kp_s_The_SnapPea_kernel_was_not_able
#define __pyx_kp_s_The_Triangulation_is_already_ori __pyx_mstate_global->__pyx_kp_s_The_Triangulation_is_already_ori
#define __pyx_kp_s_The_Triangulation_is_empty __pyx_mstate_global->__pyx_kp_s_The_Triangulation_is_empty
#define __pyx_kp_s_The_Triangulation_is_empty_2 __pyx_mstate_global->__pyx_kp_s_The_Triangulation_is_empty_2
#define __pyx_kp_s_The_Triangulation_must_be_empty __pyx_mstate_global->__pyx_kp_s_The_Triangulation_must_be_empty
#define __pyx_kp_s_The_amount_of_data_given_is_not __pyx_mstate_global->__pyx_kp_s_The_amount_of_data_given_is_not
#define __pyx_kp_s_The_braid_word_is_invalid __pyx_mstate_global->__pyx_kp_s_The_braid_word_is_invalid
#define __pyx_kp_s_The_census_knot_s_was_not_found __pyx_mstate_global->__pyx_kp_s_The_census_knot_s_was_not_found
#define __pyx_kp_s_The_curve_is_not_isotopic_to_a_g __pyx_mstate_global->__pyx_kp_s_The_curve_is_not_isotopic_to_a_g
#define __pyx_kp_s_The_cusp_neighborhood_constructi __pyx_mstate_global->__pyx_kp_s_The_cusp_neighborhood_constructi
#define __pyx_kp_s_The_data_given_do_not_have_the_r __pyx_mstate_global->__pyx_kp_s_The_data_given_do_not_have_the_r
#define __pyx_kp_s_The_data_provided_are_invalid_fo __pyx_mstate_global->__pyx_kp_s_The_data_provided_are_invalid_fo
#define __pyx_kp_s_The_data_provided_does_not_give __pyx_mstate_global->__pyx_kp_s_The_data_provided_does_not_give
#define __pyx_kp_s_The_data_provided_does_not_give_2 __pyx_mstate_global->__pyx_kp_s_The_data_provided_does_not_give_2
#define __pyx_kp_s_The_drilling_curve_requested_is __pyx_mstate_global->__pyx_kp_s_The_drilling_curve_requested_is
#define __pyx_kp_s_The_elementary_divisors_must_for __pyx_mstate_global->__pyx_kp_s_The_elementary_divisors_must_for
#define __pyx_kp_s_The_empty_triangulation_has_no_n __pyx_mstate_global->__pyx_kp_s_The_empty_triangulation_has_no_n
#define __pyx_kp_s_The_full_symmetry_group_is_not_k __pyx_mstate_global->__pyx_kp_s_The_full_symmetry_group_is_not_k
#define __pyx_kp_s_The_full_symmetry_group_not_know __pyx_mstate_global->__pyx_kp_s_The_full_symmetry_group_not_know
#define __pyx_kp_s_The_generator_data_does_not_star __pyx_mstate_global->__pyx_kp_s_The_generator_data_does_not_star
#define __pyx_kp_s_The_homomorphism_image_is_not_a __pyx_mstate_global->__pyx_kp_s_The_homomorphism_image_is_not_a
#define __pyx_kp_s_The_horoball_construction_failed __pyx_mstate_global->__pyx_kp_s_The_horoball_construction_failed
#define __pyx_kp_s_The_link_complement_s_was_not_fo __pyx_mstate_global->__pyx_kp_s_The_link_complement_s_was_not_fo
#define __pyx_kp_s_The_manifold_file_s_was_not_foun __pyx_mstate_global->__pyx_kp_s_The_manifold_file_s_was_not_foun
#define __pyx_kp_s_The_method_must_be_fold_or_layer __pyx_mstate_global->__pyx_kp_s_The_method_must_be_fold_or_layer
#define __pyx_kp_s_The_number_of_fillings_specified __pyx_mstate_global->__pyx_kp_s_The_number_of_fillings_specified
#define __pyx_kp_s_The_peripheral_data_d_d_d_d_is_n __pyx_mstate_global->__pyx_kp_s_The_peripheral_data_d_d_d_d_is_n
#define __pyx_kp_s_The_peripheral_data_s_is_not_acc __pyx_mstate_global->__pyx_kp_s_The_peripheral_data_s_is_not_acc
#define __pyx_kp_s_The_permutation_list_is_invalid __pyx_mstate_global->__pyx_kp_s_The_permutation_list_is_invalid
#define __pyx_kp_s_The_solution_type_is_s __pyx_mstate_global->__pyx_kp_s_The_solution_type_is_s
#define __pyx_kp_s_The_specified_cusp_s_does_not_ex __pyx_mstate_global->__pyx_kp_s_The_specified_cusp_s_does_not_ex
#define __pyx_kp_s_The_specified_edge_index_s_is_in __pyx_mstate_global->__pyx_kp_s_The_specified_edge_index_s_is_in
#define __pyx_kp_s_The_specified_face_index_s_is_in __pyx_mstate_global->__pyx_kp_s_The_specified_face_index_s_is_in
#define __pyx_kp_s_The_specified_indices_to_be_fill __pyx_mstate_global->__pyx_kp_s_The_specified_indices_to_be_fill
#define __pyx_kp_s_The_specified_tetrahedron_s_does __pyx_mstate_global->__pyx_kp_s_The_specified_tetrahedron_s_does
#define __pyx_kp_s_The_symmetry_group_has_only_d_el __pyx_mstate_global->__pyx_kp_s_The_symmetry_group_has_only_d_el
#define __pyx_kp_s_The_symmetry_group_is_not_a_nont __pyx_mstate_global->__pyx_kp_s_The_symmetry_group_is_not_a_nont
#define __pyx_kp_s_The_symmetry_group_is_not_abelia __pyx_mstate_global->__pyx_kp_s_The_symmetry_group_is_not_abelia
#define __pyx_kp_s_The_symmetry_group_is_not_polyhe __pyx_mstate_global->__pyx_kp_s_The_symmetry_group_is_not_polyhe
#define __pyx_kp_s_The_triangulation_construction_f __pyx_mstate_global->__pyx_kp_s_The_triangulation_construction_f
#define __pyx_kp_s_The_word_contains_a_non_generato __pyx_mstate_global->__pyx_kp_s_The_word_contains_a_non_generato
#define __pyx_kp_s_There_are_only_201_census_knots __pyx_mstate_global->__pyx_kp_s_There_are_only_201_census_knots
#define __pyx_kp_s_This_census_does_not_support_man __pyx_mstate_global->__pyx_kp_s_This_census_does_not_support_man
#define __pyx_kp_s_To_permanently_fill_a_cusp_the_D __pyx_mstate_global->__pyx_kp_s_To_permanently_fill_a_cusp_the_D
#define __pyx_kp_b_Triangulation __pyx_mstate_global->__pyx_kp_b_Triangulation
#define __pyx_kp_s_Triangulation __pyx_mstate_global->__pyx_kp_s_Triangulation
#define __pyx_n_s_Triangulation_2 __pyx_mstate_global->__pyx_n_s_Triangulation_2
#define __pyx_n_s_Triangulation_DT_code __pyx_mstate_global->__pyx_n_s_Triangulation_DT_code
#define __pyx_kp_u_Triangulation_DT_code_line_1076 __pyx_mstate_global->__pyx_kp_u_Triangulation_DT_code_line_1076
#define __pyx_n_s_Triangulation___reduce __pyx_mstate_global->__pyx_n_s_Triangulation___reduce
#define __pyx_kp_u_Triangulation___reduce___line_86 __pyx_mstate_global->__pyx_kp_u_Triangulation___reduce___line_86
#define __pyx_n_s_Triangulation__covers_gap __pyx_mstate_global->__pyx_n_s_Triangulation__covers_gap
#define __pyx_n_s_Triangulation__covers_low_index __pyx_mstate_global->__pyx_n_s_Triangulation__covers_low_index
#define __pyx_n_s_Triangulation__covers_magma __pyx_mstate_global->__pyx_n_s_Triangulation__covers_magma
#define __pyx_n_s_Triangulation__covers_snappea __pyx_mstate_global->__pyx_n_s_Triangulation__covers_snappea
#define __pyx_n_s_Triangulation__empty_save __pyx_mstate_global->__pyx_n_s_Triangulation__empty_save
#define __pyx_n_s_Triangulation__from_bytes __pyx_mstate_global->__pyx_n_s_Triangulation__from_bytes
#define __pyx_kp_u_Triangulation__from_bytes_line_7 __pyx_mstate_global->__pyx_kp_u_Triangulation__from_bytes_line_7
#define __pyx_n_s_Triangulation__from_isosig __pyx_mstate_global->__pyx_n_s_Triangulation__from_isosig
#define __pyx_kp_u_Triangulation__from_isosig_line __pyx_mstate_global->__pyx_kp_u_Triangulation__from_isosig_line
#define __pyx_n_s_Triangulation__from_pickle __pyx_mstate_global->__pyx_n_s_Triangulation__from_pickle
#define __pyx_n_s_Triangulation__from_string __pyx_mstate_global->__pyx_n_s_Triangulation__from_string
#define __pyx_kp_u_Triangulation__from_string_line __pyx_mstate_global->__pyx_kp_u_Triangulation__from_string_line
#define __pyx_n_s_Triangulation__from_tetrahedra_g __pyx_mstate_global->__pyx_n_s_Triangulation__from_tetrahedra_g
#define __pyx_kp_u_Triangulation__from_tetrahedra_g_2 __pyx_mstate_global->__pyx_kp_u_Triangulation__from_tetrahedra_g_2
#define __pyx_n_s_Triangulation__get_cusp_indices __pyx_mstate_global->__pyx_n_s_Triangulation__get_cusp_indices
#define __pyx_n_s_Triangulation__get_from_link_dat __pyx_mstate_global->__pyx_n_s_Triangulation__get_from_link_dat
#define __pyx_n_s_Triangulation__get_tetrahedra_gl __pyx_mstate_global->__pyx_n_s_Triangulation__get_tetrahedra_gl
#define __pyx_n_s_Triangulation__is_symplectic __pyx_mstate_global->__pyx_n_s_Triangulation__is_symplectic
#define __pyx_n_s_Triangulation__marked_tetrahedra __pyx_mstate_global->__pyx_n_s_Triangulation__marked_tetrahedra
#define __pyx_n_s_Triangulation__num_fake_cusps __pyx_mstate_global->__pyx_n_s_Triangulation__num_fake_cusps
#define __pyx_kp_u_Triangulation__num_fake_cusps_li __pyx_mstate_global->__pyx_kp_u_Triangulation__num_fake_cusps_li
#define __pyx_n_s_Triangulation__polish_hyperbolic __pyx_mstate_global->__pyx_n_s_Triangulation__polish_hyperbolic
#define __pyx_n_s_Triangulation__presentation_matr __pyx_mstate_global->__pyx_n_s_Triangulation__presentation_matr
#define __pyx_n_s_Triangulation__ptolemy_equations __pyx_mstate_global->__pyx_n_s_Triangulation__ptolemy_equations
#define __pyx_n_s_Triangulation__ptolemy_equations_2 __pyx_mstate_global->__pyx_n_s_Triangulation__ptolemy_equations_2
#define __pyx_n_s_Triangulation__ptolemy_equations_3 __pyx_mstate_global->__pyx_n_s_Triangulation__ptolemy_equations_3
#define __pyx_n_s_Triangulation__ptolemy_equations_4 __pyx_mstate_global->__pyx_n_s_Triangulation__ptolemy_equations_4
#define __pyx_n_s_Triangulation__ptolemy_equations_5 __pyx_mstate_global->__pyx_n_s_Triangulation__ptolemy_equations_5
#define __pyx_n_s_Triangulation__ptolemy_equations_6 __pyx_mstate_global->__pyx_n_s_Triangulation__ptolemy_equations_6
#define __pyx_n_s_Triangulation__reindex_cusps __pyx_mstate_global->__pyx_n_s_Triangulation__reindex_cusps
#define __pyx_kp_u_Triangulation__reindex_cusps_lin __pyx_mstate_global->__pyx_kp_u_Triangulation__reindex_cusps_lin
#define __pyx_n_s_Triangulation__remove_finite_ver __pyx_mstate_global->__pyx_n_s_Triangulation__remove_finite_ver
#define __pyx_kp_u_Triangulation__remove_finite_ver_2 __pyx_mstate_global->__pyx_kp_u_Triangulation__remove_finite_ver_2
#define __pyx_n_s_Triangulation__set_DTcode __pyx_mstate_global->__pyx_n_s_Triangulation__set_DTcode
#define __pyx_n_s_Triangulation__set_PDcode __pyx_mstate_global->__pyx_n_s_Triangulation__set_PDcode
#define __pyx_n_s_Triangulation__symplectic_form __pyx_mstate_global->__pyx_n_s_Triangulation__symplectic_form
#define __pyx_n_s_Triangulation__three_to_two __pyx_mstate_global->__pyx_n_s_Triangulation__three_to_two
#define __pyx_n_s_Triangulation__to_bytes __pyx_mstate_global->__pyx_n_s_Triangulation__to_bytes
#define __pyx_kp_u_Triangulation__to_bytes_line_699 __pyx_mstate_global->__pyx_kp_u_Triangulation__to_bytes_line_699
#define __pyx_n_s_Triangulation__to_string __pyx_mstate_global->__pyx_n_s_Triangulation__to_string
#define __pyx_kp_u_Triangulation__to_string_line_65 __pyx_mstate_global->__pyx_kp_u_Triangulation__to_string_line_65
#define __pyx_n_s_Triangulation__two_to_three __pyx_mstate_global->__pyx_n_s_Triangulation__two_to_three
#define __pyx_n_s_Triangulation__unsimplified_fill __pyx_mstate_global->__pyx_n_s_Triangulation__unsimplified_fill
#define __pyx_kp_u_Triangulation__unsimplified_fill_2 __pyx_mstate_global->__pyx_kp_u_Triangulation__unsimplified_fill_2
#define __pyx_kp_s_Triangulation_and_text_files __pyx_mstate_global->__pyx_kp_s_Triangulation_and_text_files
#define __pyx_kp_s_Triangulation_contains_cusps_onl __pyx_mstate_global->__pyx_kp_s_Triangulation_contains_cusps_onl
#define __pyx_n_s_Triangulation_copy __pyx_mstate_global->__pyx_n_s_Triangulation_copy
#define __pyx_kp_u_Triangulation_copy_line_442 __pyx_mstate_global->__pyx_kp_u_Triangulation_copy_line_442
#define __pyx_n_s_Triangulation_cover __pyx_mstate_global->__pyx_n_s_Triangulation_cover
#define __pyx_n_s_Triangulation_cover_info __pyx_mstate_global->__pyx_n_s_Triangulation_cover_info
#define __pyx_kp_u_Triangulation_cover_line_2360 __pyx_mstate_global->__pyx_kp_u_Triangulation_cover_line_2360
#define __pyx_n_s_Triangulation_covers __pyx_mstate_global->__pyx_n_s_Triangulation_covers
#define __pyx_kp_u_Triangulation_covers_line_2460 __pyx_mstate_global->__pyx_kp_u_Triangulation_covers_line_2460
#define __pyx_n_s_Triangulation_cusp_info __pyx_mstate_global->__pyx_n_s_Triangulation_cusp_info
#define __pyx_kp_u_Triangulation_cusp_info_line_119 __pyx_mstate_global->__pyx_kp_u_Triangulation_cusp_info_line_119
#define __pyx_n_s_Triangulation_dehn_fill __pyx_mstate_global->__pyx_n_s_Triangulation_dehn_fill
#define __pyx_kp_u_Triangulation_dehn_fill_line_112 __pyx_mstate_global->__pyx_kp_u_Triangulation_dehn_fill_line_112
#define __pyx_n_s_Triangulation_edge_valences __pyx_mstate_global->__pyx_n_s_Triangulation_edge_valences
#define __pyx_kp_u_Triangulation_edge_valences_line __pyx_mstate_global->__pyx_kp_u_Triangulation_edge_valences_line
#define __pyx_n_s_Triangulation_filled_triangulati __pyx_mstate_global->__pyx_n_s_Triangulation_filled_triangulati
#define __pyx_kp_u_Triangulation_filled_triangulati_2 __pyx_mstate_global->__pyx_kp_u_Triangulation_filled_triangulati_2
#define __pyx_n_s_Triangulation_from_Manifold __pyx_mstate_global->__pyx_n_s_Triangulation_from_Manifold
#define __pyx_n_s_Triangulation_fundamental_group __pyx_mstate_global->__pyx_n_s_Triangulation_fundamental_group
#define __pyx_kp_u_Triangulation_fundamental_group_2 __pyx_mstate_global->__pyx_kp_u_Triangulation_fundamental_group_2
#define __pyx_n_s_Triangulation_gluing_equations __pyx_mstate_global->__pyx_n_s_Triangulation_gluing_equations
#define __pyx_kp_u_Triangulation_gluing_equations_l __pyx_mstate_global->__pyx_kp_u_Triangulation_gluing_equations_l
#define __pyx_n_s_Triangulation_gluing_equations_p __pyx_mstate_global->__pyx_n_s_Triangulation_gluing_equations_p
#define __pyx_kp_u_Triangulation_gluing_equations_p_2 __pyx_mstate_global->__pyx_kp_u_Triangulation_gluing_equations_p_2
#define __pyx_n_s_Triangulation_has_finite_vertice __pyx_mstate_global->__pyx_n_s_Triangulation_has_finite_vertice
#define __pyx_kp_u_Triangulation_has_finite_vertice_2 __pyx_mstate_global->__pyx_kp_u_Triangulation_has_finite_vertice_2
#define __pyx_n_s_Triangulation_homology __pyx_mstate_global->__pyx_n_s_Triangulation_homology
#define __pyx_kp_u_Triangulation_homology_line_2278 __pyx_mstate_global->__pyx_kp_u_Triangulation_homology_line_2278
#define __pyx_n_s_Triangulation_is_orientable __pyx_mstate_global->__pyx_n_s_Triangulation_is_orientable
#define __pyx_kp_u_Triangulation_is_orientable_line __pyx_mstate_global->__pyx_kp_u_Triangulation_is_orientable_line
#define __pyx_n_s_Triangulation_isomorphisms_to __pyx_mstate_global->__pyx_n_s_Triangulation_isomorphisms_to
#define __pyx_kp_u_Triangulation_isomorphisms_to_li __pyx_mstate_global->__pyx_kp_u_Triangulation_isomorphisms_to_li
#define __pyx_n_s_Triangulation_link __pyx_mstate_global->__pyx_n_s_Triangulation_link
#define __pyx_n_s_Triangulation_name __pyx_mstate_global->__pyx_n_s_Triangulation_name
#define __pyx_kp_u_Triangulation_name_line_1049 __pyx_mstate_global->__pyx_kp_u_Triangulation_name_line_1049
#define __pyx_n_s_Triangulation_num_cusps __pyx_mstate_global->__pyx_n_s_Triangulation_num_cusps
#define __pyx_kp_u_Triangulation_num_cusps_line_363 __pyx_mstate_global->__pyx_kp_u_Triangulation_num_cusps_line_363
#define __pyx_n_s_Triangulation_num_tetrahedra __pyx_mstate_global->__pyx_n_s_Triangulation_num_tetrahedra
#define __pyx_kp_u_Triangulation_num_tetrahedra_lin __pyx_mstate_global->__pyx_kp_u_Triangulation_num_tetrahedra_lin
#define __pyx_kp_s_Triangulation_or_Manifold __pyx_mstate_global->__pyx_kp_s_Triangulation_or_Manifold
#define __pyx_n_s_Triangulation_orientation_cover __pyx_mstate_global->__pyx_n_s_Triangulation_orientation_cover
#define __pyx_kp_u_Triangulation_orientation_cover_2 __pyx_mstate_global->__pyx_kp_u_Triangulation_orientation_cover_2
#define __pyx_n_s_Triangulation_pickle __pyx_mstate_global->__pyx_n_s_Triangulation_pickle
#define __pyx_n_s_Triangulation_plink __pyx_mstate_global->__pyx_n_s_Triangulation_plink
#define __pyx_kp_u_Triangulation_plink_line_319 __pyx_mstate_global->__pyx_kp_u_Triangulation_plink_line_319
#define __pyx_n_s_Triangulation_ptolemy_generalize __pyx_mstate_global->__pyx_n_s_Triangulation_ptolemy_generalize
#define __pyx_kp_u_Triangulation_ptolemy_generalize_2 __pyx_mstate_global->__pyx_kp_u_Triangulation_ptolemy_generalize_2
#define __pyx_n_s_Triangulation_ptolemy_obstructio __pyx_mstate_global->__pyx_n_s_Triangulation_ptolemy_obstructio
#define __pyx_kp_u_Triangulation_ptolemy_obstructio_2 __pyx_mstate_global->__pyx_kp_u_Triangulation_ptolemy_obstructio_2
#define __pyx_n_s_Triangulation_ptolemy_variety __pyx_mstate_global->__pyx_n_s_Triangulation_ptolemy_variety
#define __pyx_kp_u_Triangulation_ptolemy_variety_li __pyx_mstate_global->__pyx_kp_u_Triangulation_ptolemy_variety_li
#define __pyx_n_s_Triangulation_randomize __pyx_mstate_global->__pyx_n_s_Triangulation_randomize
#define __pyx_kp_u_Triangulation_randomize_line_459 __pyx_mstate_global->__pyx_kp_u_Triangulation_randomize_line_459
#define __pyx_n_s_Triangulation_reverse_orientatio __pyx_mstate_global->__pyx_n_s_Triangulation_reverse_orientatio
#define __pyx_kp_u_Triangulation_reverse_orientatio_2 __pyx_mstate_global->__pyx_kp_u_Triangulation_reverse_orientatio_2
#define __pyx_n_s_Triangulation_save __pyx_mstate_global->__pyx_n_s_Triangulation_save
#define __pyx_kp_u_Triangulation_save_line_629 __pyx_mstate_global->__pyx_kp_u_Triangulation_save_line_629
#define __pyx_n_s_Triangulation_set_name __pyx_mstate_global->__pyx_n_s_Triangulation_set_name
#define __pyx_kp_u_Triangulation_set_name_line_1061 __pyx_mstate_global->__pyx_kp_u_Triangulation_set_name_line_1061
#define __pyx_n_s_Triangulation_set_peripheral_cur __pyx_mstate_global->__pyx_n_s_Triangulation_set_peripheral_cur
#define __pyx_n_s_Triangulation_simplify __pyx_mstate_global->__pyx_n_s_Triangulation_simplify
#define __pyx_kp_u_Triangulation_simplify_line_473 __pyx_mstate_global->__pyx_kp_u_Triangulation_simplify_line_473
#define __pyx_n_s_Triangulation_symplectic_basis __pyx_mstate_global->__pyx_n_s_Triangulation_symplectic_basis
#define __pyx_kp_u_Triangulation_symplectic_basis_l __pyx_mstate_global->__pyx_kp_u_Triangulation_symplectic_basis_l
#define __pyx_n_s_Triangulation_triangulation_isos __pyx_mstate_global->__pyx_n_s_Triangulation_triangulation_isos
#define __pyx_kp_u_Triangulation_triangulation_isos_2 __pyx_mstate_global->__pyx_kp_u_Triangulation_triangulation_isos_2
#define __pyx_n_s_Triangulation_with_hyperbolic_st __pyx_mstate_global->__pyx_n_s_Triangulation_with_hyperbolic_st
#define __pyx_kp_u_Triangulation_with_hyperbolic_st_2 __pyx_mstate_global->__pyx_kp_u_Triangulation_with_hyperbolic_st_2
#define __pyx_kp_u_Try_to_simplify_the_triangulati __pyx_mstate_global->__pyx_kp_u_Try_to_simplify_the_triangulati
#define __pyx_n_s_Type __pyx_mstate_global->__pyx_n_s_Type
#define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
#define __pyx_n_s_UI_callback __pyx_mstate_global->__pyx_n_s_UI_callback
#define __pyx_kp_u_Used_by_pickle_dumps_from_pickl __pyx_mstate_global->__pyx_kp_u_Used_by_pickle_dumps_from_pickl
#define __pyx_kp_u_Used_by_the_pickle_module_to_pi __pyx_mstate_global->__pyx_kp_u_Used_by_the_pickle_module_to_pi
#define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
#define __pyx_kp_s_Verified_and_arbitrary_precision __pyx_mstate_global->__pyx_kp_s_Verified_and_arbitrary_precision
#define __pyx_n_s_ViewerWindow __pyx_mstate_global->__pyx_n_s_ViewerWindow
#define __pyx_kp_u_WARNING_Users_should_not_use_th __pyx_mstate_global->__pyx_kp_u_WARNING_Users_should_not_use_th
#define __pyx_kp_u_WARNING_Users_should_not_use_th_2 __pyx_mstate_global->__pyx_kp_u_WARNING_Users_should_not_use_th_2
#define __pyx_kp_u_WARNING_Users_should_not_use_th_3 __pyx_mstate_global->__pyx_kp_u_WARNING_Users_should_not_use_th_3
#define __pyx_kp_s_Warning_Result_is_not_symplectic __pyx_mstate_global->__pyx_kp_s_Warning_Result_is_not_symplectic
#define __pyx_kp_s_Words_must_be_represented_as_Pyt __pyx_mstate_global->__pyx_kp_s_Words_must_be_represented_as_Pyt
#define __pyx_kp_s_Wrong_equation_type __pyx_mstate_global->__pyx_kp_s_Wrong_equation_type
#define __pyx_n_s_X __pyx_mstate_global->__pyx_n_s_X
#define __pyx_n_s_Xbackward_neighbor __pyx_mstate_global->__pyx_n_s_Xbackward_neighbor
#define __pyx_n_s_Xbackward_strand __pyx_mstate_global->__pyx_n_s_Xbackward_strand
#define __pyx_n_s_Xcomponent __pyx_mstate_global->__pyx_n_s_Xcomponent
#define __pyx_n_s_Xforward_neighbor __pyx_mstate_global->__pyx_n_s_Xforward_neighbor
#define __pyx_n_s_Xforward_strand __pyx_mstate_global->__pyx_n_s_Xforward_strand
#define __pyx_n_s_Y __pyx_mstate_global->__pyx_n_s_Y
#define __pyx_n_s_Ybackward_neighbor __pyx_mstate_global->__pyx_n_s_Ybackward_neighbor
#define __pyx_n_s_Ybackward_strand __pyx_mstate_global->__pyx_n_s_Ybackward_strand
#define __pyx_n_s_Ycomponent __pyx_mstate_global->__pyx_n_s_Ycomponent
#define __pyx_n_s_Yforward_neighbor __pyx_mstate_global->__pyx_n_s_Yforward_neighbor
#define __pyx_n_s_Yforward_strand __pyx_mstate_global->__pyx_n_s_Yforward_strand
#define __pyx_kp_s_You_have_specified_a_Hoste_Thist __pyx_mstate_global->__pyx_kp_s_You_have_specified_a_Hoste_Thist
#define __pyx_kp_s_You_must_apply_fillings_to_all_o __pyx_mstate_global->__pyx_kp_s_You_must_apply_fillings_to_all_o
#define __pyx_kp_s_You_must_apply_shortest_to_all_o __pyx_mstate_global->__pyx_kp_s_You_must_apply_shortest_to_all_o
#define __pyx_kp_s_You_provided_filling_data_for_to __pyx_mstate_global->__pyx_kp_s_You_provided_filling_data_for_to
#define __pyx_kp_s_You_provided_more_peripheral_dat __pyx_mstate_global->__pyx_kp_s_You_provided_more_peripheral_dat
#define __pyx_kp_s_You_tried_to_create_an_empty_Sym __pyx_mstate_global->__pyx_kp_s_You_tried_to_create_an_empty_Sym
#define __pyx_n_s_Z __pyx_mstate_global->__pyx_n_s_Z
#define __pyx_kp_s_Z_d __pyx_mstate_global->__pyx_kp_s_Z_d
#define __pyx_kp_s__111 __pyx_mstate_global->__pyx_kp_s__111
#define __pyx_kp_s__114 __pyx_mstate_global->__pyx_kp_s__114
#define __pyx_kp_s__115 __pyx_mstate_global->__pyx_kp_s__115
#define __pyx_kp_s__116 __pyx_mstate_global->__pyx_kp_s__116
#define __pyx_kp_s__117 __pyx_mstate_global->__pyx_kp_s__117
#define __pyx_kp_s__118 __pyx_mstate_global->__pyx_kp_s__118
#define __pyx_kp_s__12 __pyx_mstate_global->__pyx_kp_s__12
#define __pyx_kp_s__13 __pyx_mstate_global->__pyx_kp_s__13
#define __pyx_kp_b__144 __pyx_mstate_global->__pyx_kp_b__144
#define __pyx_n_s__150 __pyx_mstate_global->__pyx_n_s__150
#define __pyx_kp_s__16 __pyx_mstate_global->__pyx_kp_s__16
#define __pyx_kp_s__17 __pyx_mstate_global->__pyx_kp_s__17
#define __pyx_kp_s__170 __pyx_mstate_global->__pyx_kp_s__170
#define __pyx_kp_u__170 __pyx_mstate_global->__pyx_kp_u__170
#define __pyx_kp_s__18 __pyx_mstate_global->__pyx_kp_s__18
#define __pyx_kp_s__2 __pyx_mstate_global->__pyx_kp_s__2
#define __pyx_kp_s__23 __pyx_mstate_global->__pyx_kp_s__23
#define __pyx_kp_s__29 __pyx_mstate_global->__pyx_kp_s__29
#define __pyx_kp_s__30 __pyx_mstate_global->__pyx_kp_s__30
#define __pyx_kp_s__32 __pyx_mstate_global->__pyx_kp_s__32
#define __pyx_kp_s__33 __pyx_mstate_global->__pyx_kp_s__33
#define __pyx_kp_s__38 __pyx_mstate_global->__pyx_kp_s__38
#define __pyx_kp_s__653 __pyx_mstate_global->__pyx_kp_s__653
#define __pyx_kp_s__7 __pyx_mstate_global->__pyx_kp_s__7
#define __pyx_n_s__726 __pyx_mstate_global->__pyx_n_s__726
#define __pyx_kp_s__8 __pyx_mstate_global->__pyx_kp_s__8
#define __pyx_kp_b__9 __pyx_mstate_global->__pyx_kp_b__9
#define __pyx_kp_s__9 __pyx_mstate_global->__pyx_kp_s__9
#define __pyx_kp_s_a __pyx_mstate_global->__pyx_kp_s_a
#define __pyx_n_s_a_2 __pyx_mstate_global->__pyx_n_s_a_2
#define __pyx_n_s_a_il __pyx_mstate_global->__pyx_n_s_a_il
#define __pyx_kp_s_a_zA_Z0_9 __pyx_mstate_global->__pyx_kp_s_a_zA_Z0_9
#define __pyx_kp_s_abcABC__d_abcABC__d __pyx_mstate_global->__pyx_kp_s_abcABC__d_abcABC__d
#define __pyx_kp_s_abcdefghijklmnopqrstuvwxyzZYXWV __pyx_mstate_global->__pyx_kp_s_abcdefghijklmnopqrstuvwxyzZYXWV
#define __pyx_n_s_abelian_description __pyx_mstate_global->__pyx_n_s_abelian_description
#define __pyx_n_s_abelianization __pyx_mstate_global->__pyx_n_s_abelianization
#define __pyx_n_s_absImag __pyx_mstate_global->__pyx_n_s_absImag
#define __pyx_n_s_abspath __pyx_mstate_global->__pyx_n_s_abspath
#define __pyx_n_s_acc_log_im __pyx_mstate_global->__pyx_n_s_acc_log_im
#define __pyx_n_s_acc_log_re __pyx_mstate_global->__pyx_n_s_acc_log_re
#define __pyx_n_s_acc_rec_im __pyx_mstate_global->__pyx_n_s_acc_rec_im
#define __pyx_n_s_acc_rec_re __pyx_mstate_global->__pyx_n_s_acc_rec_re
#define __pyx_n_s_accuracies __pyx_mstate_global->__pyx_n_s_accuracies
#define __pyx_n_s_accuracy __pyx_mstate_global->__pyx_n_s_accuracy
#define __pyx_n_s_add __pyx_mstate_global->__pyx_n_s_add
#define __pyx_n_s_add_rows __pyx_mstate_global->__pyx_n_s_add_rows
#define __pyx_n_s_algorithm __pyx_mstate_global->__pyx_n_s_algorithm
#define __pyx_n_s_all __pyx_mstate_global->__pyx_n_s_all
#define __pyx_n_s_all_tables __pyx_mstate_global->__pyx_n_s_all_tables
#define __pyx_kp_s_all_tetrahedra_positively_orient __pyx_mstate_global->__pyx_kp_s_all_tetrahedra_positively_orient
#define __pyx_n_s_alpha __pyx_mstate_global->__pyx_n_s_alpha
#define __pyx_kp_s_alternating_gz __pyx_mstate_global->__pyx_kp_s_alternating_gz
#define __pyx_n_s_alternation __pyx_mstate_global->__pyx_n_s_alternation
#define __pyx_n_s_ans __pyx_mstate_global->__pyx_n_s_ans
#define __pyx_n_s_append __pyx_mstate_global->__pyx_n_s_append
#define __pyx_n_s_are_isometric __pyx_mstate_global->__pyx_n_s_are_isometric
#define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args
#define __pyx_n_s_as_ideal __pyx_mstate_global->__pyx_n_s_as_ideal
#define __pyx_n_s_as_int_list __pyx_mstate_global->__pyx_n_s_as_int_list
#define __pyx_n_s_as_string __pyx_mstate_global->__pyx_n_s_as_string
#define __pyx_n_s_ascii __pyx_mstate_global->__pyx_n_s_ascii
#define __pyx_n_s_ascii_lowercase __pyx_mstate_global->__pyx_n_s_ascii_lowercase
#define __pyx_n_s_asksaveasfile __pyx_mstate_global->__pyx_n_s_asksaveasfile
#define __pyx_n_s_assignments __pyx_mstate_global->__pyx_n_s_assignments
#define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
#define __pyx_kp_s_at_least __pyx_mstate_global->__pyx_kp_s_at_least
#define __pyx_n_s_atexit __pyx_mstate_global->__pyx_n_s_atexit
#define __pyx_kp_s_b __pyx_mstate_global->__pyx_kp_s_b
#define __pyx_n_s_b_2 __pyx_mstate_global->__pyx_n_s_b_2
#define __pyx_kp_s_b_RL __pyx_mstate_global->__pyx_kp_s_b_RL
#define __pyx_kp_s_b_RL_2 __pyx_mstate_global->__pyx_kp_s_b_RL_2
#define __pyx_kp_s_b_RRL __pyx_mstate_global->__pyx_kp_s_b_RRL
#define __pyx_kp_s_b_RRL_2 __pyx_mstate_global->__pyx_kp_s_b_RRL_2
#define __pyx_n_s_b_file_name __pyx_mstate_global->__pyx_n_s_b_file_name
#define __pyx_n_s_b_new_name __pyx_mstate_global->__pyx_n_s_b_new_name
#define __pyx_kp_s_b_no_lLrR __pyx_mstate_global->__pyx_kp_s_b_no_lLrR
#define __pyx_n_s_b_string __pyx_mstate_global->__pyx_n_s_b_string
#define __pyx_n_s_ball __pyx_mstate_global->__pyx_n_s_ball
#define __pyx_n_s_base __pyx_mstate_global->__pyx_n_s_base
#define __pyx_n_s_bases __pyx_mstate_global->__pyx_n_s_bases
#define __pyx_n_s_basis __pyx_mstate_global->__pyx_n_s_basis
#define __pyx_n_s_betti_number __pyx_mstate_global->__pyx_n_s_betti_number
#define __pyx_kp_s_binary __pyx_mstate_global->__pyx_kp_s_binary
#define __pyx_kp_s_binary_dihedral_group_2_2_d __pyx_mstate_global->__pyx_kp_s_binary_dihedral_group_2_2_d
#define __pyx_n_s_bit __pyx_mstate_global->__pyx_n_s_bit
#define __pyx_n_s_bits_prec __pyx_mstate_global->__pyx_n_s_bits_prec
#define __pyx_n_s_blowup_multiple __pyx_mstate_global->__pyx_n_s_blowup_multiple
#define __pyx_n_s_browse __pyx_mstate_global->__pyx_n_s_browse
#define __pyx_n_s_browser __pyx_mstate_global->__pyx_n_s_browser
#define __pyx_n_s_bundle __pyx_mstate_global->__pyx_n_s_bundle
#define __pyx_n_s_bundle_from_string __pyx_mstate_global->__pyx_n_s_bundle_from_string
#define __pyx_n_s_byte __pyx_mstate_global->__pyx_n_s_byte
#define __pyx_n_s_bytearray_to_bytes __pyx_mstate_global->__pyx_n_s_bytearray_to_bytes
#define __pyx_n_s_byteseq __pyx_mstate_global->__pyx_n_s_byteseq
#define __pyx_n_s_bytestring __pyx_mstate_global->__pyx_n_s_bytestring
#define __pyx_n_s_c __pyx_mstate_global->__pyx_n_s_c
#define __pyx_n_s_c0 __pyx_mstate_global->__pyx_n_s_c0
#define __pyx_n_s_c1 __pyx_mstate_global->__pyx_n_s_c1
#define __pyx_n_s_c2 __pyx_mstate_global->__pyx_n_s_c2
#define __pyx_n_s_c3 __pyx_mstate_global->__pyx_n_s_c3
#define __pyx_n_s_c_abelianization __pyx_mstate_global->__pyx_n_s_c_abelianization
#define __pyx_n_s_c_canonized_triangulation __pyx_mstate_global->__pyx_n_s_c_canonized_triangulation
#define __pyx_n_s_c_center __pyx_mstate_global->__pyx_n_s_c_center
#define __pyx_n_s_c_comm_subgroup __pyx_mstate_global->__pyx_n_s_c_comm_subgroup
#define __pyx_n_s_c_core_length __pyx_mstate_global->__pyx_n_s_c_core_length
#define __pyx_n_s_c_cover_type __pyx_mstate_global->__pyx_n_s_c_cover_type
#define __pyx_n_s_c_eqns __pyx_mstate_global->__pyx_n_s_c_eqns
#define __pyx_n_s_c_factor_0 __pyx_mstate_global->__pyx_n_s_c_factor_0
#define __pyx_n_s_c_factor_1 __pyx_mstate_global->__pyx_n_s_c_factor_1
#define __pyx_n_s_c_filled_tri __pyx_mstate_global->__pyx_n_s_c_filled_tri
#define __pyx_n_s_c_longitude __pyx_mstate_global->__pyx_n_s_c_longitude
#define __pyx_n_s_c_matrix __pyx_mstate_global->__pyx_n_s_c_matrix
#define __pyx_n_s_c_meridian __pyx_mstate_global->__pyx_n_s_c_meridian
#define __pyx_n_s_c_moves __pyx_mstate_global->__pyx_n_s_c_moves
#define __pyx_n_s_c_new_name __pyx_mstate_global->__pyx_n_s_c_new_name
#define __pyx_n_s_c_new_tri __pyx_mstate_global->__pyx_n_s_c_new_tri
#define __pyx_n_s_c_obstruction_class __pyx_mstate_global->__pyx_n_s_c_obstruction_class
#define __pyx_n_s_c_opacities __pyx_mstate_global->__pyx_n_s_c_opacities
#define __pyx_n_s_c_representation __pyx_mstate_global->__pyx_n_s_c_representation
#define __pyx_n_s_c_retriangulated_triangulation __pyx_mstate_global->__pyx_n_s_c_retriangulated_triangulation
#define __pyx_n_s_c_string __pyx_mstate_global->__pyx_n_s_c_string
#define __pyx_n_s_c_symmetric_triangulation __pyx_mstate_global->__pyx_n_s_c_symmetric_triangulation
#define __pyx_n_s_c_target __pyx_mstate_global->__pyx_n_s_c_target
#define __pyx_n_s_c_terse __pyx_mstate_global->__pyx_n_s_c_terse
#define __pyx_n_s_c_triangulation __pyx_mstate_global->__pyx_n_s_c_triangulation
#define __pyx_n_s_c_vars __pyx_mstate_global->__pyx_n_s_c_vars
#define __pyx_n_s_c_word __pyx_mstate_global->__pyx_n_s_c_word
#define __pyx_n_s_cache __pyx_mstate_global->__pyx_n_s_cache
#define __pyx_n_s_callback __pyx_mstate_global->__pyx_n_s_callback
#define __pyx_n_s_canonical __pyx_mstate_global->__pyx_n_s_canonical
#define __pyx_n_s_canonical_cells_are_tetrahedra __pyx_mstate_global->__pyx_n_s_canonical_cells_are_tetrahedra
#define __pyx_n_s_canonical_retriangulation __pyx_mstate_global->__pyx_n_s_canonical_retriangulation
#define __pyx_n_s_canonize __pyx_mstate_global->__pyx_n_s_canonize
#define __pyx_n_s_cb_menu __pyx_mstate_global->__pyx_n_s_cb_menu
#define __pyx_n_s_census_index __pyx_mstate_global->__pyx_n_s_census_index
#define __pyx_n_s_census_knot_archive __pyx_mstate_global->__pyx_n_s_census_knot_archive
#define __pyx_n_s_census_knot_numbers __pyx_mstate_global->__pyx_n_s_census_knot_numbers
#define __pyx_n_s_center __pyx_mstate_global->__pyx_n_s_center
#define __pyx_n_s_centroid_at_origin __pyx_mstate_global->__pyx_n_s_centroid_at_origin
#define __pyx_n_s_certified_shapes __pyx_mstate_global->__pyx_n_s_certified_shapes
#define __pyx_n_s_character_variety __pyx_mstate_global->__pyx_n_s_character_variety
#define __pyx_n_s_character_variety_ideal __pyx_mstate_global->__pyx_n_s_character_variety_ideal
#define __pyx_n_s_character_variety_vars_and_polys __pyx_mstate_global->__pyx_n_s_character_variety_vars_and_polys
#define __pyx_n_s_check_SnapPea_memory __pyx_mstate_global->__pyx_n_s_check_SnapPea_memory
#define __pyx_n_s_check_index __pyx_mstate_global->__pyx_n_s_check_index
#define __pyx_n_s_chern_simons __pyx_mstate_global->__pyx_n_s_chern_simons
#define __pyx_n_s_choose_generators __pyx_mstate_global->__pyx_n_s_choose_generators
#define __pyx_n_s_choose_generators_info __pyx_mstate_global->__pyx_n_s_choose_generators_info
#define __pyx_n_s_circle __pyx_mstate_global->__pyx_n_s_circle
#define __pyx_n_s_class __pyx_mstate_global->__pyx_n_s_class
#define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem
#define __pyx_n_s_clear __pyx_mstate_global->__pyx_n_s_clear
#define __pyx_n_s_clear_marks __pyx_mstate_global->__pyx_n_s_clear_marks
#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
#define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close
#define __pyx_n_s_closed_census_directory __pyx_mstate_global->__pyx_n_s_closed_census_directory
#define __pyx_n_s_closed_nonorientable __pyx_mstate_global->__pyx_n_s_closed_nonorientable
#define __pyx_n_s_closed_orientable __pyx_mstate_global->__pyx_n_s_closed_orientable
#define __pyx_n_s_closest __pyx_mstate_global->__pyx_n_s_closest
#define __pyx_n_s_cls __pyx_mstate_global->__pyx_n_s_cls
#define __pyx_n_s_cobs __pyx_mstate_global->__pyx_n_s_cobs
#define __pyx_n_s_code __pyx_mstate_global->__pyx_n_s_code
#define __pyx_n_s_codec __pyx_mstate_global->__pyx_n_s_codec
#define __pyx_n_s_coefficient_list __pyx_mstate_global->__pyx_n_s_coefficient_list
#define __pyx_n_s_coeffs __pyx_mstate_global->__pyx_n_s_coeffs
#define __pyx_n_s_col_support __pyx_mstate_global->__pyx_n_s_col_support
#define __pyx_n_s_cols __pyx_mstate_global->__pyx_n_s_cols
#define __pyx_n_s_columns __pyx_mstate_global->__pyx_n_s_columns
#define __pyx_n_s_combinatorial __pyx_mstate_global->__pyx_n_s_combinatorial
#define __pyx_n_s_comm_subgroup __pyx_mstate_global->__pyx_n_s_comm_subgroup
#define __pyx_n_s_commutator_subgroup __pyx_mstate_global->__pyx_n_s_commutator_subgroup
#define __pyx_n_s_compile __pyx_mstate_global->__pyx_n_s_compile
#define __pyx_n_s_complete __pyx_mstate_global->__pyx_n_s_complete
#define __pyx_kp_s_complete_2 __pyx_mstate_global->__pyx_kp_s_complete_2
#define __pyx_n_s_complete_length __pyx_mstate_global->__pyx_n_s_complete_length
#define __pyx_kp_s_complete_length_2 __pyx_mstate_global->__pyx_kp_s_complete_length_2
#define __pyx_n_s_complete_shape_array __pyx_mstate_global->__pyx_n_s_complete_shape_array
#define __pyx_n_s_complete_shapes __pyx_mstate_global->__pyx_n_s_complete_shapes
#define __pyx_n_s_complex __pyx_mstate_global->__pyx_n_s_complex
#define __pyx_n_s_complex_length __pyx_mstate_global->__pyx_n_s_complex_length
#define __pyx_n_s_complex_volume __pyx_mstate_global->__pyx_n_s_complex_volume
#define __pyx_n_s_complex_volume_2 __pyx_mstate_global->__pyx_n_s_complex_volume_2
#define __pyx_n_s_components __pyx_mstate_global->__pyx_n_s_components
#define __pyx_n_s_compute_corners __pyx_mstate_global->__pyx_n_s_compute_corners
#define __pyx_n_s_compute_cusp_shapes __pyx_mstate_global->__pyx_n_s_compute_cusp_shapes
#define __pyx_n_s_compute_volume __pyx_mstate_global->__pyx_n_s_compute_volume
#define __pyx_n_s_contains __pyx_mstate_global->__pyx_n_s_contains
#define __pyx_kp_s_contains_degenerate_tetrahedra __pyx_mstate_global->__pyx_kp_s_contains_degenerate_tetrahedra
#define __pyx_kp_s_contains_flat_tetrahedra __pyx_mstate_global->__pyx_kp_s_contains_flat_tetrahedra
#define __pyx_kp_s_contains_negatively_oriented_tet __pyx_mstate_global->__pyx_kp_s_contains_negatively_oriented_tet
#define __pyx_n_s_content __pyx_mstate_global->__pyx_n_s_content
#define __pyx_n_s_copy __pyx_mstate_global->__pyx_n_s_copy
#define __pyx_n_s_copy_c_triangulation __pyx_mstate_global->__pyx_n_s_copy_c_triangulation
#define __pyx_n_s_core_length __pyx_mstate_global->__pyx_n_s_core_length
#define __pyx_n_s_corners __pyx_mstate_global->__pyx_n_s_corners
#define __pyx_n_s_coset_action __pyx_mstate_global->__pyx_n_s_coset_action
#define __pyx_n_s_cover __pyx_mstate_global->__pyx_n_s_cover
#define __pyx_n_s_cover_c_triangulation __pyx_mstate_global->__pyx_n_s_cover_c_triangulation
#define __pyx_n_s_cover_count __pyx_mstate_global->__pyx_n_s_cover_count
#define __pyx_n_s_cover_info __pyx_mstate_global->__pyx_n_s_cover_info
#define __pyx_n_s_cover_locals_genexpr __pyx_mstate_global->__pyx_n_s_cover_locals_genexpr
#define __pyx_n_s_cover_type __pyx_mstate_global->__pyx_n_s_cover_type
#define __pyx_n_s_cover_types __pyx_mstate_global->__pyx_n_s_cover_types
#define __pyx_n_s_covers __pyx_mstate_global->__pyx_n_s_covers
#define __pyx_n_s_covers_gap __pyx_mstate_global->__pyx_n_s_covers_gap
#define __pyx_n_s_covers_low_index __pyx_mstate_global->__pyx_n_s_covers_low_index
#define __pyx_n_s_covers_low_index_locals_index __pyx_mstate_global->__pyx_n_s_covers_low_index_locals_index
#define __pyx_n_s_covers_magma __pyx_mstate_global->__pyx_n_s_covers_magma
#define __pyx_n_s_covers_snappea __pyx_mstate_global->__pyx_n_s_covers_snappea
#define __pyx_n_s_crossings __pyx_mstate_global->__pyx_n_s_crossings
#define __pyx_n_s_cs __pyx_mstate_global->__pyx_n_s_cs
#define __pyx_n_s_curdir __pyx_mstate_global->__pyx_n_s_curdir
#define __pyx_n_s_current_modulus __pyx_mstate_global->__pyx_n_s_current_modulus
#define __pyx_n_s_current_shape __pyx_mstate_global->__pyx_n_s_current_shape
#define __pyx_n_s_current_shape_accuracy __pyx_mstate_global->__pyx_n_s_current_shape_accuracy
#define __pyx_n_s_curve_list __pyx_mstate_global->__pyx_n_s_curve_list
#define __pyx_n_s_cusp_cross_section_info __pyx_mstate_global->__pyx_n_s_cusp_cross_section_info
#define __pyx_n_s_cusp_images __pyx_mstate_global->__pyx_n_s_cusp_images
#define __pyx_n_s_cusp_images_2 __pyx_mstate_global->__pyx_n_s_cusp_images_2
#define __pyx_n_s_cusp_index __pyx_mstate_global->__pyx_n_s_cusp_index
#define __pyx_n_s_cusp_indices __pyx_mstate_global->__pyx_n_s_cusp_indices
#define __pyx_n_s_cusp_info __pyx_mstate_global->__pyx_n_s_cusp_info
#define __pyx_n_s_cusp_maps __pyx_mstate_global->__pyx_n_s_cusp_maps
#define __pyx_n_s_cusp_maps_2 __pyx_mstate_global->__pyx_n_s_cusp_maps_2
#define __pyx_n_s_cusp_neighborhood __pyx_mstate_global->__pyx_n_s_cusp_neighborhood
#define __pyx_n_s_cusp_type __pyx_mstate_global->__pyx_n_s_cusp_type
#define __pyx_n_s_cusps __pyx_mstate_global->__pyx_n_s_cusps
#define __pyx_n_s_cusps_to_fill __pyx_mstate_global->__pyx_n_s_cusps_to_fill
#define __pyx_n_s_cutoff __pyx_mstate_global->__pyx_n_s_cutoff
#define __pyx_n_s_cutoff_length __pyx_mstate_global->__pyx_n_s_cutoff_length
#define __pyx_n_s_cutoff_radius __pyx_mstate_global->__pyx_n_s_cutoff_radius
#define __pyx_n_s_cutout __pyx_mstate_global->__pyx_n_s_cutout
#define __pyx_n_s_cy_eval __pyx_mstate_global->__pyx_n_s_cy_eval
#define __pyx_n_s_cyclic __pyx_mstate_global->__pyx_n_s_cyclic
#define __pyx_kp_s_cython_core_abelian_group_pyx __pyx_mstate_global->__pyx_kp_s_cython_core_abelian_group_pyx
#define __pyx_kp_s_cython_core_basic_pyx __pyx_mstate_global->__pyx_kp_s_cython_core_basic_pyx
#define __pyx_kp_s_cython_core_cusp_neighborhoods_p __pyx_mstate_global->__pyx_kp_s_cython_core_cusp_neighborhoods_p
#define __pyx_kp_s_cython_core_dirichlet_pyx __pyx_mstate_global->__pyx_kp_s_cython_core_dirichlet_pyx
#define __pyx_kp_s_cython_core_fundamental_group_py __pyx_mstate_global->__pyx_kp_s_cython_core_fundamental_group_py
#define __pyx_kp_s_cython_core_manifold_pyx __pyx_mstate_global->__pyx_kp_s_cython_core_manifold_pyx
#define __pyx_kp_s_cython_core_symmetry_group_pyx __pyx_mstate_global->__pyx_kp_s_cython_core_symmetry_group_pyx
#define __pyx_kp_s_cython_core_tail_pyx __pyx_mstate_global->__pyx_kp_s_cython_core_tail_pyx
#define __pyx_kp_s_cython_core_triangulation_pyx __pyx_mstate_global->__pyx_kp_s_cython_core_triangulation_pyx
#define __pyx_kp_s_d __pyx_mstate_global->__pyx_kp_s_d
#define __pyx_kp_s_dB __pyx_mstate_global->__pyx_kp_s_dB
#define __pyx_n_s_dLQbcccdxwb __pyx_mstate_global->__pyx_n_s_dLQbcccdxwb
#define __pyx_kp_s_d_2 __pyx_mstate_global->__pyx_kp_s_d_2
#define __pyx_kp_s_d_3 __pyx_mstate_global->__pyx_kp_s_d_3
#define __pyx_n_s_d_4 __pyx_mstate_global->__pyx_n_s_d_4
#define __pyx_kp_s_d__d __pyx_mstate_global->__pyx_kp_s_d__d
#define __pyx_kp_s_d_d __pyx_mstate_global->__pyx_kp_s_d_d
#define __pyx_kp_s_d_d_2 __pyx_mstate_global->__pyx_kp_s_d_d_2
#define __pyx_kp_s_d_d__d __pyx_mstate_global->__pyx_kp_s_d_d__d
#define __pyx_kp_s_d_finite_vertices_d_ideal_verti __pyx_mstate_global->__pyx_kp_s_d_finite_vertices_d_ideal_verti
#define __pyx_n_s_data __pyx_mstate_global->__pyx_n_s_data
#define __pyx_kp_u_data_1_1_2_2_0_1_3_2_2_3_1_0_0 __pyx_mstate_global->__pyx_kp_u_data_1_1_2_2_0_1_3_2_2_3_1_0_0
#define __pyx_n_s_data_ijk __pyx_mstate_global->__pyx_n_s_data_ijk
#define __pyx_n_s_data_spec __pyx_mstate_global->__pyx_n_s_data_spec
#define __pyx_n_s_database __pyx_mstate_global->__pyx_n_s_database
#define __pyx_n_s_datafile __pyx_mstate_global->__pyx_n_s_datafile
#define __pyx_n_s_dec_prec __pyx_mstate_global->__pyx_n_s_dec_prec
#define __pyx_n_s_decode __pyx_mstate_global->__pyx_n_s_decode
#define __pyx_n_s_decorated __pyx_mstate_global->__pyx_n_s_decorated
#define __pyx_n_s_decorated_isosig __pyx_mstate_global->__pyx_n_s_decorated_isosig
#define __pyx_n_s_decoration __pyx_mstate_global->__pyx_n_s_decoration
#define __pyx_n_s_default_precision __pyx_mstate_global->__pyx_n_s_default_precision
#define __pyx_n_s_defaultextension __pyx_mstate_global->__pyx_n_s_defaultextension
#define __pyx_n_s_degree __pyx_mstate_global->__pyx_n_s_degree
#define __pyx_n_s_dehn_fill __pyx_mstate_global->__pyx_n_s_dehn_fill
#define __pyx_n_s_delattr __pyx_mstate_global->__pyx_n_s_delattr
#define __pyx_n_s_delitem __pyx_mstate_global->__pyx_n_s_delitem
#define __pyx_n_s_desc __pyx_mstate_global->__pyx_n_s_desc
#define __pyx_n_s_det __pyx_mstate_global->__pyx_n_s_det
#define __pyx_n_s_details __pyx_mstate_global->__pyx_n_s_details
#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_n_s_dict_3 __pyx_mstate_global->__pyx_n_s_dict_3
#define __pyx_n_s_direct_product_description __pyx_mstate_global->__pyx_n_s_direct_product_description
#define __pyx_n_s_dirichlet_domain __pyx_mstate_global->__pyx_n_s_dirichlet_domain
#define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
#define __pyx_n_s_disp __pyx_mstate_global->__pyx_n_s_disp
#define __pyx_n_s_displacement __pyx_mstate_global->__pyx_n_s_displacement
#define __pyx_n_s_distance __pyx_mstate_global->__pyx_n_s_distance
#define __pyx_n_s_doc __pyx_mstate_global->__pyx_n_s_doc
#define __pyx_n_s_domain __pyx_mstate_global->__pyx_n_s_domain
#define __pyx_n_s_drill __pyx_mstate_global->__pyx_n_s_drill
#define __pyx_n_s_dual_curves __pyx_mstate_global->__pyx_n_s_dual_curves
#define __pyx_n_s_dual_rows __pyx_mstate_global->__pyx_n_s_dual_rows
#define __pyx_n_s_e __pyx_mstate_global->__pyx_n_s_e
#define __pyx_n_s_edge __pyx_mstate_global->__pyx_n_s_edge
#define __pyx_n_s_edge_class __pyx_mstate_global->__pyx_n_s_edge_class
#define __pyx_n_s_edge_image_indices __pyx_mstate_global->__pyx_n_s_edge_image_indices
#define __pyx_n_s_edge_index __pyx_mstate_global->__pyx_n_s_edge_index
#define __pyx_n_s_edge_indices __pyx_mstate_global->__pyx_n_s_edge_indices
#define __pyx_n_s_edge_list __pyx_mstate_global->__pyx_n_s_edge_list
#define __pyx_n_s_edge_orientations __pyx_mstate_global->__pyx_n_s_edge_orientations
#define __pyx_n_s_edge_to_index __pyx_mstate_global->__pyx_n_s_edge_to_index
#define __pyx_n_s_edge_to_index_dict __pyx_mstate_global->__pyx_n_s_edge_to_index_dict
#define __pyx_n_s_edge_valences __pyx_mstate_global->__pyx_n_s_edge_valences
#define __pyx_n_s_edges __pyx_mstate_global->__pyx_n_s_edges
#define __pyx_n_s_eight_length __pyx_mstate_global->__pyx_n_s_eight_length
#define __pyx_n_s_elementary_divisors __pyx_mstate_global->__pyx_n_s_elementary_divisors
#define __pyx_n_s_eliminate_fixed_ptolemys __pyx_mstate_global->__pyx_n_s_eliminate_fixed_ptolemys
#define __pyx_n_s_elt __pyx_mstate_global->__pyx_n_s_elt
#define __pyx_n_s_empty __pyx_mstate_global->__pyx_n_s_empty
#define __pyx_n_s_empty_save __pyx_mstate_global->__pyx_n_s_empty_save
#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_end __pyx_mstate_global->__pyx_n_s_end
#define __pyx_n_s_endpoints __pyx_mstate_global->__pyx_n_s_endpoints
#define __pyx_n_s_engine __pyx_mstate_global->__pyx_n_s_engine
#define __pyx_n_s_enter __pyx_mstate_global->__pyx_n_s_enter
#define __pyx_n_s_entries __pyx_mstate_global->__pyx_n_s_entries
#define __pyx_n_s_enum __pyx_mstate_global->__pyx_n_s_enum
#define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate
#define __pyx_n_s_environ __pyx_mstate_global->__pyx_n_s_environ
#define __pyx_n_s_eqn __pyx_mstate_global->__pyx_n_s_eqn
#define __pyx_n_s_eqns __pyx_mstate_global->__pyx_n_s_eqns
#define __pyx_n_s_equation_type __pyx_mstate_global->__pyx_n_s_equation_type
#define __pyx_n_s_equations __pyx_mstate_global->__pyx_n_s_equations
#define __pyx_n_s_euler __pyx_mstate_global->__pyx_n_s_euler
#define __pyx_n_s_eval __pyx_mstate_global->__pyx_n_s_eval
#define __pyx_n_s_exceptions __pyx_mstate_global->__pyx_n_s_exceptions
#define __pyx_n_s_exit __pyx_mstate_global->__pyx_n_s_exit
#define __pyx_n_s_exit_2 __pyx_mstate_global->__pyx_n_s_exit_2
#define __pyx_n_s_expand_until_certified __pyx_mstate_global->__pyx_n_s_expand_until_certified
#define __pyx_n_s_explain_cols __pyx_mstate_global->__pyx_n_s_explain_cols
#define __pyx_n_s_explain_columns __pyx_mstate_global->__pyx_n_s_explain_columns
#define __pyx_n_s_explain_rows __pyx_mstate_global->__pyx_n_s_explain_rows
#define __pyx_n_s_explode __pyx_mstate_global->__pyx_n_s_explode
#define __pyx_n_s_export_stl __pyx_mstate_global->__pyx_n_s_export_stl
#define __pyx_n_s_extends_to_link __pyx_mstate_global->__pyx_n_s_extends_to_link
#define __pyx_n_s_extends_to_link_2 __pyx_mstate_global->__pyx_n_s_extends_to_link_2
#define __pyx_n_s_extract_HT_knot __pyx_mstate_global->__pyx_n_s_extract_HT_knot
#define __pyx_n_s_extractfile __pyx_mstate_global->__pyx_n_s_extractfile
#define __pyx_n_s_f __pyx_mstate_global->__pyx_n_s_f
#define __pyx_n_s_face __pyx_mstate_global->__pyx_n_s_face
#define __pyx_n_s_face0_gen __pyx_mstate_global->__pyx_n_s_face0_gen
#define __pyx_n_s_face1_gen __pyx_mstate_global->__pyx_n_s_face1_gen
#define __pyx_n_s_face2_gen __pyx_mstate_global->__pyx_n_s_face2_gen
#define __pyx_n_s_face3_gen __pyx_mstate_global->__pyx_n_s_face3_gen
#define __pyx_n_s_face_index __pyx_mstate_global->__pyx_n_s_face_index
#define __pyx_n_s_face_list __pyx_mstate_global->__pyx_n_s_face_list
#define __pyx_n_s_face_list_locals_genexpr __pyx_mstate_global->__pyx_n_s_face_list_locals_genexpr
#define __pyx_n_s_facedicts __pyx_mstate_global->__pyx_n_s_facedicts
#define __pyx_n_s_faces __pyx_mstate_global->__pyx_n_s_faces
#define __pyx_n_s_factor_0 __pyx_mstate_global->__pyx_n_s_factor_0
#define __pyx_n_s_factor_1 __pyx_mstate_global->__pyx_n_s_factor_1
#define __pyx_n_s_file __pyx_mstate_global->__pyx_n_s_file
#define __pyx_n_s_file_name __pyx_mstate_global->__pyx_n_s_file_name
#define __pyx_n_s_filedata __pyx_mstate_global->__pyx_n_s_filedata
#define __pyx_n_s_filedialog __pyx_mstate_global->__pyx_n_s_filedialog
#define __pyx_n_s_filename __pyx_mstate_global->__pyx_n_s_filename
#define __pyx_n_s_files __pyx_mstate_global->__pyx_n_s_files
#define __pyx_n_s_filetypes __pyx_mstate_global->__pyx_n_s_filetypes
#define __pyx_n_s_fill __pyx_mstate_global->__pyx_n_s_fill
#define __pyx_n_s_fill_all __pyx_mstate_global->__pyx_n_s_fill_all
#define __pyx_n_s_fill_by_fold __pyx_mstate_global->__pyx_n_s_fill_by_fold
#define __pyx_n_s_fill_cusp_spec __pyx_mstate_global->__pyx_n_s_fill_cusp_spec
#define __pyx_n_s_filled __pyx_mstate_global->__pyx_n_s_filled
#define __pyx_n_s_filled_2 __pyx_mstate_global->__pyx_n_s_filled_2
#define __pyx_n_s_filled_length __pyx_mstate_global->__pyx_n_s_filled_length
#define __pyx_kp_s_filled_length_2 __pyx_mstate_global->__pyx_kp_s_filled_length_2
#define __pyx_n_s_filled_shape_array __pyx_mstate_global->__pyx_n_s_filled_shape_array
#define __pyx_n_s_filled_shapes __pyx_mstate_global->__pyx_n_s_filled_shapes
#define __pyx_n_s_filled_tri __pyx_mstate_global->__pyx_n_s_filled_tri
#define __pyx_n_s_filled_triangulation __pyx_mstate_global->__pyx_n_s_filled_triangulation
#define __pyx_n_s_filling __pyx_mstate_global->__pyx_n_s_filling
#define __pyx_kp_s_filling__d__d __pyx_mstate_global->__pyx_kp_s_filling__d__d
#define __pyx_n_s_filling_data __pyx_mstate_global->__pyx_n_s_filling_data
#define __pyx_n_s_fillings __pyx_mstate_global->__pyx_n_s_fillings
#define __pyx_n_s_fillings_may_affect_generators __pyx_mstate_global->__pyx_n_s_fillings_may_affect_generators
#define __pyx_n_s_find __pyx_mstate_global->__pyx_n_s_find
#define __pyx_n_s_findall __pyx_mstate_global->__pyx_n_s_findall
#define __pyx_n_s_first_nybble __pyx_mstate_global->__pyx_n_s_first_nybble
#define __pyx_n_s_five_length __pyx_mstate_global->__pyx_n_s_five_length
#define __pyx_n_s_five_tet_nonorientable __pyx_mstate_global->__pyx_n_s_five_tet_nonorientable
#define __pyx_n_s_five_tet_orientable __pyx_mstate_global->__pyx_n_s_five_tet_orientable
#define __pyx_n_s_fixed_alignment __pyx_mstate_global->__pyx_n_s_fixed_alignment
#define __pyx_n_s_flips __pyx_mstate_global->__pyx_n_s_flips
#define __pyx_n_s_flush __pyx_mstate_global->__pyx_n_s_flush
#define __pyx_n_s_fold __pyx_mstate_global->__pyx_n_s_fold
#define __pyx_n_s_force_recompute __pyx_mstate_global->__pyx_n_s_force_recompute
#define __pyx_n_s_form __pyx_mstate_global->__pyx_n_s_form
#define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
#define __pyx_n_s_format_explain_list __pyx_mstate_global->__pyx_n_s_format_explain_list
#define __pyx_n_s_format_str __pyx_mstate_global->__pyx_n_s_format_str
#define __pyx_n_s_format_two_by_two __pyx_mstate_global->__pyx_n_s_format_two_by_two
#define __pyx_n_s_from_bytes __pyx_mstate_global->__pyx_n_s_from_bytes
#define __pyx_n_b_from_data __pyx_mstate_global->__pyx_n_b_from_data
#define __pyx_n_s_from_isosig __pyx_mstate_global->__pyx_n_s_from_isosig
#define __pyx_n_s_from_pickle __pyx_mstate_global->__pyx_n_s_from_pickle
#define __pyx_n_s_from_string __pyx_mstate_global->__pyx_n_s_from_string
#define __pyx_n_s_from_tetrahedra_gluing_data __pyx_mstate_global->__pyx_n_s_from_tetrahedra_gluing_data
#define __pyx_n_s_full_list __pyx_mstate_global->__pyx_n_s_full_list
#define __pyx_n_s_full_rigor __pyx_mstate_global->__pyx_n_s_full_rigor
#define __pyx_n_s_func __pyx_mstate_global->__pyx_n_s_func
#define __pyx_n_s_func_OK __pyx_mstate_global->__pyx_n_s_func_OK
#define __pyx_n_s_func_bad_input __pyx_mstate_global->__pyx_n_s_func_bad_input
#define __pyx_n_s_func_cancelled __pyx_mstate_global->__pyx_n_s_func_cancelled
#define __pyx_n_s_func_failed __pyx_mstate_global->__pyx_n_s_func_failed
#define __pyx_n_s_fundamental_group __pyx_mstate_global->__pyx_n_s_fundamental_group
#define __pyx_n_s_g __pyx_mstate_global->__pyx_n_s_g
#define __pyx_n_s_g_eqns __pyx_mstate_global->__pyx_n_s_g_eqns
#define __pyx_kp_s_g_g __pyx_mstate_global->__pyx_kp_s_g_g
#define __pyx_n_s_gap __pyx_mstate_global->__pyx_n_s_gap
#define __pyx_n_s_gap_image_gens __pyx_mstate_global->__pyx_n_s_gap_image_gens
#define __pyx_n_s_gap_init __pyx_mstate_global->__pyx_n_s_gap_init
#define __pyx_n_s_gap_string __pyx_mstate_global->__pyx_n_s_gap_string
#define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
#define __pyx_n_s_gen __pyx_mstate_global->__pyx_n_s_gen
#define __pyx_n_s_gen_names __pyx_mstate_global->__pyx_n_s_gen_names
#define __pyx_n_s_generator_bytes __pyx_mstate_global->__pyx_n_s_generator_bytes
#define __pyx_n_s_generator_file __pyx_mstate_global->__pyx_n_s_generator_file
#define __pyx_n_s_generator_path __pyx_mstate_global->__pyx_n_s_generator_path
#define __pyx_n_s_generators __pyx_mstate_global->__pyx_n_s_generators
#define __pyx_n_s_generators_in_originals __pyx_mstate_global->__pyx_n_s_generators_in_originals
#define __pyx_n_s_genexpr __pyx_mstate_global->__pyx_n_s_genexpr
#define __pyx_n_s_gens __pyx_mstate_global->__pyx_n_s_gens
#define __pyx_n_s_geodesics __pyx_mstate_global->__pyx_n_s_geodesics
#define __pyx_n_s_get __pyx_mstate_global->__pyx_n_s_get
#define __pyx_n_s_get_HT_knot_DT __pyx_mstate_global->__pyx_n_s_get_HT_knot_DT
#define __pyx_n_s_get_HT_knot_by_index __pyx_mstate_global->__pyx_n_s_get_HT_knot_by_index
#define __pyx_n_s_get_cusp_indices_and_peripheral __pyx_mstate_global->__pyx_n_s_get_cusp_indices_and_peripheral
#define __pyx_n_s_get_data __pyx_mstate_global->__pyx_n_s_get_data
#define __pyx_n_s_get_displacement __pyx_mstate_global->__pyx_n_s_get_displacement
#define __pyx_n_s_get_from_link_data __pyx_mstate_global->__pyx_n_s_get_from_link_data
#define __pyx_n_s_get_generalized_ptolemy_obstruct __pyx_mstate_global->__pyx_n_s_get_generalized_ptolemy_obstruct
#define __pyx_n_s_get_ptolemy_obstruction_classes __pyx_mstate_global->__pyx_n_s_get_ptolemy_obstruction_classes
#define __pyx_n_s_get_ptolemy_variety __pyx_mstate_global->__pyx_n_s_get_ptolemy_variety
#define __pyx_n_s_get_tetrahedra_gluing_data __pyx_mstate_global->__pyx_n_s_get_tetrahedra_gluing_data
#define __pyx_n_s_get_tetrahedra_shapes __pyx_mstate_global->__pyx_n_s_get_tetrahedra_shapes
#define __pyx_n_s_get_tie __pyx_mstate_global->__pyx_n_s_get_tie
#define __pyx_n_s_get_triangulation_tester __pyx_mstate_global->__pyx_n_s_get_triangulation_tester
#define __pyx_kp_u_get_triangulation_tester_doctes __pyx_mstate_global->__pyx_kp_u_get_triangulation_tester_doctes
#define __pyx_kp_u_get_triangulation_tester_line_11 __pyx_mstate_global->__pyx_kp_u_get_triangulation_tester_line_11
#define __pyx_n_s_getitem __pyx_mstate_global->__pyx_n_s_getitem
#define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
#define __pyx_n_s_gluing __pyx_mstate_global->__pyx_n_s_gluing
#define __pyx_n_s_gluing_equations __pyx_mstate_global->__pyx_n_s_gluing_equations
#define __pyx_n_s_gluing_equations_pgl __pyx_mstate_global->__pyx_n_s_gluing_equations_pgl
#define __pyx_n_s_gluings __pyx_mstate_global->__pyx_n_s_gluings
#define __pyx_n_s_group __pyx_mstate_global->__pyx_n_s_group
#define __pyx_n_s_grouped __pyx_mstate_global->__pyx_n_s_grouped
#define __pyx_n_s_groups __pyx_mstate_global->__pyx_n_s_groups
#define __pyx_n_s_gui __pyx_mstate_global->__pyx_n_s_gui
#define __pyx_n_s_gzip __pyx_mstate_global->__pyx_n_s_gzip
#define __pyx_n_s_handles __pyx_mstate_global->__pyx_n_s_handles
#define __pyx_n_s_has_finite_vertices __pyx_mstate_global->__pyx_n_s_has_finite_vertices
#define __pyx_n_s_header __pyx_mstate_global->__pyx_n_s_header
#define __pyx_n_s_high_precision __pyx_mstate_global->__pyx_n_s_high_precision
#define __pyx_n_s_holonomies __pyx_mstate_global->__pyx_n_s_holonomies
#define __pyx_n_s_holonomy_accuracy __pyx_mstate_global->__pyx_n_s_holonomy_accuracy
#define __pyx_kp_s_holonomy_precision __pyx_mstate_global->__pyx_kp_s_holonomy_precision
#define __pyx_n_s_homology __pyx_mstate_global->__pyx_n_s_homology
#define __pyx_n_s_horoball_list __pyx_mstate_global->__pyx_n_s_horoball_list
#define __pyx_n_s_horoballs __pyx_mstate_global->__pyx_n_s_horoballs
#define __pyx_n_s_horoviewer __pyx_mstate_global->__pyx_n_s_horoviewer
#define __pyx_n_s_hue __pyx_mstate_global->__pyx_n_s_hue
#define __pyx_kp_s_hyperbolic_data__sa_gz __pyx_mstate_global->__pyx_kp_s_hyperbolic_data__sa_gz
#define __pyx_kp_s_hyperbolic_data__sn_gz __pyx_mstate_global->__pyx_kp_s_hyperbolic_data__sn_gz
#define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i
#define __pyx_kp_s_icosohedral_group __pyx_mstate_global->__pyx_kp_s_icosohedral_group
#define __pyx_n_s_ideal __pyx_mstate_global->__pyx_n_s_ideal
#define __pyx_n_s_identify __pyx_mstate_global->__pyx_n_s_identify
#define __pyx_n_s_identify_2 __pyx_mstate_global->__pyx_n_s_identify_2
#define __pyx_n_s_ignore_curve_orientations __pyx_mstate_global->__pyx_n_s_ignore_curve_orientations
#define __pyx_n_s_ignore_cusp_ordering __pyx_mstate_global->__pyx_n_s_ignore_cusp_ordering
#define __pyx_n_s_ignore_orientation __pyx_mstate_global->__pyx_n_s_ignore_orientation
#define __pyx_n_s_ignore_solution_type __pyx_mstate_global->__pyx_n_s_ignore_solution_type
#define __pyx_n_s_imag __pyx_mstate_global->__pyx_n_s_imag
#define __pyx_n_s_images __pyx_mstate_global->__pyx_n_s_images
#define __pyx_n_s_immutable __pyx_mstate_global->__pyx_n_s_immutable
#define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
#define __pyx_kp_u_import_itertools_M_Manifold_L14 __pyx_mstate_global->__pyx_kp_u_import_itertools_M_Manifold_L14
#define __pyx_n_s_in_radius __pyx_mstate_global->__pyx_n_s_in_radius
#define __pyx_n_s_include_words __pyx_mstate_global->__pyx_n_s_include_words
#define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index
#define __pyx_n_s_index_within_crossings __pyx_mstate_global->__pyx_n_s_index_within_crossings
#define __pyx_n_s_indices __pyx_mstate_global->__pyx_n_s_indices
#define __pyx_n_s_infinite __pyx_mstate_global->__pyx_n_s_infinite
#define __pyx_n_s_info __pyx_mstate_global->__pyx_n_s_info
#define __pyx_n_s_init __pyx_mstate_global->__pyx_n_s_init
#define __pyx_n_s_init_hyperbolic_structure __pyx_mstate_global->__pyx_n_s_init_hyperbolic_structure
#define __pyx_n_s_init_subclass __pyx_mstate_global->__pyx_n_s_init_subclass
#define __pyx_n_s_initial_modulus __pyx_mstate_global->__pyx_n_s_initial_modulus
#define __pyx_n_s_initial_shape __pyx_mstate_global->__pyx_n_s_initial_shape
#define __pyx_n_s_initial_shape_accuracy __pyx_mstate_global->__pyx_n_s_initial_shape_accuracy
#define __pyx_n_s_initialize_structure __pyx_mstate_global->__pyx_n_s_initialize_structure
#define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
#define __pyx_n_s_input_type __pyx_mstate_global->__pyx_n_s_input_type
#define __pyx_n_s_int_list __pyx_mstate_global->__pyx_n_s_int_list
#define __pyx_n_s_integer __pyx_mstate_global->__pyx_n_s_integer
#define __pyx_n_s_internal __pyx_mstate_global->__pyx_n_s_internal
#define __pyx_n_s_interrupted __pyx_mstate_global->__pyx_n_s_interrupted
#define __pyx_n_s_intervals __pyx_mstate_global->__pyx_n_s_intervals
#define __pyx_n_s_inverse_list_word __pyx_mstate_global->__pyx_n_s_inverse_list_word
#define __pyx_n_s_irregular __pyx_mstate_global->__pyx_n_s_irregular
#define __pyx_n_s_is_GapElement __pyx_mstate_global->__pyx_n_s_is_GapElement
#define __pyx_n_s_is_HT_knot __pyx_mstate_global->__pyx_n_s_is_HT_knot
#define __pyx_n_s_is_MagmaElement __pyx_mstate_global->__pyx_n_s_is_MagmaElement
#define __pyx_n_s_is_PermutationGroupElement __pyx_mstate_global->__pyx_n_s_is_PermutationGroupElement
#define __pyx_n_s_is_S5 __pyx_mstate_global->__pyx_n_s_is_S5
#define __pyx_n_s_is_abelian __pyx_mstate_global->__pyx_n_s_is_abelian
#define __pyx_n_s_is_alpha_DT_exterior __pyx_mstate_global->__pyx_n_s_is_alpha_DT_exterior
#define __pyx_n_s_is_amphicheiral __pyx_mstate_global->__pyx_n_s_is_amphicheiral
#define __pyx_n_s_is_binary_group __pyx_mstate_global->__pyx_n_s_is_binary_group
#define __pyx_n_s_is_braid_complement __pyx_mstate_global->__pyx_n_s_is_braid_complement
#define __pyx_n_s_is_complete __pyx_mstate_global->__pyx_n_s_is_complete
#define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
#define __pyx_n_s_is_decorated_isosig __pyx_mstate_global->__pyx_n_s_is_decorated_isosig
#define __pyx_n_s_is_dihedral __pyx_mstate_global->__pyx_n_s_is_dihedral
#define __pyx_n_s_is_direct_product __pyx_mstate_global->__pyx_n_s_is_direct_product
#define __pyx_n_s_is_full_group __pyx_mstate_global->__pyx_n_s_is_full_group
#define __pyx_n_s_is_geometric __pyx_mstate_global->__pyx_n_s_is_geometric
#define __pyx_n_s_is_int_DT_exterior __pyx_mstate_global->__pyx_n_s_is_int_DT_exterior
#define __pyx_n_s_is_invertible_knot __pyx_mstate_global->__pyx_n_s_is_invertible_knot
#define __pyx_n_s_is_isometric_to __pyx_mstate_global->__pyx_n_s_is_isometric_to
#define __pyx_n_s_is_isosig __pyx_mstate_global->__pyx_n_s_is_isosig
#define __pyx_n_s_is_link_complement1 __pyx_mstate_global->__pyx_n_s_is_link_complement1
#define __pyx_n_s_is_link_complement1_pat __pyx_mstate_global->__pyx_n_s_is_link_complement1_pat
#define __pyx_n_s_is_link_complement2 __pyx_mstate_global->__pyx_n_s_is_link_complement2
#define __pyx_n_s_is_link_complement2_pat __pyx_mstate_global->__pyx_n_s_is_link_complement2_pat
#define __pyx_n_s_is_link_complement3 __pyx_mstate_global->__pyx_n_s_is_link_complement3
#define __pyx_n_s_is_link_complement3_pat __pyx_mstate_global->__pyx_n_s_is_link_complement3_pat
#define __pyx_n_s_is_orientable __pyx_mstate_global->__pyx_n_s_is_orientable
#define __pyx_n_s_is_polyhedral __pyx_mstate_global->__pyx_n_s_is_polyhedral
#define __pyx_n_s_is_symplectic __pyx_mstate_global->__pyx_n_s_is_symplectic
#define __pyx_n_s_is_torus_bundle __pyx_mstate_global->__pyx_n_s_is_torus_bundle
#define __pyx_n_s_is_twister_bundle __pyx_mstate_global->__pyx_n_s_is_twister_bundle
#define __pyx_n_s_is_twister_splitting __pyx_mstate_global->__pyx_n_s_is_twister_splitting
#define __pyx_n_s_is_two_bridge __pyx_mstate_global->__pyx_n_s_is_two_bridge
#define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
#define __pyx_n_s_isfile __pyx_mstate_global->__pyx_n_s_isfile
#define __pyx_n_s_islower __pyx_mstate_global->__pyx_n_s_islower
#define __pyx_n_s_isometries __pyx_mstate_global->__pyx_n_s_isometries
#define __pyx_n_s_isomorphisms_to __pyx_mstate_global->__pyx_n_s_isomorphisms_to
#define __pyx_n_s_isosig __pyx_mstate_global->__pyx_n_s_isosig
#define __pyx_n_s_isosig_pattern __pyx_mstate_global->__pyx_n_s_isosig_pattern
#define __pyx_n_s_item __pyx_mstate_global->__pyx_n_s_item
#define __pyx_n_s_items __pyx_mstate_global->__pyx_n_s_items
#define __pyx_n_s_iter __pyx_mstate_global->__pyx_n_s_iter
#define __pyx_n_s_its_matrix __pyx_mstate_global->__pyx_n_s_its_matrix
#define __pyx_n_s_j __pyx_mstate_global->__pyx_n_s_j
#define __pyx_n_s_join __pyx_mstate_global->__pyx_n_s_join
#define __pyx_n_s_k __pyx_mstate_global->__pyx_n_s_k
#define __pyx_n_s_key __pyx_mstate_global->__pyx_n_s_key
#define __pyx_n_s_keys __pyx_mstate_global->__pyx_n_s_keys
#define __pyx_n_s_kl __pyx_mstate_global->__pyx_n_s_kl
#define __pyx_n_s_klein __pyx_mstate_global->__pyx_n_s_klein
#define __pyx_n_s_klp __pyx_mstate_global->__pyx_n_s_klp
#define __pyx_n_s_kwargs __pyx_mstate_global->__pyx_n_s_kwargs
#define __pyx_n_s_l __pyx_mstate_global->__pyx_n_s_l
#define __pyx_n_s_l0 __pyx_mstate_global->__pyx_n_s_l0
#define __pyx_n_s_l1 __pyx_mstate_global->__pyx_n_s_l1
#define __pyx_n_s_l2 __pyx_mstate_global->__pyx_n_s_l2
#define __pyx_kp_s_lL_P_components_0_9_1_P_crossin __pyx_mstate_global->__pyx_kp_s_lL_P_components_0_9_1_P_crossin
#define __pyx_n_s_layered __pyx_mstate_global->__pyx_n_s_layered
#define __pyx_n_s_layered_and_marked __pyx_mstate_global->__pyx_n_s_layered_and_marked
#define __pyx_n_s_lazy __pyx_mstate_global->__pyx_n_s_lazy
#define __pyx_n_s_left __pyx_mstate_global->__pyx_n_s_left
#define __pyx_n_s_left_pad_string __pyx_mstate_global->__pyx_n_s_left_pad_string
#define __pyx_n_s_len __pyx_mstate_global->__pyx_n_s_len
#define __pyx_n_s_lenStr __pyx_mstate_global->__pyx_n_s_lenStr
#define __pyx_n_s_len_2 __pyx_mstate_global->__pyx_n_s_len_2
#define __pyx_n_s_length __pyx_mstate_global->__pyx_n_s_length
#define __pyx_kp_s_length_2 __pyx_mstate_global->__pyx_kp_s_length_2
#define __pyx_n_s_length_spectrum __pyx_mstate_global->__pyx_n_s_length_spectrum
#define __pyx_n_s_length_spectrum_dicts __pyx_mstate_global->__pyx_n_s_length_spectrum_dicts
#define __pyx_n_s_letter __pyx_mstate_global->__pyx_n_s_letter
#define __pyx_n_s_letter_seperator __pyx_mstate_global->__pyx_n_s_letter_seperator
#define __pyx_n_s_line __pyx_mstate_global->__pyx_n_s_line
#define __pyx_n_s_line0 __pyx_mstate_global->__pyx_n_s_line0
#define __pyx_n_s_line1 __pyx_mstate_global->__pyx_n_s_line1
#define __pyx_n_s_line2 __pyx_mstate_global->__pyx_n_s_line2
#define __pyx_n_s_line3 __pyx_mstate_global->__pyx_n_s_line3
#define __pyx_n_s_link __pyx_mstate_global->__pyx_n_s_link
#define __pyx_n_s_link_archive __pyx_mstate_global->__pyx_n_s_link_archive
#define __pyx_n_s_link_directory __pyx_mstate_global->__pyx_n_s_link_directory
#define __pyx_n_s_list_as_word __pyx_mstate_global->__pyx_n_s_list_as_word
#define __pyx_n_s_list_as_word_locals_genexpr __pyx_mstate_global->__pyx_n_s_list_as_word_locals_genexpr
#define __pyx_n_s_ljust __pyx_mstate_global->__pyx_n_s_ljust
#define __pyx_n_s_log __pyx_mstate_global->__pyx_n_s_log
#define __pyx_n_s_log_im __pyx_mstate_global->__pyx_n_s_log_im
#define __pyx_n_s_log_re __pyx_mstate_global->__pyx_n_s_log_re
#define __pyx_n_s_log_shape __pyx_mstate_global->__pyx_n_s_log_shape
#define __pyx_n_s_long_relators __pyx_mstate_global->__pyx_n_s_long_relators
#define __pyx_n_s_longitude __pyx_mstate_global->__pyx_n_s_longitude
#define __pyx_kp_s_longitude__d__d __pyx_mstate_global->__pyx_kp_s_longitude__d__d
#define __pyx_n_s_longitude_accuracy __pyx_mstate_global->__pyx_n_s_longitude_accuracy
#define __pyx_n_s_lookup __pyx_mstate_global->__pyx_n_s_lookup
#define __pyx_n_s_low_index __pyx_mstate_global->__pyx_n_s_low_index
#define __pyx_n_s_low_index_version __pyx_mstate_global->__pyx_n_s_low_index_version
#define __pyx_n_s_lower __pyx_mstate_global->__pyx_n_s_lower
#define __pyx_n_s_m __pyx_mstate_global->__pyx_n_s_m
#define __pyx_n_s_m003 __pyx_mstate_global->__pyx_n_s_m003
#define __pyx_n_s_m004 __pyx_mstate_global->__pyx_n_s_m004
#define __pyx_n_s_magma __pyx_mstate_global->__pyx_n_s_magma
#define __pyx_n_s_magma_init __pyx_mstate_global->__pyx_n_s_magma_init
#define __pyx_n_s_magma_string __pyx_mstate_global->__pyx_n_s_magma_string
#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
#define __pyx_n_s_major __pyx_mstate_global->__pyx_n_s_major
#define __pyx_n_s_manifold __pyx_mstate_global->__pyx_n_s_manifold
#define __pyx_n_s_manifoldMethods __pyx_mstate_global->__pyx_n_s_manifoldMethods
#define __pyx_n_s_manifold_class __pyx_mstate_global->__pyx_n_s_manifold_class
#define __pyx_n_s_manifold_class_2 __pyx_mstate_global->__pyx_n_s_manifold_class_2
#define __pyx_n_s_manifold_name __pyx_mstate_global->__pyx_n_s_manifold_name
#define __pyx_n_s_manifold_path __pyx_mstate_global->__pyx_n_s_manifold_path
#define __pyx_n_s_manifold_paths __pyx_mstate_global->__pyx_n_s_manifold_paths
#define __pyx_n_s_manifolds __pyx_mstate_global->__pyx_n_s_manifolds
#define __pyx_n_s_map __pyx_mstate_global->__pyx_n_s_map
#define __pyx_n_s_maps __pyx_mstate_global->__pyx_n_s_maps
#define __pyx_n_s_mark_solid_tori __pyx_mstate_global->__pyx_n_s_mark_solid_tori
#define __pyx_n_s_marked __pyx_mstate_global->__pyx_n_s_marked
#define __pyx_n_s_marked_tetrahedra __pyx_mstate_global->__pyx_n_s_marked_tetrahedra
#define __pyx_n_s_mask __pyx_mstate_global->__pyx_n_s_mask
#define __pyx_n_s_mat __pyx_mstate_global->__pyx_n_s_mat
#define __pyx_n_s_match __pyx_mstate_global->__pyx_n_s_match
#define __pyx_n_s_math __pyx_mstate_global->__pyx_n_s_math
#define __pyx_n_s_matrices __pyx_mstate_global->__pyx_n_s_matrices
#define __pyx_n_s_matrices_2 __pyx_mstate_global->__pyx_n_s_matrices_2
#define __pyx_n_s_matrix __pyx_mstate_global->__pyx_n_s_matrix
#define __pyx_n_s_matsnf __pyx_mstate_global->__pyx_n_s_matsnf
#define __pyx_n_s_max __pyx_mstate_global->__pyx_n_s_max
#define __pyx_n_s_max_crossings __pyx_mstate_global->__pyx_n_s_max_crossings
#define __pyx_n_s_max_reach __pyx_mstate_global->__pyx_n_s_max_reach
#define __pyx_n_s_max_segments __pyx_mstate_global->__pyx_n_s_max_segments
#define __pyx_n_s_maximize_injectivity_radius __pyx_mstate_global->__pyx_n_s_maximize_injectivity_radius
#define __pyx_n_s_meridian __pyx_mstate_global->__pyx_n_s_meridian
#define __pyx_kp_s_meridian__d__d __pyx_mstate_global->__pyx_kp_s_meridian__d__d
#define __pyx_n_s_meridian_accuracy __pyx_mstate_global->__pyx_n_s_meridian_accuracy
#define __pyx_n_s_message __pyx_mstate_global->__pyx_n_s_message
#define __pyx_n_s_metaclass __pyx_mstate_global->__pyx_n_s_metaclass
#define __pyx_n_s_method __pyx_mstate_global->__pyx_n_s_method
#define __pyx_n_s_minimize_number_of_generators __pyx_mstate_global->__pyx_n_s_minimize_number_of_generators
#define __pyx_kp_s_mirrored_arc __pyx_mstate_global->__pyx_kp_s_mirrored_arc
#define __pyx_n_s_mode __pyx_mstate_global->__pyx_n_s_mode
#define __pyx_n_s_model __pyx_mstate_global->__pyx_n_s_model
#define __pyx_n_s_module __pyx_mstate_global->__pyx_n_s_module
#define __pyx_n_s_modulus __pyx_mstate_global->__pyx_n_s_modulus
#define __pyx_n_s_monodromy __pyx_mstate_global->__pyx_n_s_monodromy
#define __pyx_kp_s_morwen8 __pyx_mstate_global->__pyx_kp_s_morwen8
#define __pyx_kp_s_morwen8_tgz __pyx_mstate_global->__pyx_kp_s_morwen8_tgz
#define __pyx_n_s_morwen_link_directory __pyx_mstate_global->__pyx_n_s_morwen_link_directory
#define __pyx_n_s_moves __pyx_mstate_global->__pyx_n_s_moves
#define __pyx_n_s_mro_entries __pyx_mstate_global->__pyx_n_s_mro_entries
#define __pyx_n_s_msg_stream __pyx_mstate_global->__pyx_n_s_msg_stream
#define __pyx_n_s_mult __pyx_mstate_global->__pyx_n_s_mult
#define __pyx_n_s_multiplicities __pyx_mstate_global->__pyx_n_s_multiplicities
#define __pyx_n_s_multiplicity __pyx_mstate_global->__pyx_n_s_multiplicity
#define __pyx_n_s_multiply_elements __pyx_mstate_global->__pyx_n_s_multiply_elements
#define __pyx_n_s_myslice __pyx_mstate_global->__pyx_n_s_myslice
#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_ncols __pyx_mstate_global->__pyx_n_s_ncols
#define __pyx_n_s_neighbor __pyx_mstate_global->__pyx_n_s_neighbor
#define __pyx_n_s_neighbor0_idx __pyx_mstate_global->__pyx_n_s_neighbor0_idx
#define __pyx_n_s_neighbor1_idx __pyx_mstate_global->__pyx_n_s_neighbor1_idx
#define __pyx_n_s_neighbor2_idx __pyx_mstate_global->__pyx_n_s_neighbor2_idx
#define __pyx_n_s_neighbor3_idx __pyx_mstate_global->__pyx_n_s_neighbor3_idx
#define __pyx_n_s_neighbor_end __pyx_mstate_global->__pyx_n_s_neighbor_end
#define __pyx_n_s_neighbors __pyx_mstate_global->__pyx_n_s_neighbors
#define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new
#define __pyx_n_s_new_2 __pyx_mstate_global->__pyx_n_s_new_2
#define __pyx_n_s_new_displacement __pyx_mstate_global->__pyx_n_s_new_displacement
#define __pyx_n_s_new_name __pyx_mstate_global->__pyx_n_s_new_name
#define __pyx_n_s_new_tie __pyx_mstate_global->__pyx_n_s_new_tie
#define __pyx_n_s_new_tri __pyx_mstate_global->__pyx_n_s_new_tri
#define __pyx_n_s_next __pyx_mstate_global->__pyx_n_s_next
#define __pyx_n_s_next_2 __pyx_mstate_global->__pyx_n_s_next_2
#define __pyx_n_s_no_arcs __pyx_mstate_global->__pyx_n_s_no_arcs
#define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non
#define __pyx_kp_s_no_solution_found __pyx_mstate_global->__pyx_kp_s_no_solution_found
#define __pyx_n_s_non_peripheral __pyx_mstate_global->__pyx_n_s_non_peripheral
#define __pyx_kp_s_nonabelian_group_of_order_d __pyx_mstate_global->__pyx_kp_s_nonabelian_group_of_order_d
#define __pyx_kp_s_nonalternating_gz __pyx_mstate_global->__pyx_kp_s_nonalternating_gz
#define __pyx_n_s_nonorientable __pyx_mstate_global->__pyx_n_s_nonorientable
#define __pyx_n_s_nonzeros __pyx_mstate_global->__pyx_n_s_nonzeros
#define __pyx_kp_s_not_attempted __pyx_mstate_global->__pyx_kp_s_not_attempted
#define __pyx_n_s_nrows __pyx_mstate_global->__pyx_n_s_nrows
#define __pyx_n_s_num __pyx_mstate_global->__pyx_n_s_num
#define __pyx_n_s_num_cols __pyx_mstate_global->__pyx_n_s_num_cols
#define __pyx_n_s_num_components __pyx_mstate_global->__pyx_n_s_num_components
#define __pyx_n_s_num_crossings __pyx_mstate_global->__pyx_n_s_num_crossings
#define __pyx_n_s_num_curves __pyx_mstate_global->__pyx_n_s_num_curves
#define __pyx_n_s_num_cusps __pyx_mstate_global->__pyx_n_s_num_cusps
#define __pyx_n_s_num_edges __pyx_mstate_global->__pyx_n_s_num_edges
#define __pyx_n_s_num_faces __pyx_mstate_global->__pyx_n_s_num_faces
#define __pyx_n_s_num_fake_cusps __pyx_mstate_global->__pyx_n_s_num_fake_cusps
#define __pyx_n_s_num_finite_vertices __pyx_mstate_global->__pyx_n_s_num_finite_vertices
#define __pyx_n_s_num_gen __pyx_mstate_global->__pyx_n_s_num_gen
#define __pyx_n_s_num_generators __pyx_mstate_global->__pyx_n_s_num_generators
#define __pyx_n_s_num_gens __pyx_mstate_global->__pyx_n_s_num_gens
#define __pyx_n_s_num_ideal_vertices __pyx_mstate_global->__pyx_n_s_num_ideal_vertices
#define __pyx_n_s_num_lengths __pyx_mstate_global->__pyx_n_s_num_lengths
#define __pyx_n_s_num_links __pyx_mstate_global->__pyx_n_s_num_links
#define __pyx_n_s_num_nonor_cusps __pyx_mstate_global->__pyx_n_s_num_nonor_cusps
#define __pyx_n_s_num_or_cusps __pyx_mstate_global->__pyx_n_s_num_or_cusps
#define __pyx_n_s_num_orig_gens __pyx_mstate_global->__pyx_n_s_num_orig_gens
#define __pyx_n_s_num_original_generators __pyx_mstate_global->__pyx_n_s_num_original_generators
#define __pyx_n_s_num_relations __pyx_mstate_global->__pyx_n_s_num_relations
#define __pyx_n_s_num_relators __pyx_mstate_global->__pyx_n_s_num_relators
#define __pyx_n_s_num_rows __pyx_mstate_global->__pyx_n_s_num_rows
#define __pyx_n_s_num_subdivisions __pyx_mstate_global->__pyx_n_s_num_subdivisions
#define __pyx_n_s_num_surfaces __pyx_mstate_global->__pyx_n_s_num_surfaces
#define __pyx_n_s_num_tet __pyx_mstate_global->__pyx_n_s_num_tet
#define __pyx_n_s_num_tetrahedra __pyx_mstate_global->__pyx_n_s_num_tetrahedra
#define __pyx_n_s_num_threads __pyx_mstate_global->__pyx_n_s_num_threads
#define __pyx_n_s_num_vertices __pyx_mstate_global->__pyx_n_s_num_vertices
#define __pyx_n_s_number __pyx_mstate_global->__pyx_n_s_number
#define __pyx_n_s_number_2 __pyx_mstate_global->__pyx_n_s_number_2
#define __pyx_n_s_number_to_native_number __pyx_mstate_global->__pyx_n_s_number_to_native_number
#define __pyx_n_s_o31 __pyx_mstate_global->__pyx_n_s_o31
#define __pyx_n_s_obsolete __pyx_mstate_global->__pyx_n_s_obsolete
#define __pyx_n_s_obstruction_class __pyx_mstate_global->__pyx_n_s_obstruction_class
#define __pyx_kp_s_octahedral_group __pyx_mstate_global->__pyx_kp_s_octahedral_group
#define __pyx_n_s_of_link __pyx_mstate_global->__pyx_n_s_of_link
#define __pyx_n_s_offset __pyx_mstate_global->__pyx_n_s_offset
#define __pyx_n_s_old __pyx_mstate_global->__pyx_n_s_old
#define __pyx_n_s_omega __pyx_mstate_global->__pyx_n_s_omega
#define __pyx_n_s_one_manifold __pyx_mstate_global->__pyx_n_s_one_manifold
#define __pyx_kp_s_one_sided __pyx_mstate_global->__pyx_kp_s_one_sided
#define __pyx_n_s_one_tet_lengths __pyx_mstate_global->__pyx_n_s_one_tet_lengths
#define __pyx_n_s_one_tet_tilts __pyx_mstate_global->__pyx_n_s_one_tet_tilts
#define __pyx_n_s_one_vertex_lengths __pyx_mstate_global->__pyx_n_s_one_vertex_lengths
#define __pyx_n_s_opacities __pyx_mstate_global->__pyx_n_s_opacities
#define __pyx_n_s_open __pyx_mstate_global->__pyx_n_s_open
#define __pyx_n_s_operator __pyx_mstate_global->__pyx_n_s_operator
#define __pyx_n_s_order __pyx_mstate_global->__pyx_n_s_order
#define __pyx_n_s_orient __pyx_mstate_global->__pyx_n_s_orient
#define __pyx_n_s_orientability __pyx_mstate_global->__pyx_n_s_orientability
#define __pyx_n_s_orientable __pyx_mstate_global->__pyx_n_s_orientable
#define __pyx_n_s_orientation_cover __pyx_mstate_global->__pyx_n_s_orientation_cover
#define __pyx_kp_s_orientation_preserving __pyx_mstate_global->__pyx_kp_s_orientation_preserving
#define __pyx_kp_s_orientation_reversing __pyx_mstate_global->__pyx_kp_s_orientation_reversing
#define __pyx_n_s_orig_gens __pyx_mstate_global->__pyx_n_s_orig_gens
#define __pyx_n_s_original_generators __pyx_mstate_global->__pyx_n_s_original_generators
#define __pyx_n_s_original_index __pyx_mstate_global->__pyx_n_s_original_index
#define __pyx_n_s_os __pyx_mstate_global->__pyx_n_s_os
#define __pyx_n_s_other __pyx_mstate_global->__pyx_n_s_other
#define __pyx_n_s_out_radius __pyx_mstate_global->__pyx_n_s_out_radius
#define __pyx_n_s_output __pyx_mstate_global->__pyx_n_s_output
#define __pyx_n_s_output_file __pyx_mstate_global->__pyx_n_s_output_file
#define __pyx_n_s_owns_c_symmetry_group __pyx_mstate_global->__pyx_n_s_owns_c_symmetry_group
#define __pyx_n_s_p __pyx_mstate_global->__pyx_n_s_p
#define __pyx_n_s_pad __pyx_mstate_global->__pyx_n_s_pad
#define __pyx_n_s_pair __pyx_mstate_global->__pyx_n_s_pair
#define __pyx_n_s_pairing_matrices __pyx_mstate_global->__pyx_n_s_pairing_matrices
#define __pyx_n_s_pairing_words __pyx_mstate_global->__pyx_n_s_pairing_words
#define __pyx_n_s_pari __pyx_mstate_global->__pyx_n_s_pari
#define __pyx_n_s_parity __pyx_mstate_global->__pyx_n_s_parity
#define __pyx_n_s_part __pyx_mstate_global->__pyx_n_s_part
#define __pyx_n_s_parts __pyx_mstate_global->__pyx_n_s_parts
#define __pyx_n_s_passes_at_fours __pyx_mstate_global->__pyx_n_s_passes_at_fours
#define __pyx_n_s_path __pyx_mstate_global->__pyx_n_s_path
#define __pyx_n_s_path_2 __pyx_mstate_global->__pyx_n_s_path_2
#define __pyx_n_s_peripheral __pyx_mstate_global->__pyx_n_s_peripheral
#define __pyx_n_s_peripheral_curves __pyx_mstate_global->__pyx_n_s_peripheral_curves
#define __pyx_n_s_peripheral_data __pyx_mstate_global->__pyx_n_s_peripheral_data
#define __pyx_n_s_perm __pyx_mstate_global->__pyx_n_s_perm
#define __pyx_n_s_perm0 __pyx_mstate_global->__pyx_n_s_perm0
#define __pyx_n_s_perm1 __pyx_mstate_global->__pyx_n_s_perm1
#define __pyx_n_s_perm2 __pyx_mstate_global->__pyx_n_s_perm2
#define __pyx_n_s_perm3 __pyx_mstate_global->__pyx_n_s_perm3
#define __pyx_n_s_perms __pyx_mstate_global->__pyx_n_s_perms
#define __pyx_n_s_permutation __pyx_mstate_global->__pyx_n_s_permutation
#define __pyx_n_s_permutation_rep __pyx_mstate_global->__pyx_n_s_permutation_rep
#define __pyx_n_s_permutation_reps __pyx_mstate_global->__pyx_n_s_permutation_reps
#define __pyx_kp_b_pickle __pyx_mstate_global->__pyx_kp_b_pickle
#define __pyx_n_b_pickle_2 __pyx_mstate_global->__pyx_n_b_pickle_2
#define __pyx_n_s_pickle_2 __pyx_mstate_global->__pyx_n_s_pickle_2
#define __pyx_n_s_pieces __pyx_mstate_global->__pyx_n_s_pieces
#define __pyx_n_s_plink __pyx_mstate_global->__pyx_n_s_plink
#define __pyx_n_s_plink_callback __pyx_mstate_global->__pyx_n_s_plink_callback
#define __pyx_n_s_plink_callback_2 __pyx_mstate_global->__pyx_n_s_plink_callback_2
#define __pyx_n_s_polish_hyperbolic_structures __pyx_mstate_global->__pyx_n_s_polish_hyperbolic_structures
#define __pyx_n_s_polished_tetrahedra_shapes __pyx_mstate_global->__pyx_n_s_polished_tetrahedra_shapes
#define __pyx_n_s_polyhedral_description __pyx_mstate_global->__pyx_n_s_polyhedral_description
#define __pyx_n_s_polyviewer __pyx_mstate_global->__pyx_n_s_polyviewer
#define __pyx_n_s_pop __pyx_mstate_global->__pyx_n_s_pop
#define __pyx_n_s_popitem __pyx_mstate_global->__pyx_n_s_popitem
#define __pyx_n_s_position __pyx_mstate_global->__pyx_n_s_position
#define __pyx_n_s_precision __pyx_mstate_global->__pyx_n_s_precision
#define __pyx_n_s_prefix __pyx_mstate_global->__pyx_n_s_prefix
#define __pyx_n_s_prepare __pyx_mstate_global->__pyx_n_s_prepare
#define __pyx_n_s_presentation __pyx_mstate_global->__pyx_n_s_presentation
#define __pyx_n_s_presentation_matrix __pyx_mstate_global->__pyx_n_s_presentation_matrix
#define __pyx_n_s_print __pyx_mstate_global->__pyx_n_s_print
#define __pyx_n_s_protocol __pyx_mstate_global->__pyx_n_s_protocol
#define __pyx_n_s_ptolemy __pyx_mstate_global->__pyx_n_s_ptolemy
#define __pyx_n_s_ptolemyManifoldMethods __pyx_mstate_global->__pyx_n_s_ptolemyManifoldMethods
#define __pyx_n_s_ptolemy_equations_action_by_dec __pyx_mstate_global->__pyx_n_s_ptolemy_equations_action_by_dec
#define __pyx_n_s_ptolemy_equations_boundary_map __pyx_mstate_global->__pyx_n_s_ptolemy_equations_boundary_map
#define __pyx_n_s_ptolemy_equations_boundary_map_2 __pyx_mstate_global->__pyx_n_s_ptolemy_equations_boundary_map_2
#define __pyx_n_s_ptolemy_equations_boundary_map_3 __pyx_mstate_global->__pyx_n_s_ptolemy_equations_boundary_map_3
#define __pyx_n_s_ptolemy_equations_identified_co __pyx_mstate_global->__pyx_n_s_ptolemy_equations_identified_co
#define __pyx_n_s_ptolemy_equations_identified_fa __pyx_mstate_global->__pyx_n_s_ptolemy_equations_identified_fa
#define __pyx_n_s_ptolemy_generalized_obstruction __pyx_mstate_global->__pyx_n_s_ptolemy_generalized_obstruction
#define __pyx_n_s_ptolemy_obstruction_classes __pyx_mstate_global->__pyx_n_s_ptolemy_obstruction_classes
#define __pyx_n_s_ptolemy_variety __pyx_mstate_global->__pyx_n_s_ptolemy_variety
#define __pyx_n_s_python_major_version __pyx_mstate_global->__pyx_n_s_python_major_version
#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_PresentationMatri __pyx_mstate_global->__pyx_n_s_pyx_unpickle_PresentationMatri
#define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable
#define __pyx_n_s_q __pyx_mstate_global->__pyx_n_s_q
#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_kp_s_r_2 __pyx_mstate_global->__pyx_kp_s_r_2
#define __pyx_n_s_radius __pyx_mstate_global->__pyx_n_s_radius
#define __pyx_n_s_randomize __pyx_mstate_global->__pyx_n_s_randomize
#define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range
#define __pyx_n_s_rank __pyx_mstate_global->__pyx_n_s_rank
#define __pyx_n_s_raw_form __pyx_mstate_global->__pyx_n_s_raw_form
#define __pyx_n_s_rb __pyx_mstate_global->__pyx_n_s_rb
#define __pyx_n_s_re __pyx_mstate_global->__pyx_n_s_re
#define __pyx_n_s_reach __pyx_mstate_global->__pyx_n_s_reach
#define __pyx_n_s_read __pyx_mstate_global->__pyx_n_s_read
#define __pyx_n_s_readline __pyx_mstate_global->__pyx_n_s_readline
#define __pyx_n_s_readlines __pyx_mstate_global->__pyx_n_s_readlines
#define __pyx_n_s_real __pyx_mstate_global->__pyx_n_s_real
#define __pyx_n_s_real_coerced_to_bits_prec __pyx_mstate_global->__pyx_n_s_real_coerced_to_bits_prec
#define __pyx_n_s_recompute __pyx_mstate_global->__pyx_n_s_recompute
#define __pyx_n_s_record __pyx_mstate_global->__pyx_n_s_record
#define __pyx_n_s_rect __pyx_mstate_global->__pyx_n_s_rect
#define __pyx_n_s_rect_im __pyx_mstate_global->__pyx_n_s_rect_im
#define __pyx_n_s_rect_re __pyx_mstate_global->__pyx_n_s_rect_re
#define __pyx_n_s_rect_shape __pyx_mstate_global->__pyx_n_s_rect_shape
#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_reduce_list_word __pyx_mstate_global->__pyx_n_s_reduce_list_word
#define __pyx_n_s_regular __pyx_mstate_global->__pyx_n_s_regular
#define __pyx_n_s_reindex_cusps __pyx_mstate_global->__pyx_n_s_reindex_cusps
#define __pyx_n_s_rel __pyx_mstate_global->__pyx_n_s_rel
#define __pyx_n_s_relation __pyx_mstate_global->__pyx_n_s_relation
#define __pyx_n_s_relation_list __pyx_mstate_global->__pyx_n_s_relation_list
#define __pyx_n_s_relators __pyx_mstate_global->__pyx_n_s_relators
#define __pyx_n_s_rels __pyx_mstate_global->__pyx_n_s_rels
#define __pyx_n_s_remove __pyx_mstate_global->__pyx_n_s_remove
#define __pyx_n_s_remove_finite_vertices __pyx_mstate_global->__pyx_n_s_remove_finite_vertices
#define __pyx_n_s_remove_finite_vertices_2 __pyx_mstate_global->__pyx_n_s_remove_finite_vertices_2
#define __pyx_n_s_reopen __pyx_mstate_global->__pyx_n_s_reopen
#define __pyx_n_s_rep __pyx_mstate_global->__pyx_n_s_rep
#define __pyx_n_s_replace __pyx_mstate_global->__pyx_n_s_replace
#define __pyx_n_s_repr __pyx_mstate_global->__pyx_n_s_repr
#define __pyx_n_s_repr_2 __pyx_mstate_global->__pyx_n_s_repr_2
#define __pyx_n_s_reps __pyx_mstate_global->__pyx_n_s_reps
#define __pyx_n_s_result __pyx_mstate_global->__pyx_n_s_result
#define __pyx_n_s_result_curves __pyx_mstate_global->__pyx_n_s_result_curves
#define __pyx_n_s_result_cusp_indices __pyx_mstate_global->__pyx_n_s_result_cusp_indices
#define __pyx_n_s_return_isometries __pyx_mstate_global->__pyx_n_s_return_isometries
#define __pyx_n_s_return_matrices __pyx_mstate_global->__pyx_n_s_return_matrices
#define __pyx_n_s_return_type __pyx_mstate_global->__pyx_n_s_return_type
#define __pyx_n_s_retval __pyx_mstate_global->__pyx_n_s_retval
#define __pyx_n_s_rev_spec_dict __pyx_mstate_global->__pyx_n_s_rev_spec_dict
#define __pyx_n_s_reverse_orientation __pyx_mstate_global->__pyx_n_s_reverse_orientation
#define __pyx_n_s_right __pyx_mstate_global->__pyx_n_s_right
#define __pyx_n_s_rings __pyx_mstate_global->__pyx_n_s_rings
#define __pyx_n_s_rjust __pyx_mstate_global->__pyx_n_s_rjust
#define __pyx_n_s_rolfsen_link_regexs __pyx_mstate_global->__pyx_n_s_rolfsen_link_regexs
#define __pyx_n_s_round __pyx_mstate_global->__pyx_n_s_round
#define __pyx_n_s_row __pyx_mstate_global->__pyx_n_s_row
#define __pyx_n_s_row_entries __pyx_mstate_global->__pyx_n_s_row_entries
#define __pyx_n_s_row_op __pyx_mstate_global->__pyx_n_s_row_op
#define __pyx_n_s_rows __pyx_mstate_global->__pyx_n_s_rows
#define __pyx_n_s_s __pyx_mstate_global->__pyx_n_s_s
#define __pyx_kp_s_s_2 __pyx_mstate_global->__pyx_kp_s_s_2
#define __pyx_kp_s_s_3 __pyx_mstate_global->__pyx_kp_s_s_3
#define __pyx_kp_s_s_4 __pyx_mstate_global->__pyx_kp_s_s_4
#define __pyx_kp_s_s_F_d __pyx_mstate_global->__pyx_kp_s_s_F_d
#define __pyx_kp_s_s_s __pyx_mstate_global->__pyx_kp_s_s_s
#define __pyx_kp_s_s_s_explain_columns_s_explain_r __pyx_mstate_global->__pyx_kp_s_s_s_explain_columns_s_explain_r
#define __pyx_kp_s_s_s_with_euler_s __pyx_mstate_global->__pyx_kp_s_s_s_with_euler_s
#define __pyx_kp_s_s_x_s __pyx_mstate_global->__pyx_kp_s_s_x_s
#define __pyx_n_s_sage __pyx_mstate_global->__pyx_n_s_sage
#define __pyx_n_s_sage_all __pyx_mstate_global->__pyx_n_s_sage_all
#define __pyx_n_s_sage_groups_free_group __pyx_mstate_global->__pyx_n_s_sage_groups_free_group
#define __pyx_n_s_sage_groups_perm_gps_permgroup __pyx_mstate_global->__pyx_n_s_sage_groups_perm_gps_permgroup
#define __pyx_n_s_sage_groups_perm_gps_permgroup_e __pyx_mstate_global->__pyx_n_s_sage_groups_perm_gps_permgroup_e
#define __pyx_n_s_sage_helper __pyx_mstate_global->__pyx_n_s_sage_helper
#define __pyx_n_s_sage_interfaces_abc __pyx_mstate_global->__pyx_n_s_sage_interfaces_abc
#define __pyx_n_s_sage_interfaces_gap __pyx_mstate_global->__pyx_n_s_sage_interfaces_gap
#define __pyx_n_s_sage_interfaces_magma __pyx_mstate_global->__pyx_n_s_sage_interfaces_magma
#define __pyx_n_s_sage_matrix __pyx_mstate_global->__pyx_n_s_sage_matrix
#define __pyx_n_s_sage_matrix_constructor __pyx_mstate_global->__pyx_n_s_sage_matrix_constructor
#define __pyx_n_s_sage_object __pyx_mstate_global->__pyx_n_s_sage_object
#define __pyx_n_s_sage_structure_sage_object __pyx_mstate_global->__pyx_n_s_sage_structure_sage_object
#define __pyx_n_s_save __pyx_mstate_global->__pyx_n_s_save
#define __pyx_n_s_savefile __pyx_mstate_global->__pyx_n_s_savefile
#define __pyx_n_s_second_char __pyx_mstate_global->__pyx_n_s_second_char
#define __pyx_n_s_second_nybble __pyx_mstate_global->__pyx_n_s_second_nybble
#define __pyx_n_s_seed __pyx_mstate_global->__pyx_n_s_seed
#define __pyx_n_s_seek __pyx_mstate_global->__pyx_n_s_seek
#define __pyx_n_s_segment __pyx_mstate_global->__pyx_n_s_segment
#define __pyx_n_s_segment_list __pyx_mstate_global->__pyx_n_s_segment_list
#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_sep __pyx_mstate_global->__pyx_n_s_sep
#define __pyx_n_s_set_DTcode __pyx_mstate_global->__pyx_n_s_set_DTcode
#define __pyx_n_s_set_PDcode __pyx_mstate_global->__pyx_n_s_set_PDcode
#define __pyx_n_s_set_displacement __pyx_mstate_global->__pyx_n_s_set_displacement
#define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name
#define __pyx_n_s_set_name_2 __pyx_mstate_global->__pyx_n_s_set_name_2
#define __pyx_n_s_set_peripheral_curves __pyx_mstate_global->__pyx_n_s_set_peripheral_curves
#define __pyx_n_s_set_peripheral_from_decoration __pyx_mstate_global->__pyx_n_s_set_peripheral_from_decoration
#define __pyx_n_s_set_rand_seed __pyx_mstate_global->__pyx_n_s_set_rand_seed
#define __pyx_n_s_set_target_holonomy __pyx_mstate_global->__pyx_n_s_set_target_holonomy
#define __pyx_n_s_set_test_flag __pyx_mstate_global->__pyx_n_s_set_test_flag
#define __pyx_n_s_set_tetrahedra_shapes __pyx_mstate_global->__pyx_n_s_set_tetrahedra_shapes
#define __pyx_n_s_set_tie __pyx_mstate_global->__pyx_n_s_set_tie
#define __pyx_n_s_setattr __pyx_mstate_global->__pyx_n_s_setattr
#define __pyx_n_s_setitem __pyx_mstate_global->__pyx_n_s_setitem
#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_seven_length __pyx_mstate_global->__pyx_n_s_seven_length
#define __pyx_n_s_shape __pyx_mstate_global->__pyx_n_s_shape
#define __pyx_n_s_shape_accuracy __pyx_mstate_global->__pyx_n_s_shape_accuracy
#define __pyx_kp_s_shape_precision __pyx_mstate_global->__pyx_kp_s_shape_precision
#define __pyx_n_s_shapes __pyx_mstate_global->__pyx_n_s_shapes
#define __pyx_n_s_short_relators __pyx_mstate_global->__pyx_n_s_short_relators
#define __pyx_n_s_shortest __pyx_mstate_global->__pyx_n_s_shortest
#define __pyx_n_s_shortest_longitudes __pyx_mstate_global->__pyx_n_s_shortest_longitudes
#define __pyx_n_s_shortest_meridians __pyx_mstate_global->__pyx_n_s_shortest_meridians
#define __pyx_n_s_show_uAcknowledge __pyx_mstate_global->__pyx_n_s_show_uAcknowledge
#define __pyx_n_s_shrink_factor __pyx_mstate_global->__pyx_n_s_shrink_factor
#define __pyx_n_s_side __pyx_mstate_global->__pyx_n_s_side
#define __pyx_n_s_side_lengths __pyx_mstate_global->__pyx_n_s_side_lengths
#define __pyx_n_s_sided __pyx_mstate_global->__pyx_n_s_sided
#define __pyx_n_s_sign __pyx_mstate_global->__pyx_n_s_sign
#define __pyx_n_s_signs __pyx_mstate_global->__pyx_n_s_signs
#define __pyx_n_s_signtype __pyx_mstate_global->__pyx_n_s_signtype
#define __pyx_n_s_simplified_matrix __pyx_mstate_global->__pyx_n_s_simplified_matrix
#define __pyx_n_s_simplify __pyx_mstate_global->__pyx_n_s_simplify
#define __pyx_n_s_simplify_presentation __pyx_mstate_global->__pyx_n_s_simplify_presentation
#define __pyx_n_s_singularity_index __pyx_mstate_global->__pyx_n_s_singularity_index
#define __pyx_n_s_six_length __pyx_mstate_global->__pyx_n_s_six_length
#define __pyx_n_s_size __pyx_mstate_global->__pyx_n_s_size
#define __pyx_n_s_sl2 __pyx_mstate_global->__pyx_n_s_sl2
#define __pyx_n_s_smith_form __pyx_mstate_global->__pyx_n_s_smith_form
#define __pyx_n_s_snap __pyx_mstate_global->__pyx_n_s_snap
#define __pyx_n_s_snapPea __pyx_mstate_global->__pyx_n_s_snapPea
#define __pyx_n_s_snappea __pyx_mstate_global->__pyx_n_s_snappea
#define __pyx_n_s_snappy __pyx_mstate_global->__pyx_n_s_snappy
#define __pyx_n_s_so_far __pyx_mstate_global->__pyx_n_s_so_far
#define __pyx_n_s_soln __pyx_mstate_global->__pyx_n_s_soln
#define __pyx_n_s_solution_type __pyx_mstate_global->__pyx_n_s_solution_type
#define __pyx_n_s_sorted __pyx_mstate_global->__pyx_n_s_sorted
#define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
#define __pyx_n_s_spec_2 __pyx_mstate_global->__pyx_n_s_spec_2
#define __pyx_n_s_specs __pyx_mstate_global->__pyx_n_s_specs
#define __pyx_n_s_spectrum __pyx_mstate_global->__pyx_n_s_spectrum
#define __pyx_n_s_spherogram __pyx_mstate_global->__pyx_n_s_spherogram
#define __pyx_n_s_spin_short __pyx_mstate_global->__pyx_n_s_spin_short
#define __pyx_n_s_spine_radius __pyx_mstate_global->__pyx_n_s_spine_radius
#define __pyx_n_s_split __pyx_mstate_global->__pyx_n_s_split
#define __pyx_n_s_split_filling_info __pyx_mstate_global->__pyx_n_s_split_filling_info
#define __pyx_n_s_splitting __pyx_mstate_global->__pyx_n_s_splitting
#define __pyx_n_s_splitting_from_string __pyx_mstate_global->__pyx_n_s_splitting_from_string
#define __pyx_n_s_splitting_surfaces __pyx_mstate_global->__pyx_n_s_splitting_surfaces
#define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start
#define __pyx_n_s_startswith __pyx_mstate_global->__pyx_n_s_startswith
#define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state
#define __pyx_n_s_staticmethod __pyx_mstate_global->__pyx_n_s_staticmethod
#define __pyx_n_s_stderr __pyx_mstate_global->__pyx_n_s_stderr
#define __pyx_n_s_stdout __pyx_mstate_global->__pyx_n_s_stdout
#define __pyx_n_s_step __pyx_mstate_global->__pyx_n_s_step
#define __pyx_n_s_stl __pyx_mstate_global->__pyx_n_s_stl
#define __pyx_n_s_stop __pyx_mstate_global->__pyx_n_s_stop
#define __pyx_n_s_stopper __pyx_mstate_global->__pyx_n_s_stopper
#define __pyx_n_s_stopping_displacement __pyx_mstate_global->__pyx_n_s_stopping_displacement
#define __pyx_n_s_str __pyx_mstate_global->__pyx_n_s_str
#define __pyx_n_s_strandtype __pyx_mstate_global->__pyx_n_s_strandtype
#define __pyx_n_s_strategy __pyx_mstate_global->__pyx_n_s_strategy
#define __pyx_n_s_string __pyx_mstate_global->__pyx_n_s_string
#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_strline __pyx_mstate_global->__pyx_n_s_strline
#define __pyx_n_s_struct __pyx_mstate_global->__pyx_n_s_struct
#define __pyx_n_s_structure __pyx_mstate_global->__pyx_n_s_structure
#define __pyx_n_s_subgroup __pyx_mstate_global->__pyx_n_s_subgroup
#define __pyx_n_s_sum __pyx_mstate_global->__pyx_n_s_sum
#define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super
#define __pyx_n_s_surface __pyx_mstate_global->__pyx_n_s_surface
#define __pyx_n_s_surfaces __pyx_mstate_global->__pyx_n_s_surfaces
#define __pyx_n_s_symmetric_triangulation __pyx_mstate_global->__pyx_n_s_symmetric_triangulation
#define __pyx_n_s_symmetries_of_link __pyx_mstate_global->__pyx_n_s_symmetries_of_link
#define __pyx_n_s_symmetries_of_manifold __pyx_mstate_global->__pyx_n_s_symmetries_of_manifold
#define __pyx_n_s_symmetry_group __pyx_mstate_global->__pyx_n_s_symmetry_group
#define __pyx_n_s_symplectic_basis __pyx_mstate_global->__pyx_n_s_symplectic_basis
#define __pyx_n_s_symplectic_form __pyx_mstate_global->__pyx_n_s_symplectic_form
#define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys
#define __pyx_n_s_t __pyx_mstate_global->__pyx_n_s_t
#define __pyx_n_s_table __pyx_mstate_global->__pyx_n_s_table
#define __pyx_n_s_table_directory __pyx_mstate_global->__pyx_n_s_table_directory
#define __pyx_n_s_tail __pyx_mstate_global->__pyx_n_s_tail
#define __pyx_n_s_tail_vertex_index __pyx_mstate_global->__pyx_n_s_tail_vertex_index
#define __pyx_n_s_tarfile __pyx_mstate_global->__pyx_n_s_tarfile
#define __pyx_n_s_target __pyx_mstate_global->__pyx_n_s_target
#define __pyx_n_s_tarpath __pyx_mstate_global->__pyx_n_s_tarpath
#define __pyx_n_s_temp __pyx_mstate_global->__pyx_n_s_temp
#define __pyx_n_s_tempfile __pyx_mstate_global->__pyx_n_s_tempfile
#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
#define __pyx_n_s_tet __pyx_mstate_global->__pyx_n_s_tet
#define __pyx_n_s_tet_num __pyx_mstate_global->__pyx_n_s_tet_num
#define __pyx_n_s_tetrahedra_data __pyx_mstate_global->__pyx_n_s_tetrahedra_data
#define __pyx_n_s_tetrahedra_shapes __pyx_mstate_global->__pyx_n_s_tetrahedra_shapes
#define __pyx_kp_s_tetrahedra_shapes_were_inserted __pyx_mstate_global->__pyx_kp_s_tetrahedra_shapes_were_inserted
#define __pyx_kp_s_tetrahedral_group __pyx_mstate_global->__pyx_kp_s_tetrahedral_group
#define __pyx_kp_s_the_gap_method_for_covers_requir __pyx_mstate_global->__pyx_kp_s_the_gap_method_for_covers_requir
#define __pyx_kp_s_the_magma_method_for_covers_requ __pyx_mstate_global->__pyx_kp_s_the_magma_method_for_covers_requ
#define __pyx_n_s_three_to_two __pyx_mstate_global->__pyx_n_s_three_to_two
#define __pyx_n_s_throw __pyx_mstate_global->__pyx_n_s_throw
#define __pyx_n_s_tilts __pyx_mstate_global->__pyx_n_s_tilts
#define __pyx_n_s_time __pyx_mstate_global->__pyx_n_s_time
#define __pyx_n_s_tip __pyx_mstate_global->__pyx_n_s_tip
#define __pyx_n_s_tip_vertex_index __pyx_mstate_global->__pyx_n_s_tip_vertex_index
#define __pyx_n_s_title __pyx_mstate_global->__pyx_n_s_title
#define __pyx_n_s_to_byte_str __pyx_mstate_global->__pyx_n_s_to_byte_str
#define __pyx_n_s_to_bytes __pyx_mstate_global->__pyx_n_s_to_bytes
#define __pyx_n_s_to_do __pyx_mstate_global->__pyx_n_s_to_do
#define __pyx_n_s_to_str __pyx_mstate_global->__pyx_n_s_to_str
#define __pyx_n_s_to_string __pyx_mstate_global->__pyx_n_s_to_string
#define __pyx_n_s_to_string_locals_genexpr __pyx_mstate_global->__pyx_n_s_to_string_locals_genexpr
#define __pyx_n_s_topology __pyx_mstate_global->__pyx_n_s_topology
#define __pyx_kp_s_torus_cusp __pyx_mstate_global->__pyx_kp_s_torus_cusp
#define __pyx_n_s_total __pyx_mstate_global->__pyx_n_s_total
#define __pyx_n_s_translations __pyx_mstate_global->__pyx_n_s_translations
#define __pyx_kp_s_tri __pyx_mstate_global->__pyx_kp_s_tri
#define __pyx_kp_s_tri_txt __pyx_mstate_global->__pyx_kp_s_tri_txt
#define __pyx_n_s_triangulation __pyx_mstate_global->__pyx_n_s_triangulation
#define __pyx_n_s_triangulation_class __pyx_mstate_global->__pyx_n_s_triangulation_class
#define __pyx_n_s_triangulation_help __pyx_mstate_global->__pyx_n_s_triangulation_help
#define __pyx_n_s_triangulation_isosig __pyx_mstate_global->__pyx_n_s_triangulation_isosig
#define __pyx_n_s_try_hard_to_shorten_relators __pyx_mstate_global->__pyx_n_s_try_hard_to_shorten_relators
#define __pyx_n_s_twister __pyx_mstate_global->__pyx_n_s_twister
#define __pyx_n_s_twister_word __pyx_mstate_global->__pyx_n_s_twister_word
#define __pyx_n_s_two_sided __pyx_mstate_global->__pyx_n_s_two_sided
#define __pyx_kp_s_two_sided_2 __pyx_mstate_global->__pyx_kp_s_two_sided_2
#define __pyx_n_s_two_to_three __pyx_mstate_global->__pyx_n_s_two_to_three
#define __pyx_n_s_type __pyx_mstate_global->__pyx_n_s_type
#define __pyx_n_s_type_str __pyx_mstate_global->__pyx_n_s_type_str
#define __pyx_n_s_types __pyx_mstate_global->__pyx_n_s_types
#define __pyx_n_s_u __pyx_mstate_global->__pyx_n_s_u
#define __pyx_n_s_unit __pyx_mstate_global->__pyx_n_s_unit
#define __pyx_n_s_unknown __pyx_mstate_global->__pyx_n_s_unknown
#define __pyx_n_s_unnamed __pyx_mstate_global->__pyx_n_s_unnamed
#define __pyx_kp_s_unnamed_link __pyx_mstate_global->__pyx_kp_s_unnamed_link
#define __pyx_n_s_unpack __pyx_mstate_global->__pyx_n_s_unpack
#define __pyx_n_s_unpickle_dirichlet_domain __pyx_mstate_global->__pyx_n_s_unpickle_dirichlet_domain
#define __pyx_kp_s_unrecognized_solution_type __pyx_mstate_global->__pyx_kp_s_unrecognized_solution_type
#define __pyx_n_s_unsimplified_filled_triangulati __pyx_mstate_global->__pyx_n_s_unsimplified_filled_triangulati
#define __pyx_n_s_unsimplified_filled_triangulati_2 __pyx_mstate_global->__pyx_n_s_unsimplified_filled_triangulati_2
#define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
#define __pyx_n_s_upper __pyx_mstate_global->__pyx_n_s_upper
#define __pyx_n_s_use_field_conversion __pyx_mstate_global->__pyx_n_s_use_field_conversion
#define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate
#define __pyx_n_s_user_radius __pyx_mstate_global->__pyx_n_s_user_radius
#define __pyx_kp_s_utf_8 __pyx_mstate_global->__pyx_kp_s_utf_8
#define __pyx_n_s_v __pyx_mstate_global->__pyx_n_s_v
#define __pyx_kp_s_v1205_2_3 __pyx_mstate_global->__pyx_kp_s_v1205_2_3
#define __pyx_n_s_valid_index __pyx_mstate_global->__pyx_n_s_valid_index
#define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value
#define __pyx_n_s_values __pyx_mstate_global->__pyx_n_s_values
#define __pyx_n_s_verbose_form __pyx_mstate_global->__pyx_n_s_verbose_form
#define __pyx_n_s_verified __pyx_mstate_global->__pyx_n_s_verified
#define __pyx_n_s_verify __pyx_mstate_global->__pyx_n_s_verify
#define __pyx_n_s_verify_complex_volume __pyx_mstate_global->__pyx_n_s_verify_complex_volume
#define __pyx_n_s_version __pyx_mstate_global->__pyx_n_s_version
#define __pyx_n_s_version_info __pyx_mstate_global->__pyx_n_s_version_info
#define __pyx_n_s_vertex __pyx_mstate_global->__pyx_n_s_vertex
#define __pyx_n_s_vertex_class __pyx_mstate_global->__pyx_n_s_vertex_class
#define __pyx_n_s_vertex_data_list __pyx_mstate_global->__pyx_n_s_vertex_data_list
#define __pyx_n_s_vertex_epsilon __pyx_mstate_global->__pyx_n_s_vertex_epsilon
#define __pyx_n_s_vertex_image_indices __pyx_mstate_global->__pyx_n_s_vertex_image_indices
#define __pyx_n_s_vertex_indices __pyx_mstate_global->__pyx_n_s_vertex_indices
#define __pyx_n_s_vertex_list __pyx_mstate_global->__pyx_n_s_vertex_list
#define __pyx_n_s_vertex_list_2 __pyx_mstate_global->__pyx_n_s_vertex_list_2
#define __pyx_n_s_vertex_to_index __pyx_mstate_global->__pyx_n_s_vertex_to_index
#define __pyx_n_s_vertex_to_index_dict __pyx_mstate_global->__pyx_n_s_vertex_to_index_dict
#define __pyx_n_s_vertices __pyx_mstate_global->__pyx_n_s_vertices
#define __pyx_n_s_view __pyx_mstate_global->__pyx_n_s_view
#define __pyx_n_s_vol __pyx_mstate_global->__pyx_n_s_vol
#define __pyx_n_s_volume __pyx_mstate_global->__pyx_n_s_volume
#define __pyx_n_s_w __pyx_mstate_global->__pyx_n_s_w
#define __pyx_n_s_w0 __pyx_mstate_global->__pyx_n_s_w0
#define __pyx_n_s_w1 __pyx_mstate_global->__pyx_n_s_w1
#define __pyx_n_s_wb __pyx_mstate_global->__pyx_n_s_wb
#define __pyx_n_s_where_to_resume __pyx_mstate_global->__pyx_n_s_where_to_resume
#define __pyx_n_s_which_curve __pyx_mstate_global->__pyx_n_s_which_curve
#define __pyx_n_s_which_cusp __pyx_mstate_global->__pyx_n_s_which_cusp
#define __pyx_n_s_which_solution __pyx_mstate_global->__pyx_n_s_which_solution
#define __pyx_n_s_which_surface __pyx_mstate_global->__pyx_n_s_which_surface
#define __pyx_n_s_with_hyperbolic_structure __pyx_mstate_global->__pyx_n_s_with_hyperbolic_structure
#define __pyx_n_s_within_sage __pyx_mstate_global->__pyx_n_s_within_sage
#define __pyx_n_s_without_hyperbolic_structure __pyx_mstate_global->__pyx_n_s_without_hyperbolic_structure
#define __pyx_n_s_word __pyx_mstate_global->__pyx_n_s_word
#define __pyx_n_s_word_as_list __pyx_mstate_global->__pyx_n_s_word_as_list
#define __pyx_n_s_word_list __pyx_mstate_global->__pyx_n_s_word_list
#define __pyx_n_s_word_moves __pyx_mstate_global->__pyx_n_s_word_moves
#define __pyx_n_s_words __pyx_mstate_global->__pyx_n_s_words
#define __pyx_n_s_write __pyx_mstate_global->__pyx_n_s_write
#define __pyx_n_s_x __pyx_mstate_global->__pyx_n_s_x
#define __pyx_n_s_x012 __pyx_mstate_global->__pyx_n_s_x012
#define __pyx_kp_s_xX_d __pyx_mstate_global->__pyx_kp_s_xX_d
#define __pyx_kp_s_x_d_1 __pyx_mstate_global->__pyx_kp_s_x_d_1
#define __pyx_n_s_y __pyx_mstate_global->__pyx_n_s_y
#define __pyx_n_s_y123 __pyx_mstate_global->__pyx_n_s_y123
#define __pyx_n_s_z __pyx_mstate_global->__pyx_n_s_z
#define __pyx_n_s_zeros __pyx_mstate_global->__pyx_n_s_zeros
#define __pyx_float_0_0 __pyx_mstate_global->__pyx_float_0_0
#define __pyx_float_0_1 __pyx_mstate_global->__pyx_float_0_1
#define __pyx_float_0_2 __pyx_mstate_global->__pyx_float_0_2
#define __pyx_float_0_9 __pyx_mstate_global->__pyx_float_0_9
#define __pyx_float_1_0 __pyx_mstate_global->__pyx_float_1_0
#define __pyx_float_1eneg_9 __pyx_mstate_global->__pyx_float_1eneg_9
#define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
#define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
#define __pyx_int_2 __pyx_mstate_global->__pyx_int_2
#define __pyx_int_3 __pyx_mstate_global->__pyx_int_3
#define __pyx_int_4 __pyx_mstate_global->__pyx_int_4
#define __pyx_int_5 __pyx_mstate_global->__pyx_int_5
#define __pyx_int_6 __pyx_mstate_global->__pyx_int_6
#define __pyx_int_7 __pyx_mstate_global->__pyx_int_7
#define __pyx_int_8 __pyx_mstate_global->__pyx_int_8
#define __pyx_int_9 __pyx_mstate_global->__pyx_int_9
#define __pyx_int_10 __pyx_mstate_global->__pyx_int_10
#define __pyx_int_11 __pyx_mstate_global->__pyx_int_11
#define __pyx_int_12 __pyx_mstate_global->__pyx_int_12
#define __pyx_int_13 __pyx_mstate_global->__pyx_int_13
#define __pyx_int_14 __pyx_mstate_global->__pyx_int_14
#define __pyx_int_15 __pyx_mstate_global->__pyx_int_15
#define __pyx_int_16 __pyx_mstate_global->__pyx_int_16
#define __pyx_int_17 __pyx_mstate_global->__pyx_int_17
#define __pyx_int_18 __pyx_mstate_global->__pyx_int_18
#define __pyx_int_19 __pyx_mstate_global->__pyx_int_19
#define __pyx_int_20 __pyx_mstate_global->__pyx_int_20
#define __pyx_int_21 __pyx_mstate_global->__pyx_int_21
#define __pyx_int_22 __pyx_mstate_global->__pyx_int_22
#define __pyx_int_23 __pyx_mstate_global->__pyx_int_23
#define __pyx_int_24 __pyx_mstate_global->__pyx_int_24
#define __pyx_int_25 __pyx_mstate_global->__pyx_int_25
#define __pyx_int_26 __pyx_mstate_global->__pyx_int_26
#define __pyx_int_27 __pyx_mstate_global->__pyx_int_27
#define __pyx_int_28 __pyx_mstate_global->__pyx_int_28
#define __pyx_int_29 __pyx_mstate_global->__pyx_int_29
#define __pyx_int_30 __pyx_mstate_global->__pyx_int_30
#define __pyx_int_31 __pyx_mstate_global->__pyx_int_31
#define __pyx_int_32 __pyx_mstate_global->__pyx_int_32
#define __pyx_int_33 __pyx_mstate_global->__pyx_int_33
#define __pyx_int_34 __pyx_mstate_global->__pyx_int_34
#define __pyx_int_35 __pyx_mstate_global->__pyx_int_35
#define __pyx_int_36 __pyx_mstate_global->__pyx_int_36
#define __pyx_int_37 __pyx_mstate_global->__pyx_int_37
#define __pyx_int_38 __pyx_mstate_global->__pyx_int_38
#define __pyx_int_39 __pyx_mstate_global->__pyx_int_39
#define __pyx_int_40 __pyx_mstate_global->__pyx_int_40
#define __pyx_int_41 __pyx_mstate_global->__pyx_int_41
#define __pyx_int_42 __pyx_mstate_global->__pyx_int_42
#define __pyx_int_43 __pyx_mstate_global->__pyx_int_43
#define __pyx_int_44 __pyx_mstate_global->__pyx_int_44
#define __pyx_int_45 __pyx_mstate_global->__pyx_int_45
#define __pyx_int_46 __pyx_mstate_global->__pyx_int_46
#define __pyx_int_47 __pyx_mstate_global->__pyx_int_47
#define __pyx_int_48 __pyx_mstate_global->__pyx_int_48
#define __pyx_int_49 __pyx_mstate_global->__pyx_int_49
#define __pyx_int_50 __pyx_mstate_global->__pyx_int_50
#define __pyx_int_51 __pyx_mstate_global->__pyx_int_51
#define __pyx_int_52 __pyx_mstate_global->__pyx_int_52
#define __pyx_int_53 __pyx_mstate_global->__pyx_int_53
#define __pyx_int_54 __pyx_mstate_global->__pyx_int_54
#define __pyx_int_55 __pyx_mstate_global->__pyx_int_55
#define __pyx_int_56 __pyx_mstate_global->__pyx_int_56
#define __pyx_int_57 __pyx_mstate_global->__pyx_int_57
#define __pyx_int_58 __pyx_mstate_global->__pyx_int_58
#define __pyx_int_59 __pyx_mstate_global->__pyx_int_59
#define __pyx_int_60 __pyx_mstate_global->__pyx_int_60
#define __pyx_int_61 __pyx_mstate_global->__pyx_int_61
#define __pyx_int_62 __pyx_mstate_global->__pyx_int_62
#define __pyx_int_63 __pyx_mstate_global->__pyx_int_63
#define __pyx_int_64 __pyx_mstate_global->__pyx_int_64
#define __pyx_int_65 __pyx_mstate_global->__pyx_int_65
#define __pyx_int_66 __pyx_mstate_global->__pyx_int_66
#define __pyx_int_67 __pyx_mstate_global->__pyx_int_67
#define __pyx_int_68 __pyx_mstate_global->__pyx_int_68
#define __pyx_int_69 __pyx_mstate_global->__pyx_int_69
#define __pyx_int_70 __pyx_mstate_global->__pyx_int_70
#define __pyx_int_71 __pyx_mstate_global->__pyx_int_71
#define __pyx_int_72 __pyx_mstate_global->__pyx_int_72
#define __pyx_int_73 __pyx_mstate_global->__pyx_int_73
#define __pyx_int_74 __pyx_mstate_global->__pyx_int_74
#define __pyx_int_75 __pyx_mstate_global->__pyx_int_75
#define __pyx_int_76 __pyx_mstate_global->__pyx_int_76
#define __pyx_int_77 __pyx_mstate_global->__pyx_int_77
#define __pyx_int_78 __pyx_mstate_global->__pyx_int_78
#define __pyx_int_79 __pyx_mstate_global->__pyx_int_79
#define __pyx_int_80 __pyx_mstate_global->__pyx_int_80
#define __pyx_int_81 __pyx_mstate_global->__pyx_int_81
#define __pyx_int_82 __pyx_mstate_global->__pyx_int_82
#define __pyx_int_83 __pyx_mstate_global->__pyx_int_83
#define __pyx_int_84 __pyx_mstate_global->__pyx_int_84
#define __pyx_int_85 __pyx_mstate_global->__pyx_int_85
#define __pyx_int_86 __pyx_mstate_global->__pyx_int_86
#define __pyx_int_87 __pyx_mstate_global->__pyx_int_87
#define __pyx_int_88 __pyx_mstate_global->__pyx_int_88
#define __pyx_int_89 __pyx_mstate_global->__pyx_int_89
#define __pyx_int_90 __pyx_mstate_global->__pyx_int_90
#define __pyx_int_91 __pyx_mstate_global->__pyx_int_91
#define __pyx_int_92 __pyx_mstate_global->__pyx_int_92
#define __pyx_int_93 __pyx_mstate_global->__pyx_int_93
#define __pyx_int_94 __pyx_mstate_global->__pyx_int_94
#define __pyx_int_95 __pyx_mstate_global->__pyx_int_95
#define __pyx_int_96 __pyx_mstate_global->__pyx_int_96
#define __pyx_int_97 __pyx_mstate_global->__pyx_int_97
#define __pyx_int_98 __pyx_mstate_global->__pyx_int_98
#define __pyx_int_99 __pyx_mstate_global->__pyx_int_99
#define __pyx_int_100 __pyx_mstate_global->__pyx_int_100
#define __pyx_int_101 __pyx_mstate_global->__pyx_int_101
#define __pyx_int_102 __pyx_mstate_global->__pyx_int_102
#define __pyx_int_103 __pyx_mstate_global->__pyx_int_103
#define __pyx_int_104 __pyx_mstate_global->__pyx_int_104
#define __pyx_int_105 __pyx_mstate_global->__pyx_int_105
#define __pyx_int_106 __pyx_mstate_global->__pyx_int_106
#define __pyx_int_107 __pyx_mstate_global->__pyx_int_107
#define __pyx_int_108 __pyx_mstate_global->__pyx_int_108
#define __pyx_int_109 __pyx_mstate_global->__pyx_int_109
#define __pyx_int_110 __pyx_mstate_global->__pyx_int_110
#define __pyx_int_111 __pyx_mstate_global->__pyx_int_111
#define __pyx_int_112 __pyx_mstate_global->__pyx_int_112
#define __pyx_int_113 __pyx_mstate_global->__pyx_int_113
#define __pyx_int_114 __pyx_mstate_global->__pyx_int_114
#define __pyx_int_115 __pyx_mstate_global->__pyx_int_115
#define __pyx_int_116 __pyx_mstate_global->__pyx_int_116
#define __pyx_int_117 __pyx_mstate_global->__pyx_int_117
#define __pyx_int_118 __pyx_mstate_global->__pyx_int_118
#define __pyx_int_119 __pyx_mstate_global->__pyx_int_119
#define __pyx_int_120 __pyx_mstate_global->__pyx_int_120
#define __pyx_int_121 __pyx_mstate_global->__pyx_int_121
#define __pyx_int_122 __pyx_mstate_global->__pyx_int_122
#define __pyx_int_123 __pyx_mstate_global->__pyx_int_123
#define __pyx_int_124 __pyx_mstate_global->__pyx_int_124
#define __pyx_int_125 __pyx_mstate_global->__pyx_int_125
#define __pyx_int_126 __pyx_mstate_global->__pyx_int_126
#define __pyx_int_127 __pyx_mstate_global->__pyx_int_127
#define __pyx_int_128 __pyx_mstate_global->__pyx_int_128
#define __pyx_int_129 __pyx_mstate_global->__pyx_int_129
#define __pyx_int_130 __pyx_mstate_global->__pyx_int_130
#define __pyx_int_131 __pyx_mstate_global->__pyx_int_131
#define __pyx_int_132 __pyx_mstate_global->__pyx_int_132
#define __pyx_int_133 __pyx_mstate_global->__pyx_int_133
#define __pyx_int_134 __pyx_mstate_global->__pyx_int_134
#define __pyx_int_135 __pyx_mstate_global->__pyx_int_135
#define __pyx_int_136 __pyx_mstate_global->__pyx_int_136
#define __pyx_int_137 __pyx_mstate_global->__pyx_int_137
#define __pyx_int_138 __pyx_mstate_global->__pyx_int_138
#define __pyx_int_139 __pyx_mstate_global->__pyx_int_139
#define __pyx_int_140 __pyx_mstate_global->__pyx_int_140
#define __pyx_int_141 __pyx_mstate_global->__pyx_int_141
#define __pyx_int_142 __pyx_mstate_global->__pyx_int_142
#define __pyx_int_143 __pyx_mstate_global->__pyx_int_143
#define __pyx_int_144 __pyx_mstate_global->__pyx_int_144
#define __pyx_int_145 __pyx_mstate_global->__pyx_int_145
#define __pyx_int_146 __pyx_mstate_global->__pyx_int_146
#define __pyx_int_147 __pyx_mstate_global->__pyx_int_147
#define __pyx_int_148 __pyx_mstate_global->__pyx_int_148
#define __pyx_int_149 __pyx_mstate_global->__pyx_int_149
#define __pyx_int_150 __pyx_mstate_global->__pyx_int_150
#define __pyx_int_151 __pyx_mstate_global->__pyx_int_151
#define __pyx_int_152 __pyx_mstate_global->__pyx_int_152
#define __pyx_int_153 __pyx_mstate_global->__pyx_int_153
#define __pyx_int_154 __pyx_mstate_global->__pyx_int_154
#define __pyx_int_155 __pyx_mstate_global->__pyx_int_155
#define __pyx_int_156 __pyx_mstate_global->__pyx_int_156
#define __pyx_int_157 __pyx_mstate_global->__pyx_int_157
#define __pyx_int_158 __pyx_mstate_global->__pyx_int_158
#define __pyx_int_159 __pyx_mstate_global->__pyx_int_159
#define __pyx_int_160 __pyx_mstate_global->__pyx_int_160
#define __pyx_int_161 __pyx_mstate_global->__pyx_int_161
#define __pyx_int_162 __pyx_mstate_global->__pyx_int_162
#define __pyx_int_163 __pyx_mstate_global->__pyx_int_163
#define __pyx_int_164 __pyx_mstate_global->__pyx_int_164
#define __pyx_int_165 __pyx_mstate_global->__pyx_int_165
#define __pyx_int_166 __pyx_mstate_global->__pyx_int_166
#define __pyx_int_167 __pyx_mstate_global->__pyx_int_167
#define __pyx_int_168 __pyx_mstate_global->__pyx_int_168
#define __pyx_int_169 __pyx_mstate_global->__pyx_int_169
#define __pyx_int_170 __pyx_mstate_global->__pyx_int_170
#define __pyx_int_171 __pyx_mstate_global->__pyx_int_171
#define __pyx_int_172 __pyx_mstate_global->__pyx_int_172
#define __pyx_int_173 __pyx_mstate_global->__pyx_int_173
#define __pyx_int_174 __pyx_mstate_global->__pyx_int_174
#define __pyx_int_175 __pyx_mstate_global->__pyx_int_175
#define __pyx_int_176 __pyx_mstate_global->__pyx_int_176
#define __pyx_int_177 __pyx_mstate_global->__pyx_int_177
#define __pyx_int_178 __pyx_mstate_global->__pyx_int_178
#define __pyx_int_179 __pyx_mstate_global->__pyx_int_179
#define __pyx_int_180 __pyx_mstate_global->__pyx_int_180
#define __pyx_int_181 __pyx_mstate_global->__pyx_int_181
#define __pyx_int_182 __pyx_mstate_global->__pyx_int_182
#define __pyx_int_183 __pyx_mstate_global->__pyx_int_183
#define __pyx_int_184 __pyx_mstate_global->__pyx_int_184
#define __pyx_int_185 __pyx_mstate_global->__pyx_int_185
#define __pyx_int_186 __pyx_mstate_global->__pyx_int_186
#define __pyx_int_187 __pyx_mstate_global->__pyx_int_187
#define __pyx_int_188 __pyx_mstate_global->__pyx_int_188
#define __pyx_int_189 __pyx_mstate_global->__pyx_int_189
#define __pyx_int_190 __pyx_mstate_global->__pyx_int_190
#define __pyx_int_191 __pyx_mstate_global->__pyx_int_191
#define __pyx_int_192 __pyx_mstate_global->__pyx_int_192
#define __pyx_int_193 __pyx_mstate_global->__pyx_int_193
#define __pyx_int_194 __pyx_mstate_global->__pyx_int_194
#define __pyx_int_195 __pyx_mstate_global->__pyx_int_195
#define __pyx_int_196 __pyx_mstate_global->__pyx_int_196
#define __pyx_int_197 __pyx_mstate_global->__pyx_int_197
#define __pyx_int_198 __pyx_mstate_global->__pyx_int_198
#define __pyx_int_199 __pyx_mstate_global->__pyx_int_199
#define __pyx_int_200 __pyx_mstate_global->__pyx_int_200
#define __pyx_int_201 __pyx_mstate_global->__pyx_int_201
#define __pyx_int_202 __pyx_mstate_global->__pyx_int_202
#define __pyx_int_203 __pyx_mstate_global->__pyx_int_203
#define __pyx_int_204 __pyx_mstate_global->__pyx_int_204
#define __pyx_int_205 __pyx_mstate_global->__pyx_int_205
#define __pyx_int_206 __pyx_mstate_global->__pyx_int_206
#define __pyx_int_207 __pyx_mstate_global->__pyx_int_207
#define __pyx_int_208 __pyx_mstate_global->__pyx_int_208
#define __pyx_int_209 __pyx_mstate_global->__pyx_int_209
#define __pyx_int_210 __pyx_mstate_global->__pyx_int_210
#define __pyx_int_211 __pyx_mstate_global->__pyx_int_211
#define __pyx_int_212 __pyx_mstate_global->__pyx_int_212
#define __pyx_int_213 __pyx_mstate_global->__pyx_int_213
#define __pyx_int_214 __pyx_mstate_global->__pyx_int_214
#define __pyx_int_215 __pyx_mstate_global->__pyx_int_215
#define __pyx_int_216 __pyx_mstate_global->__pyx_int_216
#define __pyx_int_217 __pyx_mstate_global->__pyx_int_217
#define __pyx_int_218 __pyx_mstate_global->__pyx_int_218
#define __pyx_int_219 __pyx_mstate_global->__pyx_int_219
#define __pyx_int_220 __pyx_mstate_global->__pyx_int_220
#define __pyx_int_221 __pyx_mstate_global->__pyx_int_221
#define __pyx_int_222 __pyx_mstate_global->__pyx_int_222
#define __pyx_int_223 __pyx_mstate_global->__pyx_int_223
#define __pyx_int_224 __pyx_mstate_global->__pyx_int_224
#define __pyx_int_225 __pyx_mstate_global->__pyx_int_225
#define __pyx_int_226 __pyx_mstate_global->__pyx_int_226
#define __pyx_int_227 __pyx_mstate_global->__pyx_int_227
#define __pyx_int_228 __pyx_mstate_global->__pyx_int_228
#define __pyx_int_229 __pyx_mstate_global->__pyx_int_229
#define __pyx_int_230 __pyx_mstate_global->__pyx_int_230
#define __pyx_int_231 __pyx_mstate_global->__pyx_int_231
#define __pyx_int_232 __pyx_mstate_global->__pyx_int_232
#define __pyx_int_233 __pyx_mstate_global->__pyx_int_233
#define __pyx_int_234 __pyx_mstate_global->__pyx_int_234
#define __pyx_int_235 __pyx_mstate_global->__pyx_int_235
#define __pyx_int_236 __pyx_mstate_global->__pyx_int_236
#define __pyx_int_237 __pyx_mstate_global->__pyx_int_237
#define __pyx_int_238 __pyx_mstate_global->__pyx_int_238
#define __pyx_int_239 __pyx_mstate_global->__pyx_int_239
#define __pyx_int_240 __pyx_mstate_global->__pyx_int_240
#define __pyx_int_241 __pyx_mstate_global->__pyx_int_241
#define __pyx_int_242 __pyx_mstate_global->__pyx_int_242
#define __pyx_int_243 __pyx_mstate_global->__pyx_int_243
#define __pyx_int_244 __pyx_mstate_global->__pyx_int_244
#define __pyx_int_245 __pyx_mstate_global->__pyx_int_245
#define __pyx_int_246 __pyx_mstate_global->__pyx_int_246
#define __pyx_int_247 __pyx_mstate_global->__pyx_int_247
#define __pyx_int_248 __pyx_mstate_global->__pyx_int_248
#define __pyx_int_249 __pyx_mstate_global->__pyx_int_249
#define __pyx_int_250 __pyx_mstate_global->__pyx_int_250
#define __pyx_int_251 __pyx_mstate_global->__pyx_int_251
#define __pyx_int_252 __pyx_mstate_global->__pyx_int_252
#define __pyx_int_253 __pyx_mstate_global->__pyx_int_253
#define __pyx_int_254 __pyx_mstate_global->__pyx_int_254
#define __pyx_int_255 __pyx_mstate_global->__pyx_int_255
#define __pyx_int_256 __pyx_mstate_global->__pyx_int_256
#define __pyx_int_257 __pyx_mstate_global->__pyx_int_257
#define __pyx_int_258 __pyx_mstate_global->__pyx_int_258
#define __pyx_int_259 __pyx_mstate_global->__pyx_int_259
#define __pyx_int_260 __pyx_mstate_global->__pyx_int_260
#define __pyx_int_261 __pyx_mstate_global->__pyx_int_261
#define __pyx_int_262 __pyx_mstate_global->__pyx_int_262
#define __pyx_int_263 __pyx_mstate_global->__pyx_int_263
#define __pyx_int_264 __pyx_mstate_global->__pyx_int_264
#define __pyx_int_265 __pyx_mstate_global->__pyx_int_265
#define __pyx_int_266 __pyx_mstate_global->__pyx_int_266
#define __pyx_int_267 __pyx_mstate_global->__pyx_int_267
#define __pyx_int_268 __pyx_mstate_global->__pyx_int_268
#define __pyx_int_269 __pyx_mstate_global->__pyx_int_269
#define __pyx_int_270 __pyx_mstate_global->__pyx_int_270
#define __pyx_int_271 __pyx_mstate_global->__pyx_int_271
#define __pyx_int_272 __pyx_mstate_global->__pyx_int_272
#define __pyx_int_273 __pyx_mstate_global->__pyx_int_273
#define __pyx_int_274 __pyx_mstate_global->__pyx_int_274
#define __pyx_int_275 __pyx_mstate_global->__pyx_int_275
#define __pyx_int_276 __pyx_mstate_global->__pyx_int_276
#define __pyx_int_277 __pyx_mstate_global->__pyx_int_277
#define __pyx_int_278 __pyx_mstate_global->__pyx_int_278
#define __pyx_int_279 __pyx_mstate_global->__pyx_int_279
#define __pyx_int_280 __pyx_mstate_global->__pyx_int_280
#define __pyx_int_281 __pyx_mstate_global->__pyx_int_281
#define __pyx_int_282 __pyx_mstate_global->__pyx_int_282
#define __pyx_int_283 __pyx_mstate_global->__pyx_int_283
#define __pyx_int_284 __pyx_mstate_global->__pyx_int_284
#define __pyx_int_285 __pyx_mstate_global->__pyx_int_285
#define __pyx_int_286 __pyx_mstate_global->__pyx_int_286
#define __pyx_int_287 __pyx_mstate_global->__pyx_int_287
#define __pyx_int_288 __pyx_mstate_global->__pyx_int_288
#define __pyx_int_289 __pyx_mstate_global->__pyx_int_289
#define __pyx_int_290 __pyx_mstate_global->__pyx_int_290
#define __pyx_int_291 __pyx_mstate_global->__pyx_int_291
#define __pyx_int_292 __pyx_mstate_global->__pyx_int_292
#define __pyx_int_293 __pyx_mstate_global->__pyx_int_293
#define __pyx_int_294 __pyx_mstate_global->__pyx_int_294
#define __pyx_int_295 __pyx_mstate_global->__pyx_int_295
#define __pyx_int_296 __pyx_mstate_global->__pyx_int_296
#define __pyx_int_297 __pyx_mstate_global->__pyx_int_297
#define __pyx_int_298 __pyx_mstate_global->__pyx_int_298
#define __pyx_int_299 __pyx_mstate_global->__pyx_int_299
#define __pyx_int_300 __pyx_mstate_global->__pyx_int_300
#define __pyx_int_301 __pyx_mstate_global->__pyx_int_301
#define __pyx_int_302 __pyx_mstate_global->__pyx_int_302
#define __pyx_int_303 __pyx_mstate_global->__pyx_int_303
#define __pyx_int_304 __pyx_mstate_global->__pyx_int_304
#define __pyx_int_305 __pyx_mstate_global->__pyx_int_305
#define __pyx_int_306 __pyx_mstate_global->__pyx_int_306
#define __pyx_int_307 __pyx_mstate_global->__pyx_int_307
#define __pyx_int_308 __pyx_mstate_global->__pyx_int_308
#define __pyx_int_309 __pyx_mstate_global->__pyx_int_309
#define __pyx_int_310 __pyx_mstate_global->__pyx_int_310
#define __pyx_int_311 __pyx_mstate_global->__pyx_int_311
#define __pyx_int_312 __pyx_mstate_global->__pyx_int_312
#define __pyx_int_313 __pyx_mstate_global->__pyx_int_313
#define __pyx_int_314 __pyx_mstate_global->__pyx_int_314
#define __pyx_int_315 __pyx_mstate_global->__pyx_int_315
#define __pyx_int_316 __pyx_mstate_global->__pyx_int_316
#define __pyx_int_317 __pyx_mstate_global->__pyx_int_317
#define __pyx_int_318 __pyx_mstate_global->__pyx_int_318
#define __pyx_int_319 __pyx_mstate_global->__pyx_int_319
#define __pyx_int_320 __pyx_mstate_global->__pyx_int_320
#define __pyx_int_321 __pyx_mstate_global->__pyx_int_321
#define __pyx_int_322 __pyx_mstate_global->__pyx_int_322
#define __pyx_int_323 __pyx_mstate_global->__pyx_int_323
#define __pyx_int_324 __pyx_mstate_global->__pyx_int_324
#define __pyx_int_325 __pyx_mstate_global->__pyx_int_325
#define __pyx_int_326 __pyx_mstate_global->__pyx_int_326
#define __pyx_int_327 __pyx_mstate_global->__pyx_int_327
#define __pyx_int_328 __pyx_mstate_global->__pyx_int_328
#define __pyx_int_329 __pyx_mstate_global->__pyx_int_329
#define __pyx_int_330 __pyx_mstate_global->__pyx_int_330
#define __pyx_int_331 __pyx_mstate_global->__pyx_int_331
#define __pyx_int_332 __pyx_mstate_global->__pyx_int_332
#define __pyx_int_333 __pyx_mstate_global->__pyx_int_333
#define __pyx_int_334 __pyx_mstate_global->__pyx_int_334
#define __pyx_int_335 __pyx_mstate_global->__pyx_int_335
#define __pyx_int_336 __pyx_mstate_global->__pyx_int_336
#define __pyx_int_337 __pyx_mstate_global->__pyx_int_337
#define __pyx_int_338 __pyx_mstate_global->__pyx_int_338
#define __pyx_int_339 __pyx_mstate_global->__pyx_int_339
#define __pyx_int_340 __pyx_mstate_global->__pyx_int_340
#define __pyx_int_341 __pyx_mstate_global->__pyx_int_341
#define __pyx_int_342 __pyx_mstate_global->__pyx_int_342
#define __pyx_int_343 __pyx_mstate_global->__pyx_int_343
#define __pyx_int_344 __pyx_mstate_global->__pyx_int_344
#define __pyx_int_345 __pyx_mstate_global->__pyx_int_345
#define __pyx_int_346 __pyx_mstate_global->__pyx_int_346
#define __pyx_int_347 __pyx_mstate_global->__pyx_int_347
#define __pyx_int_348 __pyx_mstate_global->__pyx_int_348
#define __pyx_int_349 __pyx_mstate_global->__pyx_int_349
#define __pyx_int_350 __pyx_mstate_global->__pyx_int_350
#define __pyx_int_351 __pyx_mstate_global->__pyx_int_351
#define __pyx_int_352 __pyx_mstate_global->__pyx_int_352
#define __pyx_int_353 __pyx_mstate_global->__pyx_int_353
#define __pyx_int_354 __pyx_mstate_global->__pyx_int_354
#define __pyx_int_355 __pyx_mstate_global->__pyx_int_355
#define __pyx_int_356 __pyx_mstate_global->__pyx_int_356
#define __pyx_int_357 __pyx_mstate_global->__pyx_int_357
#define __pyx_int_358 __pyx_mstate_global->__pyx_int_358
#define __pyx_int_359 __pyx_mstate_global->__pyx_int_359
#define __pyx_int_360 __pyx_mstate_global->__pyx_int_360
#define __pyx_int_361 __pyx_mstate_global->__pyx_int_361
#define __pyx_int_362 __pyx_mstate_global->__pyx_int_362
#define __pyx_int_363 __pyx_mstate_global->__pyx_int_363
#define __pyx_int_364 __pyx_mstate_global->__pyx_int_364
#define __pyx_int_365 __pyx_mstate_global->__pyx_int_365
#define __pyx_int_366 __pyx_mstate_global->__pyx_int_366
#define __pyx_int_367 __pyx_mstate_global->__pyx_int_367
#define __pyx_int_368 __pyx_mstate_global->__pyx_int_368
#define __pyx_int_369 __pyx_mstate_global->__pyx_int_369
#define __pyx_int_370 __pyx_mstate_global->__pyx_int_370
#define __pyx_int_371 __pyx_mstate_global->__pyx_int_371
#define __pyx_int_372 __pyx_mstate_global->__pyx_int_372
#define __pyx_int_373 __pyx_mstate_global->__pyx_int_373
#define __pyx_int_374 __pyx_mstate_global->__pyx_int_374
#define __pyx_int_375 __pyx_mstate_global->__pyx_int_375
#define __pyx_int_376 __pyx_mstate_global->__pyx_int_376
#define __pyx_int_377 __pyx_mstate_global->__pyx_int_377
#define __pyx_int_378 __pyx_mstate_global->__pyx_int_378
#define __pyx_int_379 __pyx_mstate_global->__pyx_int_379
#define __pyx_int_380 __pyx_mstate_global->__pyx_int_380
#define __pyx_int_381 __pyx_mstate_global->__pyx_int_381
#define __pyx_int_382 __pyx_mstate_global->__pyx_int_382
#define __pyx_int_383 __pyx_mstate_global->__pyx_int_383
#define __pyx_int_384 __pyx_mstate_global->__pyx_int_384
#define __pyx_int_385 __pyx_mstate_global->__pyx_int_385
#define __pyx_int_386 __pyx_mstate_global->__pyx_int_386
#define __pyx_int_387 __pyx_mstate_global->__pyx_int_387
#define __pyx_int_388 __pyx_mstate_global->__pyx_int_388
#define __pyx_int_389 __pyx_mstate_global->__pyx_int_389
#define __pyx_int_390 __pyx_mstate_global->__pyx_int_390
#define __pyx_int_391 __pyx_mstate_global->__pyx_int_391
#define __pyx_int_392 __pyx_mstate_global->__pyx_int_392
#define __pyx_int_393 __pyx_mstate_global->__pyx_int_393
#define __pyx_int_394 __pyx_mstate_global->__pyx_int_394
#define __pyx_int_395 __pyx_mstate_global->__pyx_int_395
#define __pyx_int_396 __pyx_mstate_global->__pyx_int_396
#define __pyx_int_397 __pyx_mstate_global->__pyx_int_397
#define __pyx_int_398 __pyx_mstate_global->__pyx_int_398
#define __pyx_int_399 __pyx_mstate_global->__pyx_int_399
#define __pyx_int_400 __pyx_mstate_global->__pyx_int_400
#define __pyx_int_401 __pyx_mstate_global->__pyx_int_401
#define __pyx_int_402 __pyx_mstate_global->__pyx_int_402
#define __pyx_int_403 __pyx_mstate_global->__pyx_int_403
#define __pyx_int_404 __pyx_mstate_global->__pyx_int_404
#define __pyx_int_405 __pyx_mstate_global->__pyx_int_405
#define __pyx_int_406 __pyx_mstate_global->__pyx_int_406
#define __pyx_int_407 __pyx_mstate_global->__pyx_int_407
#define __pyx_int_408 __pyx_mstate_global->__pyx_int_408
#define __pyx_int_409 __pyx_mstate_global->__pyx_int_409
#define __pyx_int_410 __pyx_mstate_global->__pyx_int_410
#define __pyx_int_411 __pyx_mstate_global->__pyx_int_411
#define __pyx_int_412 __pyx_mstate_global->__pyx_int_412
#define __pyx_int_413 __pyx_mstate_global->__pyx_int_413
#define __pyx_int_414 __pyx_mstate_global->__pyx_int_414
#define __pyx_int_552 __pyx_mstate_global->__pyx_int_552
#define __pyx_int_887 __pyx_mstate_global->__pyx_int_887
#define __pyx_int_888 __pyx_mstate_global->__pyx_int_888
#define __pyx_int_962 __pyx_mstate_global->__pyx_int_962
#define __pyx_int_1260 __pyx_mstate_global->__pyx_int_1260
#define __pyx_int_1288 __pyx_mstate_global->__pyx_int_1288
#define __pyx_int_3552 __pyx_mstate_global->__pyx_int_3552
#define __pyx_int_4878 __pyx_mstate_global->__pyx_int_4878
#define __pyx_int_5110 __pyx_mstate_global->__pyx_int_5110
#define __pyx_int_10000 __pyx_mstate_global->__pyx_int_10000
#define __pyx_int_11031 __pyx_mstate_global->__pyx_int_11031
#define __pyx_int_12846 __pyx_mstate_global->__pyx_int_12846
#define __pyx_int_17661 __pyx_mstate_global->__pyx_int_17661
#define __pyx_int_19536 __pyx_mstate_global->__pyx_int_19536
#define __pyx_int_27436 __pyx_mstate_global->__pyx_int_27436
#define __pyx_int_32768 __pyx_mstate_global->__pyx_int_32768
#define __pyx_int_85263 __pyx_mstate_global->__pyx_int_85263
#define __pyx_int_168030 __pyx_mstate_global->__pyx_int_168030
#define __pyx_int_379799 __pyx_mstate_global->__pyx_int_379799
#define __pyx_int_1008906 __pyx_mstate_global->__pyx_int_1008906
#define __pyx_int_60959262 __pyx_mstate_global->__pyx_int_60959262
#define __pyx_int_64961464 __pyx_mstate_global->__pyx_int_64961464
#define __pyx_int_94173347 __pyx_mstate_global->__pyx_int_94173347
#define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1
#define __pyx_int_neg_3 __pyx_mstate_global->__pyx_int_neg_3
#define __pyx_k__85 __pyx_mstate_global->__pyx_k__85
#define __pyx_k__108 __pyx_mstate_global->__pyx_k__108
#define __pyx_k__130 __pyx_mstate_global->__pyx_k__130
#define __pyx_slice__3 __pyx_mstate_global->__pyx_slice__3
#define __pyx_slice__4 __pyx_mstate_global->__pyx_slice__4
#define __pyx_tuple__5 __pyx_mstate_global->__pyx_tuple__5
#define __pyx_slice__34 __pyx_mstate_global->__pyx_slice__34
#define __pyx_slice__92 __pyx_mstate_global->__pyx_slice__92
#define __pyx_tuple__10 __pyx_mstate_global->__pyx_tuple__10
#define __pyx_tuple__11 __pyx_mstate_global->__pyx_tuple__11
#define __pyx_tuple__14 __pyx_mstate_global->__pyx_tuple__14
#define __pyx_tuple__15 __pyx_mstate_global->__pyx_tuple__15
#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__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__31 __pyx_mstate_global->__pyx_tuple__31
#define __pyx_tuple__35 __pyx_mstate_global->__pyx_tuple__35
#define __pyx_tuple__36 __pyx_mstate_global->__pyx_tuple__36
#define __pyx_tuple__37 __pyx_mstate_global->__pyx_tuple__37
#define __pyx_tuple__39 __pyx_mstate_global->__pyx_tuple__39
#define __pyx_tuple__40 __pyx_mstate_global->__pyx_tuple__40
#define __pyx_tuple__41 __pyx_mstate_global->__pyx_tuple__41
#define __pyx_tuple__42 __pyx_mstate_global->__pyx_tuple__42
#define __pyx_tuple__43 __pyx_mstate_global->__pyx_tuple__43
#define __pyx_tuple__44 __pyx_mstate_global->__pyx_tuple__44
#define __pyx_tuple__45 __pyx_mstate_global->__pyx_tuple__45
#define __pyx_tuple__46 __pyx_mstate_global->__pyx_tuple__46
#define __pyx_tuple__47 __pyx_mstate_global->__pyx_tuple__47
#define __pyx_tuple__48 __pyx_mstate_global->__pyx_tuple__48
#define __pyx_tuple__49 __pyx_mstate_global->__pyx_tuple__49
#define __pyx_tuple__50 __pyx_mstate_global->__pyx_tuple__50
#define __pyx_tuple__51 __pyx_mstate_global->__pyx_tuple__51
#define __pyx_tuple__52 __pyx_mstate_global->__pyx_tuple__52
#define __pyx_tuple__53 __pyx_mstate_global->__pyx_tuple__53
#define __pyx_tuple__54 __pyx_mstate_global->__pyx_tuple__54
#define __pyx_tuple__55 __pyx_mstate_global->__pyx_tuple__55
#define __pyx_tuple__56 __pyx_mstate_global->__pyx_tuple__56
#define __pyx_tuple__57 __pyx_mstate_global->__pyx_tuple__57
#define __pyx_tuple__58 __pyx_mstate_global->__pyx_tuple__58
#define __pyx_tuple__59 __pyx_mstate_global->__pyx_tuple__59
#define __pyx_tuple__60 __pyx_mstate_global->__pyx_tuple__60
#define __pyx_tuple__61 __pyx_mstate_global->__pyx_tuple__61
#define __pyx_tuple__62 __pyx_mstate_global->__pyx_tuple__62
#define __pyx_tuple__63 __pyx_mstate_global->__pyx_tuple__63
#define __pyx_tuple__64 __pyx_mstate_global->__pyx_tuple__64
#define __pyx_tuple__65 __pyx_mstate_global->__pyx_tuple__65
#define __pyx_tuple__66 __pyx_mstate_global->__pyx_tuple__66
#define __pyx_tuple__67 __pyx_mstate_global->__pyx_tuple__67
#define __pyx_tuple__68 __pyx_mstate_global->__pyx_tuple__68
#define __pyx_tuple__69 __pyx_mstate_global->__pyx_tuple__69
#define __pyx_tuple__71 __pyx_mstate_global->__pyx_tuple__71
#define __pyx_tuple__72 __pyx_mstate_global->__pyx_tuple__72
#define __pyx_tuple__73 __pyx_mstate_global->__pyx_tuple__73
#define __pyx_tuple__74 __pyx_mstate_global->__pyx_tuple__74
#define __pyx_tuple__75 __pyx_mstate_global->__pyx_tuple__75
#define __pyx_tuple__76 __pyx_mstate_global->__pyx_tuple__76
#define __pyx_tuple__77 __pyx_mstate_global->__pyx_tuple__77
#define __pyx_tuple__78 __pyx_mstate_global->__pyx_tuple__78
#define __pyx_tuple__79 __pyx_mstate_global->__pyx_tuple__79
#define __pyx_tuple__80 __pyx_mstate_global->__pyx_tuple__80
#define __pyx_tuple__81 __pyx_mstate_global->__pyx_tuple__81
#define __pyx_tuple__82 __pyx_mstate_global->__pyx_tuple__82
#define __pyx_tuple__83 __pyx_mstate_global->__pyx_tuple__83
#define __pyx_tuple__84 __pyx_mstate_global->__pyx_tuple__84
#define __pyx_tuple__86 __pyx_mstate_global->__pyx_tuple__86
#define __pyx_tuple__87 __pyx_mstate_global->__pyx_tuple__87
#define __pyx_tuple__88 __pyx_mstate_global->__pyx_tuple__88
#define __pyx_tuple__89 __pyx_mstate_global->__pyx_tuple__89
#define __pyx_tuple__90 __pyx_mstate_global->__pyx_tuple__90
#define __pyx_tuple__91 __pyx_mstate_global->__pyx_tuple__91
#define __pyx_tuple__93 __pyx_mstate_global->__pyx_tuple__93
#define __pyx_tuple__94 __pyx_mstate_global->__pyx_tuple__94
#define __pyx_tuple__95 __pyx_mstate_global->__pyx_tuple__95
#define __pyx_tuple__96 __pyx_mstate_global->__pyx_tuple__96
#define __pyx_tuple__97 __pyx_mstate_global->__pyx_tuple__97
#define __pyx_tuple__98 __pyx_mstate_global->__pyx_tuple__98
#define __pyx_tuple__99 __pyx_mstate_global->__pyx_tuple__99
#define __pyx_codeobj__6 __pyx_mstate_global->__pyx_codeobj__6
#define __pyx_slice__110 __pyx_mstate_global->__pyx_slice__110
#define __pyx_slice__128 __pyx_mstate_global->__pyx_slice__128
#define __pyx_tuple__100 __pyx_mstate_global->__pyx_tuple__100
#define __pyx_tuple__101 __pyx_mstate_global->__pyx_tuple__101
#define __pyx_tuple__102 __pyx_mstate_global->__pyx_tuple__102
#define __pyx_tuple__103 __pyx_mstate_global->__pyx_tuple__103
#define __pyx_tuple__104 __pyx_mstate_global->__pyx_tuple__104
#define __pyx_tuple__105 __pyx_mstate_global->__pyx_tuple__105
#define __pyx_tuple__106 __pyx_mstate_global->__pyx_tuple__106
#define __pyx_tuple__107 __pyx_mstate_global->__pyx_tuple__107
#define __pyx_tuple__109 __pyx_mstate_global->__pyx_tuple__109
#define __pyx_tuple__112 __pyx_mstate_global->__pyx_tuple__112
#define __pyx_tuple__113 __pyx_mstate_global->__pyx_tuple__113
#define __pyx_tuple__119 __pyx_mstate_global->__pyx_tuple__119
#define __pyx_tuple__120 __pyx_mstate_global->__pyx_tuple__120
#define __pyx_tuple__121 __pyx_mstate_global->__pyx_tuple__121
#define __pyx_tuple__122 __pyx_mstate_global->__pyx_tuple__122
#define __pyx_tuple__123 __pyx_mstate_global->__pyx_tuple__123
#define __pyx_tuple__124 __pyx_mstate_global->__pyx_tuple__124
#define __pyx_tuple__125 __pyx_mstate_global->__pyx_tuple__125
#define __pyx_tuple__126 __pyx_mstate_global->__pyx_tuple__126
#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__132 __pyx_mstate_global->__pyx_tuple__132
#define __pyx_tuple__133 __pyx_mstate_global->__pyx_tuple__133
#define __pyx_tuple__134 __pyx_mstate_global->__pyx_tuple__134
#define __pyx_tuple__135 __pyx_mstate_global->__pyx_tuple__135
#define __pyx_tuple__136 __pyx_mstate_global->__pyx_tuple__136
#define __pyx_tuple__137 __pyx_mstate_global->__pyx_tuple__137
#define __pyx_tuple__138 __pyx_mstate_global->__pyx_tuple__138
#define __pyx_tuple__139 __pyx_mstate_global->__pyx_tuple__139
#define __pyx_tuple__140 __pyx_mstate_global->__pyx_tuple__140
#define __pyx_tuple__141 __pyx_mstate_global->__pyx_tuple__141
#define __pyx_tuple__142 __pyx_mstate_global->__pyx_tuple__142
#define __pyx_tuple__143 __pyx_mstate_global->__pyx_tuple__143
#define __pyx_tuple__145 __pyx_mstate_global->__pyx_tuple__145
#define __pyx_tuple__146 __pyx_mstate_global->__pyx_tuple__146
#define __pyx_tuple__147 __pyx_mstate_global->__pyx_tuple__147
#define __pyx_tuple__148 __pyx_mstate_global->__pyx_tuple__148
#define __pyx_tuple__149 __pyx_mstate_global->__pyx_tuple__149
#define __pyx_tuple__151 __pyx_mstate_global->__pyx_tuple__151
#define __pyx_tuple__152 __pyx_mstate_global->__pyx_tuple__152
#define __pyx_tuple__153 __pyx_mstate_global->__pyx_tuple__153
#define __pyx_tuple__154 __pyx_mstate_global->__pyx_tuple__154
#define __pyx_tuple__155 __pyx_mstate_global->__pyx_tuple__155
#define __pyx_tuple__156 __pyx_mstate_global->__pyx_tuple__156
#define __pyx_tuple__157 __pyx_mstate_global->__pyx_tuple__157
#define __pyx_tuple__158 __pyx_mstate_global->__pyx_tuple__158
#define __pyx_tuple__159 __pyx_mstate_global->__pyx_tuple__159
#define __pyx_tuple__160 __pyx_mstate_global->__pyx_tuple__160
#define __pyx_tuple__161 __pyx_mstate_global->__pyx_tuple__161
#define __pyx_tuple__162 __pyx_mstate_global->__pyx_tuple__162
#define __pyx_tuple__163 __pyx_mstate_global->__pyx_tuple__163
#define __pyx_tuple__164 __pyx_mstate_global->__pyx_tuple__164
#define __pyx_tuple__165 __pyx_mstate_global->__pyx_tuple__165
#define __pyx_tuple__166 __pyx_mstate_global->__pyx_tuple__166
#define __pyx_tuple__167 __pyx_mstate_global->__pyx_tuple__167
#define __pyx_tuple__168 __pyx_mstate_global->__pyx_tuple__168
#define __pyx_tuple__169 __pyx_mstate_global->__pyx_tuple__169
#define __pyx_tuple__171 __pyx_mstate_global->__pyx_tuple__171
#define __pyx_tuple__172 __pyx_mstate_global->__pyx_tuple__172
#define __pyx_tuple__173 __pyx_mstate_global->__pyx_tuple__173
#define __pyx_tuple__176 __pyx_mstate_global->__pyx_tuple__176
#define __pyx_tuple__178 __pyx_mstate_global->__pyx_tuple__178
#define __pyx_tuple__180 __pyx_mstate_global->__pyx_tuple__180
#define __pyx_tuple__182 __pyx_mstate_global->__pyx_tuple__182
#define __pyx_tuple__185 __pyx_mstate_global->__pyx_tuple__185
#define __pyx_tuple__189 __pyx_mstate_global->__pyx_tuple__189
#define __pyx_tuple__192 __pyx_mstate_global->__pyx_tuple__192
#define __pyx_tuple__194 __pyx_mstate_global->__pyx_tuple__194
#define __pyx_tuple__196 __pyx_mstate_global->__pyx_tuple__196
#define __pyx_tuple__198 __pyx_mstate_global->__pyx_tuple__198
#define __pyx_tuple__201 __pyx_mstate_global->__pyx_tuple__201
#define __pyx_tuple__203 __pyx_mstate_global->__pyx_tuple__203
#define __pyx_tuple__208 __pyx_mstate_global->__pyx_tuple__208
#define __pyx_tuple__210 __pyx_mstate_global->__pyx_tuple__210
#define __pyx_tuple__213 __pyx_mstate_global->__pyx_tuple__213
#define __pyx_tuple__215 __pyx_mstate_global->__pyx_tuple__215
#define __pyx_tuple__217 __pyx_mstate_global->__pyx_tuple__217
#define __pyx_tuple__219 __pyx_mstate_global->__pyx_tuple__219
#define __pyx_tuple__221 __pyx_mstate_global->__pyx_tuple__221
#define __pyx_tuple__227 __pyx_mstate_global->__pyx_tuple__227
#define __pyx_tuple__229 __pyx_mstate_global->__pyx_tuple__229
#define __pyx_tuple__231 __pyx_mstate_global->__pyx_tuple__231
#define __pyx_tuple__233 __pyx_mstate_global->__pyx_tuple__233
#define __pyx_tuple__234 __pyx_mstate_global->__pyx_tuple__234
#define __pyx_tuple__236 __pyx_mstate_global->__pyx_tuple__236
#define __pyx_tuple__238 __pyx_mstate_global->__pyx_tuple__238
#define __pyx_tuple__241 __pyx_mstate_global->__pyx_tuple__241
#define __pyx_tuple__244 __pyx_mstate_global->__pyx_tuple__244
#define __pyx_tuple__246 __pyx_mstate_global->__pyx_tuple__246
#define __pyx_tuple__248 __pyx_mstate_global->__pyx_tuple__248
#define __pyx_tuple__250 __pyx_mstate_global->__pyx_tuple__250
#define __pyx_tuple__252 __pyx_mstate_global->__pyx_tuple__252
#define __pyx_tuple__254 __pyx_mstate_global->__pyx_tuple__254
#define __pyx_tuple__256 __pyx_mstate_global->__pyx_tuple__256
#define __pyx_tuple__257 __pyx_mstate_global->__pyx_tuple__257
#define __pyx_tuple__259 __pyx_mstate_global->__pyx_tuple__259
#define __pyx_tuple__260 __pyx_mstate_global->__pyx_tuple__260
#define __pyx_tuple__262 __pyx_mstate_global->__pyx_tuple__262
#define __pyx_tuple__266 __pyx_mstate_global->__pyx_tuple__266
#define __pyx_tuple__268 __pyx_mstate_global->__pyx_tuple__268
#define __pyx_tuple__270 __pyx_mstate_global->__pyx_tuple__270
#define __pyx_tuple__271 __pyx_mstate_global->__pyx_tuple__271
#define __pyx_tuple__273 __pyx_mstate_global->__pyx_tuple__273
#define __pyx_tuple__275 __pyx_mstate_global->__pyx_tuple__275
#define __pyx_tuple__277 __pyx_mstate_global->__pyx_tuple__277
#define __pyx_tuple__279 __pyx_mstate_global->__pyx_tuple__279
#define __pyx_tuple__281 __pyx_mstate_global->__pyx_tuple__281
#define __pyx_tuple__283 __pyx_mstate_global->__pyx_tuple__283
#define __pyx_tuple__284 __pyx_mstate_global->__pyx_tuple__284
#define __pyx_tuple__288 __pyx_mstate_global->__pyx_tuple__288
#define __pyx_tuple__290 __pyx_mstate_global->__pyx_tuple__290
#define __pyx_tuple__292 __pyx_mstate_global->__pyx_tuple__292
#define __pyx_tuple__294 __pyx_mstate_global->__pyx_tuple__294
#define __pyx_tuple__297 __pyx_mstate_global->__pyx_tuple__297
#define __pyx_tuple__299 __pyx_mstate_global->__pyx_tuple__299
#define __pyx_tuple__301 __pyx_mstate_global->__pyx_tuple__301
#define __pyx_tuple__302 __pyx_mstate_global->__pyx_tuple__302
#define __pyx_tuple__304 __pyx_mstate_global->__pyx_tuple__304
#define __pyx_tuple__307 __pyx_mstate_global->__pyx_tuple__307
#define __pyx_tuple__309 __pyx_mstate_global->__pyx_tuple__309
#define __pyx_tuple__312 __pyx_mstate_global->__pyx_tuple__312
#define __pyx_tuple__314 __pyx_mstate_global->__pyx_tuple__314
#define __pyx_tuple__316 __pyx_mstate_global->__pyx_tuple__316
#define __pyx_tuple__317 __pyx_mstate_global->__pyx_tuple__317
#define __pyx_tuple__319 __pyx_mstate_global->__pyx_tuple__319
#define __pyx_tuple__320 __pyx_mstate_global->__pyx_tuple__320
#define __pyx_tuple__322 __pyx_mstate_global->__pyx_tuple__322
#define __pyx_tuple__324 __pyx_mstate_global->__pyx_tuple__324
#define __pyx_tuple__325 __pyx_mstate_global->__pyx_tuple__325
#define __pyx_tuple__327 __pyx_mstate_global->__pyx_tuple__327
#define __pyx_tuple__329 __pyx_mstate_global->__pyx_tuple__329
#define __pyx_tuple__331 __pyx_mstate_global->__pyx_tuple__331
#define __pyx_tuple__336 __pyx_mstate_global->__pyx_tuple__336
#define __pyx_tuple__338 __pyx_mstate_global->__pyx_tuple__338
#define __pyx_tuple__340 __pyx_mstate_global->__pyx_tuple__340
#define __pyx_tuple__341 __pyx_mstate_global->__pyx_tuple__341
#define __pyx_tuple__343 __pyx_mstate_global->__pyx_tuple__343
#define __pyx_tuple__345 __pyx_mstate_global->__pyx_tuple__345
#define __pyx_tuple__347 __pyx_mstate_global->__pyx_tuple__347
#define __pyx_tuple__349 __pyx_mstate_global->__pyx_tuple__349
#define __pyx_tuple__350 __pyx_mstate_global->__pyx_tuple__350
#define __pyx_tuple__352 __pyx_mstate_global->__pyx_tuple__352
#define __pyx_tuple__354 __pyx_mstate_global->__pyx_tuple__354
#define __pyx_tuple__355 __pyx_mstate_global->__pyx_tuple__355
#define __pyx_tuple__357 __pyx_mstate_global->__pyx_tuple__357
#define __pyx_tuple__358 __pyx_mstate_global->__pyx_tuple__358
#define __pyx_tuple__361 __pyx_mstate_global->__pyx_tuple__361
#define __pyx_tuple__363 __pyx_mstate_global->__pyx_tuple__363
#define __pyx_tuple__365 __pyx_mstate_global->__pyx_tuple__365
#define __pyx_tuple__367 __pyx_mstate_global->__pyx_tuple__367
#define __pyx_tuple__369 __pyx_mstate_global->__pyx_tuple__369
#define __pyx_tuple__370 __pyx_mstate_global->__pyx_tuple__370
#define __pyx_tuple__372 __pyx_mstate_global->__pyx_tuple__372
#define __pyx_tuple__374 __pyx_mstate_global->__pyx_tuple__374
#define __pyx_tuple__376 __pyx_mstate_global->__pyx_tuple__376
#define __pyx_tuple__378 __pyx_mstate_global->__pyx_tuple__378
#define __pyx_tuple__380 __pyx_mstate_global->__pyx_tuple__380
#define __pyx_tuple__382 __pyx_mstate_global->__pyx_tuple__382
#define __pyx_tuple__384 __pyx_mstate_global->__pyx_tuple__384
#define __pyx_tuple__386 __pyx_mstate_global->__pyx_tuple__386
#define __pyx_tuple__388 __pyx_mstate_global->__pyx_tuple__388
#define __pyx_tuple__390 __pyx_mstate_global->__pyx_tuple__390
#define __pyx_tuple__392 __pyx_mstate_global->__pyx_tuple__392
#define __pyx_tuple__394 __pyx_mstate_global->__pyx_tuple__394
#define __pyx_tuple__397 __pyx_mstate_global->__pyx_tuple__397
#define __pyx_tuple__400 __pyx_mstate_global->__pyx_tuple__400
#define __pyx_tuple__402 __pyx_mstate_global->__pyx_tuple__402
#define __pyx_tuple__404 __pyx_mstate_global->__pyx_tuple__404
#define __pyx_tuple__407 __pyx_mstate_global->__pyx_tuple__407
#define __pyx_tuple__409 __pyx_mstate_global->__pyx_tuple__409
#define __pyx_tuple__411 __pyx_mstate_global->__pyx_tuple__411
#define __pyx_tuple__413 __pyx_mstate_global->__pyx_tuple__413
#define __pyx_tuple__415 __pyx_mstate_global->__pyx_tuple__415
#define __pyx_tuple__416 __pyx_mstate_global->__pyx_tuple__416
#define __pyx_tuple__420 __pyx_mstate_global->__pyx_tuple__420
#define __pyx_tuple__422 __pyx_mstate_global->__pyx_tuple__422
#define __pyx_tuple__423 __pyx_mstate_global->__pyx_tuple__423
#define __pyx_tuple__425 __pyx_mstate_global->__pyx_tuple__425
#define __pyx_tuple__427 __pyx_mstate_global->__pyx_tuple__427
#define __pyx_tuple__429 __pyx_mstate_global->__pyx_tuple__429
#define __pyx_tuple__431 __pyx_mstate_global->__pyx_tuple__431
#define __pyx_tuple__432 __pyx_mstate_global->__pyx_tuple__432
#define __pyx_tuple__434 __pyx_mstate_global->__pyx_tuple__434
#define __pyx_tuple__435 __pyx_mstate_global->__pyx_tuple__435
#define __pyx_tuple__437 __pyx_mstate_global->__pyx_tuple__437
#define __pyx_tuple__439 __pyx_mstate_global->__pyx_tuple__439
#define __pyx_tuple__441 __pyx_mstate_global->__pyx_tuple__441
#define __pyx_tuple__443 __pyx_mstate_global->__pyx_tuple__443
#define __pyx_tuple__444 __pyx_mstate_global->__pyx_tuple__444
#define __pyx_tuple__446 __pyx_mstate_global->__pyx_tuple__446
#define __pyx_tuple__448 __pyx_mstate_global->__pyx_tuple__448
#define __pyx_tuple__450 __pyx_mstate_global->__pyx_tuple__450
#define __pyx_tuple__452 __pyx_mstate_global->__pyx_tuple__452
#define __pyx_tuple__454 __pyx_mstate_global->__pyx_tuple__454
#define __pyx_tuple__456 __pyx_mstate_global->__pyx_tuple__456
#define __pyx_tuple__458 __pyx_mstate_global->__pyx_tuple__458
#define __pyx_tuple__460 __pyx_mstate_global->__pyx_tuple__460
#define __pyx_tuple__465 __pyx_mstate_global->__pyx_tuple__465
#define __pyx_tuple__467 __pyx_mstate_global->__pyx_tuple__467
#define __pyx_tuple__471 __pyx_mstate_global->__pyx_tuple__471
#define __pyx_tuple__473 __pyx_mstate_global->__pyx_tuple__473
#define __pyx_tuple__475 __pyx_mstate_global->__pyx_tuple__475
#define __pyx_tuple__477 __pyx_mstate_global->__pyx_tuple__477
#define __pyx_tuple__479 __pyx_mstate_global->__pyx_tuple__479
#define __pyx_tuple__481 __pyx_mstate_global->__pyx_tuple__481
#define __pyx_tuple__483 __pyx_mstate_global->__pyx_tuple__483
#define __pyx_tuple__485 __pyx_mstate_global->__pyx_tuple__485
#define __pyx_tuple__487 __pyx_mstate_global->__pyx_tuple__487
#define __pyx_tuple__489 __pyx_mstate_global->__pyx_tuple__489
#define __pyx_tuple__491 __pyx_mstate_global->__pyx_tuple__491
#define __pyx_tuple__496 __pyx_mstate_global->__pyx_tuple__496
#define __pyx_tuple__498 __pyx_mstate_global->__pyx_tuple__498
#define __pyx_tuple__500 __pyx_mstate_global->__pyx_tuple__500
#define __pyx_tuple__501 __pyx_mstate_global->__pyx_tuple__501
#define __pyx_tuple__503 __pyx_mstate_global->__pyx_tuple__503
#define __pyx_tuple__505 __pyx_mstate_global->__pyx_tuple__505
#define __pyx_tuple__507 __pyx_mstate_global->__pyx_tuple__507
#define __pyx_tuple__509 __pyx_mstate_global->__pyx_tuple__509
#define __pyx_tuple__511 __pyx_mstate_global->__pyx_tuple__511
#define __pyx_tuple__514 __pyx_mstate_global->__pyx_tuple__514
#define __pyx_tuple__517 __pyx_mstate_global->__pyx_tuple__517
#define __pyx_tuple__519 __pyx_mstate_global->__pyx_tuple__519
#define __pyx_tuple__521 __pyx_mstate_global->__pyx_tuple__521
#define __pyx_tuple__525 __pyx_mstate_global->__pyx_tuple__525
#define __pyx_tuple__527 __pyx_mstate_global->__pyx_tuple__527
#define __pyx_tuple__536 __pyx_mstate_global->__pyx_tuple__536
#define __pyx_tuple__538 __pyx_mstate_global->__pyx_tuple__538
#define __pyx_tuple__542 __pyx_mstate_global->__pyx_tuple__542
#define __pyx_tuple__546 __pyx_mstate_global->__pyx_tuple__546
#define __pyx_tuple__550 __pyx_mstate_global->__pyx_tuple__550
#define __pyx_tuple__552 __pyx_mstate_global->__pyx_tuple__552
#define __pyx_tuple__554 __pyx_mstate_global->__pyx_tuple__554
#define __pyx_tuple__556 __pyx_mstate_global->__pyx_tuple__556
#define __pyx_tuple__558 __pyx_mstate_global->__pyx_tuple__558
#define __pyx_tuple__568 __pyx_mstate_global->__pyx_tuple__568
#define __pyx_tuple__572 __pyx_mstate_global->__pyx_tuple__572
#define __pyx_tuple__574 __pyx_mstate_global->__pyx_tuple__574
#define __pyx_tuple__575 __pyx_mstate_global->__pyx_tuple__575
#define __pyx_tuple__577 __pyx_mstate_global->__pyx_tuple__577
#define __pyx_tuple__580 __pyx_mstate_global->__pyx_tuple__580
#define __pyx_tuple__582 __pyx_mstate_global->__pyx_tuple__582
#define __pyx_tuple__584 __pyx_mstate_global->__pyx_tuple__584
#define __pyx_tuple__586 __pyx_mstate_global->__pyx_tuple__586
#define __pyx_tuple__591 __pyx_mstate_global->__pyx_tuple__591
#define __pyx_tuple__593 __pyx_mstate_global->__pyx_tuple__593
#define __pyx_tuple__595 __pyx_mstate_global->__pyx_tuple__595
#define __pyx_tuple__597 __pyx_mstate_global->__pyx_tuple__597
#define __pyx_tuple__599 __pyx_mstate_global->__pyx_tuple__599
#define __pyx_tuple__601 __pyx_mstate_global->__pyx_tuple__601
#define __pyx_tuple__603 __pyx_mstate_global->__pyx_tuple__603
#define __pyx_tuple__605 __pyx_mstate_global->__pyx_tuple__605
#define __pyx_tuple__606 __pyx_mstate_global->__pyx_tuple__606
#define __pyx_tuple__609 __pyx_mstate_global->__pyx_tuple__609
#define __pyx_tuple__611 __pyx_mstate_global->__pyx_tuple__611
#define __pyx_tuple__613 __pyx_mstate_global->__pyx_tuple__613
#define __pyx_tuple__616 __pyx_mstate_global->__pyx_tuple__616
#define __pyx_tuple__618 __pyx_mstate_global->__pyx_tuple__618
#define __pyx_tuple__620 __pyx_mstate_global->__pyx_tuple__620
#define __pyx_tuple__624 __pyx_mstate_global->__pyx_tuple__624
#define __pyx_tuple__626 __pyx_mstate_global->__pyx_tuple__626
#define __pyx_tuple__629 __pyx_mstate_global->__pyx_tuple__629
#define __pyx_tuple__631 __pyx_mstate_global->__pyx_tuple__631
#define __pyx_tuple__633 __pyx_mstate_global->__pyx_tuple__633
#define __pyx_tuple__635 __pyx_mstate_global->__pyx_tuple__635
#define __pyx_tuple__637 __pyx_mstate_global->__pyx_tuple__637
#define __pyx_tuple__638 __pyx_mstate_global->__pyx_tuple__638
#define __pyx_tuple__640 __pyx_mstate_global->__pyx_tuple__640
#define __pyx_tuple__642 __pyx_mstate_global->__pyx_tuple__642
#define __pyx_tuple__644 __pyx_mstate_global->__pyx_tuple__644
#define __pyx_tuple__647 __pyx_mstate_global->__pyx_tuple__647
#define __pyx_tuple__648 __pyx_mstate_global->__pyx_tuple__648
#define __pyx_tuple__649 __pyx_mstate_global->__pyx_tuple__649
#define __pyx_tuple__650 __pyx_mstate_global->__pyx_tuple__650
#define __pyx_tuple__651 __pyx_mstate_global->__pyx_tuple__651
#define __pyx_tuple__652 __pyx_mstate_global->__pyx_tuple__652
#define __pyx_tuple__654 __pyx_mstate_global->__pyx_tuple__654
#define __pyx_tuple__655 __pyx_mstate_global->__pyx_tuple__655
#define __pyx_tuple__657 __pyx_mstate_global->__pyx_tuple__657
#define __pyx_tuple__659 __pyx_mstate_global->__pyx_tuple__659
#define __pyx_tuple__660 __pyx_mstate_global->__pyx_tuple__660
#define __pyx_tuple__661 __pyx_mstate_global->__pyx_tuple__661
#define __pyx_tuple__662 __pyx_mstate_global->__pyx_tuple__662
#define __pyx_tuple__663 __pyx_mstate_global->__pyx_tuple__663
#define __pyx_tuple__664 __pyx_mstate_global->__pyx_tuple__664
#define __pyx_tuple__665 __pyx_mstate_global->__pyx_tuple__665
#define __pyx_tuple__667 __pyx_mstate_global->__pyx_tuple__667
#define __pyx_tuple__669 __pyx_mstate_global->__pyx_tuple__669
#define __pyx_tuple__671 __pyx_mstate_global->__pyx_tuple__671
#define __pyx_tuple__673 __pyx_mstate_global->__pyx_tuple__673
#define __pyx_tuple__675 __pyx_mstate_global->__pyx_tuple__675
#define __pyx_tuple__677 __pyx_mstate_global->__pyx_tuple__677
#define __pyx_tuple__682 __pyx_mstate_global->__pyx_tuple__682
#define __pyx_tuple__683 __pyx_mstate_global->__pyx_tuple__683
#define __pyx_tuple__684 __pyx_mstate_global->__pyx_tuple__684
#define __pyx_tuple__685 __pyx_mstate_global->__pyx_tuple__685
#define __pyx_tuple__686 __pyx_mstate_global->__pyx_tuple__686
#define __pyx_tuple__689 __pyx_mstate_global->__pyx_tuple__689
#define __pyx_tuple__693 __pyx_mstate_global->__pyx_tuple__693
#define __pyx_tuple__695 __pyx_mstate_global->__pyx_tuple__695
#define __pyx_tuple__696 __pyx_mstate_global->__pyx_tuple__696
#define __pyx_tuple__698 __pyx_mstate_global->__pyx_tuple__698
#define __pyx_tuple__700 __pyx_mstate_global->__pyx_tuple__700
#define __pyx_tuple__707 __pyx_mstate_global->__pyx_tuple__707
#define __pyx_tuple__709 __pyx_mstate_global->__pyx_tuple__709
#define __pyx_tuple__711 __pyx_mstate_global->__pyx_tuple__711
#define __pyx_tuple__713 __pyx_mstate_global->__pyx_tuple__713
#define __pyx_tuple__715 __pyx_mstate_global->__pyx_tuple__715
#define __pyx_tuple__717 __pyx_mstate_global->__pyx_tuple__717
#define __pyx_tuple__719 __pyx_mstate_global->__pyx_tuple__719
#define __pyx_tuple__720 __pyx_mstate_global->__pyx_tuple__720
#define __pyx_tuple__722 __pyx_mstate_global->__pyx_tuple__722
#define __pyx_tuple__724 __pyx_mstate_global->__pyx_tuple__724
#define __pyx_codeobj__70 __pyx_mstate_global->__pyx_codeobj__70
#define __pyx_codeobj__174 __pyx_mstate_global->__pyx_codeobj__174
#define __pyx_codeobj__175 __pyx_mstate_global->__pyx_codeobj__175
#define __pyx_codeobj__177 __pyx_mstate_global->__pyx_codeobj__177
#define __pyx_codeobj__179 __pyx_mstate_global->__pyx_codeobj__179
#define __pyx_codeobj__181 __pyx_mstate_global->__pyx_codeobj__181
#define __pyx_codeobj__183 __pyx_mstate_global->__pyx_codeobj__183
#define __pyx_codeobj__184 __pyx_mstate_global->__pyx_codeobj__184
#define __pyx_codeobj__186 __pyx_mstate_global->__pyx_codeobj__186
#define __pyx_codeobj__187 __pyx_mstate_global->__pyx_codeobj__187
#define __pyx_codeobj__188 __pyx_mstate_global->__pyx_codeobj__188
#define __pyx_codeobj__190 __pyx_mstate_global->__pyx_codeobj__190
#define __pyx_codeobj__191 __pyx_mstate_global->__pyx_codeobj__191
#define __pyx_codeobj__193 __pyx_mstate_global->__pyx_codeobj__193
#define __pyx_codeobj__195 __pyx_mstate_global->__pyx_codeobj__195
#define __pyx_codeobj__197 __pyx_mstate_global->__pyx_codeobj__197
#define __pyx_codeobj__199 __pyx_mstate_global->__pyx_codeobj__199
#define __pyx_codeobj__200 __pyx_mstate_global->__pyx_codeobj__200
#define __pyx_codeobj__202 __pyx_mstate_global->__pyx_codeobj__202
#define __pyx_codeobj__204 __pyx_mstate_global->__pyx_codeobj__204
#define __pyx_codeobj__205 __pyx_mstate_global->__pyx_codeobj__205
#define __pyx_codeobj__206 __pyx_mstate_global->__pyx_codeobj__206
#define __pyx_codeobj__207 __pyx_mstate_global->__pyx_codeobj__207
#define __pyx_codeobj__209 __pyx_mstate_global->__pyx_codeobj__209
#define __pyx_codeobj__211 __pyx_mstate_global->__pyx_codeobj__211
#define __pyx_codeobj__212 __pyx_mstate_global->__pyx_codeobj__212
#define __pyx_codeobj__214 __pyx_mstate_global->__pyx_codeobj__214
#define __pyx_codeobj__216 __pyx_mstate_global->__pyx_codeobj__216
#define __pyx_codeobj__218 __pyx_mstate_global->__pyx_codeobj__218
#define __pyx_codeobj__220 __pyx_mstate_global->__pyx_codeobj__220
#define __pyx_codeobj__222 __pyx_mstate_global->__pyx_codeobj__222
#define __pyx_codeobj__223 __pyx_mstate_global->__pyx_codeobj__223
#define __pyx_codeobj__224 __pyx_mstate_global->__pyx_codeobj__224
#define __pyx_codeobj__225 __pyx_mstate_global->__pyx_codeobj__225
#define __pyx_codeobj__226 __pyx_mstate_global->__pyx_codeobj__226
#define __pyx_codeobj__228 __pyx_mstate_global->__pyx_codeobj__228
#define __pyx_codeobj__230 __pyx_mstate_global->__pyx_codeobj__230
#define __pyx_codeobj__232 __pyx_mstate_global->__pyx_codeobj__232
#define __pyx_codeobj__235 __pyx_mstate_global->__pyx_codeobj__235
#define __pyx_codeobj__237 __pyx_mstate_global->__pyx_codeobj__237
#define __pyx_codeobj__239 __pyx_mstate_global->__pyx_codeobj__239
#define __pyx_codeobj__240 __pyx_mstate_global->__pyx_codeobj__240
#define __pyx_codeobj__242 __pyx_mstate_global->__pyx_codeobj__242
#define __pyx_codeobj__243 __pyx_mstate_global->__pyx_codeobj__243
#define __pyx_codeobj__245 __pyx_mstate_global->__pyx_codeobj__245
#define __pyx_codeobj__247 __pyx_mstate_global->__pyx_codeobj__247
#define __pyx_codeobj__249 __pyx_mstate_global->__pyx_codeobj__249
#define __pyx_codeobj__251 __pyx_mstate_global->__pyx_codeobj__251
#define __pyx_codeobj__253 __pyx_mstate_global->__pyx_codeobj__253
#define __pyx_codeobj__255 __pyx_mstate_global->__pyx_codeobj__255
#define __pyx_codeobj__258 __pyx_mstate_global->__pyx_codeobj__258
#define __pyx_codeobj__261 __pyx_mstate_global->__pyx_codeobj__261
#define __pyx_codeobj__263 __pyx_mstate_global->__pyx_codeobj__263
#define __pyx_codeobj__264 __pyx_mstate_global->__pyx_codeobj__264
#define __pyx_codeobj__265 __pyx_mstate_global->__pyx_codeobj__265
#define __pyx_codeobj__267 __pyx_mstate_global->__pyx_codeobj__267
#define __pyx_codeobj__269 __pyx_mstate_global->__pyx_codeobj__269
#define __pyx_codeobj__272 __pyx_mstate_global->__pyx_codeobj__272
#define __pyx_codeobj__274 __pyx_mstate_global->__pyx_codeobj__274
#define __pyx_codeobj__276 __pyx_mstate_global->__pyx_codeobj__276
#define __pyx_codeobj__278 __pyx_mstate_global->__pyx_codeobj__278
#define __pyx_codeobj__280 __pyx_mstate_global->__pyx_codeobj__280
#define __pyx_codeobj__282 __pyx_mstate_global->__pyx_codeobj__282
#define __pyx_codeobj__285 __pyx_mstate_global->__pyx_codeobj__285
#define __pyx_codeobj__286 __pyx_mstate_global->__pyx_codeobj__286
#define __pyx_codeobj__287 __pyx_mstate_global->__pyx_codeobj__287
#define __pyx_codeobj__289 __pyx_mstate_global->__pyx_codeobj__289
#define __pyx_codeobj__291 __pyx_mstate_global->__pyx_codeobj__291
#define __pyx_codeobj__293 __pyx_mstate_global->__pyx_codeobj__293
#define __pyx_codeobj__295 __pyx_mstate_global->__pyx_codeobj__295
#define __pyx_codeobj__296 __pyx_mstate_global->__pyx_codeobj__296
#define __pyx_codeobj__298 __pyx_mstate_global->__pyx_codeobj__298
#define __pyx_codeobj__300 __pyx_mstate_global->__pyx_codeobj__300
#define __pyx_codeobj__303 __pyx_mstate_global->__pyx_codeobj__303
#define __pyx_codeobj__305 __pyx_mstate_global->__pyx_codeobj__305
#define __pyx_codeobj__306 __pyx_mstate_global->__pyx_codeobj__306
#define __pyx_codeobj__308 __pyx_mstate_global->__pyx_codeobj__308
#define __pyx_codeobj__310 __pyx_mstate_global->__pyx_codeobj__310
#define __pyx_codeobj__311 __pyx_mstate_global->__pyx_codeobj__311
#define __pyx_codeobj__313 __pyx_mstate_global->__pyx_codeobj__313
#define __pyx_codeobj__315 __pyx_mstate_global->__pyx_codeobj__315
#define __pyx_codeobj__318 __pyx_mstate_global->__pyx_codeobj__318
#define __pyx_codeobj__321 __pyx_mstate_global->__pyx_codeobj__321
#define __pyx_codeobj__323 __pyx_mstate_global->__pyx_codeobj__323
#define __pyx_codeobj__326 __pyx_mstate_global->__pyx_codeobj__326
#define __pyx_codeobj__328 __pyx_mstate_global->__pyx_codeobj__328
#define __pyx_codeobj__330 __pyx_mstate_global->__pyx_codeobj__330
#define __pyx_codeobj__332 __pyx_mstate_global->__pyx_codeobj__332
#define __pyx_codeobj__333 __pyx_mstate_global->__pyx_codeobj__333
#define __pyx_codeobj__334 __pyx_mstate_global->__pyx_codeobj__334
#define __pyx_codeobj__335 __pyx_mstate_global->__pyx_codeobj__335
#define __pyx_codeobj__337 __pyx_mstate_global->__pyx_codeobj__337
#define __pyx_codeobj__339 __pyx_mstate_global->__pyx_codeobj__339
#define __pyx_codeobj__342 __pyx_mstate_global->__pyx_codeobj__342
#define __pyx_codeobj__344 __pyx_mstate_global->__pyx_codeobj__344
#define __pyx_codeobj__346 __pyx_mstate_global->__pyx_codeobj__346
#define __pyx_codeobj__348 __pyx_mstate_global->__pyx_codeobj__348
#define __pyx_codeobj__351 __pyx_mstate_global->__pyx_codeobj__351
#define __pyx_codeobj__353 __pyx_mstate_global->__pyx_codeobj__353
#define __pyx_codeobj__356 __pyx_mstate_global->__pyx_codeobj__356
#define __pyx_codeobj__359 __pyx_mstate_global->__pyx_codeobj__359
#define __pyx_codeobj__360 __pyx_mstate_global->__pyx_codeobj__360
#define __pyx_codeobj__362 __pyx_mstate_global->__pyx_codeobj__362
#define __pyx_codeobj__364 __pyx_mstate_global->__pyx_codeobj__364
#define __pyx_codeobj__366 __pyx_mstate_global->__pyx_codeobj__366
#define __pyx_codeobj__368 __pyx_mstate_global->__pyx_codeobj__368
#define __pyx_codeobj__371 __pyx_mstate_global->__pyx_codeobj__371
#define __pyx_codeobj__373 __pyx_mstate_global->__pyx_codeobj__373
#define __pyx_codeobj__375 __pyx_mstate_global->__pyx_codeobj__375
#define __pyx_codeobj__377 __pyx_mstate_global->__pyx_codeobj__377
#define __pyx_codeobj__379 __pyx_mstate_global->__pyx_codeobj__379
#define __pyx_codeobj__381 __pyx_mstate_global->__pyx_codeobj__381
#define __pyx_codeobj__383 __pyx_mstate_global->__pyx_codeobj__383
#define __pyx_codeobj__385 __pyx_mstate_global->__pyx_codeobj__385
#define __pyx_codeobj__387 __pyx_mstate_global->__pyx_codeobj__387
#define __pyx_codeobj__389 __pyx_mstate_global->__pyx_codeobj__389
#define __pyx_codeobj__391 __pyx_mstate_global->__pyx_codeobj__391
#define __pyx_codeobj__393 __pyx_mstate_global->__pyx_codeobj__393
#define __pyx_codeobj__395 __pyx_mstate_global->__pyx_codeobj__395
#define __pyx_codeobj__396 __pyx_mstate_global->__pyx_codeobj__396
#define __pyx_codeobj__398 __pyx_mstate_global->__pyx_codeobj__398
#define __pyx_codeobj__399 __pyx_mstate_global->__pyx_codeobj__399
#define __pyx_codeobj__401 __pyx_mstate_global->__pyx_codeobj__401
#define __pyx_codeobj__403 __pyx_mstate_global->__pyx_codeobj__403
#define __pyx_codeobj__405 __pyx_mstate_global->__pyx_codeobj__405
#define __pyx_codeobj__406 __pyx_mstate_global->__pyx_codeobj__406
#define __pyx_codeobj__408 __pyx_mstate_global->__pyx_codeobj__408
#define __pyx_codeobj__410 __pyx_mstate_global->__pyx_codeobj__410
#define __pyx_codeobj__412 __pyx_mstate_global->__pyx_codeobj__412
#define __pyx_codeobj__414 __pyx_mstate_global->__pyx_codeobj__414
#define __pyx_codeobj__417 __pyx_mstate_global->__pyx_codeobj__417
#define __pyx_codeobj__418 __pyx_mstate_global->__pyx_codeobj__418
#define __pyx_codeobj__419 __pyx_mstate_global->__pyx_codeobj__419
#define __pyx_codeobj__421 __pyx_mstate_global->__pyx_codeobj__421
#define __pyx_codeobj__424 __pyx_mstate_global->__pyx_codeobj__424
#define __pyx_codeobj__426 __pyx_mstate_global->__pyx_codeobj__426
#define __pyx_codeobj__428 __pyx_mstate_global->__pyx_codeobj__428
#define __pyx_codeobj__430 __pyx_mstate_global->__pyx_codeobj__430
#define __pyx_codeobj__433 __pyx_mstate_global->__pyx_codeobj__433
#define __pyx_codeobj__436 __pyx_mstate_global->__pyx_codeobj__436
#define __pyx_codeobj__438 __pyx_mstate_global->__pyx_codeobj__438
#define __pyx_codeobj__440 __pyx_mstate_global->__pyx_codeobj__440
#define __pyx_codeobj__442 __pyx_mstate_global->__pyx_codeobj__442
#define __pyx_codeobj__445 __pyx_mstate_global->__pyx_codeobj__445
#define __pyx_codeobj__447 __pyx_mstate_global->__pyx_codeobj__447
#define __pyx_codeobj__449 __pyx_mstate_global->__pyx_codeobj__449
#define __pyx_codeobj__451 __pyx_mstate_global->__pyx_codeobj__451
#define __pyx_codeobj__453 __pyx_mstate_global->__pyx_codeobj__453
#define __pyx_codeobj__455 __pyx_mstate_global->__pyx_codeobj__455
#define __pyx_codeobj__457 __pyx_mstate_global->__pyx_codeobj__457
#define __pyx_codeobj__459 __pyx_mstate_global->__pyx_codeobj__459
#define __pyx_codeobj__461 __pyx_mstate_global->__pyx_codeobj__461
#define __pyx_codeobj__462 __pyx_mstate_global->__pyx_codeobj__462
#define __pyx_codeobj__463 __pyx_mstate_global->__pyx_codeobj__463
#define __pyx_codeobj__464 __pyx_mstate_global->__pyx_codeobj__464
#define __pyx_codeobj__466 __pyx_mstate_global->__pyx_codeobj__466
#define __pyx_codeobj__468 __pyx_mstate_global->__pyx_codeobj__468
#define __pyx_codeobj__469 __pyx_mstate_global->__pyx_codeobj__469
#define __pyx_codeobj__470 __pyx_mstate_global->__pyx_codeobj__470
#define __pyx_codeobj__472 __pyx_mstate_global->__pyx_codeobj__472
#define __pyx_codeobj__474 __pyx_mstate_global->__pyx_codeobj__474
#define __pyx_codeobj__476 __pyx_mstate_global->__pyx_codeobj__476
#define __pyx_codeobj__478 __pyx_mstate_global->__pyx_codeobj__478
#define __pyx_codeobj__480 __pyx_mstate_global->__pyx_codeobj__480
#define __pyx_codeobj__482 __pyx_mstate_global->__pyx_codeobj__482
#define __pyx_codeobj__484 __pyx_mstate_global->__pyx_codeobj__484
#define __pyx_codeobj__486 __pyx_mstate_global->__pyx_codeobj__486
#define __pyx_codeobj__488 __pyx_mstate_global->__pyx_codeobj__488
#define __pyx_codeobj__490 __pyx_mstate_global->__pyx_codeobj__490
#define __pyx_codeobj__492 __pyx_mstate_global->__pyx_codeobj__492
#define __pyx_codeobj__493 __pyx_mstate_global->__pyx_codeobj__493
#define __pyx_codeobj__494 __pyx_mstate_global->__pyx_codeobj__494
#define __pyx_codeobj__495 __pyx_mstate_global->__pyx_codeobj__495
#define __pyx_codeobj__497 __pyx_mstate_global->__pyx_codeobj__497
#define __pyx_codeobj__499 __pyx_mstate_global->__pyx_codeobj__499
#define __pyx_codeobj__502 __pyx_mstate_global->__pyx_codeobj__502
#define __pyx_codeobj__504 __pyx_mstate_global->__pyx_codeobj__504
#define __pyx_codeobj__506 __pyx_mstate_global->__pyx_codeobj__506
#define __pyx_codeobj__508 __pyx_mstate_global->__pyx_codeobj__508
#define __pyx_codeobj__510 __pyx_mstate_global->__pyx_codeobj__510
#define __pyx_codeobj__512 __pyx_mstate_global->__pyx_codeobj__512
#define __pyx_codeobj__513 __pyx_mstate_global->__pyx_codeobj__513
#define __pyx_codeobj__515 __pyx_mstate_global->__pyx_codeobj__515
#define __pyx_codeobj__516 __pyx_mstate_global->__pyx_codeobj__516
#define __pyx_codeobj__518 __pyx_mstate_global->__pyx_codeobj__518
#define __pyx_codeobj__520 __pyx_mstate_global->__pyx_codeobj__520
#define __pyx_codeobj__522 __pyx_mstate_global->__pyx_codeobj__522
#define __pyx_codeobj__523 __pyx_mstate_global->__pyx_codeobj__523
#define __pyx_codeobj__524 __pyx_mstate_global->__pyx_codeobj__524
#define __pyx_codeobj__526 __pyx_mstate_global->__pyx_codeobj__526
#define __pyx_codeobj__528 __pyx_mstate_global->__pyx_codeobj__528
#define __pyx_codeobj__529 __pyx_mstate_global->__pyx_codeobj__529
#define __pyx_codeobj__530 __pyx_mstate_global->__pyx_codeobj__530
#define __pyx_codeobj__531 __pyx_mstate_global->__pyx_codeobj__531
#define __pyx_codeobj__532 __pyx_mstate_global->__pyx_codeobj__532
#define __pyx_codeobj__533 __pyx_mstate_global->__pyx_codeobj__533
#define __pyx_codeobj__534 __pyx_mstate_global->__pyx_codeobj__534
#define __pyx_codeobj__535 __pyx_mstate_global->__pyx_codeobj__535
#define __pyx_codeobj__537 __pyx_mstate_global->__pyx_codeobj__537
#define __pyx_codeobj__539 __pyx_mstate_global->__pyx_codeobj__539
#define __pyx_codeobj__540 __pyx_mstate_global->__pyx_codeobj__540
#define __pyx_codeobj__541 __pyx_mstate_global->__pyx_codeobj__541
#define __pyx_codeobj__543 __pyx_mstate_global->__pyx_codeobj__543
#define __pyx_codeobj__544 __pyx_mstate_global->__pyx_codeobj__544
#define __pyx_codeobj__545 __pyx_mstate_global->__pyx_codeobj__545
#define __pyx_codeobj__547 __pyx_mstate_global->__pyx_codeobj__547
#define __pyx_codeobj__548 __pyx_mstate_global->__pyx_codeobj__548
#define __pyx_codeobj__549 __pyx_mstate_global->__pyx_codeobj__549
#define __pyx_codeobj__551 __pyx_mstate_global->__pyx_codeobj__551
#define __pyx_codeobj__553 __pyx_mstate_global->__pyx_codeobj__553
#define __pyx_codeobj__555 __pyx_mstate_global->__pyx_codeobj__555
#define __pyx_codeobj__557 __pyx_mstate_global->__pyx_codeobj__557
#define __pyx_codeobj__559 __pyx_mstate_global->__pyx_codeobj__559
#define __pyx_codeobj__560 __pyx_mstate_global->__pyx_codeobj__560
#define __pyx_codeobj__561 __pyx_mstate_global->__pyx_codeobj__561
#define __pyx_codeobj__562 __pyx_mstate_global->__pyx_codeobj__562
#define __pyx_codeobj__563 __pyx_mstate_global->__pyx_codeobj__563
#define __pyx_codeobj__564 __pyx_mstate_global->__pyx_codeobj__564
#define __pyx_codeobj__565 __pyx_mstate_global->__pyx_codeobj__565
#define __pyx_codeobj__566 __pyx_mstate_global->__pyx_codeobj__566
#define __pyx_codeobj__567 __pyx_mstate_global->__pyx_codeobj__567
#define __pyx_codeobj__569 __pyx_mstate_global->__pyx_codeobj__569
#define __pyx_codeobj__570 __pyx_mstate_global->__pyx_codeobj__570
#define __pyx_codeobj__571 __pyx_mstate_global->__pyx_codeobj__571
#define __pyx_codeobj__573 __pyx_mstate_global->__pyx_codeobj__573
#define __pyx_codeobj__576 __pyx_mstate_global->__pyx_codeobj__576
#define __pyx_codeobj__578 __pyx_mstate_global->__pyx_codeobj__578
#define __pyx_codeobj__579 __pyx_mstate_global->__pyx_codeobj__579
#define __pyx_codeobj__581 __pyx_mstate_global->__pyx_codeobj__581
#define __pyx_codeobj__583 __pyx_mstate_global->__pyx_codeobj__583
#define __pyx_codeobj__585 __pyx_mstate_global->__pyx_codeobj__585
#define __pyx_codeobj__587 __pyx_mstate_global->__pyx_codeobj__587
#define __pyx_codeobj__588 __pyx_mstate_global->__pyx_codeobj__588
#define __pyx_codeobj__589 __pyx_mstate_global->__pyx_codeobj__589
#define __pyx_codeobj__590 __pyx_mstate_global->__pyx_codeobj__590
#define __pyx_codeobj__592 __pyx_mstate_global->__pyx_codeobj__592
#define __pyx_codeobj__594 __pyx_mstate_global->__pyx_codeobj__594
#define __pyx_codeobj__596 __pyx_mstate_global->__pyx_codeobj__596
#define __pyx_codeobj__598 __pyx_mstate_global->__pyx_codeobj__598
#define __pyx_codeobj__600 __pyx_mstate_global->__pyx_codeobj__600
#define __pyx_codeobj__602 __pyx_mstate_global->__pyx_codeobj__602
#define __pyx_codeobj__604 __pyx_mstate_global->__pyx_codeobj__604
#define __pyx_codeobj__607 __pyx_mstate_global->__pyx_codeobj__607
#define __pyx_codeobj__608 __pyx_mstate_global->__pyx_codeobj__608
#define __pyx_codeobj__610 __pyx_mstate_global->__pyx_codeobj__610
#define __pyx_codeobj__612 __pyx_mstate_global->__pyx_codeobj__612
#define __pyx_codeobj__614 __pyx_mstate_global->__pyx_codeobj__614
#define __pyx_codeobj__615 __pyx_mstate_global->__pyx_codeobj__615
#define __pyx_codeobj__617 __pyx_mstate_global->__pyx_codeobj__617
#define __pyx_codeobj__619 __pyx_mstate_global->__pyx_codeobj__619
#define __pyx_codeobj__621 __pyx_mstate_global->__pyx_codeobj__621
#define __pyx_codeobj__622 __pyx_mstate_global->__pyx_codeobj__622
#define __pyx_codeobj__623 __pyx_mstate_global->__pyx_codeobj__623
#define __pyx_codeobj__625 __pyx_mstate_global->__pyx_codeobj__625
#define __pyx_codeobj__627 __pyx_mstate_global->__pyx_codeobj__627
#define __pyx_codeobj__628 __pyx_mstate_global->__pyx_codeobj__628
#define __pyx_codeobj__630 __pyx_mstate_global->__pyx_codeobj__630
#define __pyx_codeobj__632 __pyx_mstate_global->__pyx_codeobj__632
#define __pyx_codeobj__634 __pyx_mstate_global->__pyx_codeobj__634
#define __pyx_codeobj__636 __pyx_mstate_global->__pyx_codeobj__636
#define __pyx_codeobj__639 __pyx_mstate_global->__pyx_codeobj__639
#define __pyx_codeobj__641 __pyx_mstate_global->__pyx_codeobj__641
#define __pyx_codeobj__643 __pyx_mstate_global->__pyx_codeobj__643
#define __pyx_codeobj__645 __pyx_mstate_global->__pyx_codeobj__645
#define __pyx_codeobj__646 __pyx_mstate_global->__pyx_codeobj__646
#define __pyx_codeobj__656 __pyx_mstate_global->__pyx_codeobj__656
#define __pyx_codeobj__658 __pyx_mstate_global->__pyx_codeobj__658
#define __pyx_codeobj__666 __pyx_mstate_global->__pyx_codeobj__666
#define __pyx_codeobj__668 __pyx_mstate_global->__pyx_codeobj__668
#define __pyx_codeobj__670 __pyx_mstate_global->__pyx_codeobj__670
#define __pyx_codeobj__672 __pyx_mstate_global->__pyx_codeobj__672
#define __pyx_codeobj__674 __pyx_mstate_global->__pyx_codeobj__674
#define __pyx_codeobj__676 __pyx_mstate_global->__pyx_codeobj__676
#define __pyx_codeobj__678 __pyx_mstate_global->__pyx_codeobj__678
#define __pyx_codeobj__679 __pyx_mstate_global->__pyx_codeobj__679
#define __pyx_codeobj__680 __pyx_mstate_global->__pyx_codeobj__680
#define __pyx_codeobj__681 __pyx_mstate_global->__pyx_codeobj__681
#define __pyx_codeobj__687 __pyx_mstate_global->__pyx_codeobj__687
#define __pyx_codeobj__688 __pyx_mstate_global->__pyx_codeobj__688
#define __pyx_codeobj__690 __pyx_mstate_global->__pyx_codeobj__690
#define __pyx_codeobj__691 __pyx_mstate_global->__pyx_codeobj__691
#define __pyx_codeobj__692 __pyx_mstate_global->__pyx_codeobj__692
#define __pyx_codeobj__694 __pyx_mstate_global->__pyx_codeobj__694
#define __pyx_codeobj__697 __pyx_mstate_global->__pyx_codeobj__697
#define __pyx_codeobj__699 __pyx_mstate_global->__pyx_codeobj__699
#define __pyx_codeobj__701 __pyx_mstate_global->__pyx_codeobj__701
#define __pyx_codeobj__702 __pyx_mstate_global->__pyx_codeobj__702
#define __pyx_codeobj__703 __pyx_mstate_global->__pyx_codeobj__703
#define __pyx_codeobj__704 __pyx_mstate_global->__pyx_codeobj__704
#define __pyx_codeobj__705 __pyx_mstate_global->__pyx_codeobj__705
#define __pyx_codeobj__706 __pyx_mstate_global->__pyx_codeobj__706
#define __pyx_codeobj__708 __pyx_mstate_global->__pyx_codeobj__708
#define __pyx_codeobj__710 __pyx_mstate_global->__pyx_codeobj__710
#define __pyx_codeobj__712 __pyx_mstate_global->__pyx_codeobj__712
#define __pyx_codeobj__714 __pyx_mstate_global->__pyx_codeobj__714
#define __pyx_codeobj__716 __pyx_mstate_global->__pyx_codeobj__716
#define __pyx_codeobj__718 __pyx_mstate_global->__pyx_codeobj__718
#define __pyx_codeobj__721 __pyx_mstate_global->__pyx_codeobj__721
#define __pyx_codeobj__723 __pyx_mstate_global->__pyx_codeobj__723
#define __pyx_codeobj__725 __pyx_mstate_global->__pyx_codeobj__725
/* #### Code section: module_code ### */
int SnapPy_test_flag;
Boolean gLongComputationInProgress;
Boolean gLongComputationCancelled;
PyObject *gLongComputationTicker = 0;

/* "cython/numbers/double.pyx":11
 *     double det_error_epsilon
 * 
 * cdef real_to_string(Real x):             # <<<<<<<<<<<<<<
 *     return '%.18f' % x
 * 
 */

static PyObject *__pyx_f_6SnapPy_real_to_string(__pyx_t_6SnapPy_Real __pyx_v_x) {
  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("real_to_string", 1);

  /* "cython/numbers/double.pyx":12
 * 
 * cdef real_to_string(Real x):
 *     return '%.18f' % x             # <<<<<<<<<<<<<<
 * 
 * cdef Real2gen_direct(Real R):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_18f, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 12, __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;

  /* "cython/numbers/double.pyx":11
 *     double det_error_epsilon
 * 
 * cdef real_to_string(Real x):             # <<<<<<<<<<<<<<
 *     return '%.18f' % x
 * 
 */

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

/* "cython/numbers/double.pyx":14
 *     return '%.18f' % x
 * 
 * cdef Real2gen_direct(Real R):             # <<<<<<<<<<<<<<
 *     """
 *     Convert a Real to a pari gen of type t_REAL.
 */

static PyObject *__pyx_f_6SnapPy_Real2gen_direct(__pyx_t_6SnapPy_Real __pyx_v_R) {
  double *__pyx_v_qd;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Real2gen_direct", 1);

  /* "cython/numbers/double.pyx":18
 *     Convert a Real to a pari gen of type t_REAL.
 *     """
 *     cdef double* qd = <double*>&R             # <<<<<<<<<<<<<<
 *     return pari(qd[0])
 * 
 */
  __pyx_v_qd = ((double *)(&__pyx_v_R));

  /* "cython/numbers/double.pyx":19
 *     """
 *     cdef double* qd = <double*>&R
 *     return pari(qd[0])             # <<<<<<<<<<<<<<
 * 
 * cdef Real2gen_string(Real R):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pari); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_qd[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 19, __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_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, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 19, __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;

  /* "cython/numbers/double.pyx":14
 *     return '%.18f' % x
 * 
 * cdef Real2gen_direct(Real R):             # <<<<<<<<<<<<<<
 *     """
 *     Convert a Real to a pari gen of type t_REAL.
 */

  /* 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("SnapPy.Real2gen_direct", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/numbers/double.pyx":21
 *     return pari(qd[0])
 * 
 * cdef Real2gen_string(Real R):             # <<<<<<<<<<<<<<
 *     """
 *     Convert a Real to a pari gen of type t_REAL.
 */

static PyObject *__pyx_f_6SnapPy_Real2gen_string(__pyx_t_6SnapPy_Real __pyx_v_R) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Real2gen_string", 1);

  /* "cython/numbers/double.pyx":26
 *     This constructs the gen from the string representation of the real.
 *     """
 *     return pari(real_to_string(R))             # <<<<<<<<<<<<<<
 * 
 * cdef Complex gen2Complex(g):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pari); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_6SnapPy_real_to_string(__pyx_v_R); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 26, __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_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, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 26, __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;

  /* "cython/numbers/double.pyx":21
 *     return pari(qd[0])
 * 
 * cdef Real2gen_string(Real R):             # <<<<<<<<<<<<<<
 *     """
 *     Convert a Real to a pari gen of type t_REAL.
 */

  /* 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("SnapPy.Real2gen_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/numbers/double.pyx":28
 *     return pari(real_to_string(R))
 * 
 * cdef Complex gen2Complex(g):             # <<<<<<<<<<<<<<
 *     cdef Complex result
 *     result.real, result.imag = g.real(), g.imag()
 */

static Complex __pyx_f_6SnapPy_gen2Complex(PyObject *__pyx_v_g) {
  Complex __pyx_v_result;
  Complex __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  __pyx_t_6SnapPy_Real __pyx_t_5;
  __pyx_t_6SnapPy_Real __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gen2Complex", 1);

  /* "cython/numbers/double.pyx":30
 * cdef Complex gen2Complex(g):
 *     cdef Complex result
 *     result.real, result.imag = g.real(), g.imag()             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_real); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 30, __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(5, 30, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(5, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_g, __pyx_n_s_imag); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 30, __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(5, 30, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(5, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_result.real = __pyx_t_5;
  __pyx_v_result.imag = __pyx_t_6;

  /* "cython/numbers/double.pyx":31
 *     cdef Complex result
 *     result.real, result.imag = g.real(), g.imag()
 *     return result             # <<<<<<<<<<<<<<
 * 
 * cdef Real2Number(Real R):
 */
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cython/numbers/double.pyx":28
 *     return pari(real_to_string(R))
 * 
 * cdef Complex gen2Complex(g):             # <<<<<<<<<<<<<<
 *     cdef Complex result
 *     result.real, result.imag = g.real(), g.imag()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.gen2Complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/numbers/double.pyx":33
 *     return result
 * 
 * cdef Real2Number(Real R):             # <<<<<<<<<<<<<<
 *     return Number(Real2gen(R))
 * cdef Complex2Number(Complex C):
 */

static PyObject *__pyx_f_6SnapPy_Real2Number(__pyx_t_6SnapPy_Real __pyx_v_R) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Real2Number", 1);

  /* "cython/numbers/double.pyx":34
 * 
 * cdef Real2Number(Real R):
 *     return Number(Real2gen(R))             # <<<<<<<<<<<<<<
 * cdef Complex2Number(Complex C):
 *     return Number(Complex2gen(C))
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Number); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_v_6SnapPy_Real2gen(__pyx_v_R); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 34, __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_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, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 34, __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;

  /* "cython/numbers/double.pyx":33
 *     return result
 * 
 * cdef Real2Number(Real R):             # <<<<<<<<<<<<<<
 *     return Number(Real2gen(R))
 * cdef Complex2Number(Complex C):
 */

  /* 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("SnapPy.Real2Number", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/numbers/double.pyx":35
 * cdef Real2Number(Real R):
 *     return Number(Real2gen(R))
 * cdef Complex2Number(Complex C):             # <<<<<<<<<<<<<<
 *     return Number(Complex2gen(C))
 */

static PyObject *__pyx_f_6SnapPy_Complex2Number(Complex __pyx_v_C) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Complex2Number", 1);

  /* "cython/numbers/double.pyx":36
 *     return Number(Real2gen(R))
 * cdef Complex2Number(Complex C):
 *     return Number(Complex2gen(C))             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Number); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_f_6SnapPy_Complex2gen(__pyx_v_C); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 36, __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_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, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 36, __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;

  /* "cython/numbers/double.pyx":35
 * cdef Real2Number(Real R):
 *     return Number(Real2gen(R))
 * cdef Complex2Number(Complex C):             # <<<<<<<<<<<<<<
 *     return Number(Complex2gen(C))
 */

  /* 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("SnapPy.Complex2Number", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":31
 *         from sage.interfaces.abc import GapElement, MagmaElement
 * 
 *         def is_GapElement(elt):             # <<<<<<<<<<<<<<
 *             return isinstance(elt, GapElement)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_1is_GapElement(PyObject *__pyx_self, 
#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_6SnapPy_is_GapElement, "is_GapElement(elt)");
static PyMethodDef __pyx_mdef_6SnapPy_1is_GapElement = {"is_GapElement", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_1is_GapElement, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_is_GapElement};
static PyObject *__pyx_pw_6SnapPy_1is_GapElement(PyObject *__pyx_self, 
#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_elt = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_GapElement (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_elt,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_elt)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 31, __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, "is_GapElement") < 0)) __PYX_ERR(0, 31, __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_elt = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_GapElement", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 31, __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("SnapPy.is_GapElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_is_GapElement(__pyx_self, __pyx_v_elt);

  /* 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_6SnapPy_is_GapElement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_elt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_GapElement", 1);

  /* "cython/core/basic.pyx":32
 * 
 *         def is_GapElement(elt):
 *             return isinstance(elt, GapElement)             # <<<<<<<<<<<<<<
 * 
 *         def is_MagmaElement(elt):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_GapElement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_elt, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 32, __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, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":31
 *         from sage.interfaces.abc import GapElement, MagmaElement
 * 
 *         def is_GapElement(elt):             # <<<<<<<<<<<<<<
 *             return isinstance(elt, GapElement)
 * 
 */

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

/* "cython/core/basic.pyx":34
 *             return isinstance(elt, GapElement)
 * 
 *         def is_MagmaElement(elt):             # <<<<<<<<<<<<<<
 *             return isinstance(elt, MagmaElement)
 *     except:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_3is_MagmaElement(PyObject *__pyx_self, 
#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_6SnapPy_2is_MagmaElement, "is_MagmaElement(elt)");
static PyMethodDef __pyx_mdef_6SnapPy_3is_MagmaElement = {"is_MagmaElement", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_3is_MagmaElement, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_2is_MagmaElement};
static PyObject *__pyx_pw_6SnapPy_3is_MagmaElement(PyObject *__pyx_self, 
#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_elt = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_MagmaElement (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_elt,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_elt)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 34, __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, "is_MagmaElement") < 0)) __PYX_ERR(0, 34, __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_elt = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_MagmaElement", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 34, __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("SnapPy.is_MagmaElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_2is_MagmaElement(__pyx_self, __pyx_v_elt);

  /* 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_6SnapPy_2is_MagmaElement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_elt) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_MagmaElement", 1);

  /* "cython/core/basic.pyx":35
 * 
 *         def is_MagmaElement(elt):
 *             return isinstance(elt, MagmaElement)             # <<<<<<<<<<<<<<
 *     except:
 *         from sage.interfaces.gap import is_GapElement
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MagmaElement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_elt, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 35, __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, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":34
 *             return isinstance(elt, GapElement)
 * 
 *         def is_MagmaElement(elt):             # <<<<<<<<<<<<<<
 *             return isinstance(elt, MagmaElement)
 *     except:
 */

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

/* "cython/core/basic.pyx":85
 * 
 * # This is part of the UCS2 hack.
 * cdef public UCS2_hack (char *string, Py_ssize_t length, char *errors) :             # <<<<<<<<<<<<<<
 *     return string
 * 
 */

PyObject *UCS2_hack(char *__pyx_v_string, CYTHON_UNUSED Py_ssize_t __pyx_v_length, CYTHON_UNUSED char *__pyx_v_errors) {
  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("UCS2_hack", 1);

  /* "cython/core/basic.pyx":86
 * # This is part of the UCS2 hack.
 * cdef public UCS2_hack (char *string, Py_ssize_t length, char *errors) :
 *     return string             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":85
 * 
 * # This is part of the UCS2 hack.
 * cdef public UCS2_hack (char *string, Py_ssize_t length, char *errors) :             # <<<<<<<<<<<<<<
 *     return string
 * 
 */

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

/* "cython/core/basic.pyx":89
 * 
 * 
 * def valid_index(i, n, format_str):             # <<<<<<<<<<<<<<
 *     """
 *     Return range(n)[i] or raises a nicely formatted IndexError
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_5valid_index(PyObject *__pyx_self, 
#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_6SnapPy_4valid_index, "valid_index(i, n, format_str)\n\n    Return range(n)[i] or raises a nicely formatted IndexError\n    using format_str.\n\n    This does several things for us::\n\n        * avoid that cython happily converts a float to an int, so a call\n          such as M.dehn_fill((1,0), 0.6) would succeed.\n        * converts a negative index such as -1 to n - 1\n        * checks that i is in the right range\n        * supports Sage and numpy Integers: they are not python int's but\n          have __index__ (see PEP 357)\n\n    It is faster than reimplementing these behaviors.\n    ");
static PyMethodDef __pyx_mdef_6SnapPy_5valid_index = {"valid_index", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_5valid_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_4valid_index};
static PyObject *__pyx_pw_6SnapPy_5valid_index(PyObject *__pyx_self, 
#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_i = 0;
  PyObject *__pyx_v_n = 0;
  PyObject *__pyx_v_format_str = 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("valid_index (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_i,&__pyx_n_s_n,&__pyx_n_s_format_str,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_i)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 89, __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_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 89, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("valid_index", 1, 3, 3, 1); __PYX_ERR(0, 89, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format_str)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 89, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("valid_index", 1, 3, 3, 2); __PYX_ERR(0, 89, __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, "valid_index") < 0)) __PYX_ERR(0, 89, __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_i = values[0];
    __pyx_v_n = values[1];
    __pyx_v_format_str = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("valid_index", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 89, __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("SnapPy.valid_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_4valid_index(__pyx_self, __pyx_v_i, __pyx_v_n, __pyx_v_format_str);

  /* 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_6SnapPy_4valid_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_i, PyObject *__pyx_v_n, PyObject *__pyx_v_format_str) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("valid_index", 1);

  /* "cython/core/basic.pyx":105
 *     It is faster than reimplementing these behaviors.
 *     """
 *     try:             # <<<<<<<<<<<<<<
 *         return range(n)[i]
 *     except IndexError:
 */
  {
    __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:*/ {

      /* "cython/core/basic.pyx":106
 *     """
 *     try:
 *         return range(n)[i]             # <<<<<<<<<<<<<<
 *     except IndexError:
 *         raise IndexError(format_str % i)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 106, __pyx_L3_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_L7_try_return;

      /* "cython/core/basic.pyx":105
 *     It is faster than reimplementing these behaviors.
 *     """
 *     try:             # <<<<<<<<<<<<<<
 *         return range(n)[i]
 *     except IndexError:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/basic.pyx":107
 *     try:
 *         return range(n)[i]
 *     except IndexError:             # <<<<<<<<<<<<<<
 *         raise IndexError(format_str % i)
 * 
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_IndexError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("SnapPy.valid_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 107, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "cython/core/basic.pyx":108
 *         return range(n)[i]
 *     except IndexError:
 *         raise IndexError(format_str % i)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __pyx_t_8 = PyNumber_Remainder(__pyx_v_format_str, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 108, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 108, __pyx_L5_except_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, 108, __pyx_L5_except_error)
    }
    goto __pyx_L5_except_error;

    /* "cython/core/basic.pyx":105
 *     It is faster than reimplementing these behaviors.
 *     """
 *     try:             # <<<<<<<<<<<<<<
 *         return range(n)[i]
 *     except IndexError:
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
  }

  /* "cython/core/basic.pyx":89
 * 
 * 
 * def valid_index(i, n, format_str):             # <<<<<<<<<<<<<<
 *     """
 *     Return range(n)[i] or raises a nicely formatted IndexError
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("SnapPy.valid_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":113
 * # A stream for asynchronous messages
 * class MsgIO():
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         if sys.stdout is None:
 *             self.write = None
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_5MsgIO_1__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_6SnapPy_5MsgIO___init__, "MsgIO.__init__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_5MsgIO_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_5MsgIO_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_5MsgIO___init__};
static PyObject *__pyx_pw_6SnapPy_5MsgIO_1__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_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 113, __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, "__init__") < 0)) __PYX_ERR(0, 113, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 113, __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("SnapPy.MsgIO.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_5MsgIO___init__(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_5MsgIO___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "cython/core/basic.pyx":114
 * class MsgIO():
 *     def __init__(self):
 *         if sys.stdout is None:             # <<<<<<<<<<<<<<
 *             self.write = None
 *             self.flush = None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stdout); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 == Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "cython/core/basic.pyx":115
 *     def __init__(self):
 *         if sys.stdout is None:
 *             self.write = None             # <<<<<<<<<<<<<<
 *             self.flush = None
 *         else:
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_write, Py_None) < 0) __PYX_ERR(0, 115, __pyx_L1_error)

    /* "cython/core/basic.pyx":116
 *         if sys.stdout is None:
 *             self.write = None
 *             self.flush = None             # <<<<<<<<<<<<<<
 *         else:
 *             self.write = sys.stdout.write
 */
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_flush, Py_None) < 0) __PYX_ERR(0, 116, __pyx_L1_error)

    /* "cython/core/basic.pyx":114
 * class MsgIO():
 *     def __init__(self):
 *         if sys.stdout is None:             # <<<<<<<<<<<<<<
 *             self.write = None
 *             self.flush = None
 */
    goto __pyx_L3;
  }

  /* "cython/core/basic.pyx":118
 *             self.flush = None
 *         else:
 *             self.write = sys.stdout.write             # <<<<<<<<<<<<<<
 *             self.flush = sys.stdout.flush
 * 
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_write, __pyx_t_2) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/basic.pyx":119
 *         else:
 *             self.write = sys.stdout.write
 *             self.flush = sys.stdout.flush             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stdout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_flush); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_flush, __pyx_t_2) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "cython/core/basic.pyx":113
 * # A stream for asynchronous messages
 * class MsgIO():
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         if sys.stdout is None:
 *             self.write = None
 */

  /* 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_AddTraceback("SnapPy.MsgIO.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":125
 * 
 * 
 * def to_str(s):             # <<<<<<<<<<<<<<
 *     return s.decode()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_7to_str(PyObject *__pyx_self, 
#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_6SnapPy_6to_str, "to_str(s)");
static PyMethodDef __pyx_mdef_6SnapPy_7to_str = {"to_str", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_7to_str, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_6to_str};
static PyObject *__pyx_pw_6SnapPy_7to_str(PyObject *__pyx_self, 
#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("to_str (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, 125, __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, "to_str") < 0)) __PYX_ERR(0, 125, __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("to_str", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 125, __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("SnapPy.to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_6to_str(__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_6SnapPy_6to_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
  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("to_str", 1);

  /* "cython/core/basic.pyx":126
 * 
 * def to_str(s):
 *     return s.decode()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_decode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __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, 126, __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;

  /* "cython/core/basic.pyx":125
 * 
 * 
 * def to_str(s):             # <<<<<<<<<<<<<<
 *     return s.decode()
 * 
 */

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

/* "cython/core/basic.pyx":129
 * 
 * 
 * def bytearray_to_bytes(x):             # <<<<<<<<<<<<<<
 *     return bytes(x)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_9bytearray_to_bytes(PyObject *__pyx_self, 
#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_6SnapPy_8bytearray_to_bytes, "bytearray_to_bytes(x)");
static PyMethodDef __pyx_mdef_6SnapPy_9bytearray_to_bytes = {"bytearray_to_bytes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_9bytearray_to_bytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8bytearray_to_bytes};
static PyObject *__pyx_pw_6SnapPy_9bytearray_to_bytes(PyObject *__pyx_self, 
#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_x = 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("bytearray_to_bytes (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_x,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_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 129, __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, "bytearray_to_bytes") < 0)) __PYX_ERR(0, 129, __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_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bytearray_to_bytes", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 129, __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("SnapPy.bytearray_to_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8bytearray_to_bytes(__pyx_self, __pyx_v_x);

  /* 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_6SnapPy_8bytearray_to_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) {
  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("bytearray_to_bytes", 1);

  /* "cython/core/basic.pyx":130
 * 
 * def bytearray_to_bytes(x):
 *     return bytes(x)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":129
 * 
 * 
 * def bytearray_to_bytes(x):             # <<<<<<<<<<<<<<
 *     return bytes(x)
 * 
 */

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

/* "cython/core/basic.pyx":133
 * 
 * 
 * def to_byte_str(s):             # <<<<<<<<<<<<<<
 *     return s.encode('utf-8') if type(s) != bytes else s
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_11to_byte_str(PyObject *__pyx_self, 
#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_6SnapPy_10to_byte_str, "to_byte_str(s)");
static PyMethodDef __pyx_mdef_6SnapPy_11to_byte_str = {"to_byte_str", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_11to_byte_str, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_10to_byte_str};
static PyObject *__pyx_pw_6SnapPy_11to_byte_str(PyObject *__pyx_self, 
#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("to_byte_str (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, 133, __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, "to_byte_str") < 0)) __PYX_ERR(0, 133, __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("to_byte_str", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 133, __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("SnapPy.to_byte_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_10to_byte_str(__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_6SnapPy_10to_byte_str(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_byte_str", 1);

  /* "cython/core/basic.pyx":134
 * 
 * def to_byte_str(s):
 *     return s.encode('utf-8') if type(s) != bytes else s             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_s)), ((PyObject *)(&PyBytes_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 134, __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, __pyx_kp_s_utf_8};
      __pyx_t_2 = __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_2)) __PYX_ERR(0, 134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
  } else {
    __Pyx_INCREF(__pyx_v_s);
    __pyx_t_1 = __pyx_v_s;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":133
 * 
 * 
 * def to_byte_str(s):             # <<<<<<<<<<<<<<
 *     return s.encode('utf-8') if type(s) != bytes else s
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("SnapPy.to_byte_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":163
 * 
 * 
 * def set_test_flag(int value):             # <<<<<<<<<<<<<<
 *     cdef int old
 *     global SnapPy_test_flag
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13set_test_flag(PyObject *__pyx_self, 
#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_6SnapPy_12set_test_flag, "set_test_flag(int value)");
static PyMethodDef __pyx_mdef_6SnapPy_13set_test_flag = {"set_test_flag", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13set_test_flag, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_12set_test_flag};
static PyObject *__pyx_pw_6SnapPy_13set_test_flag(PyObject *__pyx_self, 
#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_value;
  #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("set_test_flag (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_value,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_value)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 163, __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, "set_test_flag") < 0)) __PYX_ERR(0, 163, __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_value = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 163, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_test_flag", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 163, __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("SnapPy.set_test_flag", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_12set_test_flag(__pyx_self, __pyx_v_value);

  /* 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_6SnapPy_12set_test_flag(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_value) {
  int __pyx_v_old;
  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("set_test_flag", 1);

  /* "cython/core/basic.pyx":166
 *     cdef int old
 *     global SnapPy_test_flag
 *     old = SnapPy_test_flag             # <<<<<<<<<<<<<<
 *     SnapPy_test_flag = value
 *     return old
 */
  __pyx_v_old = SnapPy_test_flag;

  /* "cython/core/basic.pyx":167
 *     global SnapPy_test_flag
 *     old = SnapPy_test_flag
 *     SnapPy_test_flag = value             # <<<<<<<<<<<<<<
 *     return old
 * 
 */
  SnapPy_test_flag = __pyx_v_value;

  /* "cython/core/basic.pyx":168
 *     old = SnapPy_test_flag
 *     SnapPy_test_flag = value
 *     return old             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_old); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":163
 * 
 * 
 * def set_test_flag(int value):             # <<<<<<<<<<<<<<
 *     cdef int old
 *     global SnapPy_test_flag
 */

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

/* "cython/core/basic.pyx":172
 * 
 * # Implementation of the SnapPea UI functions and their global variables.
 * cdef public void uFatalError(const_char_ptr function,             # <<<<<<<<<<<<<<
 *                              const_char_ptr file) except *:
 *     # Only raise exception the first time so that we see the first
 */

void uFatalError(const char* __pyx_v_function, const char* __pyx_v_file) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("uFatalError", 1);

  /* "cython/core/basic.pyx":176
 *     # Only raise exception the first time so that we see the first
 *     # uFatalError which is usually the root cause of the problem.
 *     if not PyErr_Occurred():             # <<<<<<<<<<<<<<
 *         raise SnapPeaFatalError('SnapPea crashed in function %s(), '
 *                                 'defined in %s.c.' % (function, file))
 */
  __pyx_t_1 = (!(PyErr_Occurred() != 0));
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/basic.pyx":177
 *     # uFatalError which is usually the root cause of the problem.
 *     if not PyErr_Occurred():
 *         raise SnapPeaFatalError('SnapPea crashed in function %s(), '             # <<<<<<<<<<<<<<
 *                                 'defined in %s.c.' % (function, file))
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SnapPeaFatalError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "cython/core/basic.pyx":178
 *     if not PyErr_Occurred():
 *         raise SnapPeaFatalError('SnapPea crashed in function %s(), '
 *                                 'defined in %s.c.' % (function, file))             # <<<<<<<<<<<<<<
 * 
 * # Global variables used for interrupt processing
 */
    __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_function); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_file); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)) __PYX_ERR(0, 178, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5)) __PYX_ERR(0, 178, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_SnapPea_crashed_in_function_s_de, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 177, __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, 177, __pyx_L1_error)

    /* "cython/core/basic.pyx":176
 *     # Only raise exception the first time so that we see the first
 *     # uFatalError which is usually the root cause of the problem.
 *     if not PyErr_Occurred():             # <<<<<<<<<<<<<<
 *         raise SnapPeaFatalError('SnapPea crashed in function %s(), '
 *                                 'defined in %s.c.' % (function, file))
 */
  }

  /* "cython/core/basic.pyx":172
 * 
 * # Implementation of the SnapPea UI functions and their global variables.
 * cdef public void uFatalError(const_char_ptr function,             # <<<<<<<<<<<<<<
 *                              const_char_ptr file) except *:
 *     # Only raise exception the first time so that we see the first
 */

  /* function exit 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);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.uFatalError", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "cython/core/basic.pyx":190
 * 
 * 
 * def SnapPea_interrupt():             # <<<<<<<<<<<<<<
 *     """
 *     The UI can call this to stop SnapPea.  Returns True if SnapPea s busy.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_15SnapPea_interrupt(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6SnapPy_14SnapPea_interrupt, "SnapPea_interrupt()\n\n    The UI can call this to stop SnapPea.  Returns True if SnapPea s busy.\n    If SnapPea is busy, the side effect is to set the gLongComputationCancelled\n    flag.\n    ");
static PyMethodDef __pyx_mdef_6SnapPy_15SnapPea_interrupt = {"SnapPea_interrupt", (PyCFunction)__pyx_pw_6SnapPy_15SnapPea_interrupt, METH_NOARGS, __pyx_doc_6SnapPy_14SnapPea_interrupt};
static PyObject *__pyx_pw_6SnapPy_15SnapPea_interrupt(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("SnapPea_interrupt (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6SnapPy_14SnapPea_interrupt(__pyx_self);

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

static PyObject *__pyx_pf_6SnapPy_14SnapPea_interrupt(CYTHON_UNUSED PyObject *__pyx_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("SnapPea_interrupt", 1);

  /* "cython/core/basic.pyx":198
 *     global gLongComputationCancelled
 *     global gLongComputationInProgress
 *     if gLongComputationInProgress:             # <<<<<<<<<<<<<<
 *         gLongComputationCancelled = True
 *     return gLongComputationInProgress
 */
  __pyx_t_1 = (gLongComputationInProgress != 0);
  if (__pyx_t_1) {

    /* "cython/core/basic.pyx":199
 *     global gLongComputationInProgress
 *     if gLongComputationInProgress:
 *         gLongComputationCancelled = True             # <<<<<<<<<<<<<<
 *     return gLongComputationInProgress
 * 
 */
    gLongComputationCancelled = 1;

    /* "cython/core/basic.pyx":198
 *     global gLongComputationCancelled
 *     global gLongComputationInProgress
 *     if gLongComputationInProgress:             # <<<<<<<<<<<<<<
 *         gLongComputationCancelled = True
 *     return gLongComputationInProgress
 */
  }

  /* "cython/core/basic.pyx":200
 *     if gLongComputationInProgress:
 *         gLongComputationCancelled = True
 *     return gLongComputationInProgress             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_Boolean(gLongComputationInProgress); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":190
 * 
 * 
 * def SnapPea_interrupt():             # <<<<<<<<<<<<<<
 *     """
 *     The UI can call this to stop SnapPea.  Returns True if SnapPea s busy.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.SnapPea_interrupt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":203
 * 
 * 
 * cdef public void uLongComputationBegins(const_char_ptr message,             # <<<<<<<<<<<<<<
 *                                         Boolean is_abortable):
 *     global gLongComputationCancelled
 */

void uLongComputationBegins(CYTHON_UNUSED const char* __pyx_v_message, CYTHON_UNUSED Boolean __pyx_v_is_abortable) {
  __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("uLongComputationBegins", 1);

  /* "cython/core/basic.pyx":208
 *     global gLongComputationInProgress
 *     global gLongComputationTicker
 *     gLongComputationCancelled = False             # <<<<<<<<<<<<<<
 *     gLongComputationInProgress = True
 *     gLongComputationTicker = time.time()
 */
  gLongComputationCancelled = 0;

  /* "cython/core/basic.pyx":209
 *     global gLongComputationTicker
 *     gLongComputationCancelled = False
 *     gLongComputationInProgress = True             # <<<<<<<<<<<<<<
 *     gLongComputationTicker = time.time()
 * 
 */
  gLongComputationInProgress = 1;

  /* "cython/core/basic.pyx":210
 *     gLongComputationCancelled = False
 *     gLongComputationInProgress = True
 *     gLongComputationTicker = time.time()             # <<<<<<<<<<<<<<
 * 
 * cdef public c_FuncResult uLongComputationContinues() except *:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 210, __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, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_XGOTREF(gLongComputationTicker);
  __Pyx_DECREF_SET(gLongComputationTicker, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":203
 * 
 * 
 * cdef public void uLongComputationBegins(const_char_ptr message,             # <<<<<<<<<<<<<<
 *                                         Boolean is_abortable):
 *     global gLongComputationCancelled
 */

  /* 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_AddTraceback("SnapPy.uLongComputationBegins", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "cython/core/basic.pyx":212
 *     gLongComputationTicker = time.time()
 * 
 * cdef public c_FuncResult uLongComputationContinues() except *:             # <<<<<<<<<<<<<<
 *     global gLongComputationCancelled
 *     global gLongComputationInProgress
 */

FuncResult uLongComputationContinues(void) {
  PyObject *__pyx_v_now = 0;
  FuncResult __pyx_r;
  __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("uLongComputationContinues", 1);

  /* "cython/core/basic.pyx":217
 *     global gLongComputationTicker
 *     cdef now
 *     if gLongComputationCancelled:             # <<<<<<<<<<<<<<
 *         return func_cancelled
 *     elif UI_callback is not None:
 */
  __pyx_t_1 = (gLongComputationCancelled != 0);
  if (__pyx_t_1) {

    /* "cython/core/basic.pyx":218
 *     cdef now
 *     if gLongComputationCancelled:
 *         return func_cancelled             # <<<<<<<<<<<<<<
 *     elif UI_callback is not None:
 *         now = time.time()
 */
    __pyx_r = func_cancelled;
    goto __pyx_L0;

    /* "cython/core/basic.pyx":217
 *     global gLongComputationTicker
 *     cdef now
 *     if gLongComputationCancelled:             # <<<<<<<<<<<<<<
 *         return func_cancelled
 *     elif UI_callback is not None:
 */
  }

  /* "cython/core/basic.pyx":219
 *     if gLongComputationCancelled:
 *         return func_cancelled
 *     elif UI_callback is not None:             # <<<<<<<<<<<<<<
 *         now = time.time()
 *         if now - gLongComputationTicker > 0.2:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UI_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = (__pyx_t_2 != Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "cython/core/basic.pyx":220
 *         return func_cancelled
 *     elif UI_callback is not None:
 *         now = time.time()             # <<<<<<<<<<<<<<
 *         if now - gLongComputationTicker > 0.2:
 *             UI_callback()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 220, __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, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_v_now = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/basic.pyx":221
 *     elif UI_callback is not None:
 *         now = time.time()
 *         if now - gLongComputationTicker > 0.2:             # <<<<<<<<<<<<<<
 *             UI_callback()
 *             gLongComputationTicker = now
 */
    __pyx_t_2 = PyNumber_Subtract(__pyx_v_now, gLongComputationTicker); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_float_0_2, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 221, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 221, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "cython/core/basic.pyx":222
 *         now = time.time()
 *         if now - gLongComputationTicker > 0.2:
 *             UI_callback()             # <<<<<<<<<<<<<<
 *             gLongComputationTicker = now
 *     return func_OK
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UI_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_5 = 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_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 222, __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;

      /* "cython/core/basic.pyx":223
 *         if now - gLongComputationTicker > 0.2:
 *             UI_callback()
 *             gLongComputationTicker = now             # <<<<<<<<<<<<<<
 *     return func_OK
 * 
 */
      __Pyx_INCREF(__pyx_v_now);
      __Pyx_XGOTREF(gLongComputationTicker);
      __Pyx_DECREF_SET(gLongComputationTicker, __pyx_v_now);
      __Pyx_GIVEREF(__pyx_v_now);

      /* "cython/core/basic.pyx":221
 *     elif UI_callback is not None:
 *         now = time.time()
 *         if now - gLongComputationTicker > 0.2:             # <<<<<<<<<<<<<<
 *             UI_callback()
 *             gLongComputationTicker = now
 */
    }

    /* "cython/core/basic.pyx":219
 *     if gLongComputationCancelled:
 *         return func_cancelled
 *     elif UI_callback is not None:             # <<<<<<<<<<<<<<
 *         now = time.time()
 *         if now - gLongComputationTicker > 0.2:
 */
  }

  /* "cython/core/basic.pyx":224
 *             UI_callback()
 *             gLongComputationTicker = now
 *     return func_OK             # <<<<<<<<<<<<<<
 * 
 * cdef public void uLongComputationEnds() except*:
 */
  __pyx_r = func_OK;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":212
 *     gLongComputationTicker = time.time()
 * 
 * cdef public c_FuncResult uLongComputationContinues() except *:             # <<<<<<<<<<<<<<
 *     global gLongComputationCancelled
 *     global gLongComputationInProgress
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("SnapPy.uLongComputationContinues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = (FuncResult) 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_now);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":226
 *     return func_OK
 * 
 * cdef public void uLongComputationEnds() except*:             # <<<<<<<<<<<<<<
 *     global gLongComputationCancelled
 *     global gLongComputationInProgress
 */

void uLongComputationEnds(void) {
  __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("uLongComputationEnds", 1);

  /* "cython/core/basic.pyx":229
 *     global gLongComputationCancelled
 *     global gLongComputationInProgress
 *     gLongComputationInProgress = False             # <<<<<<<<<<<<<<
 *     if gLongComputationCancelled:
 *         gLongComputationCancelled = False
 */
  gLongComputationInProgress = 0;

  /* "cython/core/basic.pyx":230
 *     global gLongComputationInProgress
 *     gLongComputationInProgress = False
 *     if gLongComputationCancelled:             # <<<<<<<<<<<<<<
 *         gLongComputationCancelled = False
 *         if UI_callback is not None:
 */
  __pyx_t_1 = (gLongComputationCancelled != 0);
  if (__pyx_t_1) {

    /* "cython/core/basic.pyx":231
 *     gLongComputationInProgress = False
 *     if gLongComputationCancelled:
 *         gLongComputationCancelled = False             # <<<<<<<<<<<<<<
 *         if UI_callback is not None:
 *             UI_callback(interrupted=True)
 */
    gLongComputationCancelled = 0;

    /* "cython/core/basic.pyx":232
 *     if gLongComputationCancelled:
 *         gLongComputationCancelled = False
 *         if UI_callback is not None:             # <<<<<<<<<<<<<<
 *             UI_callback(interrupted=True)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UI_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = (__pyx_t_2 != Py_None);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "cython/core/basic.pyx":233
 *         gLongComputationCancelled = False
 *         if UI_callback is not None:
 *             UI_callback(interrupted=True)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UI_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_interrupted, Py_True) < 0) __PYX_ERR(0, 233, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/basic.pyx":232
 *     if gLongComputationCancelled:
 *         gLongComputationCancelled = False
 *         if UI_callback is not None:             # <<<<<<<<<<<<<<
 *             UI_callback(interrupted=True)
 * 
 */
    }

    /* "cython/core/basic.pyx":230
 *     global gLongComputationInProgress
 *     gLongComputationInProgress = False
 *     if gLongComputationCancelled:             # <<<<<<<<<<<<<<
 *         gLongComputationCancelled = False
 *         if UI_callback is not None:
 */
  }

  /* "cython/core/basic.pyx":226
 *     return func_OK
 * 
 * cdef public void uLongComputationEnds() except*:             # <<<<<<<<<<<<<<
 *     global gLongComputationCancelled
 *     global gLongComputationInProgress
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("SnapPy.uLongComputationEnds", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "cython/core/basic.pyx":238
 * show_uAcknowledge = False
 * 
 * cdef public void uAcknowledge(const_char_ptr message):             # <<<<<<<<<<<<<<
 *     if show_uAcknowledge:
 *         sys.stderr.write(to_str(<char *> message))
 */

void uAcknowledge(const char* __pyx_v_message) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("uAcknowledge", 1);

  /* "cython/core/basic.pyx":239
 * 
 * cdef public void uAcknowledge(const_char_ptr message):
 *     if show_uAcknowledge:             # <<<<<<<<<<<<<<
 *         sys.stderr.write(to_str(<char *> message))
 *         sys.stderr.write('\n')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_show_uAcknowledge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 239, __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, 239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cython/core/basic.pyx":240
 * cdef public void uAcknowledge(const_char_ptr message):
 *     if show_uAcknowledge:
 *         sys.stderr.write(to_str(<char *> message))             # <<<<<<<<<<<<<<
 *         sys.stderr.write('\n')
 *     return
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stderr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __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_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_to_str); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyBytes_FromString(((char *)__pyx_v_message)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(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_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 240, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __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;

    /* "cython/core/basic.pyx":241
 *     if show_uAcknowledge:
 *         sys.stderr.write(to_str(<char *> message))
 *         sys.stderr.write('\n')             # <<<<<<<<<<<<<<
 *     return
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stderr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 241, __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_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __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, __pyx_kp_s_};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __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;

    /* "cython/core/basic.pyx":239
 * 
 * cdef public void uAcknowledge(const_char_ptr message):
 *     if show_uAcknowledge:             # <<<<<<<<<<<<<<
 *         sys.stderr.write(to_str(<char *> message))
 *         sys.stderr.write('\n')
 */
  }

  /* "cython/core/basic.pyx":242
 *         sys.stderr.write(to_str(<char *> message))
 *         sys.stderr.write('\n')
 *     return             # <<<<<<<<<<<<<<
 * 
 * cdef public void uAbortMemoryFull():
 */
  goto __pyx_L0;

  /* "cython/core/basic.pyx":238
 * show_uAcknowledge = False
 * 
 * cdef public void uAcknowledge(const_char_ptr message):             # <<<<<<<<<<<<<<
 *     if show_uAcknowledge:
 *         sys.stderr.write(to_str(<char *> message))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.uAcknowledge", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "cython/core/basic.pyx":244
 *     return
 * 
 * cdef public void uAbortMemoryFull():             # <<<<<<<<<<<<<<
 *     sys.stderr.write('Out of memory.\n')
 *     sys.exit(2)
 */

void uAbortMemoryFull(void) {
  __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("uAbortMemoryFull", 1);

  /* "cython/core/basic.pyx":245
 * 
 * cdef public void uAbortMemoryFull():
 *     sys.stderr.write('Out of memory.\n')             # <<<<<<<<<<<<<<
 *     sys.exit(2)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stderr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __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_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 245, __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_kp_s_Out_of_memory};
    __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, 245, __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;

  /* "cython/core/basic.pyx":246
 * cdef public void uAbortMemoryFull():
 *     sys.stderr.write('Out of memory.\n')
 *     sys.exit(2)             # <<<<<<<<<<<<<<
 * 
 * cdef public int uQuery(const_char_ptr  message,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __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_int_2};
    __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, 246, __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;

  /* "cython/core/basic.pyx":244
 *     return
 * 
 * cdef public void uAbortMemoryFull():             # <<<<<<<<<<<<<<
 *     sys.stderr.write('Out of memory.\n')
 *     sys.exit(2)
 */

  /* 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_AddTraceback("SnapPy.uAbortMemoryFull", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "cython/core/basic.pyx":248
 *     sys.exit(2)
 * 
 * cdef public int uQuery(const_char_ptr  message,             # <<<<<<<<<<<<<<
 *                        const_int       num_responses,
 *                        const_char_ptr  responses[],
 */

int uQuery(const char* __pyx_v_message, CYTHON_UNUSED const int __pyx_v_num_responses, const char* *__pyx_v_responses, const int __pyx_v_default_response) {
  char *__pyx_v_default;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("uQuery", 1);

  /* "cython/core/basic.pyx":255
 *     #  from the user, but for now it is set up to return the default
 *     #  response, to facilitate batch computations.
 *     cdef char *default = <char *> responses[<int> default_response]             # <<<<<<<<<<<<<<
 *     sys.stderr.write('Q: %s\nA:  %s\n' % (<char *> message, default))
 *     return <int> default_response
 */
  __pyx_v_default = ((char *)(__pyx_v_responses[((int)__pyx_v_default_response)]));

  /* "cython/core/basic.pyx":256
 *     #  response, to facilitate batch computations.
 *     cdef char *default = <char *> responses[<int> default_response]
 *     sys.stderr.write('Q: %s\nA:  %s\n' % (<char *> message, default))             # <<<<<<<<<<<<<<
 *     return <int> default_response
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stderr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __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_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyBytes_FromString(((char *)__pyx_v_message)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_default); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 256, __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, 256, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Q_s_A_s, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __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;

  /* "cython/core/basic.pyx":257
 *     cdef char *default = <char *> responses[<int> default_response]
 *     sys.stderr.write('Q: %s\nA:  %s\n' % (<char *> message, default))
 *     return <int> default_response             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = ((int)__pyx_v_default_response);
  goto __pyx_L0;

  /* "cython/core/basic.pyx":248
 *     sys.exit(2)
 * 
 * cdef public int uQuery(const_char_ptr  message,             # <<<<<<<<<<<<<<
 *                        const_int       num_responses,
 *                        const_char_ptr  responses[],
 */

  /* 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("SnapPy.uQuery", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":260
 * 
 * 
 * def cy_eval(s):             # <<<<<<<<<<<<<<
 *     return eval(s)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17cy_eval(PyObject *__pyx_self, 
#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_6SnapPy_16cy_eval, "cy_eval(s)");
static PyMethodDef __pyx_mdef_6SnapPy_17cy_eval = {"cy_eval", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17cy_eval, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16cy_eval};
static PyObject *__pyx_pw_6SnapPy_17cy_eval(PyObject *__pyx_self, 
#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("cy_eval (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, 260, __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, "cy_eval") < 0)) __PYX_ERR(0, 260, __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("cy_eval", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 260, __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("SnapPy.cy_eval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_16cy_eval(__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_6SnapPy_16cy_eval(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
  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("cy_eval", 1);

  /* "cython/core/basic.pyx":261
 * 
 * def cy_eval(s):
 *     return eval(s)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_Globals(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__pyx_v_s) {
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_s, __pyx_v_s) < 0) __PYX_ERR(0, 261, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_s);
  __Pyx_GIVEREF(__pyx_v_s);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_s)) __PYX_ERR(0, 261, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(0, 261, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":260
 * 
 * 
 * def cy_eval(s):             # <<<<<<<<<<<<<<
 *     return eval(s)
 * 
 */

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

/* "cython/core/basic.pyx":264
 * 
 * 
 * def smith_form(M):             # <<<<<<<<<<<<<<
 *     if _within_sage:
 *         if not hasattr(M, 'elementary_divisors'):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_19smith_form(PyObject *__pyx_self, 
#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_6SnapPy_18smith_form, "smith_form(M)");
static PyMethodDef __pyx_mdef_6SnapPy_19smith_form = {"smith_form", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_19smith_form, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18smith_form};
static PyObject *__pyx_pw_6SnapPy_19smith_form(PyObject *__pyx_self, 
#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_M = 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("smith_form (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_M,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_M)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 264, __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, "smith_form") < 0)) __PYX_ERR(0, 264, __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_M = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("smith_form", 1, 1, 1, __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_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("SnapPy.smith_form", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_18smith_form(__pyx_self, __pyx_v_M);

  /* 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_6SnapPy_18smith_form(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_M) {
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_result = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_zeros = NULL;
  PyObject *__pyx_v_nonzeros = NULL;
  PyObject *__pyx_7genexpr__pyx_v_x = NULL;
  PyObject *__pyx_8genexpr1__pyx_v_x = NULL;
  PyObject *__pyx_8genexpr2__pyx_v_x = NULL;
  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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("smith_form", 0);
  __Pyx_INCREF(__pyx_v_M);

  /* "cython/core/basic.pyx":265
 * 
 * def smith_form(M):
 *     if _within_sage:             # <<<<<<<<<<<<<<
 *         if not hasattr(M, 'elementary_divisors'):
 *             M = sage_matrix(M)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_within_sage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 265, __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, 265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cython/core/basic.pyx":266
 * def smith_form(M):
 *     if _within_sage:
 *         if not hasattr(M, 'elementary_divisors'):             # <<<<<<<<<<<<<<
 *             M = sage_matrix(M)
 *         m, n = M.nrows(), M.ncols()
 */
    __pyx_t_2 = __Pyx_HasAttr(__pyx_v_M, __pyx_n_s_elementary_divisors); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 266, __pyx_L1_error)
    __pyx_t_3 = (!__pyx_t_2);
    if (__pyx_t_3) {

      /* "cython/core/basic.pyx":267
 *     if _within_sage:
 *         if not hasattr(M, 'elementary_divisors'):
 *             M = sage_matrix(M)             # <<<<<<<<<<<<<<
 *         m, n = M.nrows(), M.ncols()
 *         result = M.elementary_divisors(algorithm='pari')
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sage_matrix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 267, __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_v_M};
        __pyx_t_1 = __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_1)) __PYX_ERR(0, 267, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_M, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cython/core/basic.pyx":266
 * def smith_form(M):
 *     if _within_sage:
 *         if not hasattr(M, 'elementary_divisors'):             # <<<<<<<<<<<<<<
 *             M = sage_matrix(M)
 *         m, n = M.nrows(), M.ncols()
 */
    }

    /* "cython/core/basic.pyx":268
 *         if not hasattr(M, 'elementary_divisors'):
 *             M = sage_matrix(M)
 *         m, n = M.nrows(), M.ncols()             # <<<<<<<<<<<<<<
 *         result = M.elementary_divisors(algorithm='pari')
 *     else:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_M, __pyx_n_s_nrows); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 268, __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_1 = __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_1)) __PYX_ERR(0, 268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_M, __pyx_n_s_ncols); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __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, 268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_v_m = __pyx_t_1;
    __pyx_t_1 = 0;
    __pyx_v_n = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cython/core/basic.pyx":269
 *             M = sage_matrix(M)
 *         m, n = M.nrows(), M.ncols()
 *         result = M.elementary_divisors(algorithm='pari')             # <<<<<<<<<<<<<<
 *     else:
 *         if not isinstance(M, matrix):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_M, __pyx_n_s_elementary_divisors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_algorithm, __pyx_n_s_pari) < 0) __PYX_ERR(0, 269, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_result = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cython/core/basic.pyx":265
 * 
 * def smith_form(M):
 *     if _within_sage:             # <<<<<<<<<<<<<<
 *         if not hasattr(M, 'elementary_divisors'):
 *             M = sage_matrix(M)
 */
    goto __pyx_L3;
  }

  /* "cython/core/basic.pyx":271
 *         result = M.elementary_divisors(algorithm='pari')
 *     else:
 *         if not isinstance(M, matrix):             # <<<<<<<<<<<<<<
 *             M = matrix(M)
 *         m, n = M.shape
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_matrix); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 271, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyObject_IsInstance(__pyx_v_M, __pyx_t_5); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 271, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = (!__pyx_t_3);
    if (__pyx_t_2) {

      /* "cython/core/basic.pyx":272
 *     else:
 *         if not isinstance(M, matrix):
 *             M = matrix(M)             # <<<<<<<<<<<<<<
 *         m, n = M.shape
 *         result = [int(x) for x in pari.matrix(m, n, M.entries()).matsnf()]
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_matrix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_M};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 272, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_M, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "cython/core/basic.pyx":271
 *         result = M.elementary_divisors(algorithm='pari')
 *     else:
 *         if not isinstance(M, matrix):             # <<<<<<<<<<<<<<
 *             M = matrix(M)
 *         m, n = M.shape
 */
    }

    /* "cython/core/basic.pyx":273
 *         if not isinstance(M, matrix):
 *             M = matrix(M)
 *         m, n = M.shape             # <<<<<<<<<<<<<<
 *         result = [int(x) for x in pari.matrix(m, n, M.entries()).matsnf()]
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_M, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 273, __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, 273, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      #endif
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 273, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
      index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 273, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L7_unpacking_done;
      __pyx_L6_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 273, __pyx_L1_error)
      __pyx_L7_unpacking_done:;
    }
    __pyx_v_m = __pyx_t_1;
    __pyx_t_1 = 0;
    __pyx_v_n = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cython/core/basic.pyx":274
 *             M = matrix(M)
 *         m, n = M.shape
 *         result = [int(x) for x in pari.matrix(m, n, M.entries()).matsnf()]             # <<<<<<<<<<<<<<
 * 
 *     # PARI views the input to matsnf0 as square.
 */
    { /* enter inner scope */
      __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 274, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_pari); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 274, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_matrix); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 274, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_M, __pyx_n_s_entries); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 274, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
        __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 274, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __pyx_t_10 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(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_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_10, __pyx_v_m, __pyx_v_n, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_matsnf); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 274, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
        __pyx_t_9 = __pyx_t_4; __Pyx_INCREF(__pyx_t_9);
        __pyx_t_12 = 0;
        __pyx_t_13 = NULL;
      } else {
        __pyx_t_12 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 274, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 274, __pyx_L10_error)
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      for (;;) {
        if (likely(!__pyx_t_13)) {
          if (likely(PyList_CheckExact(__pyx_t_9))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 274, __pyx_L10_error)
              #endif
              if (__pyx_t_12 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 274, __pyx_L10_error)
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 274, __pyx_L10_error)
              #endif
              if (__pyx_t_12 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 274, __pyx_L10_error)
            #else
            __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_13(__pyx_t_9);
          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, 274, __pyx_L10_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_x, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_7genexpr__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 274, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 274, __pyx_L10_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0;
      goto __pyx_L14_exit_scope;
      __pyx_L10_error:;
      __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0;
      goto __pyx_L1_error;
      __pyx_L14_exit_scope:;
    } /* exit inner scope */
    __pyx_v_result = __pyx_t_5;
    __pyx_t_5 = 0;
  }
  __pyx_L3:;

  /* "cython/core/basic.pyx":277
 * 
 *     # PARI views the input to matsnf0 as square.
 *     if m < n:             # <<<<<<<<<<<<<<
 *         result = result + [0]*(n-m)
 *     if m > n:
 */
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_m, __pyx_v_n, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 277, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 277, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_2) {

    /* "cython/core/basic.pyx":278
 *     # PARI views the input to matsnf0 as square.
 *     if m < n:
 *         result = result + [0]*(n-m)             # <<<<<<<<<<<<<<
 *     if m > n:
 *         for i in range(m - n):
 */
    __pyx_t_5 = PyNumber_Subtract(__pyx_v_n, __pyx_v_m); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_int_0)) __PYX_ERR(0, 278, __pyx_L1_error);
    { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_9, __pyx_t_5); if (unlikely(!__pyx_temp)) __PYX_ERR(0, 278, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_temp);
      __Pyx_DECREF(__pyx_t_9);
      __pyx_t_9 = __pyx_temp;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_v_result, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cython/core/basic.pyx":277
 * 
 *     # PARI views the input to matsnf0 as square.
 *     if m < n:             # <<<<<<<<<<<<<<
 *         result = result + [0]*(n-m)
 *     if m > n:
 */
  }

  /* "cython/core/basic.pyx":279
 *     if m < n:
 *         result = result + [0]*(n-m)
 *     if m > n:             # <<<<<<<<<<<<<<
 *         for i in range(m - n):
 *             result.remove(0)
 */
  __pyx_t_5 = PyObject_RichCompare(__pyx_v_m, __pyx_v_n, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 279, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 279, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_2) {

    /* "cython/core/basic.pyx":280
 *         result = result + [0]*(n-m)
 *     if m > n:
 *         for i in range(m - n):             # <<<<<<<<<<<<<<
 *             result.remove(0)
 * 
 */
    __pyx_t_5 = PyNumber_Subtract(__pyx_v_m, __pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
      __pyx_t_5 = __pyx_t_9; __Pyx_INCREF(__pyx_t_5);
      __pyx_t_12 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_12 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 280, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 280, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    for (;;) {
      if (likely(!__pyx_t_13)) {
        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, 280, __pyx_L1_error)
            #endif
            if (__pyx_t_12 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 280, __pyx_L1_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 280, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #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, 280, __pyx_L1_error)
            #endif
            if (__pyx_t_12 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_12); __Pyx_INCREF(__pyx_t_9); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 280, __pyx_L1_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 280, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_13(__pyx_t_5);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 280, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "cython/core/basic.pyx":281
 *     if m > n:
 *         for i in range(m - n):
 *             result.remove(0)             # <<<<<<<<<<<<<<
 * 
 *     # For consistency with SnapPea, need to switch the order of the factors.
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_remove); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 281, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_1 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_int_0};
        __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 281, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "cython/core/basic.pyx":280
 *         result = result + [0]*(n-m)
 *     if m > n:
 *         for i in range(m - n):             # <<<<<<<<<<<<<<
 *             result.remove(0)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/basic.pyx":279
 *     if m < n:
 *         result = result + [0]*(n-m)
 *     if m > n:             # <<<<<<<<<<<<<<
 *         for i in range(m - n):
 *             result.remove(0)
 */
  }

  /* "cython/core/basic.pyx":284
 * 
 *     # For consistency with SnapPea, need to switch the order of the factors.
 *     zeros = [x for x in result if x == 0]             # <<<<<<<<<<<<<<
 *     nonzeros = [x for x in result if x != 0]
 *     nonzeros.sort()
 */
  { /* enter inner scope */
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 284, __pyx_L22_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(PyList_CheckExact(__pyx_v_result)) || PyTuple_CheckExact(__pyx_v_result)) {
      __pyx_t_9 = __pyx_v_result; __Pyx_INCREF(__pyx_t_9);
      __pyx_t_12 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_12 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 284, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 284, __pyx_L22_error)
    }
    for (;;) {
      if (likely(!__pyx_t_13)) {
        if (likely(PyList_CheckExact(__pyx_t_9))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 284, __pyx_L22_error)
            #endif
            if (__pyx_t_12 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 284, __pyx_L22_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L22_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 284, __pyx_L22_error)
            #endif
            if (__pyx_t_12 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 284, __pyx_L22_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 284, __pyx_L22_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_13(__pyx_t_9);
        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, 284, __pyx_L22_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_x, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_2 = (__Pyx_PyInt_BoolEqObjC(__pyx_8genexpr1__pyx_v_x, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 284, __pyx_L22_error)
      if (__pyx_t_2) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_8genexpr1__pyx_v_x))) __PYX_ERR(0, 284, __pyx_L22_error)
      }
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0;
    goto __pyx_L27_exit_scope;
    __pyx_L22_error:;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L27_exit_scope:;
  } /* exit inner scope */
  __pyx_v_zeros = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":285
 *     # For consistency with SnapPea, need to switch the order of the factors.
 *     zeros = [x for x in result if x == 0]
 *     nonzeros = [x for x in result if x != 0]             # <<<<<<<<<<<<<<
 *     nonzeros.sort()
 *     return nonzeros + zeros
 */
  { /* enter inner scope */
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 285, __pyx_L30_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(PyList_CheckExact(__pyx_v_result)) || PyTuple_CheckExact(__pyx_v_result)) {
      __pyx_t_9 = __pyx_v_result; __Pyx_INCREF(__pyx_t_9);
      __pyx_t_12 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_12 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 285, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 285, __pyx_L30_error)
    }
    for (;;) {
      if (likely(!__pyx_t_13)) {
        if (likely(PyList_CheckExact(__pyx_t_9))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 285, __pyx_L30_error)
            #endif
            if (__pyx_t_12 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 285, __pyx_L30_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L30_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 285, __pyx_L30_error)
            #endif
            if (__pyx_t_12 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(0, 285, __pyx_L30_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L30_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_13(__pyx_t_9);
        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, 285, __pyx_L30_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_x, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_2 = (__Pyx_PyInt_BoolNeObjC(__pyx_8genexpr2__pyx_v_x, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 285, __pyx_L30_error)
      if (__pyx_t_2) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_8genexpr2__pyx_v_x))) __PYX_ERR(0, 285, __pyx_L30_error)
      }
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_x); __pyx_8genexpr2__pyx_v_x = 0;
    goto __pyx_L35_exit_scope;
    __pyx_L30_error:;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_x); __pyx_8genexpr2__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L35_exit_scope:;
  } /* exit inner scope */
  __pyx_v_nonzeros = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":286
 *     zeros = [x for x in result if x == 0]
 *     nonzeros = [x for x in result if x != 0]
 *     nonzeros.sort()             # <<<<<<<<<<<<<<
 *     return nonzeros + zeros
 * 
 */
  __pyx_t_14 = PyList_Sort(__pyx_v_nonzeros); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 286, __pyx_L1_error)

  /* "cython/core/basic.pyx":287
 *     nonzeros = [x for x in result if x != 0]
 *     nonzeros.sort()
 *     return nonzeros + zeros             # <<<<<<<<<<<<<<
 * 
 * # end smith form code
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = PyNumber_Add(__pyx_v_nonzeros, __pyx_v_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":264
 * 
 * 
 * def smith_form(M):             # <<<<<<<<<<<<<<
 *     if _within_sage:
 *         if not hasattr(M, 'elementary_divisors'):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("SnapPy.smith_form", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_zeros);
  __Pyx_XDECREF(__pyx_v_nonzeros);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x);
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_M);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":306
 * 
 * # SnapPea memory usage
 * def check_SnapPea_memory():             # <<<<<<<<<<<<<<
 *     verify_my_malloc_usage()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_21check_SnapPea_memory(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6SnapPy_20check_SnapPea_memory, "check_SnapPea_memory()");
static PyMethodDef __pyx_mdef_6SnapPy_21check_SnapPea_memory = {"check_SnapPea_memory", (PyCFunction)__pyx_pw_6SnapPy_21check_SnapPea_memory, METH_NOARGS, __pyx_doc_6SnapPy_20check_SnapPea_memory};
static PyObject *__pyx_pw_6SnapPy_21check_SnapPea_memory(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("check_SnapPea_memory (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6SnapPy_20check_SnapPea_memory(__pyx_self);

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

static PyObject *__pyx_pf_6SnapPy_20check_SnapPea_memory(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("check_SnapPea_memory", 1);

  /* "cython/core/basic.pyx":307
 * # SnapPea memory usage
 * def check_SnapPea_memory():
 *     verify_my_malloc_usage()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  verify_my_malloc_usage(); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 307, __pyx_L1_error)

  /* "cython/core/basic.pyx":306
 * 
 * # SnapPea memory usage
 * def check_SnapPea_memory():             # <<<<<<<<<<<<<<
 *     verify_my_malloc_usage()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("SnapPy.check_SnapPea_memory", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":310
 * 
 * 
 * def set_rand_seed(seed):             # <<<<<<<<<<<<<<
 *     """
 *     Set seed of the random number generator used for choosing
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_23set_rand_seed(PyObject *__pyx_self, 
#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_6SnapPy_22set_rand_seed, "set_rand_seed(seed)\n\n    Set seed of the random number generator used for choosing\n    triangulation moves.\n    ");
static PyMethodDef __pyx_mdef_6SnapPy_23set_rand_seed = {"set_rand_seed", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_23set_rand_seed, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_22set_rand_seed};
static PyObject *__pyx_pw_6SnapPy_23set_rand_seed(PyObject *__pyx_self, 
#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_seed = 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("set_rand_seed (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_seed,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_seed)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 310, __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, "set_rand_seed") < 0)) __PYX_ERR(0, 310, __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_seed = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_rand_seed", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 310, __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("SnapPy.set_rand_seed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_22set_rand_seed(__pyx_self, __pyx_v_seed);

  /* 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_6SnapPy_22set_rand_seed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seed) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  unsigned int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_rand_seed", 1);

  /* "cython/core/basic.pyx":315
 *     triangulation moves.
 *     """
 *     srand(seed)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_seed); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 315, __pyx_L1_error)
  srand(__pyx_t_1);

  /* "cython/core/basic.pyx":310
 * 
 * 
 * def set_rand_seed(seed):             # <<<<<<<<<<<<<<
 *     """
 *     Set seed of the random number generator used for choosing
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("SnapPy.set_rand_seed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":320
 * # Ptolemy utility functions
 * # convert and free an identification of variables structure
 * cdef convert_and_free_identification_of_variables(             # <<<<<<<<<<<<<<
 *         Identification_of_variables c_vars):
 *     var_list = []
 */

static PyObject *__pyx_f_6SnapPy_convert_and_free_identification_of_variables(Identification_of_variables __pyx_v_c_vars) {
  PyObject *__pyx_v_var_list = NULL;
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_and_free_identification_of_variables", 1);

  /* "cython/core/basic.pyx":322
 * cdef convert_and_free_identification_of_variables(
 *         Identification_of_variables c_vars):
 *     var_list = []             # <<<<<<<<<<<<<<
 * 
 *     if c_vars.variables:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_var_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":324
 *     var_list = []
 * 
 *     if c_vars.variables:             # <<<<<<<<<<<<<<
 *         for i in range(c_vars.num_identifications):
 *             var_list.append(
 */
  __pyx_t_2 = (__pyx_v_c_vars.variables != 0);
  if (__pyx_t_2) {

    /* "cython/core/basic.pyx":325
 * 
 *     if c_vars.variables:
 *         for i in range(c_vars.num_identifications):             # <<<<<<<<<<<<<<
 *             var_list.append(
 *                   (c_vars.signs[i],
 */
    __pyx_t_3 = __pyx_v_c_vars.num_identifications;
    __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;

      /* "cython/core/basic.pyx":327
 *         for i in range(c_vars.num_identifications):
 *             var_list.append(
 *                   (c_vars.signs[i],             # <<<<<<<<<<<<<<
 *                    c_vars.powers[i],
 *                    to_str(c_vars.variables[i][0]),
 */
      __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_c_vars.signs[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cython/core/basic.pyx":328
 *             var_list.append(
 *                   (c_vars.signs[i],
 *                    c_vars.powers[i],             # <<<<<<<<<<<<<<
 *                    to_str(c_vars.variables[i][0]),
 *                    to_str(c_vars.variables[i][1])))
 */
      __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_c_vars.powers[__pyx_v_i])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 328, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);

      /* "cython/core/basic.pyx":329
 *                   (c_vars.signs[i],
 *                    c_vars.powers[i],
 *                    to_str(c_vars.variables[i][0]),             # <<<<<<<<<<<<<<
 *                    to_str(c_vars.variables[i][1])))
 *     return var_list
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_to_str); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyBytes_FromString(((__pyx_v_c_vars.variables[__pyx_v_i])[0])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_11 = 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_11 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_9};
        __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 329, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }

      /* "cython/core/basic.pyx":330
 *                    c_vars.powers[i],
 *                    to_str(c_vars.variables[i][0]),
 *                    to_str(c_vars.variables[i][1])))             # <<<<<<<<<<<<<<
 *     return var_list
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_to_str); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 330, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyBytes_FromString(((__pyx_v_c_vars.variables[__pyx_v_i])[1])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 330, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_12 = NULL;
      __pyx_t_11 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_11 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_10};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 330, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }

      /* "cython/core/basic.pyx":327
 *         for i in range(c_vars.num_identifications):
 *             var_list.append(
 *                   (c_vars.signs[i],             # <<<<<<<<<<<<<<
 *                    c_vars.powers[i],
 *                    to_str(c_vars.variables[i][0]),
 */
      __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 327, __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(0, 327, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6)) __PYX_ERR(0, 327, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_7);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_7)) __PYX_ERR(0, 327, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_8);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_8)) __PYX_ERR(0, 327, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_6 = 0;
      __pyx_t_7 = 0;
      __pyx_t_8 = 0;

      /* "cython/core/basic.pyx":326
 *     if c_vars.variables:
 *         for i in range(c_vars.num_identifications):
 *             var_list.append(             # <<<<<<<<<<<<<<
 *                   (c_vars.signs[i],
 *                    c_vars.powers[i],
 */
      __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_var_list, __pyx_t_9); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 326, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "cython/core/basic.pyx":324
 *     var_list = []
 * 
 *     if c_vars.variables:             # <<<<<<<<<<<<<<
 *         for i in range(c_vars.num_identifications):
 *             var_list.append(
 */
  }

  /* "cython/core/basic.pyx":331
 *                    to_str(c_vars.variables[i][0]),
 *                    to_str(c_vars.variables[i][1])))
 *     return var_list             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_var_list);
  __pyx_r = __pyx_v_var_list;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":320
 * # Ptolemy utility functions
 * # convert and free an identification of variables structure
 * cdef convert_and_free_identification_of_variables(             # <<<<<<<<<<<<<<
 *         Identification_of_variables c_vars):
 *     var_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("SnapPy.convert_and_free_identification_of_variables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_var_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":335
 * 
 * # convert and free an integer matrix from C
 * cdef convert_and_free_integer_matrix(             # <<<<<<<<<<<<<<
 *         Integer_matrix_with_explanations c_matrix):
 *     if not c_matrix.entries:
 */

static PyObject *__pyx_f_6SnapPy_convert_and_free_integer_matrix(Integer_matrix_with_explanations __pyx_v_c_matrix) {
  PyObject *__pyx_v_python_matrix = NULL;
  PyObject *__pyx_v_explain_row = NULL;
  int __pyx_v_i;
  PyObject *__pyx_v_explain_column = NULL;
  int __pyx_8genexpr3__pyx_v_i;
  int __pyx_8genexpr4__pyx_v_j;
  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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("convert_and_free_integer_matrix", 1);

  /* "cython/core/basic.pyx":337
 * cdef convert_and_free_integer_matrix(
 *         Integer_matrix_with_explanations c_matrix):
 *     if not c_matrix.entries:             # <<<<<<<<<<<<<<
 *         return []
 * 
 */
  __pyx_t_1 = (!(__pyx_v_c_matrix.entries != 0));
  if (__pyx_t_1) {

    /* "cython/core/basic.pyx":338
 *         Integer_matrix_with_explanations c_matrix):
 *     if not c_matrix.entries:
 *         return []             # <<<<<<<<<<<<<<
 * 
 *     python_matrix = [[c_matrix.entries[i][j]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 338, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/basic.pyx":337
 * cdef convert_and_free_integer_matrix(
 *         Integer_matrix_with_explanations c_matrix):
 *     if not c_matrix.entries:             # <<<<<<<<<<<<<<
 *         return []
 * 
 */
  }

  /* "cython/core/basic.pyx":340
 *         return []
 * 
 *     python_matrix = [[c_matrix.entries[i][j]             # <<<<<<<<<<<<<<
 *                       for j in range(c_matrix.num_cols)]
 *                      for i in range(c_matrix.num_rows)]
 */
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cython/core/basic.pyx":342
 *     python_matrix = [[c_matrix.entries[i][j]
 *                       for j in range(c_matrix.num_cols)]
 *                      for i in range(c_matrix.num_rows)]             # <<<<<<<<<<<<<<
 * 
 *     explain_row = []
 */
    __pyx_t_3 = __pyx_v_c_matrix.num_rows;
    __pyx_t_4 = __pyx_t_3;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
      __pyx_8genexpr3__pyx_v_i = __pyx_t_5;
      { /* enter inner scope */

        /* "cython/core/basic.pyx":340
 *         return []
 * 
 *     python_matrix = [[c_matrix.entries[i][j]             # <<<<<<<<<<<<<<
 *                       for j in range(c_matrix.num_cols)]
 *                      for i in range(c_matrix.num_rows)]
 */
        __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);

        /* "cython/core/basic.pyx":341
 * 
 *     python_matrix = [[c_matrix.entries[i][j]
 *                       for j in range(c_matrix.num_cols)]             # <<<<<<<<<<<<<<
 *                      for i in range(c_matrix.num_rows)]
 * 
 */
        __pyx_t_7 = __pyx_v_c_matrix.num_cols;
        __pyx_t_8 = __pyx_t_7;
        for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
          __pyx_8genexpr4__pyx_v_j = __pyx_t_9;

          /* "cython/core/basic.pyx":340
 *         return []
 * 
 *     python_matrix = [[c_matrix.entries[i][j]             # <<<<<<<<<<<<<<
 *                       for j in range(c_matrix.num_cols)]
 *                      for i in range(c_matrix.num_rows)]
 */
          __pyx_t_10 = __Pyx_PyInt_From_int(((__pyx_v_c_matrix.entries[__pyx_8genexpr3__pyx_v_i])[__pyx_8genexpr4__pyx_v_j])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 340, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 340, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
      } /* exit inner scope */
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 340, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  } /* exit inner scope */
  __pyx_v_python_matrix = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/basic.pyx":344
 *                      for i in range(c_matrix.num_rows)]
 * 
 *     explain_row = []             # <<<<<<<<<<<<<<
 * 
 *     for i in range(c_matrix.num_rows):
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_explain_row = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/basic.pyx":346
 *     explain_row = []
 * 
 *     for i in range(c_matrix.num_rows):             # <<<<<<<<<<<<<<
 *         if c_matrix.explain_row[i]:
 *             explain_row.append(to_str(c_matrix.explain_row[i]))
 */
  __pyx_t_3 = __pyx_v_c_matrix.num_rows;
  __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;

    /* "cython/core/basic.pyx":347
 * 
 *     for i in range(c_matrix.num_rows):
 *         if c_matrix.explain_row[i]:             # <<<<<<<<<<<<<<
 *             explain_row.append(to_str(c_matrix.explain_row[i]))
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_c_matrix.explain_row[__pyx_v_i]) != 0);
    if (__pyx_t_1) {

      /* "cython/core/basic.pyx":348
 *     for i in range(c_matrix.num_rows):
 *         if c_matrix.explain_row[i]:
 *             explain_row.append(to_str(c_matrix.explain_row[i]))             # <<<<<<<<<<<<<<
 *         else:
 *             explain_row.append(None)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_to_str); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = __Pyx_PyBytes_FromString((__pyx_v_c_matrix.explain_row[__pyx_v_i])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_10};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 348, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_explain_row, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 348, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/basic.pyx":347
 * 
 *     for i in range(c_matrix.num_rows):
 *         if c_matrix.explain_row[i]:             # <<<<<<<<<<<<<<
 *             explain_row.append(to_str(c_matrix.explain_row[i]))
 *         else:
 */
      goto __pyx_L10;
    }

    /* "cython/core/basic.pyx":350
 *             explain_row.append(to_str(c_matrix.explain_row[i]))
 *         else:
 *             explain_row.append(None)             # <<<<<<<<<<<<<<
 * 
 *     explain_column = []
 */
    /*else*/ {
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_explain_row, Py_None); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 350, __pyx_L1_error)
    }
    __pyx_L10:;
  }

  /* "cython/core/basic.pyx":352
 *             explain_row.append(None)
 * 
 *     explain_column = []             # <<<<<<<<<<<<<<
 * 
 *     for i in range(c_matrix.num_cols):
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_explain_column = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/basic.pyx":354
 *     explain_column = []
 * 
 *     for i in range(c_matrix.num_cols):             # <<<<<<<<<<<<<<
 *         if c_matrix.explain_column[i]:
 *             explain_column.append(to_str(c_matrix.explain_column[i]))
 */
  __pyx_t_3 = __pyx_v_c_matrix.num_cols;
  __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;

    /* "cython/core/basic.pyx":355
 * 
 *     for i in range(c_matrix.num_cols):
 *         if c_matrix.explain_column[i]:             # <<<<<<<<<<<<<<
 *             explain_column.append(to_str(c_matrix.explain_column[i]))
 *         else:
 */
    __pyx_t_1 = ((__pyx_v_c_matrix.explain_column[__pyx_v_i]) != 0);
    if (__pyx_t_1) {

      /* "cython/core/basic.pyx":356
 *     for i in range(c_matrix.num_cols):
 *         if c_matrix.explain_column[i]:
 *             explain_column.append(to_str(c_matrix.explain_column[i]))             # <<<<<<<<<<<<<<
 *         else:
 *             explain_column.append(None)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_to_str); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 356, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = __Pyx_PyBytes_FromString((__pyx_v_c_matrix.explain_column[__pyx_v_i])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 356, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_10};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_explain_column, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 356, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/basic.pyx":355
 * 
 *     for i in range(c_matrix.num_cols):
 *         if c_matrix.explain_column[i]:             # <<<<<<<<<<<<<<
 *             explain_column.append(to_str(c_matrix.explain_column[i]))
 *         else:
 */
      goto __pyx_L13;
    }

    /* "cython/core/basic.pyx":358
 *             explain_column.append(to_str(c_matrix.explain_column[i]))
 *         else:
 *             explain_column.append(None)             # <<<<<<<<<<<<<<
 * 
 *     free_integer_matrix_with_explanations(c_matrix)
 */
    /*else*/ {
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_explain_column, Py_None); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 358, __pyx_L1_error)
    }
    __pyx_L13:;
  }

  /* "cython/core/basic.pyx":360
 *             explain_column.append(None)
 * 
 *     free_integer_matrix_with_explanations(c_matrix)             # <<<<<<<<<<<<<<
 * 
 *     return python_matrix, explain_row, explain_column
 */
  free_integer_matrix_with_explanations(__pyx_v_c_matrix);

  /* "cython/core/basic.pyx":362
 *     free_integer_matrix_with_explanations(c_matrix)
 * 
 *     return python_matrix, explain_row, explain_column             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_python_matrix);
  __Pyx_GIVEREF(__pyx_v_python_matrix);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_python_matrix)) __PYX_ERR(0, 362, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_explain_row);
  __Pyx_GIVEREF(__pyx_v_explain_row);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_explain_row)) __PYX_ERR(0, 362, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_explain_column);
  __Pyx_GIVEREF(__pyx_v_explain_column);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_explain_column)) __PYX_ERR(0, 362, __pyx_L1_error);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":335
 * 
 * # convert and free an integer matrix from C
 * cdef convert_and_free_integer_matrix(             # <<<<<<<<<<<<<<
 *         Integer_matrix_with_explanations c_matrix):
 *     if not c_matrix.entries:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("SnapPy.convert_and_free_integer_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_python_matrix);
  __Pyx_XDECREF(__pyx_v_explain_row);
  __Pyx_XDECREF(__pyx_v_explain_column);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":367
 * class MatrixWithExplanations():
 * 
 *     def __init__(self, mat, explain_rows, explain_columns):             # <<<<<<<<<<<<<<
 * 
 *         self.matrix = mat
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_22MatrixWithExplanations_1__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_6SnapPy_22MatrixWithExplanations___init__, "MatrixWithExplanations.__init__(self, mat, explain_rows, explain_columns)");
static PyMethodDef __pyx_mdef_6SnapPy_22MatrixWithExplanations_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_22MatrixWithExplanations_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_22MatrixWithExplanations___init__};
static PyObject *__pyx_pw_6SnapPy_22MatrixWithExplanations_1__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_self = 0;
  PyObject *__pyx_v_mat = 0;
  PyObject *__pyx_v_explain_rows = 0;
  PyObject *__pyx_v_explain_columns = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__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_self,&__pyx_n_s_mat,&__pyx_n_s_explain_rows,&__pyx_n_s_explain_columns,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 367, __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_mat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 367, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 367, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_explain_rows)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 367, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 367, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_explain_columns)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 367, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 367, __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, 367, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      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);
      values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_mat = values[1];
    __pyx_v_explain_rows = values[2];
    __pyx_v_explain_columns = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 367, __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("SnapPy.MatrixWithExplanations.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_22MatrixWithExplanations___init__(__pyx_self, __pyx_v_self, __pyx_v_mat, __pyx_v_explain_rows, __pyx_v_explain_columns);

  /* 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_6SnapPy_22MatrixWithExplanations___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mat, PyObject *__pyx_v_explain_rows, PyObject *__pyx_v_explain_columns) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "cython/core/basic.pyx":369
 *     def __init__(self, mat, explain_rows, explain_columns):
 * 
 *         self.matrix = mat             # <<<<<<<<<<<<<<
 *         self.explain_rows = explain_rows
 *         self.explain_columns = explain_columns
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_matrix, __pyx_v_mat) < 0) __PYX_ERR(0, 369, __pyx_L1_error)

  /* "cython/core/basic.pyx":370
 * 
 *         self.matrix = mat
 *         self.explain_rows = explain_rows             # <<<<<<<<<<<<<<
 *         self.explain_columns = explain_columns
 * 
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_explain_rows, __pyx_v_explain_rows) < 0) __PYX_ERR(0, 370, __pyx_L1_error)

  /* "cython/core/basic.pyx":371
 *         self.matrix = mat
 *         self.explain_rows = explain_rows
 *         self.explain_columns = explain_columns             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self, _type_str = "MatrixWithExplanations"):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_explain_columns, __pyx_v_explain_columns) < 0) __PYX_ERR(0, 371, __pyx_L1_error)

  /* "cython/core/basic.pyx":367
 * class MatrixWithExplanations():
 * 
 *     def __init__(self, mat, explain_rows, explain_columns):             # <<<<<<<<<<<<<<
 * 
 *         self.matrix = mat
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("SnapPy.MatrixWithExplanations.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":373
 *         self.explain_columns = explain_columns
 * 
 *     def __repr__(self, _type_str = "MatrixWithExplanations"):             # <<<<<<<<<<<<<<
 * 
 *         def format_explain_list(l):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_22MatrixWithExplanations_3__repr__(PyObject *__pyx_self, 
#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_6SnapPy_22MatrixWithExplanations_2__repr__, "MatrixWithExplanations.__repr__(self, _type_str='MatrixWithExplanations')");
static PyMethodDef __pyx_mdef_6SnapPy_22MatrixWithExplanations_3__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_22MatrixWithExplanations_3__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_22MatrixWithExplanations_2__repr__};
static PyObject *__pyx_pw_6SnapPy_22MatrixWithExplanations_3__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v__type_str = 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("__repr__ (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_self,&__pyx_n_s_type_str,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_MatrixWithExplanations)));
    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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 373, __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_type_str);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 373, __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, "__repr__") < 0)) __PYX_ERR(0, 373, __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_self = values[0];
    __pyx_v__type_str = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__repr__", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 373, __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("SnapPy.MatrixWithExplanations.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_22MatrixWithExplanations_2__repr__(__pyx_self, __pyx_v_self, __pyx_v__type_str);

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

/* "cython/core/basic.pyx":375
 *     def __repr__(self, _type_str = "MatrixWithExplanations"):
 * 
 *         def format_explain_list(l):             # <<<<<<<<<<<<<<
 *             if len(l) <= 6:
 *                 return repr(l)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_22MatrixWithExplanations_8__repr___1format_explain_list(PyObject *__pyx_self, 
#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 PyMethodDef __pyx_mdef_6SnapPy_22MatrixWithExplanations_8__repr___1format_explain_list = {"format_explain_list", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_22MatrixWithExplanations_8__repr___1format_explain_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6SnapPy_22MatrixWithExplanations_8__repr___1format_explain_list(PyObject *__pyx_self, 
#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_l = 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("format_explain_list (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_l,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_l)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 375, __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, "format_explain_list") < 0)) __PYX_ERR(0, 375, __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_l = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("format_explain_list", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 375, __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("SnapPy.MatrixWithExplanations.__repr__.format_explain_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_22MatrixWithExplanations_8__repr___format_explain_list(__pyx_self, __pyx_v_l);

  /* 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_6SnapPy_22MatrixWithExplanations_8__repr___format_explain_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_l) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("format_explain_list", 1);

  /* "cython/core/basic.pyx":376
 * 
 *         def format_explain_list(l):
 *             if len(l) <= 6:             # <<<<<<<<<<<<<<
 *                 return repr(l)
 * 
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_l); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 376, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 <= 6);
  if (__pyx_t_2) {

    /* "cython/core/basic.pyx":377
 *         def format_explain_list(l):
 *             if len(l) <= 6:
 *                 return repr(l)             # <<<<<<<<<<<<<<
 * 
 *             return "[ %s, ..., %s]" % (
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyObject_Repr(__pyx_v_l); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cython/core/basic.pyx":376
 * 
 *         def format_explain_list(l):
 *             if len(l) <= 6:             # <<<<<<<<<<<<<<
 *                 return repr(l)
 * 
 */
  }

  /* "cython/core/basic.pyx":379
 *                 return repr(l)
 * 
 *             return "[ %s, ..., %s]" % (             # <<<<<<<<<<<<<<
 *                 ', '.join(map(repr, l[:3])),
 *                 ', '.join(map(repr, l[-3:])))
 */
  __Pyx_XDECREF(__pyx_r);

  /* "cython/core/basic.pyx":380
 * 
 *             return "[ %s, ..., %s]" % (
 *                 ', '.join(map(repr, l[:3])),             # <<<<<<<<<<<<<<
 *                 ', '.join(map(repr, l[-3:])))
 * 
 */
  __pyx_t_3 = __Pyx_GetBuiltinName(__pyx_n_s_repr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_l, 0, 3, NULL, NULL, &__pyx_slice__3, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 380, __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, 380, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 380, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":381
 *             return "[ %s, ..., %s]" % (
 *                 ', '.join(map(repr, l[:3])),
 *                 ', '.join(map(repr, l[-3:])))             # <<<<<<<<<<<<<<
 * 
 *         return (
 */
  __pyx_t_4 = __Pyx_GetBuiltinName(__pyx_n_s_repr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_l, -3L, 0, NULL, NULL, &__pyx_slice__4, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)) __PYX_ERR(0, 381, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3)) __PYX_ERR(0, 381, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":380
 * 
 *             return "[ %s, ..., %s]" % (
 *                 ', '.join(map(repr, l[:3])),             # <<<<<<<<<<<<<<
 *                 ', '.join(map(repr, l[-3:])))
 * 
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __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(0, 380, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6)) __PYX_ERR(0, 380, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;

  /* "cython/core/basic.pyx":379
 *                 return repr(l)
 * 
 *             return "[ %s, ..., %s]" % (             # <<<<<<<<<<<<<<
 *                 ', '.join(map(repr, l[:3])),
 *                 ', '.join(map(repr, l[-3:])))
 */
  __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":375
 *     def __repr__(self, _type_str = "MatrixWithExplanations"):
 * 
 *         def format_explain_list(l):             # <<<<<<<<<<<<<<
 *             if len(l) <= 6:
 *                 return repr(l)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.MatrixWithExplanations.__repr__.format_explain_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":373
 *         self.explain_columns = explain_columns
 * 
 *     def __repr__(self, _type_str = "MatrixWithExplanations"):             # <<<<<<<<<<<<<<
 * 
 *         def format_explain_list(l):
 */

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

  /* "cython/core/basic.pyx":375
 *     def __repr__(self, _type_str = "MatrixWithExplanations"):
 * 
 *         def format_explain_list(l):             # <<<<<<<<<<<<<<
 *             if len(l) <= 6:
 *                 return repr(l)
 */
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_22MatrixWithExplanations_8__repr___1format_explain_list, 0, __pyx_n_s_MatrixWithExplanations___repr, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_format_explain_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":383
 *                 ', '.join(map(repr, l[-3:])))
 * 
 *         return (             # <<<<<<<<<<<<<<
 *             "%s(\n"
 *             "  %s,\n"
 */
  __Pyx_XDECREF(__pyx_r);

  /* "cython/core/basic.pyx":389
 *             "  explain_rows = %s)") % (
 *                               _type_str,
 *                               '\n  '.join(repr(self.matrix).split('\n')),             # <<<<<<<<<<<<<<
 *                               format_explain_list(self.explain_columns),
 *                               format_explain_list(self.explain_rows))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_matrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __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, 389, __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_kp_s_};
    __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, 389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__7, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":390
 *                               _type_str,
 *                               '\n  '.join(repr(self.matrix).split('\n')),
 *                               format_explain_list(self.explain_columns),             # <<<<<<<<<<<<<<
 *                               format_explain_list(self.explain_rows))
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_explain_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __pyx_pf_6SnapPy_22MatrixWithExplanations_8__repr___format_explain_list(__pyx_v_format_explain_list, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":391
 *                               '\n  '.join(repr(self.matrix).split('\n')),
 *                               format_explain_list(self.explain_columns),
 *                               format_explain_list(self.explain_rows))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_explain_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __pyx_pf_6SnapPy_22MatrixWithExplanations_8__repr___format_explain_list(__pyx_v_format_explain_list, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":388
 *             "  explain_columns = %s,\n"
 *             "  explain_rows = %s)") % (
 *                               _type_str,             # <<<<<<<<<<<<<<
 *                               '\n  '.join(repr(self.matrix).split('\n')),
 *                               format_explain_list(self.explain_columns),
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v__type_str);
  __Pyx_GIVEREF(__pyx_v__type_str);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__type_str)) __PYX_ERR(0, 388, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(0, 388, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_3)) __PYX_ERR(0, 388, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_5)) __PYX_ERR(0, 388, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":387
 *             "  %s,\n"
 *             "  explain_columns = %s,\n"
 *             "  explain_rows = %s)") % (             # <<<<<<<<<<<<<<
 *                               _type_str,
 *                               '\n  '.join(repr(self.matrix).split('\n')),
 */
  __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s_explain_columns_s_explain_r, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":373
 *         self.explain_columns = explain_columns
 * 
 *     def __repr__(self, _type_str = "MatrixWithExplanations"):             # <<<<<<<<<<<<<<
 * 
 *         def format_explain_list(l):
 */

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

/* "cython/core/basic.pyx":396
 * class NeumannZagierTypeEquations(MatrixWithExplanations):
 * 
 *     def __init__(self, mat, explain_rows, explain_columns):             # <<<<<<<<<<<<<<
 *         MatrixWithExplanations.__init__(self,
 *                                         mat, explain_rows, explain_columns)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_26NeumannZagierTypeEquations_1__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_6SnapPy_26NeumannZagierTypeEquations___init__, "NeumannZagierTypeEquations.__init__(self, mat, explain_rows, explain_columns)");
static PyMethodDef __pyx_mdef_6SnapPy_26NeumannZagierTypeEquations_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_26NeumannZagierTypeEquations_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_26NeumannZagierTypeEquations___init__};
static PyObject *__pyx_pw_6SnapPy_26NeumannZagierTypeEquations_1__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_self = 0;
  PyObject *__pyx_v_mat = 0;
  PyObject *__pyx_v_explain_rows = 0;
  PyObject *__pyx_v_explain_columns = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__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_self,&__pyx_n_s_mat,&__pyx_n_s_explain_rows,&__pyx_n_s_explain_columns,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 396, __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_mat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 396, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 396, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_explain_rows)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 396, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 396, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_explain_columns)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 396, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 396, __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, 396, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      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);
      values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_mat = values[1];
    __pyx_v_explain_rows = values[2];
    __pyx_v_explain_columns = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 396, __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("SnapPy.NeumannZagierTypeEquations.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_26NeumannZagierTypeEquations___init__(__pyx_self, __pyx_v_self, __pyx_v_mat, __pyx_v_explain_rows, __pyx_v_explain_columns);

  /* 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_6SnapPy_26NeumannZagierTypeEquations___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mat, PyObject *__pyx_v_explain_rows, PyObject *__pyx_v_explain_columns) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "cython/core/basic.pyx":397
 * 
 *     def __init__(self, mat, explain_rows, explain_columns):
 *         MatrixWithExplanations.__init__(self,             # <<<<<<<<<<<<<<
 *                                         mat, explain_rows, explain_columns)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MatrixWithExplanations); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/basic.pyx":398
 *     def __init__(self, mat, explain_rows, explain_columns):
 *         MatrixWithExplanations.__init__(self,
 *                                         mat, explain_rows, explain_columns)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __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[5] = {__pyx_t_2, __pyx_v_self, __pyx_v_mat, __pyx_v_explain_rows, __pyx_v_explain_columns};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __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;

  /* "cython/core/basic.pyx":396
 * class NeumannZagierTypeEquations(MatrixWithExplanations):
 * 
 *     def __init__(self, mat, explain_rows, explain_columns):             # <<<<<<<<<<<<<<
 *         MatrixWithExplanations.__init__(self,
 *                                         mat, explain_rows, explain_columns)
 */

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

/* "cython/core/basic.pyx":400
 *                                         mat, explain_rows, explain_columns)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return MatrixWithExplanations.__repr__(self,
 *                                                "NeumannZagierTypeEquations")
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_26NeumannZagierTypeEquations_3__repr__(PyObject *__pyx_self, 
#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_6SnapPy_26NeumannZagierTypeEquations_2__repr__, "NeumannZagierTypeEquations.__repr__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_26NeumannZagierTypeEquations_3__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_26NeumannZagierTypeEquations_3__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_26NeumannZagierTypeEquations_2__repr__};
static PyObject *__pyx_pw_6SnapPy_26NeumannZagierTypeEquations_3__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 400, __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, "__repr__") < 0)) __PYX_ERR(0, 400, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 400, __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("SnapPy.NeumannZagierTypeEquations.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_26NeumannZagierTypeEquations_2__repr__(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_26NeumannZagierTypeEquations_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "cython/core/basic.pyx":401
 * 
 *     def __repr__(self):
 *         return MatrixWithExplanations.__repr__(self,             # <<<<<<<<<<<<<<
 *                                                "NeumannZagierTypeEquations")
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MatrixWithExplanations); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_repr_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 401, __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[3] = {__pyx_t_2, __pyx_v_self, __pyx_n_s_NeumannZagierTypeEquations};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":400
 *                                         mat, explain_rows, explain_columns)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return MatrixWithExplanations.__repr__(self,
 *                                                "NeumannZagierTypeEquations")
 */

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

/* "cython/core/basic.pyx":415
 *     Real2gen = Real2gen_string
 * 
 * cdef Complex2gen(Complex C):             # <<<<<<<<<<<<<<
 *     """
 *     Convert a Complex to a pari gen.
 */

static PyObject *__pyx_f_6SnapPy_Complex2gen(Complex __pyx_v_C) {
  PyObject *__pyx_v_real_part = 0;
  PyObject *__pyx_v_imag_part = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Complex2gen", 1);

  /* "cython/core/basic.pyx":419
 *     Convert a Complex to a pari gen.
 *     """
 *     cdef real_part = Real2gen(C.real)             # <<<<<<<<<<<<<<
 *     cdef imag_part = Real2gen(C.imag)
 *     return pari.complex(real_part, imag_part)
 */
  __pyx_t_1 = __pyx_v_6SnapPy_Real2gen(__pyx_v_C.real); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_real_part = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":420
 *     """
 *     cdef real_part = Real2gen(C.real)
 *     cdef imag_part = Real2gen(C.imag)             # <<<<<<<<<<<<<<
 *     return pari.complex(real_part, imag_part)
 * 
 */
  __pyx_t_1 = __pyx_v_6SnapPy_Real2gen(__pyx_v_C.imag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_imag_part = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":421
 *     cdef real_part = Real2gen(C.real)
 *     cdef imag_part = Real2gen(C.imag)
 *     return pari.complex(real_part, imag_part)             # <<<<<<<<<<<<<<
 * 
 * cdef RealImag2gen(Real R, Real I):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pari); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_complex); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 421, __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[3] = {__pyx_t_2, __pyx_v_real_part, __pyx_v_imag_part};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":415
 *     Real2gen = Real2gen_string
 * 
 * cdef Complex2gen(Complex C):             # <<<<<<<<<<<<<<
 *     """
 *     Convert a Complex to a pari gen.
 */

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

/* "cython/core/basic.pyx":423
 *     return pari.complex(real_part, imag_part)
 * 
 * cdef RealImag2gen(Real R, Real I):             # <<<<<<<<<<<<<<
 *     return pari.complex(Real2gen(R), Real2gen(I))
 * 
 */

static PyObject *__pyx_f_6SnapPy_RealImag2gen(__pyx_t_6SnapPy_Real __pyx_v_R, __pyx_t_6SnapPy_Real __pyx_v_I) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("RealImag2gen", 1);

  /* "cython/core/basic.pyx":424
 * 
 * cdef RealImag2gen(Real R, Real I):
 *     return pari.complex(Real2gen(R), Real2gen(I))             # <<<<<<<<<<<<<<
 * 
 * cdef Complex2complex(Complex C):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pari); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_complex); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __pyx_v_6SnapPy_Real2gen(__pyx_v_R); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __pyx_v_6SnapPy_Real2gen(__pyx_v_I); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 424, __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_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":423
 *     return pari.complex(real_part, imag_part)
 * 
 * cdef RealImag2gen(Real R, Real I):             # <<<<<<<<<<<<<<
 *     return pari.complex(Real2gen(R), Real2gen(I))
 * 
 */

  /* 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("SnapPy.RealImag2gen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":426
 *     return pari.complex(Real2gen(R), Real2gen(I))
 * 
 * cdef Complex2complex(Complex C):             # <<<<<<<<<<<<<<
 *     """
 *     Convert a Complex to a python complex.
 */

static PyObject *__pyx_f_6SnapPy_Complex2complex(Complex __pyx_v_C) {
  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("Complex2complex", 1);

  /* "cython/core/basic.pyx":430
 *     Convert a Complex to a python complex.
 *     """
 *     return complex( float(<double>C.real), float(<double>C.imag) )             # <<<<<<<<<<<<<<
 * 
 * cdef Real2float(Real R):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((double)__pyx_v_C.real)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(((double)__pyx_v_C.imag)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __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, 430, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyComplex_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":426
 *     return pari.complex(Real2gen(R), Real2gen(I))
 * 
 * cdef Complex2complex(Complex C):             # <<<<<<<<<<<<<<
 *     """
 *     Convert a Complex to a python complex.
 */

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

/* "cython/core/basic.pyx":432
 *     return complex( float(<double>C.real), float(<double>C.imag) )
 * 
 * cdef Real2float(Real R):             # <<<<<<<<<<<<<<
 *     """
 *     Convert a Real to a python float.
 */

static PyObject *__pyx_f_6SnapPy_Real2float(__pyx_t_6SnapPy_Real __pyx_v_R) {
  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("Real2float", 1);

  /* "cython/core/basic.pyx":436
 *     Convert a Real to a python float.
 *     """
 *     return float(<double>R)             # <<<<<<<<<<<<<<
 * 
 * cdef Complex complex2Complex(complex z):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((double)__pyx_v_R)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":432
 *     return complex( float(<double>C.real), float(<double>C.imag) )
 * 
 * cdef Real2float(Real R):             # <<<<<<<<<<<<<<
 *     """
 *     Convert a Real to a python float.
 */

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

/* "cython/core/basic.pyx":438
 *     return float(<double>R)
 * 
 * cdef Complex complex2Complex(complex z):             # <<<<<<<<<<<<<<
 *     """
 *     Convert a python complex to a Complex.
 */

static Complex __pyx_f_6SnapPy_complex2Complex(__pyx_t_double_complex __pyx_v_z) {
  Complex __pyx_v_result;
  Complex __pyx_r;

  /* "cython/core/basic.pyx":443
 *     """
 *     cdef Complex result
 *     result.real = <Real>z.real             # <<<<<<<<<<<<<<
 *     result.imag = <Real>z.imag
 *     return result
 */
  __pyx_v_result.real = ((__pyx_t_6SnapPy_Real)__Pyx_CREAL(__pyx_v_z));

  /* "cython/core/basic.pyx":444
 *     cdef Complex result
 *     result.real = <Real>z.real
 *     result.imag = <Real>z.imag             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_v_result.imag = ((__pyx_t_6SnapPy_Real)__Pyx_CIMAG(__pyx_v_z));

  /* "cython/core/basic.pyx":445
 *     result.real = <Real>z.real
 *     result.imag = <Real>z.imag
 *     return result             # <<<<<<<<<<<<<<
 * 
 * cdef Real Object2Real(obj):
 */
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":438
 *     return float(<double>R)
 * 
 * cdef Complex complex2Complex(complex z):             # <<<<<<<<<<<<<<
 *     """
 *     Convert a python complex to a Complex.
 */

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

/* "cython/core/basic.pyx":447
 *     return result
 * 
 * cdef Real Object2Real(obj):             # <<<<<<<<<<<<<<
 *     cdef char* c_string
 *     try:
 */

static __pyx_t_6SnapPy_Real __pyx_f_6SnapPy_Object2Real(PyObject *__pyx_v_obj) {
  char *__pyx_v_c_string;
  PyObject *__pyx_v_string = NULL;
  __pyx_t_6SnapPy_Real __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  double __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  char *__pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Object2Real", 1);

  /* "cython/core/basic.pyx":449
 * cdef Real Object2Real(obj):
 *     cdef char* c_string
 *     try:             # <<<<<<<<<<<<<<
 *         string = obj.as_string() if isinstance(obj, Number) else str(obj)
 *         # Pari idiosyncratically formats small and large numbers as,
 */
  {
    __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:*/ {

      /* "cython/core/basic.pyx":450
 *     cdef char* c_string
 *     try:
 *         string = obj.as_string() if isinstance(obj, Number) else str(obj)             # <<<<<<<<<<<<<<
 *         # Pari idiosyncratically formats small and large numbers as,
 *         # e.g., "1.0 E-10" (note the space before "E").
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Number); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 450, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_5); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 450, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_6) {
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_as_string); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 450, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __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, NULL};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 450, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __pyx_t_4 = __pyx_t_5;
        __pyx_t_5 = 0;
      } else {
        __pyx_t_5 = __Pyx_PyObject_Str(__pyx_v_obj); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 450, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __pyx_t_5;
        __pyx_t_5 = 0;
      }
      __pyx_v_string = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "cython/core/basic.pyx":454
 *         # e.g., "1.0 E-10" (note the space before "E").
 *         # Remove it - otherwise it cannot be parsed.
 *         string = string.replace(' ', '')             # <<<<<<<<<<<<<<
 *         float(string)
 *     except:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_string, __pyx_n_s_replace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 454, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 454, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_string, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "cython/core/basic.pyx":455
 *         # Remove it - otherwise it cannot be parsed.
 *         string = string.replace(' ', '')
 *         float(string)             # <<<<<<<<<<<<<<
 *     except:
 *         raise ValueError('Cannot convert %s to a Real.' % type(obj))
 */
      __pyx_t_10 = __Pyx_PyObject_AsDouble(__pyx_v_string); if (unlikely(__pyx_t_10 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 455, __pyx_L3_error)

      /* "cython/core/basic.pyx":449
 * cdef Real Object2Real(obj):
 *     cdef char* c_string
 *     try:             # <<<<<<<<<<<<<<
 *         string = obj.as_string() if isinstance(obj, Number) else str(obj)
 *         # Pari idiosyncratically formats small and large numbers as,
 */
    }
    __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;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cython/core/basic.pyx":456
 *         string = string.replace(' ', '')
 *         float(string)
 *     except:             # <<<<<<<<<<<<<<
 *         raise ValueError('Cannot convert %s to a Real.' % type(obj))
 *     string = to_byte_str(string)
 */
    /*except:*/ {
      __Pyx_AddTraceback("SnapPy.Object2Real", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(0, 456, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "cython/core/basic.pyx":457
 *         float(string)
 *     except:
 *         raise ValueError('Cannot convert %s to a Real.' % type(obj))             # <<<<<<<<<<<<<<
 *     string = to_byte_str(string)
 *     c_string = string
 */
      __pyx_t_8 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_convert_s_to_a_Real, ((PyObject *)Py_TYPE(__pyx_v_obj))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 457, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 457, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_Raise(__pyx_t_11, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __PYX_ERR(0, 457, __pyx_L5_except_error)
    }

    /* "cython/core/basic.pyx":449
 * cdef Real Object2Real(obj):
 *     cdef char* c_string
 *     try:             # <<<<<<<<<<<<<<
 *         string = obj.as_string() if isinstance(obj, Number) else str(obj)
 *         # Pari idiosyncratically formats small and large numbers as,
 */
    __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:;
  }

  /* "cython/core/basic.pyx":458
 *     except:
 *         raise ValueError('Cannot convert %s to a Real.' % type(obj))
 *     string = to_byte_str(string)             # <<<<<<<<<<<<<<
 *     c_string = string
 *     return Real_from_string(c_string)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_to_byte_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_9 = 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_9 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_string};
    __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_string, __pyx_t_7);
  __pyx_t_7 = 0;

  /* "cython/core/basic.pyx":459
 *         raise ValueError('Cannot convert %s to a Real.' % type(obj))
 *     string = to_byte_str(string)
 *     c_string = string             # <<<<<<<<<<<<<<
 *     return Real_from_string(c_string)
 * 
 */
  __pyx_t_12 = __Pyx_PyObject_AsWritableString(__pyx_v_string); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 459, __pyx_L1_error)
  __pyx_v_c_string = __pyx_t_12;

  /* "cython/core/basic.pyx":460
 *     string = to_byte_str(string)
 *     c_string = string
 *     return Real_from_string(c_string)             # <<<<<<<<<<<<<<
 * 
 * cdef Complex Object2Complex(obj):
 */
  __pyx_r = Real_from_string(__pyx_v_c_string);
  goto __pyx_L0;

  /* "cython/core/basic.pyx":447
 *     return result
 * 
 * cdef Real Object2Real(obj):             # <<<<<<<<<<<<<<
 *     cdef char* c_string
 *     try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("SnapPy.Object2Real", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_string);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":462
 *     return Real_from_string(c_string)
 * 
 * cdef Complex Object2Complex(obj):             # <<<<<<<<<<<<<<
 *     cdef Real real, imag
 *     cdef Complex result
 */

static Complex __pyx_f_6SnapPy_Object2Complex(PyObject *__pyx_v_obj) {
  __pyx_t_6SnapPy_Real __pyx_v_real;
  __pyx_t_6SnapPy_Real __pyx_v_imag;
  Complex __pyx_v_result;
  Complex __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  double __pyx_t_7;
  __pyx_t_6SnapPy_Real __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Object2Complex", 1);

  /* "cython/core/basic.pyx":465
 *     cdef Real real, imag
 *     cdef Complex result
 *     if hasattr(obj, 'real') and hasattr(obj, 'imag'):             # <<<<<<<<<<<<<<
 *         try:
 *             float(obj.real)
 */
  __pyx_t_2 = __Pyx_HasAttr(__pyx_v_obj, __pyx_n_s_real); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 465, __pyx_L1_error)
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_HasAttr(__pyx_v_obj, __pyx_n_s_imag); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 465, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cython/core/basic.pyx":466
 *     cdef Complex result
 *     if hasattr(obj, 'real') and hasattr(obj, 'imag'):
 *         try:             # <<<<<<<<<<<<<<
 *             float(obj.real)
 *             real = Object2Real(obj.real)
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      /*try:*/ {

        /* "cython/core/basic.pyx":467
 *     if hasattr(obj, 'real') and hasattr(obj, 'imag'):
 *         try:
 *             float(obj.real)             # <<<<<<<<<<<<<<
 *             real = Object2Real(obj.real)
 *         except TypeError:  # Probably Sage type
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_real); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 467, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __Pyx_PyObject_AsDouble(__pyx_t_6); if (unlikely(__pyx_t_7 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 467, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "cython/core/basic.pyx":468
 *         try:
 *             float(obj.real)
 *             real = Object2Real(obj.real)             # <<<<<<<<<<<<<<
 *         except TypeError:  # Probably Sage type
 *             real = Object2Real(obj.real())
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_real); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 468, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = __pyx_f_6SnapPy_Object2Real(__pyx_t_6); if (unlikely(__pyx_t_8 == ((__pyx_t_6SnapPy_Real)-1) && PyErr_Occurred())) __PYX_ERR(0, 468, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_v_real = __pyx_t_8;

        /* "cython/core/basic.pyx":466
 *     cdef Complex result
 *     if hasattr(obj, 'real') and hasattr(obj, 'imag'):
 *         try:             # <<<<<<<<<<<<<<
 *             float(obj.real)
 *             real = Object2Real(obj.real)
 */
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L11_try_end;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cython/core/basic.pyx":469
 *             float(obj.real)
 *             real = Object2Real(obj.real)
 *         except TypeError:  # Probably Sage type             # <<<<<<<<<<<<<<
 *             real = Object2Real(obj.real())
 *         try:
 */
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
      if (__pyx_t_9) {
        __Pyx_AddTraceback("SnapPy.Object2Complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(0, 469, __pyx_L8_except_error)
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);

        /* "cython/core/basic.pyx":470
 *             real = Object2Real(obj.real)
 *         except TypeError:  # Probably Sage type
 *             real = Object2Real(obj.real())             # <<<<<<<<<<<<<<
 *         try:
 *             float(obj.imag)
 */
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_real); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 470, __pyx_L8_except_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = NULL;
        __pyx_t_9 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_9 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL};
          __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 470, __pyx_L8_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __pyx_t_8 = __pyx_f_6SnapPy_Object2Real(__pyx_t_12); if (unlikely(__pyx_t_8 == ((__pyx_t_6SnapPy_Real)-1) && PyErr_Occurred())) __PYX_ERR(0, 470, __pyx_L8_except_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_v_real = __pyx_t_8;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L7_exception_handled;
      }
      goto __pyx_L8_except_error;

      /* "cython/core/basic.pyx":466
 *     cdef Complex result
 *     if hasattr(obj, 'real') and hasattr(obj, 'imag'):
 *         try:             # <<<<<<<<<<<<<<
 *             float(obj.real)
 *             real = Object2Real(obj.real)
 */
      __pyx_L8_except_error:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      goto __pyx_L1_error;
      __pyx_L7_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
      __pyx_L11_try_end:;
    }

    /* "cython/core/basic.pyx":471
 *         except TypeError:  # Probably Sage type
 *             real = Object2Real(obj.real())
 *         try:             # <<<<<<<<<<<<<<
 *             float(obj.imag)
 *             imag = Object2Real(obj.imag)
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_3);
      /*try:*/ {

        /* "cython/core/basic.pyx":472
 *             real = Object2Real(obj.real())
 *         try:
 *             float(obj.imag)             # <<<<<<<<<<<<<<
 *             imag = Object2Real(obj.imag)
 *         except TypeError:  # Probably Sage type
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_imag); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 472, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_7 = __Pyx_PyObject_AsDouble(__pyx_t_11); if (unlikely(__pyx_t_7 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 472, __pyx_L14_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "cython/core/basic.pyx":473
 *         try:
 *             float(obj.imag)
 *             imag = Object2Real(obj.imag)             # <<<<<<<<<<<<<<
 *         except TypeError:  # Probably Sage type
 *             imag = Object2Real(obj.imag())
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_imag); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 473, __pyx_L14_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_8 = __pyx_f_6SnapPy_Object2Real(__pyx_t_11); if (unlikely(__pyx_t_8 == ((__pyx_t_6SnapPy_Real)-1) && PyErr_Occurred())) __PYX_ERR(0, 473, __pyx_L14_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_v_imag = __pyx_t_8;

        /* "cython/core/basic.pyx":471
 *         except TypeError:  # Probably Sage type
 *             real = Object2Real(obj.real())
 *         try:             # <<<<<<<<<<<<<<
 *             float(obj.imag)
 *             imag = Object2Real(obj.imag)
 */
      }
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L19_try_end;
      __pyx_L14_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cython/core/basic.pyx":474
 *             float(obj.imag)
 *             imag = Object2Real(obj.imag)
 *         except TypeError:  # Probably Sage type             # <<<<<<<<<<<<<<
 *             imag = Object2Real(obj.imag())
 *     else:
 */
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
      if (__pyx_t_9) {
        __Pyx_AddTraceback("SnapPy.Object2Complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_10, &__pyx_t_6) < 0) __PYX_ERR(0, 474, __pyx_L16_except_error)
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_6);

        /* "cython/core/basic.pyx":475
 *             imag = Object2Real(obj.imag)
 *         except TypeError:  # Probably Sage type
 *             imag = Object2Real(obj.imag())             # <<<<<<<<<<<<<<
 *     else:
 *         real = Object2Real(obj)
 */
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_imag); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 475, __pyx_L16_except_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = NULL;
        __pyx_t_9 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_9 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL};
          __pyx_t_12 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 475, __pyx_L16_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __pyx_t_8 = __pyx_f_6SnapPy_Object2Real(__pyx_t_12); if (unlikely(__pyx_t_8 == ((__pyx_t_6SnapPy_Real)-1) && PyErr_Occurred())) __PYX_ERR(0, 475, __pyx_L16_except_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_v_imag = __pyx_t_8;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L15_exception_handled;
      }
      goto __pyx_L16_except_error;

      /* "cython/core/basic.pyx":471
 *         except TypeError:  # Probably Sage type
 *             real = Object2Real(obj.real())
 *         try:             # <<<<<<<<<<<<<<
 *             float(obj.imag)
 *             imag = Object2Real(obj.imag)
 */
      __pyx_L16_except_error:;
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
      goto __pyx_L1_error;
      __pyx_L15_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
      __pyx_L19_try_end:;
    }

    /* "cython/core/basic.pyx":465
 *     cdef Real real, imag
 *     cdef Complex result
 *     if hasattr(obj, 'real') and hasattr(obj, 'imag'):             # <<<<<<<<<<<<<<
 *         try:
 *             float(obj.real)
 */
    goto __pyx_L3;
  }

  /* "cython/core/basic.pyx":477
 *             imag = Object2Real(obj.imag())
 *     else:
 *         real = Object2Real(obj)             # <<<<<<<<<<<<<<
 *         imag = <Real>0.0
 *     result.real = real
 */
  /*else*/ {
    __pyx_t_8 = __pyx_f_6SnapPy_Object2Real(__pyx_v_obj); if (unlikely(__pyx_t_8 == ((__pyx_t_6SnapPy_Real)-1) && PyErr_Occurred())) __PYX_ERR(0, 477, __pyx_L1_error)
    __pyx_v_real = __pyx_t_8;

    /* "cython/core/basic.pyx":478
 *     else:
 *         real = Object2Real(obj)
 *         imag = <Real>0.0             # <<<<<<<<<<<<<<
 *     result.real = real
 *     result.imag = imag
 */
    __pyx_v_imag = ((__pyx_t_6SnapPy_Real)0.0);
  }
  __pyx_L3:;

  /* "cython/core/basic.pyx":479
 *         real = Object2Real(obj)
 *         imag = <Real>0.0
 *     result.real = real             # <<<<<<<<<<<<<<
 *     result.imag = imag
 *     return result
 */
  __pyx_v_result.real = __pyx_v_real;

  /* "cython/core/basic.pyx":480
 *         imag = <Real>0.0
 *     result.real = real
 *     result.imag = imag             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_v_result.imag = __pyx_v_imag;

  /* "cython/core/basic.pyx":481
 *     result.real = real
 *     result.imag = imag
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":462
 *     return Real_from_string(c_string)
 * 
 * cdef Complex Object2Complex(obj):             # <<<<<<<<<<<<<<
 *     cdef Real real, imag
 *     cdef Complex result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("SnapPy.Object2Complex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":484
 * 
 * 
 * cdef double Real2double(Real R):             # <<<<<<<<<<<<<<
 *     cdef double* quad = <double *>&R
 *     return quad[0]
 */

static double __pyx_f_6SnapPy_Real2double(__pyx_t_6SnapPy_Real __pyx_v_R) {
  double *__pyx_v_quad;
  double __pyx_r;

  /* "cython/core/basic.pyx":485
 * 
 * cdef double Real2double(Real R):
 *     cdef double* quad = <double *>&R             # <<<<<<<<<<<<<<
 *     return quad[0]
 * 
 */
  __pyx_v_quad = ((double *)(&__pyx_v_R));

  /* "cython/core/basic.pyx":486
 * cdef double Real2double(Real R):
 *     cdef double* quad = <double *>&R
 *     return quad[0]             # <<<<<<<<<<<<<<
 * 
 * cdef B2B(Boolean B):
 */
  __pyx_r = (__pyx_v_quad[0]);
  goto __pyx_L0;

  /* "cython/core/basic.pyx":484
 * 
 * 
 * cdef double Real2double(Real R):             # <<<<<<<<<<<<<<
 *     cdef double* quad = <double *>&R
 *     return quad[0]
 */

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

/* "cython/core/basic.pyx":488
 *     return quad[0]
 * 
 * cdef B2B(Boolean B):             # <<<<<<<<<<<<<<
 *     return B != 0
 * 
 */

static PyObject *__pyx_f_6SnapPy_B2B(Boolean __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("B2B", 1);

  /* "cython/core/basic.pyx":489
 * 
 * cdef B2B(Boolean B):
 *     return B != 0             # <<<<<<<<<<<<<<
 * 
 * # Infos are immutable containers which hold information about SnapPy
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_B != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":488
 *     return quad[0]
 * 
 * cdef B2B(Boolean B):             # <<<<<<<<<<<<<<
 *     return B != 0
 * 
 */

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

/* "cython/core/basic.pyx":503
 *     Initialize with keyword arguments, or **dict.
 *     """
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         # Hack to support obsolete keys
 *         content = dict(kwargs)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_4Info_1__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_6SnapPy_4Info___init__, "Info.__init__(self, **kwargs)");
static PyMethodDef __pyx_mdef_6SnapPy_4Info_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_4Info_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_4Info___init__};
static PyObject *__pyx_pw_6SnapPy_4Info_1__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_self = 0;
  PyObject *__pyx_v_kwargs = 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("__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);
  __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kwargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 503, __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, __pyx_v_kwargs, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 503, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 503, __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_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
  __Pyx_AddTraceback("SnapPy.Info.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_4Info___init__(__pyx_self, __pyx_v_self, __pyx_v_kwargs);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_kwargs);
  {
    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_6SnapPy_4Info___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_content = NULL;
  PyObject *__pyx_v_old = NULL;
  PyObject *__pyx_v_new = 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;
  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("__init__", 1);

  /* "cython/core/basic.pyx":505
 *     def __init__(self, **kwargs):
 *         # Hack to support obsolete keys
 *         content = dict(kwargs)             # <<<<<<<<<<<<<<
 *         for old, new in self._obsolete.items():
 *             try:
 */
  __pyx_t_1 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_content = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":506
 *         # Hack to support obsolete keys
 *         content = dict(kwargs)
 *         for old, new in self._obsolete.items():             # <<<<<<<<<<<<<<
 *             try:
 *                 content[old] = content[new]
 */
  __pyx_t_2 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_obsolete); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (unlikely(__pyx_t_5 == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
    __PYX_ERR(0, 506, __pyx_L1_error)
  }
  __pyx_t_6 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_XDECREF(__pyx_t_1);
  __pyx_t_1 = __pyx_t_6;
  __pyx_t_6 = 0;
  while (1) {
    __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_6, &__pyx_t_5, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_7 == 0)) break;
    if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_old, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_XDECREF_SET(__pyx_v_new, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cython/core/basic.pyx":507
 *         content = dict(kwargs)
 *         for old, new in self._obsolete.items():
 *             try:             # <<<<<<<<<<<<<<
 *                 content[old] = content[new]
 *             except KeyError:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      /*try:*/ {

        /* "cython/core/basic.pyx":508
 *         for old, new in self._obsolete.items():
 *             try:
 *                 content[old] = content[new]             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 pass
 */
        __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_content, __pyx_v_new); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 508, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (unlikely((PyDict_SetItem(__pyx_v_content, __pyx_v_old, __pyx_t_5) < 0))) __PYX_ERR(0, 508, __pyx_L5_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "cython/core/basic.pyx":507
 *         content = dict(kwargs)
 *         for old, new in self._obsolete.items():
 *             try:             # <<<<<<<<<<<<<<
 *                 content[old] = content[new]
 *             except KeyError:
 */
      }
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L12_try_end;
      __pyx_L5_error:;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cython/core/basic.pyx":509
 *             try:
 *                 content[old] = content[new]
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 pass
 *         super(Info, self).__init__(content)
 */
      __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_7) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L6_exception_handled;
      }
      goto __pyx_L7_except_error;

      /* "cython/core/basic.pyx":507
 *         content = dict(kwargs)
 *         for old, new in self._obsolete.items():
 *             try:             # <<<<<<<<<<<<<<
 *                 content[old] = content[new]
 *             except KeyError:
 */
      __pyx_L7_except_error:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      goto __pyx_L1_error;
      __pyx_L6_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      __pyx_L12_try_end:;
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":511
 *             except KeyError:
 *                 pass
 *         super(Info, self).__init__(content)             # <<<<<<<<<<<<<<
 *         self.__dict__.update(kwargs)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5)) __PYX_ERR(0, 511, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self)) __PYX_ERR(0, 511, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_init); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_4 = 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_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_content};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __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;

  /* "cython/core/basic.pyx":512
 *                 pass
 *         super(Info, self).__init__(content)
 *         self.__dict__.update(kwargs)             # <<<<<<<<<<<<<<
 * 
 *     def _immutable(self, *args):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_kwargs};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":503
 *     Initialize with keyword arguments, or **dict.
 *     """
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         # Hack to support obsolete keys
 *         content = dict(kwargs)
 */

  /* 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("SnapPy.Info.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_content);
  __Pyx_XDECREF(__pyx_v_old);
  __Pyx_XDECREF(__pyx_v_new);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":514
 *         self.__dict__.update(kwargs)
 * 
 *     def _immutable(self, *args):             # <<<<<<<<<<<<<<
 *         raise AttributeError('Info objects are immutable.')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_4Info_3_immutable(PyObject *__pyx_self, 
#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_6SnapPy_4Info_2_immutable, "Info._immutable(self, *args)");
static PyMethodDef __pyx_mdef_6SnapPy_4Info_3_immutable = {"_immutable", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_4Info_3_immutable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_4Info_2_immutable};
static PyObject *__pyx_pw_6SnapPy_4Info_3_immutable(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_args = 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("_immutable (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);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        default:
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 514, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, used_pos_args, "_immutable") < 0)) __PYX_ERR(0, 514, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_immutable", 0, 1, 1, __pyx_nargs); __PYX_ERR(0, 514, __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_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("SnapPy.Info._immutable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_4Info_2_immutable(__pyx_self, __pyx_v_self, __pyx_v_args);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_args);
  {
    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_6SnapPy_4Info_2_immutable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_immutable", 1);

  /* "cython/core/basic.pyx":515
 * 
 *     def _immutable(self, *args):
 *         raise AttributeError('Info objects are immutable.')             # <<<<<<<<<<<<<<
 * 
 *     def keys(self):
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_AttributeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __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, 515, __pyx_L1_error)

  /* "cython/core/basic.pyx":514
 *         self.__dict__.update(kwargs)
 * 
 *     def _immutable(self, *args):             # <<<<<<<<<<<<<<
 *         raise AttributeError('Info objects are immutable.')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("SnapPy.Info._immutable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":517
 *         raise AttributeError('Info objects are immutable.')
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self.__dict__.keys()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_4Info_5keys(PyObject *__pyx_self, 
#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_6SnapPy_4Info_4keys, "Info.keys(self)");
static PyMethodDef __pyx_mdef_6SnapPy_4Info_5keys = {"keys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_4Info_5keys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_4Info_4keys};
static PyObject *__pyx_pw_6SnapPy_4Info_5keys(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("keys (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 517, __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, "keys") < 0)) __PYX_ERR(0, 517, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("keys", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 517, __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("SnapPy.Info.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_4Info_4keys(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_4Info_4keys(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("keys", 1);

  /* "cython/core/basic.pyx":518
 * 
 *     def keys(self):
 *         return self.__dict__.keys()             # <<<<<<<<<<<<<<
 * 
 *     __setattr__ = __delattr__ = __setitem__ = __delitem__ = _immutable
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 518, __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 (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, 518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":517
 *         raise AttributeError('Info objects are immutable.')
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self.__dict__.keys()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.Info.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":526
 * 
 * class CuspInfo(Info):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self.is_complete:
 *             if 'shape' in self:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8CuspInfo_1__repr__(PyObject *__pyx_self, 
#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_6SnapPy_8CuspInfo___repr__, "CuspInfo.__repr__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_8CuspInfo_1__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8CuspInfo_1__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8CuspInfo___repr__};
static PyObject *__pyx_pw_6SnapPy_8CuspInfo_1__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 526, __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, "__repr__") < 0)) __PYX_ERR(0, 526, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 526, __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("SnapPy.CuspInfo.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8CuspInfo___repr__(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_8CuspInfo___repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "cython/core/basic.pyx":527
 * class CuspInfo(Info):
 *     def __repr__(self):
 *         if self.is_complete:             # <<<<<<<<<<<<<<
 *             if 'shape' in self:
 *                 return ('Cusp %-2d: complete %s of shape %s' %
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_is_complete); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __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, 527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cython/core/basic.pyx":528
 *     def __repr__(self):
 *         if self.is_complete:
 *             if 'shape' in self:             # <<<<<<<<<<<<<<
 *                 return ('Cusp %-2d: complete %s of shape %s' %
 *                         (self.index, self.topology, self.shape) )
 */
    __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_shape, __pyx_v_self, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 528, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "cython/core/basic.pyx":529
 *         if self.is_complete:
 *             if 'shape' in self:
 *                 return ('Cusp %-2d: complete %s of shape %s' %             # <<<<<<<<<<<<<<
 *                         (self.index, self.topology, self.shape) )
 *             else:
 */
      __Pyx_XDECREF(__pyx_r);

      /* "cython/core/basic.pyx":530
 *             if 'shape' in self:
 *                 return ('Cusp %-2d: complete %s of shape %s' %
 *                         (self.index, self.topology, self.shape) )             # <<<<<<<<<<<<<<
 *             else:
 *                 return ('Cusp %-2d: %s, not filled'%
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_topology); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_shape); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 530, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 530, __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(0, 530, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4)) __PYX_ERR(0, 530, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_3 = 0;
      __pyx_t_4 = 0;

      /* "cython/core/basic.pyx":529
 *         if self.is_complete:
 *             if 'shape' in self:
 *                 return ('Cusp %-2d: complete %s of shape %s' %             # <<<<<<<<<<<<<<
 *                         (self.index, self.topology, self.shape) )
 *             else:
 */
      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Cusp_2d_complete_s_of_shape_s, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 529, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L0;

      /* "cython/core/basic.pyx":528
 *     def __repr__(self):
 *         if self.is_complete:
 *             if 'shape' in self:             # <<<<<<<<<<<<<<
 *                 return ('Cusp %-2d: complete %s of shape %s' %
 *                         (self.index, self.topology, self.shape) )
 */
    }

    /* "cython/core/basic.pyx":532
 *                         (self.index, self.topology, self.shape) )
 *             else:
 *                 return ('Cusp %-2d: %s, not filled'%             # <<<<<<<<<<<<<<
 *                         (self.index, self.topology) )
 *         else:
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);

      /* "cython/core/basic.pyx":533
 *             else:
 *                 return ('Cusp %-2d: %s, not filled'%
 *                         (self.index, self.topology) )             # <<<<<<<<<<<<<<
 *         else:
 *             return ('Cusp %-2d: %s with Dehn filling coefficients (M, L) = %s'%
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 533, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_topology); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 533, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 533, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error);
      __pyx_t_4 = 0;
      __pyx_t_5 = 0;

      /* "cython/core/basic.pyx":532
 *                         (self.index, self.topology, self.shape) )
 *             else:
 *                 return ('Cusp %-2d: %s, not filled'%             # <<<<<<<<<<<<<<
 *                         (self.index, self.topology) )
 *         else:
 */
      __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Cusp_2d_s_not_filled, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 532, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;
    }

    /* "cython/core/basic.pyx":527
 * class CuspInfo(Info):
 *     def __repr__(self):
 *         if self.is_complete:             # <<<<<<<<<<<<<<
 *             if 'shape' in self:
 *                 return ('Cusp %-2d: complete %s of shape %s' %
 */
  }

  /* "cython/core/basic.pyx":535
 *                         (self.index, self.topology) )
 *         else:
 *             return ('Cusp %-2d: %s with Dehn filling coefficients (M, L) = %s'%             # <<<<<<<<<<<<<<
 *                     (self.index, self.topology, self.filling) )
 *     _obsolete = {'complete?'          : 'is_complete',
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);

    /* "cython/core/basic.pyx":536
 *         else:
 *             return ('Cusp %-2d: %s with Dehn filling coefficients (M, L) = %s'%
 *                     (self.index, self.topology, self.filling) )             # <<<<<<<<<<<<<<
 *     _obsolete = {'complete?'          : 'is_complete',
 *                  'holonomy precision' : 'holonomy_accuracy',
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_topology); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filling); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __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(0, 536, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(0, 536, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4)) __PYX_ERR(0, 536, __pyx_L1_error);
    __pyx_t_5 = 0;
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;

    /* "cython/core/basic.pyx":535
 *                         (self.index, self.topology) )
 *         else:
 *             return ('Cusp %-2d: %s with Dehn filling coefficients (M, L) = %s'%             # <<<<<<<<<<<<<<
 *                     (self.index, self.topology, self.filling) )
 *     _obsolete = {'complete?'          : 'is_complete',
 */
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Cusp_2d_s_with_Dehn_filling_coef, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "cython/core/basic.pyx":526
 * 
 * class CuspInfo(Info):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self.is_complete:
 *             if 'shape' in self:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("SnapPy.CuspInfo.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":543
 * 
 * class DualCurveInfo(Info):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return ('%3d: %s curve of length %s'%
 *                 (self.index, MatrixParity[self.parity], self.filled_length))
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13DualCurveInfo_1__repr__(PyObject *__pyx_self, 
#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_6SnapPy_13DualCurveInfo___repr__, "DualCurveInfo.__repr__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_13DualCurveInfo_1__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13DualCurveInfo_1__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13DualCurveInfo___repr__};
static PyObject *__pyx_pw_6SnapPy_13DualCurveInfo_1__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 543, __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, "__repr__") < 0)) __PYX_ERR(0, 543, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 543, __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("SnapPy.DualCurveInfo.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13DualCurveInfo___repr__(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_13DualCurveInfo___repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "cython/core/basic.pyx":544
 * class DualCurveInfo(Info):
 *     def __repr__(self):
 *         return ('%3d: %s curve of length %s'%             # <<<<<<<<<<<<<<
 *                 (self.index, MatrixParity[self.parity], self.filled_length))
 *     _obsolete = {'complete length' : 'complete_length',
 */
  __Pyx_XDECREF(__pyx_r);

  /* "cython/core/basic.pyx":545
 *     def __repr__(self):
 *         return ('%3d: %s curve of length %s'%
 *                 (self.index, MatrixParity[self.parity], self.filled_length))             # <<<<<<<<<<<<<<
 *     _obsolete = {'complete length' : 'complete_length',
 *                  'filled length' : 'filled_length'}
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MatrixParity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_filled_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4)) __PYX_ERR(0, 545, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_3)) __PYX_ERR(0, 545, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":544
 * class DualCurveInfo(Info):
 *     def __repr__(self):
 *         return ('%3d: %s curve of length %s'%             # <<<<<<<<<<<<<<
 *                 (self.index, MatrixParity[self.parity], self.filled_length))
 *     _obsolete = {'complete length' : 'complete_length',
 */
  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_3d_s_curve_of_length_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __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;

  /* "cython/core/basic.pyx":543
 * 
 * class DualCurveInfo(Info):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return ('%3d: %s curve of length %s'%
 *                 (self.index, MatrixParity[self.parity], self.filled_length))
 */

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

/* "cython/core/basic.pyx":550
 * 
 * 
 * def _StrLongestLen(l):             # <<<<<<<<<<<<<<
 *     return str(max(len(e) for e in l))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_25_StrLongestLen(PyObject *__pyx_self, 
#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_6SnapPy_24_StrLongestLen, "_StrLongestLen(l)");
static PyMethodDef __pyx_mdef_6SnapPy_25_StrLongestLen = {"_StrLongestLen", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_25_StrLongestLen, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_24_StrLongestLen};
static PyObject *__pyx_pw_6SnapPy_25_StrLongestLen(PyObject *__pyx_self, 
#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_l = 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("_StrLongestLen (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_l,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_l)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 550, __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, "_StrLongestLen") < 0)) __PYX_ERR(0, 550, __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_l = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_StrLongestLen", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 550, __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("SnapPy._StrLongestLen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_24_StrLongestLen(__pyx_self, __pyx_v_l);

  /* 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_gb_6SnapPy_14_StrLongestLen_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cython/core/basic.pyx":551
 * 
 * def _StrLongestLen(l):
 *     return str(max(len(e) for e in l))             # <<<<<<<<<<<<<<
 * 
 * 
 */

static PyObject *__pyx_pf_6SnapPy_14_StrLongestLen_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
  struct __pyx_obj_6SnapPy___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_6SnapPy___pyx_scope_struct__genexpr *)__pyx_tp_new_6SnapPy___pyx_scope_struct__genexpr(__pyx_ptype_6SnapPy___pyx_scope_struct__genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6SnapPy___pyx_scope_struct__genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 551, __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_6SnapPy_14_StrLongestLen_2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_StrLongestLen_locals_genexpr, __pyx_n_s_SnapPy); if (unlikely(!gen)) __PYX_ERR(0, 551, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("SnapPy._StrLongestLen.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_6SnapPy_14_StrLongestLen_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6SnapPy___pyx_scope_struct__genexpr *__pyx_cur_scope = ((struct __pyx_obj_6SnapPy___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;
  Py_ssize_t __pyx_t_5;
  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;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 551, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(0, 551, __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, 551, __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, 551, __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, 551, __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, 551, __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, 551, __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, 551, __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, 551, __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, 551, __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, 551, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_e);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_e, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_5 = PyObject_Length(__pyx_cur_scope->__pyx_v_e); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 551, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 551, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 551, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  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_XDECREF(__pyx_r); __pyx_r = 0;
  #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;
}

/* "cython/core/basic.pyx":550
 * 
 * 
 * def _StrLongestLen(l):             # <<<<<<<<<<<<<<
 *     return str(max(len(e) for e in l))
 * 
 */

static PyObject *__pyx_pf_6SnapPy_24_StrLongestLen(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_l) {
  PyObject *__pyx_gb_6SnapPy_14_StrLongestLen_2generator = 0;
  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("_StrLongestLen", 1);

  /* "cython/core/basic.pyx":551
 * 
 * def _StrLongestLen(l):
 *     return str(max(len(e) for e in l))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_pf_6SnapPy_14_StrLongestLen_genexpr(NULL, __pyx_v_l); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Str(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __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;

  /* "cython/core/basic.pyx":550
 * 
 * 
 * def _StrLongestLen(l):             # <<<<<<<<<<<<<<
 *     return str(max(len(e) for e in l))
 * 
 */

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

/* "cython/core/basic.pyx":572
 * 
 * class LengthSpectrumInfo(Info):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         lenStr = "%17.14f" % self.length.real()
 *         absImag = abs(self.length.imag())
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_18LengthSpectrumInfo_1__repr__(PyObject *__pyx_self, 
#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_6SnapPy_18LengthSpectrumInfo___repr__, "LengthSpectrumInfo.__repr__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_18LengthSpectrumInfo_1__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_18LengthSpectrumInfo_1__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18LengthSpectrumInfo___repr__};
static PyObject *__pyx_pw_6SnapPy_18LengthSpectrumInfo_1__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 572, __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, "__repr__") < 0)) __PYX_ERR(0, 572, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 572, __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("SnapPy.LengthSpectrumInfo.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_18LengthSpectrumInfo___repr__(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_18LengthSpectrumInfo___repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_lenStr = NULL;
  PyObject *__pyx_v_absImag = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  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("__repr__", 1);

  /* "cython/core/basic.pyx":573
 * class LengthSpectrumInfo(Info):
 *     def __repr__(self):
 *         lenStr = "%17.14f" % self.length.real()             # <<<<<<<<<<<<<<
 *         absImag = abs(self.length.imag())
 *         if absImag > 1e-9:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_real); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __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 (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, 573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_17_14f, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_lenStr = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":574
 *     def __repr__(self):
 *         lenStr = "%17.14f" % self.length.real()
 *         absImag = abs(self.length.imag())             # <<<<<<<<<<<<<<
 *         if absImag > 1e-9:
 *             if self.length.imag() > 0:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_imag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 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_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 574, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyNumber_Absolute(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_absImag = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/basic.pyx":575
 *         lenStr = "%17.14f" % self.length.real()
 *         absImag = abs(self.length.imag())
 *         if absImag > 1e-9:             # <<<<<<<<<<<<<<
 *             if self.length.imag() > 0:
 *                 lenStr += " + "
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_absImag, __pyx_float_1eneg_9, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 575, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_5) {

    /* "cython/core/basic.pyx":576
 *         absImag = abs(self.length.imag())
 *         if absImag > 1e-9:
 *             if self.length.imag() > 0:             # <<<<<<<<<<<<<<
 *                 lenStr += " + "
 *             else:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_imag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __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, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 576, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error)
    __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, 576, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "cython/core/basic.pyx":577
 *         if absImag > 1e-9:
 *             if self.length.imag() > 0:
 *                 lenStr += " + "             # <<<<<<<<<<<<<<
 *             else:
 *                 lenStr += " - "
 */
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_lenStr, __pyx_kp_s__12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 577, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_lenStr, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cython/core/basic.pyx":576
 *         absImag = abs(self.length.imag())
 *         if absImag > 1e-9:
 *             if self.length.imag() > 0:             # <<<<<<<<<<<<<<
 *                 lenStr += " + "
 *             else:
 */
      goto __pyx_L4;
    }

    /* "cython/core/basic.pyx":579
 *                 lenStr += " + "
 *             else:
 *                 lenStr += " - "             # <<<<<<<<<<<<<<
 *             lenStr += "%16.14f*I" % absImag
 * 
 */
    /*else*/ {
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_lenStr, __pyx_kp_s__13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_lenStr, __pyx_t_1);
      __pyx_t_1 = 0;
    }
    __pyx_L4:;

    /* "cython/core/basic.pyx":580
 *             else:
 *                 lenStr += " - "
 *             lenStr += "%16.14f*I" % absImag             # <<<<<<<<<<<<<<
 * 
 *         if 'word' in self:
 */
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_16_14f_I, __pyx_v_absImag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_lenStr, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_lenStr, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/basic.pyx":575
 *         lenStr = "%17.14f" % self.length.real()
 *         absImag = abs(self.length.imag())
 *         if absImag > 1e-9:             # <<<<<<<<<<<<<<
 *             if self.length.imag() > 0:
 *                 lenStr += " + "
 */
  }

  /* "cython/core/basic.pyx":582
 *             lenStr += "%16.14f*I" % absImag
 * 
 *         if 'word' in self:             # <<<<<<<<<<<<<<
 *             return LengthSpectrumFormatStringWithWord % (
 *                 self.multiplicity,
 */
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_word, __pyx_v_self, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 582, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "cython/core/basic.pyx":583
 * 
 *         if 'word' in self:
 *             return LengthSpectrumFormatStringWithWord % (             # <<<<<<<<<<<<<<
 *                 self.multiplicity,
 *                 lenStr,
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_LengthSpectrumFormatStringWithWo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cython/core/basic.pyx":584
 *         if 'word' in self:
 *             return LengthSpectrumFormatStringWithWord % (
 *                 self.multiplicity,             # <<<<<<<<<<<<<<
 *                 lenStr,
 *                 self.topology,
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_multiplicity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cython/core/basic.pyx":586
 *                 self.multiplicity,
 *                 lenStr,
 *                 self.topology,             # <<<<<<<<<<<<<<
 *                 ShortMatrixParity[self.parity],
 *                 self.word)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_topology); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "cython/core/basic.pyx":587
 *                 lenStr,
 *                 self.topology,
 *                 ShortMatrixParity[self.parity],             # <<<<<<<<<<<<<<
 *                 self.word)
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ShortMatrixParity); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parity); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cython/core/basic.pyx":588
 *                 self.topology,
 *                 ShortMatrixParity[self.parity],
 *                 self.word)             # <<<<<<<<<<<<<<
 *         else:
 *             return LengthSpectrumFormatString % (
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_word); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "cython/core/basic.pyx":584
 *         if 'word' in self:
 *             return LengthSpectrumFormatStringWithWord % (
 *                 self.multiplicity,             # <<<<<<<<<<<<<<
 *                 lenStr,
 *                 self.topology,
 */
    __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 584, __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, 584, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_lenStr);
    __Pyx_GIVEREF(__pyx_v_lenStr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_lenStr)) __PYX_ERR(0, 584, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3)) __PYX_ERR(0, 584, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_8)) __PYX_ERR(0, 584, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_7)) __PYX_ERR(0, 584, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_t_8 = 0;
    __pyx_t_7 = 0;

    /* "cython/core/basic.pyx":583
 * 
 *         if 'word' in self:
 *             return LengthSpectrumFormatStringWithWord % (             # <<<<<<<<<<<<<<
 *                 self.multiplicity,
 *                 lenStr,
 */
    __pyx_t_7 = PyNumber_Remainder(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_7;
    __pyx_t_7 = 0;
    goto __pyx_L0;

    /* "cython/core/basic.pyx":582
 *             lenStr += "%16.14f*I" % absImag
 * 
 *         if 'word' in self:             # <<<<<<<<<<<<<<
 *             return LengthSpectrumFormatStringWithWord % (
 *                 self.multiplicity,
 */
  }

  /* "cython/core/basic.pyx":590
 *                 self.word)
 *         else:
 *             return LengthSpectrumFormatString % (             # <<<<<<<<<<<<<<
 *                 self.multiplicity,
 *                 lenStr,
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_LengthSpectrumFormatString); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "cython/core/basic.pyx":591
 *         else:
 *             return LengthSpectrumFormatString % (
 *                 self.multiplicity,             # <<<<<<<<<<<<<<
 *                 lenStr,
 *                 self.topology,
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_multiplicity); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);

    /* "cython/core/basic.pyx":593
 *                 self.multiplicity,
 *                 lenStr,
 *                 self.topology,             # <<<<<<<<<<<<<<
 *                 ShortMatrixParity[self.parity] )
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_topology); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cython/core/basic.pyx":594
 *                 lenStr,
 *                 self.topology,
 *                 ShortMatrixParity[self.parity] )             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_ShortMatrixParity); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/basic.pyx":591
 *         else:
 *             return LengthSpectrumFormatString % (
 *                 self.multiplicity,             # <<<<<<<<<<<<<<
 *                 lenStr,
 *                 self.topology,
 */
    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6)) __PYX_ERR(0, 591, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_lenStr);
    __Pyx_GIVEREF(__pyx_v_lenStr);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_lenStr)) __PYX_ERR(0, 591, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error);
    __pyx_t_6 = 0;
    __pyx_t_2 = 0;
    __pyx_t_1 = 0;

    /* "cython/core/basic.pyx":590
 *                 self.word)
 *         else:
 *             return LengthSpectrumFormatString % (             # <<<<<<<<<<<<<<
 *                 self.multiplicity,
 *                 lenStr,
 */
    __pyx_t_1 = PyNumber_Remainder(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "cython/core/basic.pyx":572
 * 
 * class LengthSpectrumInfo(Info):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         lenStr = "%17.14f" % self.length.real()
 *         absImag = abs(self.length.imag())
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("SnapPy.LengthSpectrumInfo.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_lenStr);
  __Pyx_XDECREF(__pyx_v_absImag);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":600
 *     _obsolete = {'precision' : 'accuracies'}
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(self.__dict__)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_9ShapeInfo_1__repr__(PyObject *__pyx_self, 
#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_6SnapPy_9ShapeInfo___repr__, "ShapeInfo.__repr__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_9ShapeInfo_1__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_9ShapeInfo_1__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_9ShapeInfo___repr__};
static PyObject *__pyx_pw_6SnapPy_9ShapeInfo_1__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 600, __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, "__repr__") < 0)) __PYX_ERR(0, 600, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 600, __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("SnapPy.ShapeInfo.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_9ShapeInfo___repr__(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_9ShapeInfo___repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "cython/core/basic.pyx":601
 * 
 *     def __repr__(self):
 *         return repr(self.__dict__)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __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;

  /* "cython/core/basic.pyx":600
 *     _obsolete = {'precision' : 'accuracies'}
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(self.__dict__)
 * 
 */

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

/* "cython/core/basic.pyx":605
 * 
 * class NormalSurfaceInfo(Info):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         orient = 'Orientable' if self.orientable else 'Non-orientable'
 *         sided = 'two-sided' if self.two_sided else 'one-sided'
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17NormalSurfaceInfo_1__repr__(PyObject *__pyx_self, 
#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_6SnapPy_17NormalSurfaceInfo___repr__, "NormalSurfaceInfo.__repr__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_17NormalSurfaceInfo_1__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17NormalSurfaceInfo_1__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17NormalSurfaceInfo___repr__};
static PyObject *__pyx_pw_6SnapPy_17NormalSurfaceInfo_1__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 605, __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, "__repr__") < 0)) __PYX_ERR(0, 605, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 605, __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("SnapPy.NormalSurfaceInfo.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17NormalSurfaceInfo___repr__(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_17NormalSurfaceInfo___repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_orient = NULL;
  PyObject *__pyx_v_sided = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "cython/core/basic.pyx":606
 * class NormalSurfaceInfo(Info):
 *     def __repr__(self):
 *         orient = 'Orientable' if self.orientable else 'Non-orientable'             # <<<<<<<<<<<<<<
 *         sided = 'two-sided' if self.two_sided else 'one-sided'
 *         return '%s %s with euler = %s' % (orient, sided, self.euler)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_orientable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_n_s_Orientable);
    __pyx_t_1 = __pyx_n_s_Orientable;
  } else {
    __Pyx_INCREF(__pyx_kp_s_Non_orientable);
    __pyx_t_1 = __pyx_kp_s_Non_orientable;
  }
  __pyx_v_orient = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":607
 *     def __repr__(self):
 *         orient = 'Orientable' if self.orientable else 'Non-orientable'
 *         sided = 'two-sided' if self.two_sided else 'one-sided'             # <<<<<<<<<<<<<<
 *         return '%s %s with euler = %s' % (orient, sided, self.euler)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_two_sided); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 607, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_kp_s_two_sided_2);
    __pyx_t_1 = __pyx_kp_s_two_sided_2;
  } else {
    __Pyx_INCREF(__pyx_kp_s_one_sided);
    __pyx_t_1 = __pyx_kp_s_one_sided;
  }
  __pyx_v_sided = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":608
 *         orient = 'Orientable' if self.orientable else 'Non-orientable'
 *         sided = 'two-sided' if self.two_sided else 'one-sided'
 *         return '%s %s with euler = %s' % (orient, sided, self.euler)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_euler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_orient);
  __Pyx_GIVEREF(__pyx_v_orient);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_orient)) __PYX_ERR(0, 608, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_sided);
  __Pyx_GIVEREF(__pyx_v_sided);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_sided)) __PYX_ERR(0, 608, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s_with_euler_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __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;

  /* "cython/core/basic.pyx":605
 * 
 * class NormalSurfaceInfo(Info):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         orient = 'Orientable' if self.orientable else 'Non-orientable'
 *         sided = 'two-sided' if self.two_sided else 'one-sided'
 */

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

/* "cython/core/basic.pyx":612
 * 
 * class LengthSpectrum(list):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if len(self) > 0 and 'word' in self[0]:
 *             base = LengthSpectrumFormatStringWithWord % (
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_14LengthSpectrum_1__repr__(PyObject *__pyx_self, 
#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_6SnapPy_14LengthSpectrum___repr__, "LengthSpectrum.__repr__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_14LengthSpectrum_1__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14LengthSpectrum_1__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14LengthSpectrum___repr__};
static PyObject *__pyx_pw_6SnapPy_14LengthSpectrum_1__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 612, __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, "__repr__") < 0)) __PYX_ERR(0, 612, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 612, __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("SnapPy.LengthSpectrum.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_14LengthSpectrum___repr__(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_14LengthSpectrum___repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_base = NULL;
  PyObject *__pyx_8genexpr6__pyx_v_s = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "cython/core/basic.pyx":613
 * class LengthSpectrum(list):
 *     def __repr__(self):
 *         if len(self) > 0 and 'word' in self[0]:             # <<<<<<<<<<<<<<
 *             base = LengthSpectrumFormatStringWithWord % (
 *                 'mult', ' length', 'topology', 'parity', 'word')
 */
  __pyx_t_2 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 613, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_2 > 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_self, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_word, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 613, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cython/core/basic.pyx":614
 *     def __repr__(self):
 *         if len(self) > 0 and 'word' in self[0]:
 *             base = LengthSpectrumFormatStringWithWord % (             # <<<<<<<<<<<<<<
 *                 'mult', ' length', 'topology', 'parity', 'word')
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_LengthSpectrumFormatStringWithWo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "cython/core/basic.pyx":615
 *         if len(self) > 0 and 'word' in self[0]:
 *             base = LengthSpectrumFormatStringWithWord % (
 *                 'mult', ' length', 'topology', 'parity', 'word')             # <<<<<<<<<<<<<<
 *         else:
 *             base = LengthSpectrumFormatString % (
 */
    __pyx_t_5 = PyNumber_Remainder(__pyx_t_4, __pyx_tuple__14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_base = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cython/core/basic.pyx":613
 * class LengthSpectrum(list):
 *     def __repr__(self):
 *         if len(self) > 0 and 'word' in self[0]:             # <<<<<<<<<<<<<<
 *             base = LengthSpectrumFormatStringWithWord % (
 *                 'mult', ' length', 'topology', 'parity', 'word')
 */
    goto __pyx_L3;
  }

  /* "cython/core/basic.pyx":617
 *                 'mult', ' length', 'topology', 'parity', 'word')
 *         else:
 *             base = LengthSpectrumFormatString % (             # <<<<<<<<<<<<<<
 *                 'mult', ' length', 'topology', 'parity')
 *         return '\n'.join([base] + [repr(s) for s in self])
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_LengthSpectrumFormatString); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "cython/core/basic.pyx":618
 *         else:
 *             base = LengthSpectrumFormatString % (
 *                 'mult', ' length', 'topology', 'parity')             # <<<<<<<<<<<<<<
 *         return '\n'.join([base] + [repr(s) for s in self])
 * 
 */
    __pyx_t_4 = PyNumber_Remainder(__pyx_t_5, __pyx_tuple__15); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_base = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "cython/core/basic.pyx":619
 *             base = LengthSpectrumFormatString % (
 *                 'mult', ' length', 'topology', 'parity')
 *         return '\n'.join([base] + [repr(s) for s in self])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_base);
  __Pyx_GIVEREF(__pyx_v_base);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_base)) __PYX_ERR(0, 619, __pyx_L1_error);
  { /* enter inner scope */
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 619, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(PyList_CheckExact(__pyx_v_self)) || PyTuple_CheckExact(__pyx_v_self)) {
      __pyx_t_6 = __pyx_v_self; __Pyx_INCREF(__pyx_t_6);
      __pyx_t_2 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 619, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 619, __pyx_L8_error)
    }
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 619, __pyx_L8_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 619, __pyx_L8_error)
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 619, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 619, __pyx_L8_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_8); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(0, 619, __pyx_L8_error)
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 619, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        }
      } else {
        __pyx_t_8 = __pyx_t_7(__pyx_t_6);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 619, __pyx_L8_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_s, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_8 = PyObject_Repr(__pyx_8genexpr6__pyx_v_s); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 619, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 619, __pyx_L8_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_s); __pyx_8genexpr6__pyx_v_s = 0;
    goto __pyx_L12_exit_scope;
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_s); __pyx_8genexpr6__pyx_v_s = 0;
    goto __pyx_L1_error;
    __pyx_L12_exit_scope:;
  } /* exit inner scope */
  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":612
 * 
 * class LengthSpectrum(list):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if len(self) > 0 and 'word' in self[0]:
 *             base = LengthSpectrumFormatStringWithWord % (
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("SnapPy.LengthSpectrum.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_base);
  __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_s);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":623
 * 
 * class ListOnePerLine(list):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '[' + ',\n '.join([repr(s) for s in self]) + ']'
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_14ListOnePerLine_1__repr__(PyObject *__pyx_self, 
#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_6SnapPy_14ListOnePerLine___repr__, "ListOnePerLine.__repr__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_14ListOnePerLine_1__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14ListOnePerLine_1__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14ListOnePerLine___repr__};
static PyObject *__pyx_pw_6SnapPy_14ListOnePerLine_1__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 623, __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, "__repr__") < 0)) __PYX_ERR(0, 623, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 623, __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("SnapPy.ListOnePerLine.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_14ListOnePerLine___repr__(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_14ListOnePerLine___repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_8genexpr7__pyx_v_s = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "cython/core/basic.pyx":624
 * class ListOnePerLine(list):
 *     def __repr__(self):
 *         return '[' + ',\n '.join([repr(s) for s in self]) + ']'             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_self)) || PyTuple_CheckExact(__pyx_v_self)) {
      __pyx_t_2 = __pyx_v_self; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 624, __pyx_L5_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        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, 624, __pyx_L5_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 624, __pyx_L5_error)
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 624, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_5);
          #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, 624, __pyx_L5_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 624, __pyx_L5_error)
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 624, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        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, 624, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_s, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_Repr(__pyx_8genexpr7__pyx_v_s); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 624, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 624, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_s); __pyx_8genexpr7__pyx_v_s = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_s); __pyx_8genexpr7__pyx_v_s = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__17, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_kp_s__16, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_kp_s__18); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __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;

  /* "cython/core/basic.pyx":623
 * 
 * class ListOnePerLine(list):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '[' + ',\n '.join([repr(s) for s in self]) + ']'
 * 
 */

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

/* "cython/core/basic.pyx":629
 * # Isometry
 * 
 * def format_two_by_two(mat):             # <<<<<<<<<<<<<<
 *     a,b,c,d = ['%d' % x for x in [mat[0,0], mat[0,1], mat[1,0], mat[1,1]]]
 *     w0 = max(len(a), len(c))
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_27format_two_by_two(PyObject *__pyx_self, 
#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_6SnapPy_26format_two_by_two, "format_two_by_two(mat)");
static PyMethodDef __pyx_mdef_6SnapPy_27format_two_by_two = {"format_two_by_two", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_27format_two_by_two, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_26format_two_by_two};
static PyObject *__pyx_pw_6SnapPy_27format_two_by_two(PyObject *__pyx_self, 
#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_mat = 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("format_two_by_two (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_mat,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_mat)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 629, __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, "format_two_by_two") < 0)) __PYX_ERR(0, 629, __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_mat = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("format_two_by_two", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 629, __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("SnapPy.format_two_by_two", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_26format_two_by_two(__pyx_self, __pyx_v_mat);

  /* 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_6SnapPy_26format_two_by_two(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mat) {
  PyObject *__pyx_v_a = NULL;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_v_w0 = NULL;
  PyObject *__pyx_v_w1 = NULL;
  PyObject *__pyx_8genexpr8__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("format_two_by_two", 1);

  /* "cython/core/basic.pyx":630
 * 
 * def format_two_by_two(mat):
 *     a,b,c,d = ['%d' % x for x in [mat[0,0], mat[0,1], mat[1,0], mat[1,1]]]             # <<<<<<<<<<<<<<
 *     w0 = max(len(a), len(c))
 *     w1 = max(len(b), len(d))
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_mat, __pyx_tuple__19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_mat, __pyx_tuple__20); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 630, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_mat, __pyx_tuple__21); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 630, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_mat, __pyx_tuple__22); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 630, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 630, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2)) __PYX_ERR(0, 630, __pyx_L5_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3)) __PYX_ERR(0, 630, __pyx_L5_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4)) __PYX_ERR(0, 630, __pyx_L5_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5)) __PYX_ERR(0, 630, __pyx_L5_error);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5);
    __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (__pyx_t_7 >= 4) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 630, __pyx_L5_error)
      #else
      __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 630, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_x, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyString_FormatSafe(__pyx_kp_s_d, __pyx_8genexpr8__pyx_v_x); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 630, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 630, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_x); __pyx_8genexpr8__pyx_v_x = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_x); __pyx_8genexpr8__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  if (1) {
    PyObject* sequence = __pyx_t_1;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 4)) {
      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 630, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
    __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
    __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
    __pyx_t_3 = PyList_GET_ITEM(sequence, 3); 
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_6,&__pyx_t_4,&__pyx_t_3};
      for (i=0; i < 4; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 630, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_a = __pyx_t_5;
  __pyx_t_5 = 0;
  __pyx_v_b = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_c = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_d = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":631
 * def format_two_by_two(mat):
 *     a,b,c,d = ['%d' % x for x in [mat[0,0], mat[0,1], mat[1,0], mat[1,1]]]
 *     w0 = max(len(a), len(c))             # <<<<<<<<<<<<<<
 *     w1 = max(len(b), len(d))
 *     return ('[' + a.rjust(w0) + ' ' + b.rjust(w1) + ']',
 */
  __pyx_t_7 = PyObject_Length(__pyx_v_c); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 631, __pyx_L1_error)
  __pyx_t_8 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 631, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_7 > __pyx_t_8);
  if (__pyx_t_10) {
    __pyx_t_9 = __pyx_t_7;
  } else {
    __pyx_t_9 = __pyx_t_8;
  }
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_w0 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":632
 *     a,b,c,d = ['%d' % x for x in [mat[0,0], mat[0,1], mat[1,0], mat[1,1]]]
 *     w0 = max(len(a), len(c))
 *     w1 = max(len(b), len(d))             # <<<<<<<<<<<<<<
 *     return ('[' + a.rjust(w0) + ' ' + b.rjust(w1) + ']',
 *             '[' + c.rjust(w0) + ' ' + d.rjust(w1) + ']')
 */
  __pyx_t_9 = PyObject_Length(__pyx_v_d); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 632, __pyx_L1_error)
  __pyx_t_7 = PyObject_Length(__pyx_v_b); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 632, __pyx_L1_error)
  __pyx_t_10 = (__pyx_t_9 > __pyx_t_7);
  if (__pyx_t_10) {
    __pyx_t_8 = __pyx_t_9;
  } else {
    __pyx_t_8 = __pyx_t_7;
  }
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_w1 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":633
 *     w0 = max(len(a), len(c))
 *     w1 = max(len(b), len(d))
 *     return ('[' + a.rjust(w0) + ' ' + b.rjust(w1) + ']',             # <<<<<<<<<<<<<<
 *             '[' + c.rjust(w0) + ' ' + d.rjust(w1) + ']')
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_rjust); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_11 = 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_11 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_w0};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = PyNumber_Add(__pyx_kp_s__16, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_kp_s__8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_b, __pyx_n_s_rjust); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __pyx_t_11 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_11 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_w1};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_kp_s__18); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":634
 *     w1 = max(len(b), len(d))
 *     return ('[' + a.rjust(w0) + ' ' + b.rjust(w1) + ']',
 *             '[' + c.rjust(w0) + ' ' + d.rjust(w1) + ']')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_rjust); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = NULL;
  __pyx_t_11 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_11 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_w0};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_t_1 = PyNumber_Add(__pyx_kp_s__16, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_kp_s__8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_rjust); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  __pyx_t_11 = 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_11 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_w1};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_6, __pyx_kp_s__18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cython/core/basic.pyx":633
 *     w0 = max(len(a), len(c))
 *     w1 = max(len(b), len(d))
 *     return ('[' + a.rjust(w0) + ' ' + b.rjust(w1) + ']',             # <<<<<<<<<<<<<<
 *             '[' + c.rjust(w0) + ' ' + d.rjust(w1) + ']')
 * 
 */
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3)) __PYX_ERR(0, 633, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":629
 * # Isometry
 * 
 * def format_two_by_two(mat):             # <<<<<<<<<<<<<<
 *     a,b,c,d = ['%d' % x for x in [mat[0,0], mat[0,1], mat[1,0], mat[1,1]]]
 *     w0 = max(len(a), len(c))
 */

  /* 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_AddTraceback("SnapPy.format_two_by_two", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_v_w0);
  __Pyx_XDECREF(__pyx_v_w1);
  __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":641
 *     Represents an isometry from one manifold to another.
 *     """
 *     def __init__(self, cusp_images, cusp_maps, extends_to_link):             # <<<<<<<<<<<<<<
 *         self._cusp_images, self._cusp_maps = cusp_images, cusp_maps
 *         self._extends_to_link = extends_to_link
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Isometry_1__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_6SnapPy_8Isometry___init__, "Isometry.__init__(self, cusp_images, cusp_maps, extends_to_link)");
static PyMethodDef __pyx_mdef_6SnapPy_8Isometry_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Isometry_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Isometry___init__};
static PyObject *__pyx_pw_6SnapPy_8Isometry_1__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_self = 0;
  PyObject *__pyx_v_cusp_images = 0;
  PyObject *__pyx_v_cusp_maps = 0;
  PyObject *__pyx_v_extends_to_link = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__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_self,&__pyx_n_s_cusp_images,&__pyx_n_s_cusp_maps,&__pyx_n_s_extends_to_link,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 641, __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_cusp_images)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 641, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cusp_maps)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 641, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_extends_to_link)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 641, __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, 641, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      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);
      values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_cusp_images = values[1];
    __pyx_v_cusp_maps = values[2];
    __pyx_v_extends_to_link = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 641, __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("SnapPy.Isometry.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Isometry___init__(__pyx_self, __pyx_v_self, __pyx_v_cusp_images, __pyx_v_cusp_maps, __pyx_v_extends_to_link);

  /* 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_6SnapPy_8Isometry___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_cusp_images, PyObject *__pyx_v_cusp_maps, PyObject *__pyx_v_extends_to_link) {
  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("__init__", 1);

  /* "cython/core/basic.pyx":642
 *     """
 *     def __init__(self, cusp_images, cusp_maps, extends_to_link):
 *         self._cusp_images, self._cusp_maps = cusp_images, cusp_maps             # <<<<<<<<<<<<<<
 *         self._extends_to_link = extends_to_link
 * 
 */
  __pyx_t_1 = __pyx_v_cusp_images;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __pyx_v_cusp_maps;
  __Pyx_INCREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cusp_images_2, __pyx_t_1) < 0) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cusp_maps_2, __pyx_t_2) < 0) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/basic.pyx":643
 *     def __init__(self, cusp_images, cusp_maps, extends_to_link):
 *         self._cusp_images, self._cusp_maps = cusp_images, cusp_maps
 *         self._extends_to_link = extends_to_link             # <<<<<<<<<<<<<<
 * 
 *     def cusp_images(self):
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_extends_to_link_2, __pyx_v_extends_to_link) < 0) __PYX_ERR(0, 643, __pyx_L1_error)

  /* "cython/core/basic.pyx":641
 *     Represents an isometry from one manifold to another.
 *     """
 *     def __init__(self, cusp_images, cusp_maps, extends_to_link):             # <<<<<<<<<<<<<<
 *         self._cusp_images, self._cusp_maps = cusp_images, cusp_maps
 *         self._extends_to_link = extends_to_link
 */

  /* 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_AddTraceback("SnapPy.Isometry.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":645
 *         self._extends_to_link = extends_to_link
 * 
 *     def cusp_images(self):             # <<<<<<<<<<<<<<
 *         return self._cusp_images
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Isometry_3cusp_images(PyObject *__pyx_self, 
#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_6SnapPy_8Isometry_2cusp_images, "Isometry.cusp_images(self)");
static PyMethodDef __pyx_mdef_6SnapPy_8Isometry_3cusp_images = {"cusp_images", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Isometry_3cusp_images, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Isometry_2cusp_images};
static PyObject *__pyx_pw_6SnapPy_8Isometry_3cusp_images(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cusp_images (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 645, __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, "cusp_images") < 0)) __PYX_ERR(0, 645, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cusp_images", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 645, __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("SnapPy.Isometry.cusp_images", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Isometry_2cusp_images(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_8Isometry_2cusp_images(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cusp_images", 1);

  /* "cython/core/basic.pyx":646
 * 
 *     def cusp_images(self):
 *         return self._cusp_images             # <<<<<<<<<<<<<<
 * 
 *     def cusp_maps(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cusp_images_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":645
 *         self._extends_to_link = extends_to_link
 * 
 *     def cusp_images(self):             # <<<<<<<<<<<<<<
 *         return self._cusp_images
 * 
 */

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

/* "cython/core/basic.pyx":648
 *         return self._cusp_images
 * 
 *     def cusp_maps(self):             # <<<<<<<<<<<<<<
 *         return self._cusp_maps
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Isometry_5cusp_maps(PyObject *__pyx_self, 
#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_6SnapPy_8Isometry_4cusp_maps, "Isometry.cusp_maps(self)");
static PyMethodDef __pyx_mdef_6SnapPy_8Isometry_5cusp_maps = {"cusp_maps", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Isometry_5cusp_maps, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Isometry_4cusp_maps};
static PyObject *__pyx_pw_6SnapPy_8Isometry_5cusp_maps(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cusp_maps (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 648, __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, "cusp_maps") < 0)) __PYX_ERR(0, 648, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cusp_maps", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 648, __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("SnapPy.Isometry.cusp_maps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Isometry_4cusp_maps(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_8Isometry_4cusp_maps(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cusp_maps", 1);

  /* "cython/core/basic.pyx":649
 * 
 *     def cusp_maps(self):
 *         return self._cusp_maps             # <<<<<<<<<<<<<<
 * 
 *     def extends_to_link(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cusp_maps_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":648
 *         return self._cusp_images
 * 
 *     def cusp_maps(self):             # <<<<<<<<<<<<<<
 *         return self._cusp_maps
 * 
 */

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

/* "cython/core/basic.pyx":651
 *         return self._cusp_maps
 * 
 *     def extends_to_link(self):             # <<<<<<<<<<<<<<
 *         return self._extends_to_link
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Isometry_7extends_to_link(PyObject *__pyx_self, 
#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_6SnapPy_8Isometry_6extends_to_link, "Isometry.extends_to_link(self)");
static PyMethodDef __pyx_mdef_6SnapPy_8Isometry_7extends_to_link = {"extends_to_link", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Isometry_7extends_to_link, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Isometry_6extends_to_link};
static PyObject *__pyx_pw_6SnapPy_8Isometry_7extends_to_link(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extends_to_link (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 651, __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, "extends_to_link") < 0)) __PYX_ERR(0, 651, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("extends_to_link", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 651, __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("SnapPy.Isometry.extends_to_link", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Isometry_6extends_to_link(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_8Isometry_6extends_to_link(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extends_to_link", 1);

  /* "cython/core/basic.pyx":652
 * 
 *     def extends_to_link(self):
 *         return self._extends_to_link             # <<<<<<<<<<<<<<
 * 
 *     def num_cusps(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extends_to_link_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":651
 *         return self._cusp_maps
 * 
 *     def extends_to_link(self):             # <<<<<<<<<<<<<<
 *         return self._extends_to_link
 * 
 */

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

/* "cython/core/basic.pyx":654
 *         return self._extends_to_link
 * 
 *     def num_cusps(self):             # <<<<<<<<<<<<<<
 *         return len(self.cusp_images())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Isometry_9num_cusps(PyObject *__pyx_self, 
#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_6SnapPy_8Isometry_8num_cusps, "Isometry.num_cusps(self)");
static PyMethodDef __pyx_mdef_6SnapPy_8Isometry_9num_cusps = {"num_cusps", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Isometry_9num_cusps, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Isometry_8num_cusps};
static PyObject *__pyx_pw_6SnapPy_8Isometry_9num_cusps(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("num_cusps (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 654, __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, "num_cusps") < 0)) __PYX_ERR(0, 654, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("num_cusps", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 654, __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("SnapPy.Isometry.num_cusps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Isometry_8num_cusps(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_8Isometry_8num_cusps(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("num_cusps", 1);

  /* "cython/core/basic.pyx":655
 * 
 *     def num_cusps(self):
 *         return len(self.cusp_images())             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cusp_images); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __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, 655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":654
 *         return self._extends_to_link
 * 
 *     def num_cusps(self):             # <<<<<<<<<<<<<<
 *         return len(self.cusp_images())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.Isometry.num_cusps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":657
 *         return len(self.cusp_images())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         images = self.cusp_images()
 *         maps = self.cusp_maps()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Isometry_11__repr__(PyObject *__pyx_self, 
#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_6SnapPy_8Isometry_10__repr__, "Isometry.__repr__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_8Isometry_11__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Isometry_11__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Isometry_10__repr__};
static PyObject *__pyx_pw_6SnapPy_8Isometry_11__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 657, __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, "__repr__") < 0)) __PYX_ERR(0, 657, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 657, __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("SnapPy.Isometry.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Isometry_10__repr__(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_8Isometry_10__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_images = NULL;
  PyObject *__pyx_v_maps = NULL;
  PyObject *__pyx_v_line0 = NULL;
  PyObject *__pyx_v_line1 = NULL;
  PyObject *__pyx_v_line2 = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_l0 = NULL;
  PyObject *__pyx_v_l1 = NULL;
  PyObject *__pyx_v_l2 = NULL;
  Py_ssize_t __pyx_v_L;
  PyObject *__pyx_v_line3 = NULL;
  PyObject *__pyx_8genexpr9__pyx_v_l = 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;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  Py_ssize_t __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Py_ssize_t __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "cython/core/basic.pyx":658
 * 
 *     def __repr__(self):
 *         images = self.cusp_images()             # <<<<<<<<<<<<<<
 *         maps = self.cusp_maps()
 *         line0, line1, line2 = [], [], []
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cusp_images); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __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, 658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_images = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":659
 *     def __repr__(self):
 *         images = self.cusp_images()
 *         maps = self.cusp_maps()             # <<<<<<<<<<<<<<
 *         line0, line1, line2 = [], [], []
 *         for i in range(self.num_cusps()):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cusp_maps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __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, 659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_maps = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":660
 *         images = self.cusp_images()
 *         maps = self.cusp_maps()
 *         line0, line1, line2 = [], [], []             # <<<<<<<<<<<<<<
 *         for i in range(self.num_cusps()):
 *             l0 = '%d -> %d' % (i, images[i])
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_line0 = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_line1 = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_v_line2 = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":661
 *         maps = self.cusp_maps()
 *         line0, line1, line2 = [], [], []
 *         for i in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *             l0 = '%d -> %d' % (i, images[i])
 *             l1, l2 = format_two_by_two(maps[i])
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 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_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 661, __pyx_L1_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_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 661, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      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, 661, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 661, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 661, __pyx_L1_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, 661, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 661, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 661, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_6(__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, 661, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/basic.pyx":662
 *         line0, line1, line2 = [], [], []
 *         for i in range(self.num_cusps()):
 *             l0 = '%d -> %d' % (i, images[i])             # <<<<<<<<<<<<<<
 *             l1, l2 = format_two_by_two(maps[i])
 *             L = max(len(l0), len(l1), len(l2))
 */
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_images, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_i);
    __Pyx_GIVEREF(__pyx_v_i);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_i)) __PYX_ERR(0, 662, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_d_d, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_l0, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/basic.pyx":663
 *         for i in range(self.num_cusps()):
 *             l0 = '%d -> %d' % (i, images[i])
 *             l1, l2 = format_two_by_two(maps[i])             # <<<<<<<<<<<<<<
 *             L = max(len(l0), len(l1), len(l2))
 *             line0.append(l0.ljust(L))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_format_two_by_two); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_maps, __pyx_v_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 663, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      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, 663, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 663, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 663, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
      index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 663, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 663, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_l1, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_l2, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "cython/core/basic.pyx":664
 *             l0 = '%d -> %d' % (i, images[i])
 *             l1, l2 = format_two_by_two(maps[i])
 *             L = max(len(l0), len(l1), len(l2))             # <<<<<<<<<<<<<<
 *             line0.append(l0.ljust(L))
 *             line1.append(l1.ljust(L))
 */
    __pyx_t_10 = PyObject_Length(__pyx_v_l1); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 664, __pyx_L1_error)
    __pyx_t_11 = PyObject_Length(__pyx_v_l2); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 664, __pyx_L1_error)
    __pyx_t_12 = PyObject_Length(__pyx_v_l0); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 664, __pyx_L1_error)
    __pyx_t_14 = (__pyx_t_10 > __pyx_t_12);
    if (__pyx_t_14) {
      __pyx_t_13 = __pyx_t_10;
    } else {
      __pyx_t_13 = __pyx_t_12;
    }
    __pyx_t_12 = __pyx_t_13;
    __pyx_t_14 = (__pyx_t_11 > __pyx_t_12);
    if (__pyx_t_14) {
      __pyx_t_13 = __pyx_t_11;
    } else {
      __pyx_t_13 = __pyx_t_12;
    }
    __pyx_v_L = __pyx_t_13;

    /* "cython/core/basic.pyx":665
 *             l1, l2 = format_two_by_two(maps[i])
 *             L = max(len(l0), len(l1), len(l2))
 *             line0.append(l0.ljust(L))             # <<<<<<<<<<<<<<
 *             line1.append(l1.ljust(L))
 *             line2.append(l2.ljust(L))
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_l0, __pyx_n_s_ljust); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_L); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __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_t_1};
      __pyx_t_2 = __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;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 665, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_line0, __pyx_t_2); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 665, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/basic.pyx":666
 *             L = max(len(l0), len(l1), len(l2))
 *             line0.append(l0.ljust(L))
 *             line1.append(l1.ljust(L))             # <<<<<<<<<<<<<<
 *             line2.append(l2.ljust(L))
 *         line3 = 'Extends to link' if self.extends_to_link() else 'Does not extend to link'
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_l1, __pyx_n_s_ljust); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_L); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __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_t_1};
      __pyx_t_2 = __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;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_line1, __pyx_t_2); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 666, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/basic.pyx":667
 *             line0.append(l0.ljust(L))
 *             line1.append(l1.ljust(L))
 *             line2.append(l2.ljust(L))             # <<<<<<<<<<<<<<
 *         line3 = 'Extends to link' if self.extends_to_link() else 'Does not extend to link'
 *         return '\n'.join(['  '.join(l).strip()
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_l2, __pyx_n_s_ljust); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_L); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __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_t_1};
      __pyx_t_2 = __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;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_line2, __pyx_t_2); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 667, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/basic.pyx":661
 *         maps = self.cusp_maps()
 *         line0, line1, line2 = [], [], []
 *         for i in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *             l0 = '%d -> %d' % (i, images[i])
 *             l1, l2 = format_two_by_two(maps[i])
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":668
 *             line1.append(l1.ljust(L))
 *             line2.append(l2.ljust(L))
 *         line3 = 'Extends to link' if self.extends_to_link() else 'Does not extend to link'             # <<<<<<<<<<<<<<
 *         return '\n'.join(['  '.join(l).strip()
 *                           for l in [line0, line1, line2]] + [line3])
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_extends_to_link); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(0, 668, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_14) {
    __Pyx_INCREF(__pyx_kp_s_Extends_to_link);
    __pyx_t_3 = __pyx_kp_s_Extends_to_link;
  } else {
    __Pyx_INCREF(__pyx_kp_s_Does_not_extend_to_link);
    __pyx_t_3 = __pyx_kp_s_Does_not_extend_to_link;
  }
  __pyx_v_line3 = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":669
 *             line2.append(l2.ljust(L))
 *         line3 = 'Extends to link' if self.extends_to_link() else 'Does not extend to link'
 *         return '\n'.join(['  '.join(l).strip()             # <<<<<<<<<<<<<<
 *                           for l in [line0, line1, line2]] + [line3])
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 669, __pyx_L10_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "cython/core/basic.pyx":670
 *         line3 = 'Extends to link' if self.extends_to_link() else 'Does not extend to link'
 *         return '\n'.join(['  '.join(l).strip()
 *                           for l in [line0, line1, line2]] + [line3])             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L10_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_line0);
    __Pyx_GIVEREF(__pyx_v_line0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_line0)) __PYX_ERR(0, 670, __pyx_L10_error);
    __Pyx_INCREF(__pyx_v_line1);
    __Pyx_GIVEREF(__pyx_v_line1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_line1)) __PYX_ERR(0, 670, __pyx_L10_error);
    __Pyx_INCREF(__pyx_v_line2);
    __Pyx_GIVEREF(__pyx_v_line2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_line2)) __PYX_ERR(0, 670, __pyx_L10_error);
    __pyx_t_7 = __pyx_t_2; __Pyx_INCREF(__pyx_t_7);
    __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (__pyx_t_5 >= 3) break;
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 670, __pyx_L10_error)
      #else
      __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_l, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "cython/core/basic.pyx":669
 *             line2.append(l2.ljust(L))
 *         line3 = 'Extends to link' if self.extends_to_link() else 'Does not extend to link'
 *         return '\n'.join(['  '.join(l).strip()             # <<<<<<<<<<<<<<
 *                           for l in [line0, line1, line2]] + [line3])
 * 
 */
      __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__23, __pyx_8genexpr9__pyx_v_l); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strip); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 669, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 669, __pyx_L10_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/basic.pyx":670
 *         line3 = 'Extends to link' if self.extends_to_link() else 'Does not extend to link'
 *         return '\n'.join(['  '.join(l).strip()
 *                           for l in [line0, line1, line2]] + [line3])             # <<<<<<<<<<<<<<
 * 
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_l); __pyx_8genexpr9__pyx_v_l = 0;
    goto __pyx_L14_exit_scope;
    __pyx_L10_error:;
    __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_l); __pyx_8genexpr9__pyx_v_l = 0;
    goto __pyx_L1_error;
    __pyx_L14_exit_scope:;
  } /* exit inner scope */
  __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_line3);
  __Pyx_GIVEREF(__pyx_v_line3);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_line3)) __PYX_ERR(0, 670, __pyx_L1_error);
  __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cython/core/basic.pyx":669
 *             line2.append(l2.ljust(L))
 *         line3 = 'Extends to link' if self.extends_to_link() else 'Does not extend to link'
 *         return '\n'.join(['  '.join(l).strip()             # <<<<<<<<<<<<<<
 *                           for l in [line0, line1, line2]] + [line3])
 * 
 */
  __pyx_t_7 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":657
 *         return len(self.cusp_images())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         images = self.cusp_images()
 *         maps = self.cusp_maps()
 */

  /* 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_AddTraceback("SnapPy.Isometry.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_images);
  __Pyx_XDECREF(__pyx_v_maps);
  __Pyx_XDECREF(__pyx_v_line0);
  __Pyx_XDECREF(__pyx_v_line1);
  __Pyx_XDECREF(__pyx_v_line2);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_l0);
  __Pyx_XDECREF(__pyx_v_l1);
  __Pyx_XDECREF(__pyx_v_l2);
  __Pyx_XDECREF(__pyx_v_line3);
  __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":673
 * 
 * 
 * cdef IsometryListToIsometries(IsometryList *isometries):             # <<<<<<<<<<<<<<
 *     cdef int n, c, i = 0, j = 0, c_cusp_image
 *     cdef MatrixInt22  c_cusp_map
 */

static PyObject *__pyx_f_6SnapPy_IsometryListToIsometries(IsometryList *__pyx_v_isometries) {
  int __pyx_v_n;
  int __pyx_v_c;
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_c_cusp_image;
  MatrixInt22 __pyx_v_c_cusp_map;
  PyObject *__pyx_v_ans = NULL;
  PyObject *__pyx_v_cusp_images = NULL;
  PyObject *__pyx_v_cusp_maps = NULL;
  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;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  Boolean __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("IsometryListToIsometries", 1);

  /* "cython/core/basic.pyx":674
 * 
 * cdef IsometryListToIsometries(IsometryList *isometries):
 *     cdef int n, c, i = 0, j = 0, c_cusp_image             # <<<<<<<<<<<<<<
 *     cdef MatrixInt22  c_cusp_map
 *     n = isometry_list_size(isometries)
 */
  __pyx_v_i = 0;
  __pyx_v_j = 0;

  /* "cython/core/basic.pyx":676
 *     cdef int n, c, i = 0, j = 0, c_cusp_image
 *     cdef MatrixInt22  c_cusp_map
 *     n = isometry_list_size(isometries)             # <<<<<<<<<<<<<<
 *     c = isometry_list_num_cusps(isometries)
 * 
 */
  __pyx_t_1 = isometry_list_size(__pyx_v_isometries); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 676, __pyx_L1_error)
  __pyx_v_n = __pyx_t_1;

  /* "cython/core/basic.pyx":677
 *     cdef MatrixInt22  c_cusp_map
 *     n = isometry_list_size(isometries)
 *     c = isometry_list_num_cusps(isometries)             # <<<<<<<<<<<<<<
 * 
 *     ans = []
 */
  __pyx_t_1 = isometry_list_num_cusps(__pyx_v_isometries); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 677, __pyx_L1_error)
  __pyx_v_c = __pyx_t_1;

  /* "cython/core/basic.pyx":679
 *     c = isometry_list_num_cusps(isometries)
 * 
 *     ans = []             # <<<<<<<<<<<<<<
 *     for i in range(n):
 *         cusp_images = []
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_ans = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/basic.pyx":680
 * 
 *     ans = []
 *     for i in range(n):             # <<<<<<<<<<<<<<
 *         cusp_images = []
 *         cusp_maps = []
 */
  __pyx_t_1 = __pyx_v_n;
  __pyx_t_3 = __pyx_t_1;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "cython/core/basic.pyx":681
 *     ans = []
 *     for i in range(n):
 *         cusp_images = []             # <<<<<<<<<<<<<<
 *         cusp_maps = []
 *         for j in range(c):
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_cusp_images, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cython/core/basic.pyx":682
 *     for i in range(n):
 *         cusp_images = []
 *         cusp_maps = []             # <<<<<<<<<<<<<<
 *         for j in range(c):
 *             isometry_list_cusp_action(isometries, i, j, &c_cusp_image, c_cusp_map)
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_cusp_maps, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "cython/core/basic.pyx":683
 *         cusp_images = []
 *         cusp_maps = []
 *         for j in range(c):             # <<<<<<<<<<<<<<
 *             isometry_list_cusp_action(isometries, i, j, &c_cusp_image, c_cusp_map)
 *             cusp_images.append(c_cusp_image)
 */
    __pyx_t_5 = __pyx_v_c;
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_j = __pyx_t_7;

      /* "cython/core/basic.pyx":684
 *         cusp_maps = []
 *         for j in range(c):
 *             isometry_list_cusp_action(isometries, i, j, &c_cusp_image, c_cusp_map)             # <<<<<<<<<<<<<<
 *             cusp_images.append(c_cusp_image)
 *             cusp_maps.append(matrix(
 */
      isometry_list_cusp_action(__pyx_v_isometries, __pyx_v_i, __pyx_v_j, (&__pyx_v_c_cusp_image), __pyx_v_c_cusp_map); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 684, __pyx_L1_error)

      /* "cython/core/basic.pyx":685
 *         for j in range(c):
 *             isometry_list_cusp_action(isometries, i, j, &c_cusp_image, c_cusp_map)
 *             cusp_images.append(c_cusp_image)             # <<<<<<<<<<<<<<
 *             cusp_maps.append(matrix(
 *                 [ [c_cusp_map[0][0], c_cusp_map[0][1]],
 */
      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_c_cusp_image); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 685, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_cusp_images, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 685, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/basic.pyx":686
 *             isometry_list_cusp_action(isometries, i, j, &c_cusp_image, c_cusp_map)
 *             cusp_images.append(c_cusp_image)
 *             cusp_maps.append(matrix(             # <<<<<<<<<<<<<<
 *                 [ [c_cusp_map[0][0], c_cusp_map[0][1]],
 *                   [c_cusp_map[1][0], c_cusp_map[1][1]]] ))
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_matrix); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 686, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);

      /* "cython/core/basic.pyx":687
 *             cusp_images.append(c_cusp_image)
 *             cusp_maps.append(matrix(
 *                 [ [c_cusp_map[0][0], c_cusp_map[0][1]],             # <<<<<<<<<<<<<<
 *                   [c_cusp_map[1][0], c_cusp_map[1][1]]] ))
 * 
 */
      __pyx_t_10 = __Pyx_PyInt_From_int(((__pyx_v_c_cusp_map[0])[0])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 687, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = __Pyx_PyInt_From_int(((__pyx_v_c_cusp_map[0])[1])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 687, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = PyList_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 687, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __Pyx_GIVEREF(__pyx_t_10);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_10)) __PYX_ERR(0, 687, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_11);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_12, 1, __pyx_t_11)) __PYX_ERR(0, 687, __pyx_L1_error);
      __pyx_t_10 = 0;
      __pyx_t_11 = 0;

      /* "cython/core/basic.pyx":688
 *             cusp_maps.append(matrix(
 *                 [ [c_cusp_map[0][0], c_cusp_map[0][1]],
 *                   [c_cusp_map[1][0], c_cusp_map[1][1]]] ))             # <<<<<<<<<<<<<<
 * 
 *         ans.append(Isometry(cusp_images, cusp_maps, B2B(isometry_extends_to_link(isometries, i))))
 */
      __pyx_t_11 = __Pyx_PyInt_From_int(((__pyx_v_c_cusp_map[1])[0])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_10 = __Pyx_PyInt_From_int(((__pyx_v_c_cusp_map[1])[1])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_13 = PyList_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_GIVEREF(__pyx_t_11);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_t_11)) __PYX_ERR(0, 688, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_10);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 1, __pyx_t_10)) __PYX_ERR(0, 688, __pyx_L1_error);
      __pyx_t_11 = 0;
      __pyx_t_10 = 0;

      /* "cython/core/basic.pyx":687
 *             cusp_images.append(c_cusp_image)
 *             cusp_maps.append(matrix(
 *                 [ [c_cusp_map[0][0], c_cusp_map[0][1]],             # <<<<<<<<<<<<<<
 *                   [c_cusp_map[1][0], c_cusp_map[1][1]]] ))
 * 
 */
      __pyx_t_10 = PyList_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 687, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_12);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_12)) __PYX_ERR(0, 687, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_13);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_13)) __PYX_ERR(0, 687, __pyx_L1_error);
      __pyx_t_12 = 0;
      __pyx_t_13 = 0;
      __pyx_t_13 = NULL;
      __pyx_t_14 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_14 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_10};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_14, 1+__pyx_t_14);
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }

      /* "cython/core/basic.pyx":686
 *             isometry_list_cusp_action(isometries, i, j, &c_cusp_image, c_cusp_map)
 *             cusp_images.append(c_cusp_image)
 *             cusp_maps.append(matrix(             # <<<<<<<<<<<<<<
 *                 [ [c_cusp_map[0][0], c_cusp_map[0][1]],
 *                   [c_cusp_map[1][0], c_cusp_map[1][1]]] ))
 */
      __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_cusp_maps, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 686, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "cython/core/basic.pyx":690
 *                   [c_cusp_map[1][0], c_cusp_map[1][1]]] ))
 * 
 *         ans.append(Isometry(cusp_images, cusp_maps, B2B(isometry_extends_to_link(isometries, i))))             # <<<<<<<<<<<<<<
 * 
 *     return ans
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_Isometry); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_15 = isometry_extends_to_link(__pyx_v_isometries, __pyx_v_i); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 690, __pyx_L1_error)
    __pyx_t_10 = __pyx_f_6SnapPy_B2B(__pyx_t_15); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_13 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_13, __pyx_v_cusp_images, __pyx_v_cusp_maps, __pyx_t_10};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_ans, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 690, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "cython/core/basic.pyx":692
 *         ans.append(Isometry(cusp_images, cusp_maps, B2B(isometry_extends_to_link(isometries, i))))
 * 
 *     return ans             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ans);
  __pyx_r = __pyx_v_ans;
  goto __pyx_L0;

  /* "cython/core/basic.pyx":673
 * 
 * 
 * cdef IsometryListToIsometries(IsometryList *isometries):             # <<<<<<<<<<<<<<
 *     cdef int n, c, i = 0, j = 0, c_cusp_image
 *     cdef MatrixInt22  c_cusp_map
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("SnapPy.IsometryListToIsometries", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ans);
  __Pyx_XDECREF(__pyx_v_cusp_images);
  __Pyx_XDECREF(__pyx_v_cusp_maps);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":697
 * # PLink communication
 * 
 * def _plink_callback(LE):             # <<<<<<<<<<<<<<
 *     cdef Manifold manifold
 *     cdef c_Triangulation* c_triangulation = NULL
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_29_plink_callback(PyObject *__pyx_self, 
#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_6SnapPy_28_plink_callback, "_plink_callback(LE)");
static PyMethodDef __pyx_mdef_6SnapPy_29_plink_callback = {"_plink_callback", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_29_plink_callback, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_28_plink_callback};
static PyObject *__pyx_pw_6SnapPy_29_plink_callback(PyObject *__pyx_self, 
#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_LE = 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("_plink_callback (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_LE,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_LE)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 697, __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, "_plink_callback") < 0)) __PYX_ERR(0, 697, __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_LE = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_plink_callback", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 697, __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("SnapPy._plink_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_28_plink_callback(__pyx_self, __pyx_v_LE);

  /* 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_6SnapPy_28_plink_callback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_LE) {
  struct __pyx_obj_6SnapPy_Manifold *__pyx_v_manifold = 0;
  Triangulation *__pyx_v_c_triangulation;
  PyObject *__pyx_v_klp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Triangulation *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_plink_callback", 1);

  /* "cython/core/basic.pyx":699
 * def _plink_callback(LE):
 *     cdef Manifold manifold
 *     cdef c_Triangulation* c_triangulation = NULL             # <<<<<<<<<<<<<<
 *     if LE.manifold is None:
 *         LE.manifold = _manifold_class('empty')
 */
  __pyx_v_c_triangulation = NULL;

  /* "cython/core/basic.pyx":700
 *     cdef Manifold manifold
 *     cdef c_Triangulation* c_triangulation = NULL
 *     if LE.manifold is None:             # <<<<<<<<<<<<<<
 *         LE.manifold = _manifold_class('empty')
 *     manifold = LE.manifold
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_LE, __pyx_n_s_manifold); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cython/core/basic.pyx":701
 *     cdef c_Triangulation* c_triangulation = NULL
 *     if LE.manifold is None:
 *         LE.manifold = _manifold_class('empty')             # <<<<<<<<<<<<<<
 *     manifold = LE.manifold
 *     klp = LE.SnapPea_KLPProjection()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_manifold_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 701, __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_n_s_empty};
      __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(0, 701, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_LE, __pyx_n_s_manifold, __pyx_t_1) < 0) __PYX_ERR(0, 701, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/basic.pyx":700
 *     cdef Manifold manifold
 *     cdef c_Triangulation* c_triangulation = NULL
 *     if LE.manifold is None:             # <<<<<<<<<<<<<<
 *         LE.manifold = _manifold_class('empty')
 *     manifold = LE.manifold
 */
  }

  /* "cython/core/basic.pyx":702
 *     if LE.manifold is None:
 *         LE.manifold = _manifold_class('empty')
 *     manifold = LE.manifold             # <<<<<<<<<<<<<<
 *     klp = LE.SnapPea_KLPProjection()
 *     if klp is None:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_LE, __pyx_n_s_manifold); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6SnapPy_Manifold))))) __PYX_ERR(0, 702, __pyx_L1_error)
  __pyx_v_manifold = ((struct __pyx_obj_6SnapPy_Manifold *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":703
 *         LE.manifold = _manifold_class('empty')
 *     manifold = LE.manifold
 *     klp = LE.SnapPea_KLPProjection()             # <<<<<<<<<<<<<<
 *     if klp is None:
 *         raise RuntimeError('Communication with PLink failed.')
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_LE, __pyx_n_s_SnapPea_KLPProjection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __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_1 = __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_1)) __PYX_ERR(0, 703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_klp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":704
 *     manifold = LE.manifold
 *     klp = LE.SnapPea_KLPProjection()
 *     if klp is None:             # <<<<<<<<<<<<<<
 *         raise RuntimeError('Communication with PLink failed.')
 *     elif klp == (0, 0, 0, []):
 */
  __pyx_t_2 = (__pyx_v_klp == Py_None);
  if (unlikely(__pyx_t_2)) {

    /* "cython/core/basic.pyx":705
 *     klp = LE.SnapPea_KLPProjection()
 *     if klp is None:
 *         raise RuntimeError('Communication with PLink failed.')             # <<<<<<<<<<<<<<
 *     elif klp == (0, 0, 0, []):
 *         msg_stream.write('\nGot the empty link from PLink and so not changing the triangulation.\n')
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __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, 705, __pyx_L1_error)

    /* "cython/core/basic.pyx":704
 *     manifold = LE.manifold
 *     klp = LE.SnapPea_KLPProjection()
 *     if klp is None:             # <<<<<<<<<<<<<<
 *         raise RuntimeError('Communication with PLink failed.')
 *     elif klp == (0, 0, 0, []):
 */
  }

  /* "cython/core/basic.pyx":706
 *     if klp is None:
 *         raise RuntimeError('Communication with PLink failed.')
 *     elif klp == (0, 0, 0, []):             # <<<<<<<<<<<<<<
 *         msg_stream.write('\nGot the empty link from PLink and so not changing the triangulation.\n')
 *     else:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0)) __PYX_ERR(0, 706, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0)) __PYX_ERR(0, 706, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_0)) __PYX_ERR(0, 706, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_klp, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cython/core/basic.pyx":707
 *         raise RuntimeError('Communication with PLink failed.')
 *     elif klp == (0, 0, 0, []):
 *         msg_stream.write('\nGot the empty link from PLink and so not changing the triangulation.\n')             # <<<<<<<<<<<<<<
 *     else:
 *         manifold._set_DTcode(spherogram.DTcodec(*LE.DT_code()))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_msg_stream); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 707, __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_Got_the_empty_link_from_PLink_a};
      __pyx_t_1 = __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_1)) __PYX_ERR(0, 707, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/basic.pyx":706
 *     if klp is None:
 *         raise RuntimeError('Communication with PLink failed.')
 *     elif klp == (0, 0, 0, []):             # <<<<<<<<<<<<<<
 *         msg_stream.write('\nGot the empty link from PLink and so not changing the triangulation.\n')
 *     else:
 */
    goto __pyx_L4;
  }

  /* "cython/core/basic.pyx":709
 *         msg_stream.write('\nGot the empty link from PLink and so not changing the triangulation.\n')
 *     else:
 *         manifold._set_DTcode(spherogram.DTcodec(*LE.DT_code()))             # <<<<<<<<<<<<<<
 *         manifold._set_PDcode(LE.PD_code())
 *         c_triangulation = get_triangulation_from_PythonKLP(klp)
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_manifold), __pyx_n_s_set_DTcode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_spherogram); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_DTcodec); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_LE, __pyx_n_s_DT_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    __pyx_t_5 = 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_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 709, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_7 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(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_1 = __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_1)) __PYX_ERR(0, 709, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/basic.pyx":710
 *     else:
 *         manifold._set_DTcode(spherogram.DTcodec(*LE.DT_code()))
 *         manifold._set_PDcode(LE.PD_code())             # <<<<<<<<<<<<<<
 *         c_triangulation = get_triangulation_from_PythonKLP(klp)
 *         if c_triangulation is not NULL:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_manifold), __pyx_n_s_set_PDcode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_LE, __pyx_n_s_PD_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_7 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(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_1 = __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_1)) __PYX_ERR(0, 710, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/basic.pyx":711
 *         manifold._set_DTcode(spherogram.DTcodec(*LE.DT_code()))
 *         manifold._set_PDcode(LE.PD_code())
 *         c_triangulation = get_triangulation_from_PythonKLP(klp)             # <<<<<<<<<<<<<<
 *         if c_triangulation is not NULL:
 *             find_complete_hyperbolic_structure(c_triangulation)
 */
    __pyx_t_9 = __pyx_f_6SnapPy_get_triangulation_from_PythonKLP(__pyx_v_klp, NULL); if (unlikely(__pyx_t_9 == ((Triangulation *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 711, __pyx_L1_error)
    __pyx_v_c_triangulation = __pyx_t_9;

    /* "cython/core/basic.pyx":712
 *         manifold._set_PDcode(LE.PD_code())
 *         c_triangulation = get_triangulation_from_PythonKLP(klp)
 *         if c_triangulation is not NULL:             # <<<<<<<<<<<<<<
 *             find_complete_hyperbolic_structure(c_triangulation)
 *         if manifold.c_triangulation is not NULL:
 */
    __pyx_t_2 = (__pyx_v_c_triangulation != NULL);
    if (__pyx_t_2) {

      /* "cython/core/basic.pyx":713
 *         c_triangulation = get_triangulation_from_PythonKLP(klp)
 *         if c_triangulation is not NULL:
 *             find_complete_hyperbolic_structure(c_triangulation)             # <<<<<<<<<<<<<<
 *         if manifold.c_triangulation is not NULL:
 *             free_triangulation(manifold.c_triangulation)
 */
      find_complete_hyperbolic_structure(__pyx_v_c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 713, __pyx_L1_error)

      /* "cython/core/basic.pyx":712
 *         manifold._set_PDcode(LE.PD_code())
 *         c_triangulation = get_triangulation_from_PythonKLP(klp)
 *         if c_triangulation is not NULL:             # <<<<<<<<<<<<<<
 *             find_complete_hyperbolic_structure(c_triangulation)
 *         if manifold.c_triangulation is not NULL:
 */
    }

    /* "cython/core/basic.pyx":714
 *         if c_triangulation is not NULL:
 *             find_complete_hyperbolic_structure(c_triangulation)
 *         if manifold.c_triangulation is not NULL:             # <<<<<<<<<<<<<<
 *             free_triangulation(manifold.c_triangulation)
 *         manifold.set_c_triangulation(c_triangulation)
 */
    __pyx_t_2 = (__pyx_v_manifold->__pyx_base.c_triangulation != NULL);
    if (__pyx_t_2) {

      /* "cython/core/basic.pyx":715
 *             find_complete_hyperbolic_structure(c_triangulation)
 *         if manifold.c_triangulation is not NULL:
 *             free_triangulation(manifold.c_triangulation)             # <<<<<<<<<<<<<<
 *         manifold.set_c_triangulation(c_triangulation)
 *         manifold._cache.clear(message='plink_callback')
 */
      free_triangulation(__pyx_v_manifold->__pyx_base.c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 715, __pyx_L1_error)

      /* "cython/core/basic.pyx":714
 *         if c_triangulation is not NULL:
 *             find_complete_hyperbolic_structure(c_triangulation)
 *         if manifold.c_triangulation is not NULL:             # <<<<<<<<<<<<<<
 *             free_triangulation(manifold.c_triangulation)
 *         manifold.set_c_triangulation(c_triangulation)
 */
    }

    /* "cython/core/basic.pyx":716
 *         if manifold.c_triangulation is not NULL:
 *             free_triangulation(manifold.c_triangulation)
 *         manifold.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 *         manifold._cache.clear(message='plink_callback')
 *         msg_stream.write('\nNew triangulation received from PLink!\n')
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6SnapPy_Manifold *)__pyx_v_manifold->__pyx_base.__pyx_vtab)->__pyx_base.set_c_triangulation(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_manifold), __pyx_v_c_triangulation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/basic.pyx":717
 *             free_triangulation(manifold.c_triangulation)
 *         manifold.set_c_triangulation(c_triangulation)
 *         manifold._cache.clear(message='plink_callback')             # <<<<<<<<<<<<<<
 *         msg_stream.write('\nNew triangulation received from PLink!\n')
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_manifold->__pyx_base._cache, __pyx_n_s_clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_message, __pyx_n_s_plink_callback) < 0) __PYX_ERR(0, 717, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/basic.pyx":718
 *         manifold.set_c_triangulation(c_triangulation)
 *         manifold._cache.clear(message='plink_callback')
 *         msg_stream.write('\nNew triangulation received from PLink!\n')             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_msg_stream); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __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_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_New_triangulation_received_from};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 718, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L4:;

  /* "cython/core/basic.pyx":697
 * # PLink communication
 * 
 * def _plink_callback(LE):             # <<<<<<<<<<<<<<
 *     cdef Manifold manifold
 *     cdef c_Triangulation* c_triangulation = NULL
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("SnapPy._plink_callback", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_manifold);
  __Pyx_XDECREF(__pyx_v_klp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":723
 * # Conversion functions Manifold <-> Triangulation
 * 
 * def Manifold_from_Triangulation(Triangulation T, recompute=True,             # <<<<<<<<<<<<<<
 *                                 manifold_class=None):
 *     cdef c_Triangulation *c_triangulation
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_31Manifold_from_Triangulation(PyObject *__pyx_self, 
#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_6SnapPy_30Manifold_from_Triangulation, "Manifold_from_Triangulation(Triangulation T, recompute=True, manifold_class=None)");
static PyMethodDef __pyx_mdef_6SnapPy_31Manifold_from_Triangulation = {"Manifold_from_Triangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_31Manifold_from_Triangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_30Manifold_from_Triangulation};
static PyObject *__pyx_pw_6SnapPy_31Manifold_from_Triangulation(PyObject *__pyx_self, 
#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_6SnapPy_Triangulation *__pyx_v_T = 0;
  PyObject *__pyx_v_recompute = 0;
  PyObject *__pyx_v_manifold_class = 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("Manifold_from_Triangulation (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_T,&__pyx_n_s_recompute,&__pyx_n_s_manifold_class_2,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));

    /* "cython/core/basic.pyx":724
 * 
 * def Manifold_from_Triangulation(Triangulation T, recompute=True,
 *                                 manifold_class=None):             # <<<<<<<<<<<<<<
 *     cdef c_Triangulation *c_triangulation
 *     cdef Manifold M
 */
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    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_T)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 723, __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_recompute);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 723, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_manifold_class_2);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 723, __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, "Manifold_from_Triangulation") < 0)) __PYX_ERR(0, 723, __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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_T = ((struct __pyx_obj_6SnapPy_Triangulation *)values[0]);
    __pyx_v_recompute = values[1];
    __pyx_v_manifold_class = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Manifold_from_Triangulation", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 723, __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("SnapPy.Manifold_from_Triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_T), __pyx_ptype_6SnapPy_Triangulation, 1, "T", 0))) __PYX_ERR(0, 723, __pyx_L1_error)
  __pyx_r = __pyx_pf_6SnapPy_30Manifold_from_Triangulation(__pyx_self, __pyx_v_T, __pyx_v_recompute, __pyx_v_manifold_class);

  /* "cython/core/basic.pyx":723
 * # Conversion functions Manifold <-> Triangulation
 * 
 * def Manifold_from_Triangulation(Triangulation T, recompute=True,             # <<<<<<<<<<<<<<
 *                                 manifold_class=None):
 *     cdef c_Triangulation *c_triangulation
 */

  /* 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_6SnapPy_30Manifold_from_Triangulation(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_T, PyObject *__pyx_v_recompute, PyObject *__pyx_v_manifold_class) {
  Triangulation *__pyx_v_c_triangulation;
  struct __pyx_obj_6SnapPy_Manifold *__pyx_v_M = 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;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Manifold_from_Triangulation", 1);

  /* "cython/core/basic.pyx":728
 *     cdef Manifold M
 * 
 *     M = _manifold_class('empty') if manifold_class is None else manifold_class('empty')             # <<<<<<<<<<<<<<
 *     if T.c_triangulation is NULL:
 *         return M
 */
  __pyx_t_2 = (__pyx_v_manifold_class == Py_None);
  if (__pyx_t_2) {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_manifold_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 728, __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_n_s_empty};
      __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, 728, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6SnapPy_Manifold))))) __PYX_ERR(0, 728, __pyx_L1_error)
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __Pyx_INCREF(__pyx_v_manifold_class);
    __pyx_t_4 = __pyx_v_manifold_class; __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_n_s_empty};
      __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, 728, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6SnapPy_Manifold))))) __PYX_ERR(0, 728, __pyx_L1_error)
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_v_M = ((struct __pyx_obj_6SnapPy_Manifold *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":729
 * 
 *     M = _manifold_class('empty') if manifold_class is None else manifold_class('empty')
 *     if T.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *         return M
 *     copy_triangulation(T.c_triangulation, &c_triangulation)
 */
  __pyx_t_2 = (__pyx_v_T->c_triangulation == NULL);
  if (__pyx_t_2) {

    /* "cython/core/basic.pyx":730
 *     M = _manifold_class('empty') if manifold_class is None else manifold_class('empty')
 *     if T.c_triangulation is NULL:
 *         return M             # <<<<<<<<<<<<<<
 *     copy_triangulation(T.c_triangulation, &c_triangulation)
 *     M.set_c_triangulation(c_triangulation)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_M);
    __pyx_r = ((PyObject *)__pyx_v_M);
    goto __pyx_L0;

    /* "cython/core/basic.pyx":729
 * 
 *     M = _manifold_class('empty') if manifold_class is None else manifold_class('empty')
 *     if T.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *         return M
 *     copy_triangulation(T.c_triangulation, &c_triangulation)
 */
  }

  /* "cython/core/basic.pyx":731
 *     if T.c_triangulation is NULL:
 *         return M
 *     copy_triangulation(T.c_triangulation, &c_triangulation)             # <<<<<<<<<<<<<<
 *     M.set_c_triangulation(c_triangulation)
 *     if recompute:
 */
  copy_triangulation(__pyx_v_T->c_triangulation, (&__pyx_v_c_triangulation)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 731, __pyx_L1_error)

  /* "cython/core/basic.pyx":732
 *         return M
 *     copy_triangulation(T.c_triangulation, &c_triangulation)
 *     M.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 *     if recompute:
 *         # Need to remove any finite vertices to be able to find a
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6SnapPy_Manifold *)__pyx_v_M->__pyx_base.__pyx_vtab)->__pyx_base.set_c_triangulation(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_M), __pyx_v_c_triangulation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":733
 *     copy_triangulation(T.c_triangulation, &c_triangulation)
 *     M.set_c_triangulation(c_triangulation)
 *     if recompute:             # <<<<<<<<<<<<<<
 *         # Need to remove any finite vertices to be able to find a
 *         # hyperbolic structure.
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_recompute); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 733, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "cython/core/basic.pyx":736
 *         # Need to remove any finite vertices to be able to find a
 *         # hyperbolic structure.
 *         count_cusps(c_triangulation)             # <<<<<<<<<<<<<<
 *         if get_num_fake_cusps(c_triangulation) > 0:
 *             remove_finite_vertices(c_triangulation)
 */
    count_cusps(__pyx_v_c_triangulation);

    /* "cython/core/basic.pyx":737
 *         # hyperbolic structure.
 *         count_cusps(c_triangulation)
 *         if get_num_fake_cusps(c_triangulation) > 0:             # <<<<<<<<<<<<<<
 *             remove_finite_vertices(c_triangulation)
 *             count_cusps(c_triangulation)
 */
    __pyx_t_6 = get_num_fake_cusps(__pyx_v_c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_6 > 0);
    if (__pyx_t_2) {

      /* "cython/core/basic.pyx":738
 *         count_cusps(c_triangulation)
 *         if get_num_fake_cusps(c_triangulation) > 0:
 *             remove_finite_vertices(c_triangulation)             # <<<<<<<<<<<<<<
 *             count_cusps(c_triangulation)
 * 
 */
      remove_finite_vertices(__pyx_v_c_triangulation);

      /* "cython/core/basic.pyx":739
 *         if get_num_fake_cusps(c_triangulation) > 0:
 *             remove_finite_vertices(c_triangulation)
 *             count_cusps(c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *         find_complete_hyperbolic_structure(c_triangulation)
 */
      count_cusps(__pyx_v_c_triangulation);

      /* "cython/core/basic.pyx":737
 *         # hyperbolic structure.
 *         count_cusps(c_triangulation)
 *         if get_num_fake_cusps(c_triangulation) > 0:             # <<<<<<<<<<<<<<
 *             remove_finite_vertices(c_triangulation)
 *             count_cusps(c_triangulation)
 */
    }

    /* "cython/core/basic.pyx":741
 *             count_cusps(c_triangulation)
 * 
 *         find_complete_hyperbolic_structure(c_triangulation)             # <<<<<<<<<<<<<<
 *         do_Dehn_filling(c_triangulation)
 * 
 */
    find_complete_hyperbolic_structure(__pyx_v_c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 741, __pyx_L1_error)

    /* "cython/core/basic.pyx":742
 * 
 *         find_complete_hyperbolic_structure(c_triangulation)
 *         do_Dehn_filling(c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *     M.set_name(T.name())
 */
    do_Dehn_filling(__pyx_v_c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 742, __pyx_L1_error)

    /* "cython/core/basic.pyx":733
 *     copy_triangulation(T.c_triangulation, &c_triangulation)
 *     M.set_c_triangulation(c_triangulation)
 *     if recompute:             # <<<<<<<<<<<<<<
 *         # Need to remove any finite vertices to be able to find a
 *         # hyperbolic structure.
 */
  }

  /* "cython/core/basic.pyx":744
 *         do_Dehn_filling(c_triangulation)
 * 
 *     M.set_name(T.name())             # <<<<<<<<<<<<<<
 *     M._cover_info = T._cover_info
 *     return M
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_M), __pyx_n_s_set_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_T), __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 744, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __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, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __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, 744, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __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;

  /* "cython/core/basic.pyx":745
 * 
 *     M.set_name(T.name())
 *     M._cover_info = T._cover_info             # <<<<<<<<<<<<<<
 *     return M
 * 
 */
  __pyx_t_1 = __pyx_v_T->_cover_info;
  __Pyx_INCREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_M->__pyx_base._cover_info);
  __Pyx_DECREF(__pyx_v_M->__pyx_base._cover_info);
  __pyx_v_M->__pyx_base._cover_info = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/basic.pyx":746
 *     M.set_name(T.name())
 *     M._cover_info = T._cover_info
 *     return M             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_M);
  __pyx_r = ((PyObject *)__pyx_v_M);
  goto __pyx_L0;

  /* "cython/core/basic.pyx":723
 * # Conversion functions Manifold <-> Triangulation
 * 
 * def Manifold_from_Triangulation(Triangulation T, recompute=True,             # <<<<<<<<<<<<<<
 *                                 manifold_class=None):
 *     cdef c_Triangulation *c_triangulation
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.Manifold_from_Triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_M);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/basic.pyx":749
 * 
 * 
 * def Triangulation_from_Manifold(Manifold M):             # <<<<<<<<<<<<<<
 *     cdef c_Triangulation *c_triangulation
 *     cdef Triangulation T
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_33Triangulation_from_Manifold(PyObject *__pyx_self, 
#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_6SnapPy_32Triangulation_from_Manifold, "Triangulation_from_Manifold(Manifold M)");
static PyMethodDef __pyx_mdef_6SnapPy_33Triangulation_from_Manifold = {"Triangulation_from_Manifold", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_33Triangulation_from_Manifold, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_32Triangulation_from_Manifold};
static PyObject *__pyx_pw_6SnapPy_33Triangulation_from_Manifold(PyObject *__pyx_self, 
#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_6SnapPy_Manifold *__pyx_v_M = 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("Triangulation_from_Manifold (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_M,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_M)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 749, __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, "Triangulation_from_Manifold") < 0)) __PYX_ERR(0, 749, __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_M = ((struct __pyx_obj_6SnapPy_Manifold *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Triangulation_from_Manifold", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 749, __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("SnapPy.Triangulation_from_Manifold", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_M), __pyx_ptype_6SnapPy_Manifold, 1, "M", 0))) __PYX_ERR(0, 749, __pyx_L1_error)
  __pyx_r = __pyx_pf_6SnapPy_32Triangulation_from_Manifold(__pyx_self, __pyx_v_M);

  /* 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_6SnapPy_32Triangulation_from_Manifold(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_6SnapPy_Manifold *__pyx_v_M) {
  Triangulation *__pyx_v_c_triangulation;
  struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_T = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Triangulation_from_Manifold", 1);

  /* "cython/core/basic.pyx":753
 *     cdef Triangulation T
 * 
 *     if M.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *         return _triangulation_class('empty')
 * 
 */
  __pyx_t_1 = (__pyx_v_M->__pyx_base.c_triangulation == NULL);
  if (__pyx_t_1) {

    /* "cython/core/basic.pyx":754
 * 
 *     if M.c_triangulation is NULL:
 *         return _triangulation_class('empty')             # <<<<<<<<<<<<<<
 * 
 *     copy_triangulation(M.c_triangulation, &c_triangulation)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_triangulation_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 754, __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_n_s_empty};
      __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, 754, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/basic.pyx":753
 *     cdef Triangulation T
 * 
 *     if M.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *         return _triangulation_class('empty')
 * 
 */
  }

  /* "cython/core/basic.pyx":756
 *         return _triangulation_class('empty')
 * 
 *     copy_triangulation(M.c_triangulation, &c_triangulation)             # <<<<<<<<<<<<<<
 *     remove_hyperbolic_structures(c_triangulation)
 *     T = _triangulation_class('empty')
 */
  copy_triangulation(__pyx_v_M->__pyx_base.c_triangulation, (&__pyx_v_c_triangulation)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 756, __pyx_L1_error)

  /* "cython/core/basic.pyx":757
 * 
 *     copy_triangulation(M.c_triangulation, &c_triangulation)
 *     remove_hyperbolic_structures(c_triangulation)             # <<<<<<<<<<<<<<
 *     T = _triangulation_class('empty')
 *     T.set_c_triangulation(c_triangulation)
 */
  remove_hyperbolic_structures(__pyx_v_c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 757, __pyx_L1_error)

  /* "cython/core/basic.pyx":758
 *     copy_triangulation(M.c_triangulation, &c_triangulation)
 *     remove_hyperbolic_structures(c_triangulation)
 *     T = _triangulation_class('empty')             # <<<<<<<<<<<<<<
 *     T.set_c_triangulation(c_triangulation)
 *     T.set_name(M.name())
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_triangulation_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __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_n_s_empty};
    __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, 758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6SnapPy_Triangulation))))) __PYX_ERR(0, 758, __pyx_L1_error)
  __pyx_v_T = ((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/basic.pyx":759
 *     remove_hyperbolic_structures(c_triangulation)
 *     T = _triangulation_class('empty')
 *     T.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 *     T.set_name(M.name())
 *     T._cover_info = M._cover_info
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_T->__pyx_vtab)->set_c_triangulation(__pyx_v_T, __pyx_v_c_triangulation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/basic.pyx":760
 *     T = _triangulation_class('empty')
 *     T.set_c_triangulation(c_triangulation)
 *     T.set_name(M.name())             # <<<<<<<<<<<<<<
 *     T._cover_info = M._cover_info
 *     return T
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_T), __pyx_n_s_set_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_M), __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_5 = 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_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 760, __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;

  /* "cython/core/basic.pyx":761
 *     T.set_c_triangulation(c_triangulation)
 *     T.set_name(M.name())
 *     T._cover_info = M._cover_info             # <<<<<<<<<<<<<<
 *     return T
 */
  __pyx_t_2 = __pyx_v_M->__pyx_base._cover_info;
  __Pyx_INCREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_T->_cover_info);
  __Pyx_DECREF(__pyx_v_T->_cover_info);
  __pyx_v_T->_cover_info = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/basic.pyx":762
 *     T.set_name(M.name())
 *     T._cover_info = M._cover_info
 *     return T             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_T);
  __pyx_r = ((PyObject *)__pyx_v_T);
  goto __pyx_L0;

  /* "cython/core/basic.pyx":749
 * 
 * 
 * def Triangulation_from_Manifold(Manifold M):             # <<<<<<<<<<<<<<
 *     cdef c_Triangulation *c_triangulation
 *     cdef Triangulation T
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.Triangulation_from_Manifold", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_T);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":80
 *     cdef hyperbolic_structure_initialized
 * 
 *     def __cinit__(self, spec=None, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         if UI_callback is not None:
 *             uLongComputationBegins('Constructing a manifold', 1)
 */

/* Python wrapper */
static int __pyx_pw_6SnapPy_13Triangulation_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6SnapPy_13Triangulation_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_spec = 0;
  PyObject *__pyx_v_remove_finite_vertices = 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("__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_spec,&__pyx_n_s_remove_finite_vertices,0};
    values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
    values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_spec);
          if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 80, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_remove_finite_vertices);
          if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 80, __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(3, 80, __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);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_spec = values[0];
    __pyx_v_remove_finite_vertices = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, __pyx_nargs); __PYX_ERR(3, 80, __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("SnapPy.Triangulation.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation___cinit__(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_spec, __pyx_v_remove_finite_vertices);

  /* 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_6SnapPy_13Triangulation___cinit__(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_spec, PyObject *__pyx_v_remove_finite_vertices) {
  PyObject *__pyx_v_attr = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  struct __pyx_opt_args_6SnapPy_13Triangulation_get_triangulation __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_spec);

  /* "cython/core/triangulation.pyx":81
 * 
 *     def __cinit__(self, spec=None, remove_finite_vertices=True):
 *         if UI_callback is not None:             # <<<<<<<<<<<<<<
 *             uLongComputationBegins('Constructing a manifold', 1)
 *             UI_callback()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_UI_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cython/core/triangulation.pyx":82
 *     def __cinit__(self, spec=None, remove_finite_vertices=True):
 *         if UI_callback is not None:
 *             uLongComputationBegins('Constructing a manifold', 1)             # <<<<<<<<<<<<<<
 *             UI_callback()
 *             uLongComputationEnds()
 */
    uLongComputationBegins(((const char*)"Constructing a manifold"), 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 82, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":83
 *         if UI_callback is not None:
 *             uLongComputationBegins('Constructing a manifold', 1)
 *             UI_callback()             # <<<<<<<<<<<<<<
 *             uLongComputationEnds()
 *         # Answers to potentially hard computations are cached
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_UI_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 83, __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_1 = __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_1)) __PYX_ERR(3, 83, __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;

    /* "cython/core/triangulation.pyx":84
 *             uLongComputationBegins('Constructing a manifold', 1)
 *             UI_callback()
 *             uLongComputationEnds()             # <<<<<<<<<<<<<<
 *         # Answers to potentially hard computations are cached
 *         self._cache = SnapPyCache()
 */
    uLongComputationEnds(); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 84, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":81
 * 
 *     def __cinit__(self, spec=None, remove_finite_vertices=True):
 *         if UI_callback is not None:             # <<<<<<<<<<<<<<
 *             uLongComputationBegins('Constructing a manifold', 1)
 *             UI_callback()
 */
  }

  /* "cython/core/triangulation.pyx":86
 *             uLongComputationEnds()
 *         # Answers to potentially hard computations are cached
 *         self._cache = SnapPyCache()             # <<<<<<<<<<<<<<
 *         self._DTcode = None
 *         self._PDcode = None
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SnapPyCache); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 86, __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_1 = __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_1)) __PYX_ERR(3, 86, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_cache);
  __Pyx_DECREF(__pyx_v_self->_cache);
  __pyx_v_self->_cache = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":87
 *         # Answers to potentially hard computations are cached
 *         self._cache = SnapPyCache()
 *         self._DTcode = None             # <<<<<<<<<<<<<<
 *         self._PDcode = None
 *         self._cover_info = None
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_DTcode);
  __Pyx_DECREF(__pyx_v_self->_DTcode);
  __pyx_v_self->_DTcode = Py_None;

  /* "cython/core/triangulation.pyx":88
 *         self._cache = SnapPyCache()
 *         self._DTcode = None
 *         self._PDcode = None             # <<<<<<<<<<<<<<
 *         self._cover_info = None
 *         self.LE = None
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_PDcode);
  __Pyx_DECREF(__pyx_v_self->_PDcode);
  __pyx_v_self->_PDcode = Py_None;

  /* "cython/core/triangulation.pyx":89
 *         self._DTcode = None
 *         self._PDcode = None
 *         self._cover_info = None             # <<<<<<<<<<<<<<
 *         self.LE = None
 *         self.hyperbolic_structure_initialized = False
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_cover_info);
  __Pyx_DECREF(__pyx_v_self->_cover_info);
  __pyx_v_self->_cover_info = Py_None;

  /* "cython/core/triangulation.pyx":90
 *         self._PDcode = None
 *         self._cover_info = None
 *         self.LE = None             # <<<<<<<<<<<<<<
 *         self.hyperbolic_structure_initialized = False
 *         self._link_file_full_path = None
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->LE);
  __Pyx_DECREF(__pyx_v_self->LE);
  __pyx_v_self->LE = Py_None;

  /* "cython/core/triangulation.pyx":91
 *         self._cover_info = None
 *         self.LE = None
 *         self.hyperbolic_structure_initialized = False             # <<<<<<<<<<<<<<
 *         self._link_file_full_path = None
 *         for attr in ['__snappy__', 'snapPea', '_to_string']:
 */
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  __Pyx_GOTREF(__pyx_v_self->hyperbolic_structure_initialized);
  __Pyx_DECREF(__pyx_v_self->hyperbolic_structure_initialized);
  __pyx_v_self->hyperbolic_structure_initialized = Py_False;

  /* "cython/core/triangulation.pyx":92
 *         self.LE = None
 *         self.hyperbolic_structure_initialized = False
 *         self._link_file_full_path = None             # <<<<<<<<<<<<<<
 *         for attr in ['__snappy__', 'snapPea', '_to_string']:
 *             if hasattr(spec, attr):
 */
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GOTREF(__pyx_v_self->_link_file_full_path);
  __Pyx_DECREF(__pyx_v_self->_link_file_full_path);
  __pyx_v_self->_link_file_full_path = Py_None;

  /* "cython/core/triangulation.pyx":93
 *         self.hyperbolic_structure_initialized = False
 *         self._link_file_full_path = None
 *         for attr in ['__snappy__', 'snapPea', '_to_string']:             # <<<<<<<<<<<<<<
 *             if hasattr(spec, attr):
 *                 spec = getattr(spec, attr)()
 */
  __pyx_t_1 = __pyx_tuple__25; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_6 = 0;
  for (;;) {
    if (__pyx_t_6 >= 3) break;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 93, __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(3, 93, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":94
 *         self._link_file_full_path = None
 *         for attr in ['__snappy__', 'snapPea', '_to_string']:
 *             if hasattr(spec, attr):             # <<<<<<<<<<<<<<
 *                 spec = getattr(spec, attr)()
 *                 break
 */
    __pyx_t_2 = __Pyx_HasAttr(__pyx_v_spec, __pyx_v_attr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 94, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "cython/core/triangulation.pyx":95
 *         for attr in ['__snappy__', 'snapPea', '_to_string']:
 *             if hasattr(spec, attr):
 *                 spec = getattr(spec, attr)()             # <<<<<<<<<<<<<<
 *                 break
 *         if spec is not None and spec != 'empty':
 */
      __pyx_t_4 = __Pyx_GetAttr(__pyx_v_spec, __pyx_v_attr); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 95, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __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, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 95, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_spec, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cython/core/triangulation.pyx":96
 *             if hasattr(spec, attr):
 *                 spec = getattr(spec, attr)()
 *                 break             # <<<<<<<<<<<<<<
 *         if spec is not None and spec != 'empty':
 *             if not isinstance(spec, (str, bytes)):
 */
      goto __pyx_L5_break;

      /* "cython/core/triangulation.pyx":94
 *         self._link_file_full_path = None
 *         for attr in ['__snappy__', 'snapPea', '_to_string']:
 *             if hasattr(spec, attr):             # <<<<<<<<<<<<<<
 *                 spec = getattr(spec, attr)()
 *                 break
 */
    }

    /* "cython/core/triangulation.pyx":93
 *         self.hyperbolic_structure_initialized = False
 *         self._link_file_full_path = None
 *         for attr in ['__snappy__', 'snapPea', '_to_string']:             # <<<<<<<<<<<<<<
 *             if hasattr(spec, attr):
 *                 spec = getattr(spec, attr)()
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  goto __pyx_L7_for_end;
  __pyx_L5_break:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  goto __pyx_L7_for_end;
  __pyx_L7_for_end:;

  /* "cython/core/triangulation.pyx":97
 *                 spec = getattr(spec, attr)()
 *                 break
 *         if spec is not None and spec != 'empty':             # <<<<<<<<<<<<<<
 *             if not isinstance(spec, (str, bytes)):
 *                 raise TypeError(triangulation_help %
 */
  __pyx_t_8 = (__pyx_v_spec != Py_None);
  if (__pyx_t_8) {
  } else {
    __pyx_t_2 = __pyx_t_8;
    goto __pyx_L9_bool_binop_done;
  }
  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_spec, __pyx_n_s_empty, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(3, 97, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_8;
  __pyx_L9_bool_binop_done:;
  if (__pyx_t_2) {

    /* "cython/core/triangulation.pyx":98
 *                 break
 *         if spec is not None and spec != 'empty':
 *             if not isinstance(spec, (str, bytes)):             # <<<<<<<<<<<<<<
 *                 raise TypeError(triangulation_help %
 *                                 self.__class__.__name__)
 */
    __pyx_t_8 = PyString_Check(__pyx_v_spec); 
    if (!__pyx_t_8) {
    } else {
      __pyx_t_2 = __pyx_t_8;
      goto __pyx_L12_bool_binop_done;
    }
    __pyx_t_8 = PyBytes_Check(__pyx_v_spec); 
    __pyx_t_2 = __pyx_t_8;
    __pyx_L12_bool_binop_done:;
    __pyx_t_8 = (!__pyx_t_2);
    if (unlikely(__pyx_t_8)) {

      /* "cython/core/triangulation.pyx":99
 *         if spec is not None and spec != 'empty':
 *             if not isinstance(spec, (str, bytes)):
 *                 raise TypeError(triangulation_help %             # <<<<<<<<<<<<<<
 *                                 self.__class__.__name__)
 *             self.get_triangulation(spec, remove_finite_vertices)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_triangulation_help); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 99, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cython/core/triangulation.pyx":100
 *             if not isinstance(spec, (str, bytes)):
 *                 raise TypeError(triangulation_help %
 *                                 self.__class__.__name__)             # <<<<<<<<<<<<<<
 *             self.get_triangulation(spec, remove_finite_vertices)
 *             if self.c_triangulation == NULL:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cython/core/triangulation.pyx":99
 *         if spec is not None and spec != 'empty':
 *             if not isinstance(spec, (str, bytes)):
 *                 raise TypeError(triangulation_help %             # <<<<<<<<<<<<<<
 *                                 self.__class__.__name__)
 *             self.get_triangulation(spec, remove_finite_vertices)
 */
      __pyx_t_3 = PyNumber_Remainder(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 99, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 99, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(3, 99, __pyx_L1_error)

      /* "cython/core/triangulation.pyx":98
 *                 break
 *         if spec is not None and spec != 'empty':
 *             if not isinstance(spec, (str, bytes)):             # <<<<<<<<<<<<<<
 *                 raise TypeError(triangulation_help %
 *                                 self.__class__.__name__)
 */
    }

    /* "cython/core/triangulation.pyx":101
 *                 raise TypeError(triangulation_help %
 *                                 self.__class__.__name__)
 *             self.get_triangulation(spec, remove_finite_vertices)             # <<<<<<<<<<<<<<
 *             if self.c_triangulation == NULL:
 *                 raise RuntimeError('An empty triangulation was generated.')
 */
    __pyx_t_9.__pyx_n = 1;
    __pyx_t_9.remove_finite_vertices = __pyx_v_remove_finite_vertices;
    __pyx_t_4 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->get_triangulation(__pyx_v_self, __pyx_v_spec, &__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":102
 *                                 self.__class__.__name__)
 *             self.get_triangulation(spec, remove_finite_vertices)
 *             if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError('An empty triangulation was generated.')
 *         elif spec is None:
 */
    __pyx_t_8 = (__pyx_v_self->c_triangulation == NULL);
    if (unlikely(__pyx_t_8)) {

      /* "cython/core/triangulation.pyx":103
 *             self.get_triangulation(spec, remove_finite_vertices)
 *             if self.c_triangulation == NULL:
 *                 raise RuntimeError('An empty triangulation was generated.')             # <<<<<<<<<<<<<<
 *         elif spec is None:
 *             self.get_from_new_plink()
 */
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(3, 103, __pyx_L1_error)

      /* "cython/core/triangulation.pyx":102
 *                                 self.__class__.__name__)
 *             self.get_triangulation(spec, remove_finite_vertices)
 *             if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError('An empty triangulation was generated.')
 *         elif spec is None:
 */
    }

    /* "cython/core/triangulation.pyx":97
 *                 spec = getattr(spec, attr)()
 *                 break
 *         if spec is not None and spec != 'empty':             # <<<<<<<<<<<<<<
 *             if not isinstance(spec, (str, bytes)):
 *                 raise TypeError(triangulation_help %
 */
    goto __pyx_L8;
  }

  /* "cython/core/triangulation.pyx":104
 *             if self.c_triangulation == NULL:
 *                 raise RuntimeError('An empty triangulation was generated.')
 *         elif spec is None:             # <<<<<<<<<<<<<<
 *             self.get_from_new_plink()
 * 
 */
  __pyx_t_8 = (__pyx_v_spec == Py_None);
  if (__pyx_t_8) {

    /* "cython/core/triangulation.pyx":105
 *                 raise RuntimeError('An empty triangulation was generated.')
 *         elif spec is None:
 *             self.get_from_new_plink()             # <<<<<<<<<<<<<<
 * 
 *         if self.c_triangulation != NULL and not self.hyperbolic_structure_initialized:
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->get_from_new_plink(__pyx_v_self, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 105, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":104
 *             if self.c_triangulation == NULL:
 *                 raise RuntimeError('An empty triangulation was generated.')
 *         elif spec is None:             # <<<<<<<<<<<<<<
 *             self.get_from_new_plink()
 * 
 */
  }
  __pyx_L8:;

  /* "cython/core/triangulation.pyx":107
 *             self.get_from_new_plink()
 * 
 *         if self.c_triangulation != NULL and not self.hyperbolic_structure_initialized:             # <<<<<<<<<<<<<<
 *             remove_hyperbolic_structures(self.c_triangulation)
 * 
 */
  __pyx_t_2 = (__pyx_v_self->c_triangulation != NULL);
  if (__pyx_t_2) {
  } else {
    __pyx_t_8 = __pyx_t_2;
    goto __pyx_L16_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->hyperbolic_structure_initialized); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 107, __pyx_L1_error)
  __pyx_t_10 = (!__pyx_t_2);
  __pyx_t_8 = __pyx_t_10;
  __pyx_L16_bool_binop_done:;
  if (__pyx_t_8) {

    /* "cython/core/triangulation.pyx":108
 * 
 *         if self.c_triangulation != NULL and not self.hyperbolic_structure_initialized:
 *             remove_hyperbolic_structures(self.c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *     cdef get_from_new_plink(self, file_name=None):
 */
    remove_hyperbolic_structures(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 108, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":107
 *             self.get_from_new_plink()
 * 
 *         if self.c_triangulation != NULL and not self.hyperbolic_structure_initialized:             # <<<<<<<<<<<<<<
 *             remove_hyperbolic_structures(self.c_triangulation)
 * 
 */
  }

  /* "cython/core/triangulation.pyx":80
 *     cdef hyperbolic_structure_initialized
 * 
 *     def __cinit__(self, spec=None, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         if UI_callback is not None:
 *             uLongComputationBegins('Constructing a manifold', 1)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.Triangulation.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_attr);
  __Pyx_XDECREF(__pyx_v_spec);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":110
 *             remove_hyperbolic_structures(self.c_triangulation)
 * 
 *     cdef get_from_new_plink(self, file_name=None):             # <<<<<<<<<<<<<<
 *         if LinkEditor is None:
 *             raise RuntimeError('PLink was not imported.')
 */

static PyObject *__pyx_f_6SnapPy_13Triangulation_get_from_new_plink(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, struct __pyx_opt_args_6SnapPy_13Triangulation_get_from_new_plink *__pyx_optional_args) {
  PyObject *__pyx_v_file_name = ((PyObject *)Py_None);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_from_new_plink", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_file_name = __pyx_optional_args->file_name;
    }
  }

  /* "cython/core/triangulation.pyx":111
 * 
 *     cdef get_from_new_plink(self, file_name=None):
 *         if LinkEditor is None:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('PLink was not imported.')
 *         self.LE = LinkEditor(no_arcs=True,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_LinkEditor); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "cython/core/triangulation.pyx":112
 *     cdef get_from_new_plink(self, file_name=None):
 *         if LinkEditor is None:
 *             raise RuntimeError('PLink was not imported.')             # <<<<<<<<<<<<<<
 *         self.LE = LinkEditor(no_arcs=True,
 *                              callback=_plink_callback,
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 112, __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(3, 112, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":111
 * 
 *     cdef get_from_new_plink(self, file_name=None):
 *         if LinkEditor is None:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('PLink was not imported.')
 *         self.LE = LinkEditor(no_arcs=True,
 */
  }

  /* "cython/core/triangulation.pyx":113
 *         if LinkEditor is None:
 *             raise RuntimeError('PLink was not imported.')
 *         self.LE = LinkEditor(no_arcs=True,             # <<<<<<<<<<<<<<
 *                              callback=_plink_callback,
 *                              cb_menu='Send to SnapPy',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_LinkEditor); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_no_arcs, Py_True) < 0) __PYX_ERR(3, 113, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":114
 *             raise RuntimeError('PLink was not imported.')
 *         self.LE = LinkEditor(no_arcs=True,
 *                              callback=_plink_callback,             # <<<<<<<<<<<<<<
 *                              cb_menu='Send to SnapPy',
 *                              file_name=file_name,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_plink_callback_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_callback, __pyx_t_4) < 0) __PYX_ERR(3, 113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_cb_menu, __pyx_kp_s_Send_to_SnapPy) < 0) __PYX_ERR(3, 113, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":116
 *                              callback=_plink_callback,
 *                              cb_menu='Send to SnapPy',
 *                              file_name=file_name,             # <<<<<<<<<<<<<<
 *                              manifold=self)
 *         print('Starting the link editor.\n'
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_file_name, __pyx_v_file_name) < 0) __PYX_ERR(3, 113, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":117
 *                              cb_menu='Send to SnapPy',
 *                              file_name=file_name,
 *                              manifold=self)             # <<<<<<<<<<<<<<
 *         print('Starting the link editor.\n'
 *               'Select Tools->Send to SnapPy to load the '
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_manifold, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(3, 113, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":113
 *         if LinkEditor is None:
 *             raise RuntimeError('PLink was not imported.')
 *         self.LE = LinkEditor(no_arcs=True,             # <<<<<<<<<<<<<<
 *                              callback=_plink_callback,
 *                              cb_menu='Send to SnapPy',
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 113, __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_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_self->LE);
  __Pyx_DECREF(__pyx_v_self->LE);
  __pyx_v_self->LE = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":118
 *                              file_name=file_name,
 *                              manifold=self)
 *         print('Starting the link editor.\n'             # <<<<<<<<<<<<<<
 *               'Select Tools->Send to SnapPy to load the '
 *               'link complement.')
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":110
 *             remove_hyperbolic_structures(self.c_triangulation)
 * 
 *     cdef get_from_new_plink(self, file_name=None):             # <<<<<<<<<<<<<<
 *         if LinkEditor is None:
 *             raise RuntimeError('PLink was not imported.')
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("SnapPy.Triangulation.get_from_new_plink", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":122
 *               'link complement.')
 * 
 *     cdef get_triangulation(self, spec, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         # Step -1 Check for an entire-triangulation-file-in-a-string
 *         if isinstance(spec, bytes) and spec.startswith(b'pickle:'):
 */

static PyObject *__pyx_f_6SnapPy_13Triangulation_get_triangulation(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_spec, struct __pyx_opt_args_6SnapPy_13Triangulation_get_triangulation *__pyx_optional_args) {
  PyObject *__pyx_v_remove_finite_vertices = ((PyObject *)Py_True);
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_fillings = NULL;
  PyObject *__pyx_v_db = NULL;
  PyObject *__pyx_v_regex = NULL;
  PyObject *__pyx_v_rolfsen_name = NULL;
  PyObject *__pyx_v_word = NULL;
  PyObject *__pyx_v_num_strands = NULL;
  PyObject *__pyx_v_code = NULL;
  PyObject *__pyx_v_knot = NULL;
  PyObject *__pyx_v_klp = NULL;
  PyObject *__pyx_v_shortened_name = NULL;
  PyObject *__pyx_v_mb = NULL;
  PyObject *__pyx_v_ms = NULL;
  PyObject *__pyx_v_func = NULL;
  PyObject *__pyx_v_tri_as_string = NULL;
  PyObject *__pyx_9genexpr11__pyx_v_x = 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;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *(*__pyx_t_14)(PyObject *);
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  Triangulation *__pyx_t_17;
  struct __pyx_opt_args_6SnapPy_get_triangulation_from_PythonKLP __pyx_t_18;
  struct __pyx_opt_args_6SnapPy_13Triangulation_get_from_file __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_triangulation", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_remove_finite_vertices = __pyx_optional_args->remove_finite_vertices;
    }
  }

  /* "cython/core/triangulation.pyx":124
 *     cdef get_triangulation(self, spec, remove_finite_vertices=True):
 *         # Step -1 Check for an entire-triangulation-file-in-a-string
 *         if isinstance(spec, bytes) and spec.startswith(b'pickle:'):             # <<<<<<<<<<<<<<
 *             return self._from_pickle(spec, remove_finite_vertices)
 * 
 */
  __pyx_t_2 = PyBytes_Check(__pyx_v_spec); 
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_spec, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 124, __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, __pyx_kp_b_pickle};
    __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(3, 124, __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(3, 124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":125
 *         # Step -1 Check for an entire-triangulation-file-in-a-string
 *         if isinstance(spec, bytes) and spec.startswith(b'pickle:'):
 *             return self._from_pickle(spec, remove_finite_vertices)             # <<<<<<<<<<<<<<
 * 
 *         if (isinstance(spec, str) and spec.startswith('% Triangulation') or
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_from_pickle); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 125, __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[3] = {__pyx_t_5, __pyx_v_spec, __pyx_v_remove_finite_vertices};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 125, __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;

    /* "cython/core/triangulation.pyx":124
 *     cdef get_triangulation(self, spec, remove_finite_vertices=True):
 *         # Step -1 Check for an entire-triangulation-file-in-a-string
 *         if isinstance(spec, bytes) and spec.startswith(b'pickle:'):             # <<<<<<<<<<<<<<
 *             return self._from_pickle(spec, remove_finite_vertices)
 * 
 */
  }

  /* "cython/core/triangulation.pyx":127
 *             return self._from_pickle(spec, remove_finite_vertices)
 * 
 *         if (isinstance(spec, str) and spec.startswith('% Triangulation') or             # <<<<<<<<<<<<<<
 *                 isinstance(spec, bytes) and spec.startswith(b'% Triangulation')):
 *             return self._from_string(spec, remove_finite_vertices)
 */
  __pyx_t_2 = PyString_Check(__pyx_v_spec); 
  if (!__pyx_t_2) {
    goto __pyx_L8_next_or;
  } else {
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_spec, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 127, __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, __pyx_kp_s_Triangulation};
    __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(3, 127, __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(3, 127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_L8_next_or:;

  /* "cython/core/triangulation.pyx":128
 * 
 *         if (isinstance(spec, str) and spec.startswith('% Triangulation') or
 *                 isinstance(spec, bytes) and spec.startswith(b'% Triangulation')):             # <<<<<<<<<<<<<<
 *             return self._from_string(spec, remove_finite_vertices)
 * 
 */
  __pyx_t_2 = PyBytes_Check(__pyx_v_spec); 
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_spec, __pyx_n_s_startswith); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 128, __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, __pyx_kp_b_Triangulation};
    __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(3, 128, __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(3, 128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __pyx_t_2;
  __pyx_L7_bool_binop_done:;

  /* "cython/core/triangulation.pyx":127
 *             return self._from_pickle(spec, remove_finite_vertices)
 * 
 *         if (isinstance(spec, str) and spec.startswith('% Triangulation') or             # <<<<<<<<<<<<<<
 *                 isinstance(spec, bytes) and spec.startswith(b'% Triangulation')):
 *             return self._from_string(spec, remove_finite_vertices)
 */
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":129
 *         if (isinstance(spec, str) and spec.startswith('% Triangulation') or
 *                 isinstance(spec, bytes) and spec.startswith(b'% Triangulation')):
 *             return self._from_string(spec, remove_finite_vertices)             # <<<<<<<<<<<<<<
 * 
 *         # Get fillings, if any
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_from_string); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 129, __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[3] = {__pyx_t_5, __pyx_v_spec, __pyx_v_remove_finite_vertices};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 129, __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;

    /* "cython/core/triangulation.pyx":127
 *             return self._from_pickle(spec, remove_finite_vertices)
 * 
 *         if (isinstance(spec, str) and spec.startswith('% Triangulation') or             # <<<<<<<<<<<<<<
 *                 isinstance(spec, bytes) and spec.startswith(b'% Triangulation')):
 *             return self._from_string(spec, remove_finite_vertices)
 */
  }

  /* "cython/core/triangulation.pyx":132
 * 
 *         # Get fillings, if any
 *         m = split_filling_info.match(spec)             # <<<<<<<<<<<<<<
 *         name = m.group(1)
 *         fillings = eval( '[' + m.group(2).replace(')(', '),(')+ ']', {})
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_split_filling_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_match); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 132, __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_v_spec};
    __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(3, 132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_m = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cython/core/triangulation.pyx":133
 *         # Get fillings, if any
 *         m = split_filling_info.match(spec)
 *         name = m.group(1)             # <<<<<<<<<<<<<<
 *         fillings = eval( '[' + m.group(2).replace(')(', '),(')+ ']', {})
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_group); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __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, __pyx_int_1};
    __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(3, 133, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cython/core/triangulation.pyx":134
 *         m = split_filling_info.match(spec)
 *         name = m.group(1)
 *         fillings = eval( '[' + m.group(2).replace(')(', '),(')+ ']', {})             # <<<<<<<<<<<<<<
 * 
 *         # Step 1. The easy databases
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_group); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __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, __pyx_int_2};
    __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(3, 134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_replace); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_kp_s__16, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__18); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(3, 134, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5)) __PYX_ERR(3, 134, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_fillings = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cython/core/triangulation.pyx":137
 * 
 *         # Step 1. The easy databases
 *         for db in database.__all_tables__.values():             # <<<<<<<<<<<<<<
 *             try:
 *                 db._one_manifold(name, self)
 */
  __pyx_t_7 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_database); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_all_tables); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(__pyx_t_3 == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
    __PYX_ERR(3, 137, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_dict_iterator(__pyx_t_3, 0, __pyx_n_s_values, (&__pyx_t_8), (&__pyx_t_6)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_XDECREF(__pyx_t_5);
  __pyx_t_5 = __pyx_t_4;
  __pyx_t_4 = 0;
  while (1) {
    __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_8, &__pyx_t_7, NULL, &__pyx_t_4, NULL, __pyx_t_6);
    if (unlikely(__pyx_t_9 == 0)) break;
    if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(3, 137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_db, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":138
 *         # Step 1. The easy databases
 *         for db in database.__all_tables__.values():
 *             try:             # <<<<<<<<<<<<<<
 *                 db._one_manifold(name, self)
 *                 break
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      /*try:*/ {

        /* "cython/core/triangulation.pyx":139
 *         for db in database.__all_tables__.values():
 *             try:
 *                 db._one_manifold(name, self)             # <<<<<<<<<<<<<<
 *                 break
 *             except KeyError:
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_db, __pyx_n_s_one_manifold); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 139, __pyx_L13_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_13 = NULL;
        __pyx_t_9 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_9 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_v_name, ((PyObject *)__pyx_v_self)};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9);
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 139, __pyx_L13_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "cython/core/triangulation.pyx":140
 *             try:
 *                 db._one_manifold(name, self)
 *                 break             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 pass
 */
        goto __pyx_L18_try_break;

        /* "cython/core/triangulation.pyx":138
 *         # Step 1. The easy databases
 *         for db in database.__all_tables__.values():
 *             try:             # <<<<<<<<<<<<<<
 *                 db._one_manifold(name, self)
 *                 break
 */
      }
      __pyx_L13_error:;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/triangulation.pyx":141
 *                 db._one_manifold(name, self)
 *                 break
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 pass
 * 
 */
      __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_9) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L14_exception_handled;
      }
      goto __pyx_L15_except_error;

      /* "cython/core/triangulation.pyx":138
 *         # Step 1. The easy databases
 *         for db in database.__all_tables__.values():
 *             try:             # <<<<<<<<<<<<<<
 *                 db._one_manifold(name, self)
 *                 break
 */
      __pyx_L15_except_error:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      goto __pyx_L1_error;
      __pyx_L18_try_break:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
      goto __pyx_L12_break;
      __pyx_L14_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
    }
  }
  __pyx_L12_break:;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/triangulation.pyx":145
 * 
 *         # Step 2. Alternate names for the Rolfsen links
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             for regex in rolfsen_link_regexs:
 *                 m = regex.match(name)
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":146
 *         # Step 2. Alternate names for the Rolfsen links
 *         if self.c_triangulation == NULL:
 *             for regex in rolfsen_link_regexs:             # <<<<<<<<<<<<<<
 *                 m = regex.match(name)
 *                 if not m:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_rolfsen_link_regexs); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
      __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_8 = 0;
      __pyx_t_14 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 146, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    for (;;) {
      if (likely(!__pyx_t_14)) {
        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(3, 146, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 146, __pyx_L1_error)
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 146, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #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(3, 146, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 146, __pyx_L1_error)
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 146, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_14(__pyx_t_4);
        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(3, 146, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_regex, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "cython/core/triangulation.pyx":147
 *         if self.c_triangulation == NULL:
 *             for regex in rolfsen_link_regexs:
 *                 m = regex.match(name)             # <<<<<<<<<<<<<<
 *                 if not m:
 *                     continue
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_regex, __pyx_n_s_match); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 147, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_13 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_v_name};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 147, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_m, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "cython/core/triangulation.pyx":148
 *             for regex in rolfsen_link_regexs:
 *                 m = regex.match(name)
 *                 if not m:             # <<<<<<<<<<<<<<
 *                     continue
 *                 if int(m.group('components')) > 1:
 */
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_m); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 148, __pyx_L1_error)
      __pyx_t_2 = (!__pyx_t_1);
      if (__pyx_t_2) {

        /* "cython/core/triangulation.pyx":149
 *                 m = regex.match(name)
 *                 if not m:
 *                     continue             # <<<<<<<<<<<<<<
 *                 if int(m.group('components')) > 1:
 *                     rolfsen_name = '%d^%d_%d' % (int(m.group('crossings')),
 */
        goto __pyx_L22_continue;

        /* "cython/core/triangulation.pyx":148
 *             for regex in rolfsen_link_regexs:
 *                 m = regex.match(name)
 *                 if not m:             # <<<<<<<<<<<<<<
 *                     continue
 *                 if int(m.group('components')) > 1:
 */
      }

      /* "cython/core/triangulation.pyx":150
 *                 if not m:
 *                     continue
 *                 if int(m.group('components')) > 1:             # <<<<<<<<<<<<<<
 *                     rolfsen_name = '%d^%d_%d' % (int(m.group('crossings')),
 *                                                  int(m.group('components')),
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_group); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 150, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_13 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_n_s_components};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 150, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 150, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 150, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 150, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_2) {

        /* "cython/core/triangulation.pyx":151
 *                     continue
 *                 if int(m.group('components')) > 1:
 *                     rolfsen_name = '%d^%d_%d' % (int(m.group('crossings')),             # <<<<<<<<<<<<<<
 *                                                  int(m.group('components')),
 *                                                  int(m.group('index')))
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_group); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 151, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_13 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_n_s_crossings};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 151, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 151, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "cython/core/triangulation.pyx":152
 *                 if int(m.group('components')) > 1:
 *                     rolfsen_name = '%d^%d_%d' % (int(m.group('crossings')),
 *                                                  int(m.group('components')),             # <<<<<<<<<<<<<<
 *                                                  int(m.group('index')))
 *                 else:
 */
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_group); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 152, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_15 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_n_s_components};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 152, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __pyx_t_13 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 152, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "cython/core/triangulation.pyx":153
 *                     rolfsen_name = '%d^%d_%d' % (int(m.group('crossings')),
 *                                                  int(m.group('components')),
 *                                                  int(m.group('index')))             # <<<<<<<<<<<<<<
 *                 else:
 *                     rolfsen_name = '%d_%d' % (int(m.group('crossings')),
 */
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_group); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 153, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_16 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_15))) {
          __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_15);
          if (likely(__pyx_t_16)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
            __Pyx_INCREF(__pyx_t_16);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_15, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_n_s_index};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 153, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        }
        __pyx_t_15 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 153, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "cython/core/triangulation.pyx":151
 *                     continue
 *                 if int(m.group('components')) > 1:
 *                     rolfsen_name = '%d^%d_%d' % (int(m.group('crossings')),             # <<<<<<<<<<<<<<
 *                                                  int(m.group('components')),
 *                                                  int(m.group('index')))
 */
        __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 151, __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(3, 151, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_13);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_13)) __PYX_ERR(3, 151, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_15);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_15)) __PYX_ERR(3, 151, __pyx_L1_error);
        __pyx_t_3 = 0;
        __pyx_t_13 = 0;
        __pyx_t_15 = 0;
        __pyx_t_15 = __Pyx_PyString_Format(__pyx_kp_s_d_d__d, __pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 151, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF_SET(__pyx_v_rolfsen_name, __pyx_t_15);
        __pyx_t_15 = 0;

        /* "cython/core/triangulation.pyx":150
 *                 if not m:
 *                     continue
 *                 if int(m.group('components')) > 1:             # <<<<<<<<<<<<<<
 *                     rolfsen_name = '%d^%d_%d' % (int(m.group('crossings')),
 *                                                  int(m.group('components')),
 */
        goto __pyx_L25;
      }

      /* "cython/core/triangulation.pyx":155
 *                                                  int(m.group('index')))
 *                 else:
 *                     rolfsen_name = '%d_%d' % (int(m.group('crossings')),             # <<<<<<<<<<<<<<
 *                                               int(m.group('index')))
 *                 database.LinkExteriors._one_manifold(rolfsen_name, self)
 */
      /*else*/ {
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_group); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 155, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_13 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_n_s_crossings};
          __pyx_t_15 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 155, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 155, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

        /* "cython/core/triangulation.pyx":156
 *                 else:
 *                     rolfsen_name = '%d_%d' % (int(m.group('crossings')),
 *                                               int(m.group('index')))             # <<<<<<<<<<<<<<
 *                 database.LinkExteriors._one_manifold(rolfsen_name, self)
 * 
 */
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_group); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 156, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_3 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_s_index};
          __pyx_t_15 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 156, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __pyx_t_13 = __Pyx_PyNumber_Int(__pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 156, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

        /* "cython/core/triangulation.pyx":155
 *                                                  int(m.group('index')))
 *                 else:
 *                     rolfsen_name = '%d_%d' % (int(m.group('crossings')),             # <<<<<<<<<<<<<<
 *                                               int(m.group('index')))
 *                 database.LinkExteriors._one_manifold(rolfsen_name, self)
 */
        __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 155, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_5);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_5)) __PYX_ERR(3, 155, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_13);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_13)) __PYX_ERR(3, 155, __pyx_L1_error);
        __pyx_t_5 = 0;
        __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyString_Format(__pyx_kp_s_d__d, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 155, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_XDECREF_SET(__pyx_v_rolfsen_name, __pyx_t_13);
        __pyx_t_13 = 0;
      }
      __pyx_L25:;

      /* "cython/core/triangulation.pyx":157
 *                     rolfsen_name = '%d_%d' % (int(m.group('crossings')),
 *                                               int(m.group('index')))
 *                 database.LinkExteriors._one_manifold(rolfsen_name, self)             # <<<<<<<<<<<<<<
 * 
 *         # Step 3. Hoste-Thistlethwaite knots
 */
      __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_database); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_LinkExteriors); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_one_manifold); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_15))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_15);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_15, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_rolfsen_name, ((PyObject *)__pyx_v_self)};
        __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 157, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "cython/core/triangulation.pyx":146
 *         # Step 2. Alternate names for the Rolfsen links
 *         if self.c_triangulation == NULL:
 *             for regex in rolfsen_link_regexs:             # <<<<<<<<<<<<<<
 *                 m = regex.match(name)
 *                 if not m:
 */
      __pyx_L22_continue:;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":145
 * 
 *         # Step 2. Alternate names for the Rolfsen links
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             for regex in rolfsen_link_regexs:
 *                 m = regex.match(name)
 */
  }

  /* "cython/core/triangulation.pyx":160
 * 
 *         # Step 3. Hoste-Thistlethwaite knots
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             m = is_HT_knot.match(name)
 *             if m:
 */
  __pyx_t_2 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_2) {

    /* "cython/core/triangulation.pyx":161
 *         # Step 3. Hoste-Thistlethwaite knots
 *         if self.c_triangulation == NULL:
 *             m = is_HT_knot.match(name)             # <<<<<<<<<<<<<<
 *             if m:
 *                 self.get_HT_knot(int(m.group('crossings')), m.group('alternation'),
 */
    __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_is_HT_knot); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_match); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_13 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_15))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_15);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_15, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_v_name};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_m, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":162
 *         if self.c_triangulation == NULL:
 *             m = is_HT_knot.match(name)
 *             if m:             # <<<<<<<<<<<<<<
 *                 self.get_HT_knot(int(m.group('crossings')), m.group('alternation'),
 *                                  int(m.group('index')), remove_finite_vertices)
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_m); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 162, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "cython/core/triangulation.pyx":163
 *             m = is_HT_knot.match(name)
 *             if m:
 *                 self.get_HT_knot(int(m.group('crossings')), m.group('alternation'),             # <<<<<<<<<<<<<<
 *                                  int(m.group('index')), remove_finite_vertices)
 * 
 */
      __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_group); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_13 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_15))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_15);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_15, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_n_s_crossings};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 163, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
      __pyx_t_15 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_group); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_5 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_13))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_13);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_13, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_n_s_alternation};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 163, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      }

      /* "cython/core/triangulation.pyx":164
 *             if m:
 *                 self.get_HT_knot(int(m.group('crossings')), m.group('alternation'),
 *                                  int(m.group('index')), remove_finite_vertices)             # <<<<<<<<<<<<<<
 * 
 *         # Step 4. Once-punctured torus bundles
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_group); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 164, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(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, __pyx_n_s_index};
        __pyx_t_13 = __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_13)) __PYX_ERR(3, 164, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 164, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "cython/core/triangulation.pyx":163
 *             m = is_HT_knot.match(name)
 *             if m:
 *                 self.get_HT_knot(int(m.group('crossings')), m.group('alternation'),             # <<<<<<<<<<<<<<
 *                                  int(m.group('index')), remove_finite_vertices)
 * 
 */
      __pyx_t_13 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->get_HT_knot(__pyx_v_self, __pyx_t_15, __pyx_t_4, __pyx_t_5, __pyx_v_remove_finite_vertices); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "cython/core/triangulation.pyx":162
 *         if self.c_triangulation == NULL:
 *             m = is_HT_knot.match(name)
 *             if m:             # <<<<<<<<<<<<<<
 *                 self.get_HT_knot(int(m.group('crossings')), m.group('alternation'),
 *                                  int(m.group('index')), remove_finite_vertices)
 */
    }

    /* "cython/core/triangulation.pyx":160
 * 
 *         # Step 3. Hoste-Thistlethwaite knots
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             m = is_HT_knot.match(name)
 *             if m:
 */
  }

  /* "cython/core/triangulation.pyx":167
 * 
 *         # Step 4. Once-punctured torus bundles
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             m = is_torus_bundle.match(name)
 *             if m:
 */
  __pyx_t_2 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_2) {

    /* "cython/core/triangulation.pyx":168
 *         # Step 4. Once-punctured torus bundles
 *         if self.c_triangulation == NULL:
 *             m = is_torus_bundle.match(name)             # <<<<<<<<<<<<<<
 *             if m:
 *                 self.get_punctured_torus_bundle(m)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_is_torus_bundle); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_match); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __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_v_name};
      __pyx_t_13 = __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_13)) __PYX_ERR(3, 168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_m, __pyx_t_13);
    __pyx_t_13 = 0;

    /* "cython/core/triangulation.pyx":169
 *         if self.c_triangulation == NULL:
 *             m = is_torus_bundle.match(name)
 *             if m:             # <<<<<<<<<<<<<<
 *                 self.get_punctured_torus_bundle(m)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_m); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 169, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "cython/core/triangulation.pyx":170
 *             m = is_torus_bundle.match(name)
 *             if m:
 *                 self.get_punctured_torus_bundle(m)             # <<<<<<<<<<<<<<
 * 
 *         # Step 5. (fibered) braid complements
 */
      __pyx_t_13 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->get_punctured_torus_bundle(__pyx_v_self, __pyx_v_m); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 170, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "cython/core/triangulation.pyx":169
 *         if self.c_triangulation == NULL:
 *             m = is_torus_bundle.match(name)
 *             if m:             # <<<<<<<<<<<<<<
 *                 self.get_punctured_torus_bundle(m)
 * 
 */
    }

    /* "cython/core/triangulation.pyx":167
 * 
 *         # Step 4. Once-punctured torus bundles
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             m = is_torus_bundle.match(name)
 *             if m:
 */
  }

  /* "cython/core/triangulation.pyx":173
 * 
 *         # Step 5. (fibered) braid complements
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             m = is_braid_complement.match(name)
 *             if m:
 */
  __pyx_t_2 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_2) {

    /* "cython/core/triangulation.pyx":174
 *         # Step 5. (fibered) braid complements
 *         if self.c_triangulation == NULL:
 *             m = is_braid_complement.match(name)             # <<<<<<<<<<<<<<
 *             if m:
 *                 word = eval(m.group(1), {})
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_is_braid_complement); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_match); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 174, __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_v_name};
      __pyx_t_13 = __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_13)) __PYX_ERR(3, 174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_m, __pyx_t_13);
    __pyx_t_13 = 0;

    /* "cython/core/triangulation.pyx":175
 *         if self.c_triangulation == NULL:
 *             m = is_braid_complement.match(name)
 *             if m:             # <<<<<<<<<<<<<<
 *                 word = eval(m.group(1), {})
 *                 num_strands = max([abs(x) for x in word]) + 1
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_m); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 175, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "cython/core/triangulation.pyx":176
 *             m = is_braid_complement.match(name)
 *             if m:
 *                 word = eval(m.group(1), {})             # <<<<<<<<<<<<<<
 *                 num_strands = max([abs(x) for x in word]) + 1
 *                 self.set_c_triangulation(get_fibered_manifold_associated_to_braid(num_strands, word))
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_group); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __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, __pyx_int_1};
        __pyx_t_13 = __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_13)) __PYX_ERR(3, 176, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_13);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_13)) __PYX_ERR(3, 176, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5)) __PYX_ERR(3, 176, __pyx_L1_error);
      __pyx_t_13 = 0;
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 176, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_word = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "cython/core/triangulation.pyx":177
 *             if m:
 *                 word = eval(m.group(1), {})
 *                 num_strands = max([abs(x) for x in word]) + 1             # <<<<<<<<<<<<<<
 *                 self.set_c_triangulation(get_fibered_manifold_associated_to_braid(num_strands, word))
 * 
 */
      { /* enter inner scope */
        __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 177, __pyx_L35_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (likely(PyList_CheckExact(__pyx_v_word)) || PyTuple_CheckExact(__pyx_v_word)) {
          __pyx_t_4 = __pyx_v_word; __Pyx_INCREF(__pyx_t_4);
          __pyx_t_8 = 0;
          __pyx_t_14 = NULL;
        } else {
          __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_word); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 177, __pyx_L35_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 177, __pyx_L35_error)
        }
        for (;;) {
          if (likely(!__pyx_t_14)) {
            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(3, 177, __pyx_L35_error)
                #endif
                if (__pyx_t_8 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_13 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_13); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 177, __pyx_L35_error)
              #else
              __pyx_t_13 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 177, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_13);
              #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(3, 177, __pyx_L35_error)
                #endif
                if (__pyx_t_8 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_13 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_13); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 177, __pyx_L35_error)
              #else
              __pyx_t_13 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 177, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_13);
              #endif
            }
          } else {
            __pyx_t_13 = __pyx_t_14(__pyx_t_4);
            if (unlikely(!__pyx_t_13)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(3, 177, __pyx_L35_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_13);
          }
          __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_x, __pyx_t_13);
          __pyx_t_13 = 0;
          __pyx_t_13 = __Pyx_PyNumber_Absolute(__pyx_9genexpr11__pyx_v_x); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 177, __pyx_L35_error)
          __Pyx_GOTREF(__pyx_t_13);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_13))) __PYX_ERR(3, 177, __pyx_L35_error)
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_x); __pyx_9genexpr11__pyx_v_x = 0;
        goto __pyx_L39_exit_scope;
        __pyx_L35_error:;
        __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_x); __pyx_9genexpr11__pyx_v_x = 0;
        goto __pyx_L1_error;
        __pyx_L39_exit_scope:;
      } /* exit inner scope */
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 177, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_num_strands = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "cython/core/triangulation.pyx":178
 *                 word = eval(m.group(1), {})
 *                 num_strands = max([abs(x) for x in word]) + 1
 *                 self.set_c_triangulation(get_fibered_manifold_associated_to_braid(num_strands, word))             # <<<<<<<<<<<<<<
 * 
 *         # Step 6. Dowker-Thistlethwaite codes
 */
      __pyx_t_17 = __pyx_f_6SnapPy_get_fibered_manifold_associated_to_braid(__pyx_v_num_strands, __pyx_v_word); if (unlikely(__pyx_t_17 == ((Triangulation *)NULL) && PyErr_Occurred())) __PYX_ERR(3, 178, __pyx_L1_error)
      __pyx_t_5 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->set_c_triangulation(__pyx_v_self, __pyx_t_17); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cython/core/triangulation.pyx":175
 *         if self.c_triangulation == NULL:
 *             m = is_braid_complement.match(name)
 *             if m:             # <<<<<<<<<<<<<<
 *                 word = eval(m.group(1), {})
 *                 num_strands = max([abs(x) for x in word]) + 1
 */
    }

    /* "cython/core/triangulation.pyx":173
 * 
 *         # Step 5. (fibered) braid complements
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             m = is_braid_complement.match(name)
 *             if m:
 */
  }

  /* "cython/core/triangulation.pyx":181
 * 
 *         # Step 6. Dowker-Thistlethwaite codes
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             m = is_int_DT_exterior.match(name)
 *             if m:
 */
  __pyx_t_2 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_2) {

    /* "cython/core/triangulation.pyx":182
 *         # Step 6. Dowker-Thistlethwaite codes
 *         if self.c_triangulation == NULL:
 *             m = is_int_DT_exterior.match(name)             # <<<<<<<<<<<<<<
 *             if m:
 *                 code = eval(m.group(1), {})
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_is_int_DT_exterior); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_match); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __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_13))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_13);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_13, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_name};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 182, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_m, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cython/core/triangulation.pyx":183
 *         if self.c_triangulation == NULL:
 *             m = is_int_DT_exterior.match(name)
 *             if m:             # <<<<<<<<<<<<<<
 *                 code = eval(m.group(1), {})
 *                 if isinstance(code, tuple):
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_m); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 183, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "cython/core/triangulation.pyx":184
 *             m = is_int_DT_exterior.match(name)
 *             if m:
 *                 code = eval(m.group(1), {})             # <<<<<<<<<<<<<<
 *                 if isinstance(code, tuple):
 *                     knot = spherogram.DTcodec(*code)
 */
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_group); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_4 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_13))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_13);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_13, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_int_1};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 184, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      }
      __pyx_t_13 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(3, 184, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_13);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_13)) __PYX_ERR(3, 184, __pyx_L1_error);
      __pyx_t_5 = 0;
      __pyx_t_13 = 0;
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_4, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 184, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_code = __pyx_t_13;
      __pyx_t_13 = 0;

      /* "cython/core/triangulation.pyx":185
 *             if m:
 *                 code = eval(m.group(1), {})
 *                 if isinstance(code, tuple):             # <<<<<<<<<<<<<<
 *                     knot = spherogram.DTcodec(*code)
 *                 elif isinstance(code, list) and isinstance(code[0], int):
 */
      __pyx_t_2 = PyTuple_Check(__pyx_v_code); 
      if (__pyx_t_2) {

        /* "cython/core/triangulation.pyx":186
 *                 code = eval(m.group(1), {})
 *                 if isinstance(code, tuple):
 *                     knot = spherogram.DTcodec(*code)             # <<<<<<<<<<<<<<
 *                 elif isinstance(code, list) and isinstance(code[0], int):
 *                     knot = spherogram.DTcodec([tuple(code)])
 */
        __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_spherogram); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 186, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_DTcodec); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 186, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PySequence_Tuple(__pyx_v_code); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 186, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_13, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 186, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_v_knot = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "cython/core/triangulation.pyx":185
 *             if m:
 *                 code = eval(m.group(1), {})
 *                 if isinstance(code, tuple):             # <<<<<<<<<<<<<<
 *                     knot = spherogram.DTcodec(*code)
 *                 elif isinstance(code, list) and isinstance(code[0], int):
 */
        goto __pyx_L42;
      }

      /* "cython/core/triangulation.pyx":187
 *                 if isinstance(code, tuple):
 *                     knot = spherogram.DTcodec(*code)
 *                 elif isinstance(code, list) and isinstance(code[0], int):             # <<<<<<<<<<<<<<
 *                     knot = spherogram.DTcodec([tuple(code)])
 *                 else:
 */
      __pyx_t_1 = PyList_Check(__pyx_v_code); 
      if (__pyx_t_1) {
      } else {
        __pyx_t_2 = __pyx_t_1;
        goto __pyx_L43_bool_binop_done;
      }
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_code, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = PyInt_Check(__pyx_t_5); 
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_2 = __pyx_t_1;
      __pyx_L43_bool_binop_done:;
      if (__pyx_t_2) {

        /* "cython/core/triangulation.pyx":188
 *                     knot = spherogram.DTcodec(*code)
 *                 elif isinstance(code, list) and isinstance(code[0], int):
 *                     knot = spherogram.DTcodec([tuple(code)])             # <<<<<<<<<<<<<<
 *                 else:
 *                     knot = spherogram.DTcodec(code)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_spherogram); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_DTcodec); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PySequence_Tuple(__pyx_v_code); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_13);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_13)) __PYX_ERR(3, 188, __pyx_L1_error);
        __pyx_t_13 = 0;
        __pyx_t_13 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_15};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 188, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __pyx_v_knot = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "cython/core/triangulation.pyx":187
 *                 if isinstance(code, tuple):
 *                     knot = spherogram.DTcodec(*code)
 *                 elif isinstance(code, list) and isinstance(code[0], int):             # <<<<<<<<<<<<<<
 *                     knot = spherogram.DTcodec([tuple(code)])
 *                 else:
 */
        goto __pyx_L42;
      }

      /* "cython/core/triangulation.pyx":190
 *                     knot = spherogram.DTcodec([tuple(code)])
 *                 else:
 *                     knot = spherogram.DTcodec(code)             # <<<<<<<<<<<<<<
 *                 klp = knot.KLPProjection()
 *                 self.set_c_triangulation(
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_spherogram); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DTcodec); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 190, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __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_15))) {
          __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
          if (likely(__pyx_t_4)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
            __Pyx_INCREF(__pyx_t_4);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_15, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_code};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 190, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        }
        __pyx_v_knot = __pyx_t_5;
        __pyx_t_5 = 0;
      }
      __pyx_L42:;

      /* "cython/core/triangulation.pyx":191
 *                 else:
 *                     knot = spherogram.DTcodec(code)
 *                 klp = knot.KLPProjection()             # <<<<<<<<<<<<<<
 *                 self.set_c_triangulation(
 *                     get_triangulation_from_PythonKLP(klp, remove_finite_vertices))
 */
      __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_knot, __pyx_n_s_KLPProjection); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_4 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_15))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_15, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 191, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
      __pyx_v_klp = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "cython/core/triangulation.pyx":193
 *                 klp = knot.KLPProjection()
 *                 self.set_c_triangulation(
 *                     get_triangulation_from_PythonKLP(klp, remove_finite_vertices))             # <<<<<<<<<<<<<<
 *                 self.set_name(name)
 *                 self._set_DTcode(knot)
 */
      __pyx_t_18.__pyx_n = 1;
      __pyx_t_18.remove_finite_vertices = __pyx_v_remove_finite_vertices;
      __pyx_t_17 = __pyx_f_6SnapPy_get_triangulation_from_PythonKLP(__pyx_v_klp, &__pyx_t_18); if (unlikely(__pyx_t_17 == ((Triangulation *)NULL) && PyErr_Occurred())) __PYX_ERR(3, 193, __pyx_L1_error)

      /* "cython/core/triangulation.pyx":192
 *                     knot = spherogram.DTcodec(code)
 *                 klp = knot.KLPProjection()
 *                 self.set_c_triangulation(             # <<<<<<<<<<<<<<
 *                     get_triangulation_from_PythonKLP(klp, remove_finite_vertices))
 *                 self.set_name(name)
 */
      __pyx_t_5 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->set_c_triangulation(__pyx_v_self, __pyx_t_17); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 192, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cython/core/triangulation.pyx":194
 *                 self.set_c_triangulation(
 *                     get_triangulation_from_PythonKLP(klp, remove_finite_vertices))
 *                 self.set_name(name)             # <<<<<<<<<<<<<<
 *                 self._set_DTcode(knot)
 * 
 */
      __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_name); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 194, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_4 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_15))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_15, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_name};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 194, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cython/core/triangulation.pyx":195
 *                     get_triangulation_from_PythonKLP(klp, remove_finite_vertices))
 *                 self.set_name(name)
 *                 self._set_DTcode(knot)             # <<<<<<<<<<<<<<
 * 
 *             m = is_alpha_DT_exterior.match(name)
 */
      __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_DTcode); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 195, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_4 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_15))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_15, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_knot};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 195, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cython/core/triangulation.pyx":183
 *         if self.c_triangulation == NULL:
 *             m = is_int_DT_exterior.match(name)
 *             if m:             # <<<<<<<<<<<<<<
 *                 code = eval(m.group(1), {})
 *                 if isinstance(code, tuple):
 */
    }

    /* "cython/core/triangulation.pyx":197
 *                 self._set_DTcode(knot)
 * 
 *             m = is_alpha_DT_exterior.match(name)             # <<<<<<<<<<<<<<
 *             if m:
 *                 knot = spherogram.DTcodec(m.group(1))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_is_alpha_DT_exterior); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_match); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_15 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_15)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_v_name};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_m, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cython/core/triangulation.pyx":198
 * 
 *             m = is_alpha_DT_exterior.match(name)
 *             if m:             # <<<<<<<<<<<<<<
 *                 knot = spherogram.DTcodec(m.group(1))
 *                 klp=knot.KLPProjection()
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_m); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 198, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "cython/core/triangulation.pyx":199
 *             m = is_alpha_DT_exterior.match(name)
 *             if m:
 *                 knot = spherogram.DTcodec(m.group(1))             # <<<<<<<<<<<<<<
 *                 klp=knot.KLPProjection()
 *                 self.set_c_triangulation(
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_spherogram); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DTcodec); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_group); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 199, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_3 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_13))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_13);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_13, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_int_1};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_13, __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(3, 199, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      }
      __pyx_t_13 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_15))) {
        __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_15);
        if (likely(__pyx_t_13)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
          __Pyx_INCREF(__pyx_t_13);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_15, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_4};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 199, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_knot, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "cython/core/triangulation.pyx":200
 *             if m:
 *                 knot = spherogram.DTcodec(m.group(1))
 *                 klp=knot.KLPProjection()             # <<<<<<<<<<<<<<
 *                 self.set_c_triangulation(
 *                     get_triangulation_from_PythonKLP(klp, remove_finite_vertices))
 */
      __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_knot, __pyx_n_s_KLPProjection); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 200, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_4 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_15))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_15, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 200, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_klp, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "cython/core/triangulation.pyx":202
 *                 klp=knot.KLPProjection()
 *                 self.set_c_triangulation(
 *                     get_triangulation_from_PythonKLP(klp, remove_finite_vertices))             # <<<<<<<<<<<<<<
 *                 self.set_name(name)
 *                 self._set_DTcode(knot)
 */
      __pyx_t_18.__pyx_n = 1;
      __pyx_t_18.remove_finite_vertices = __pyx_v_remove_finite_vertices;
      __pyx_t_17 = __pyx_f_6SnapPy_get_triangulation_from_PythonKLP(__pyx_v_klp, &__pyx_t_18); if (unlikely(__pyx_t_17 == ((Triangulation *)NULL) && PyErr_Occurred())) __PYX_ERR(3, 202, __pyx_L1_error)

      /* "cython/core/triangulation.pyx":201
 *                 knot = spherogram.DTcodec(m.group(1))
 *                 klp=knot.KLPProjection()
 *                 self.set_c_triangulation(             # <<<<<<<<<<<<<<
 *                     get_triangulation_from_PythonKLP(klp, remove_finite_vertices))
 *                 self.set_name(name)
 */
      __pyx_t_5 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->set_c_triangulation(__pyx_v_self, __pyx_t_17); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 201, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cython/core/triangulation.pyx":203
 *                 self.set_c_triangulation(
 *                     get_triangulation_from_PythonKLP(klp, remove_finite_vertices))
 *                 self.set_name(name)             # <<<<<<<<<<<<<<
 *                 self._set_DTcode(knot)
 * 
 */
      __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_name); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 203, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_4 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_15))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_15, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_name};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 203, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cython/core/triangulation.pyx":204
 *                     get_triangulation_from_PythonKLP(klp, remove_finite_vertices))
 *                 self.set_name(name)
 *                 self._set_DTcode(knot)             # <<<<<<<<<<<<<<
 * 
 *         # Step 7.  Bundle or splitting is given in Twister's notation
 */
      __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_DTcode); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 204, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_4 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_15))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_15, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_knot};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 204, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cython/core/triangulation.pyx":198
 * 
 *             m = is_alpha_DT_exterior.match(name)
 *             if m:             # <<<<<<<<<<<<<<
 *                 knot = spherogram.DTcodec(m.group(1))
 *                 klp=knot.KLPProjection()
 */
    }

    /* "cython/core/triangulation.pyx":181
 * 
 *         # Step 6. Dowker-Thistlethwaite codes
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             m = is_int_DT_exterior.match(name)
 *             if m:
 */
  }

  /* "cython/core/triangulation.pyx":207
 * 
 *         # Step 7.  Bundle or splitting is given in Twister's notation
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             shortened_name = name.replace(' ', '')
 *             mb = is_twister_bundle.match(shortened_name)
 */
  __pyx_t_2 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_2) {

    /* "cython/core/triangulation.pyx":208
 *         # Step 7.  Bundle or splitting is given in Twister's notation
 *         if self.c_triangulation == NULL:
 *             shortened_name = name.replace(' ', '')             # <<<<<<<<<<<<<<
 *             mb = is_twister_bundle.match(shortened_name)
 *             ms = is_twister_splitting.match(shortened_name)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_replace); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_shortened_name = __pyx_t_15;
    __pyx_t_15 = 0;

    /* "cython/core/triangulation.pyx":209
 *         if self.c_triangulation == NULL:
 *             shortened_name = name.replace(' ', '')
 *             mb = is_twister_bundle.match(shortened_name)             # <<<<<<<<<<<<<<
 *             ms = is_twister_splitting.match(shortened_name)
 *             if mb or ms:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_is_twister_bundle); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_match); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __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_v_shortened_name};
      __pyx_t_15 = __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_15)) __PYX_ERR(3, 209, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_v_mb = __pyx_t_15;
    __pyx_t_15 = 0;

    /* "cython/core/triangulation.pyx":210
 *             shortened_name = name.replace(' ', '')
 *             mb = is_twister_bundle.match(shortened_name)
 *             ms = is_twister_splitting.match(shortened_name)             # <<<<<<<<<<<<<<
 *             if mb or ms:
 *                 func = bundle_from_string if mb else splitting_from_string
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_is_twister_splitting); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_match); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 210, __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_v_shortened_name};
      __pyx_t_15 = __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_15)) __PYX_ERR(3, 210, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_v_ms = __pyx_t_15;
    __pyx_t_15 = 0;

    /* "cython/core/triangulation.pyx":211
 *             mb = is_twister_bundle.match(shortened_name)
 *             ms = is_twister_splitting.match(shortened_name)
 *             if mb or ms:             # <<<<<<<<<<<<<<
 *                 func = bundle_from_string if mb else splitting_from_string
 *                 tri_as_string = func(shortened_name)
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_mb); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 211, __pyx_L1_error)
    if (!__pyx_t_1) {
    } else {
      __pyx_t_2 = __pyx_t_1;
      goto __pyx_L48_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ms); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 211, __pyx_L1_error)
    __pyx_t_2 = __pyx_t_1;
    __pyx_L48_bool_binop_done:;
    if (__pyx_t_2) {

      /* "cython/core/triangulation.pyx":212
 *             ms = is_twister_splitting.match(shortened_name)
 *             if mb or ms:
 *                 func = bundle_from_string if mb else splitting_from_string             # <<<<<<<<<<<<<<
 *                 tri_as_string = func(shortened_name)
 *                 self._from_string(tri_as_string, remove_finite_vertices)
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_mb); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 212, __pyx_L1_error)
      if (__pyx_t_2) {
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_bundle_from_string); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 212, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_15 = __pyx_t_5;
        __pyx_t_5 = 0;
      } else {
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_splitting_from_string); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 212, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_15 = __pyx_t_5;
        __pyx_t_5 = 0;
      }
      __pyx_v_func = __pyx_t_15;
      __pyx_t_15 = 0;

      /* "cython/core/triangulation.pyx":213
 *             if mb or ms:
 *                 func = bundle_from_string if mb else splitting_from_string
 *                 tri_as_string = func(shortened_name)             # <<<<<<<<<<<<<<
 *                 self._from_string(tri_as_string, remove_finite_vertices)
 * 
 */
      __Pyx_INCREF(__pyx_v_func);
      __pyx_t_5 = __pyx_v_func; __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_v_shortened_name};
        __pyx_t_15 = __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_15)) __PYX_ERR(3, 213, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __pyx_v_tri_as_string = __pyx_t_15;
      __pyx_t_15 = 0;

      /* "cython/core/triangulation.pyx":214
 *                 func = bundle_from_string if mb else splitting_from_string
 *                 tri_as_string = func(shortened_name)
 *                 self._from_string(tri_as_string, remove_finite_vertices)             # <<<<<<<<<<<<<<
 * 
 *         # Step 8. Regina/Burton isomorphism signatures.
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_from_string); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 214, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __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[3] = {__pyx_t_4, __pyx_v_tri_as_string, __pyx_v_remove_finite_vertices};
        __pyx_t_15 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 214, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

      /* "cython/core/triangulation.pyx":211
 *             mb = is_twister_bundle.match(shortened_name)
 *             ms = is_twister_splitting.match(shortened_name)
 *             if mb or ms:             # <<<<<<<<<<<<<<
 *                 func = bundle_from_string if mb else splitting_from_string
 *                 tri_as_string = func(shortened_name)
 */
    }

    /* "cython/core/triangulation.pyx":207
 * 
 *         # Step 7.  Bundle or splitting is given in Twister's notation
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             shortened_name = name.replace(' ', '')
 *             mb = is_twister_bundle.match(shortened_name)
 */
  }

  /* "cython/core/triangulation.pyx":217
 * 
 *         # Step 8. Regina/Burton isomorphism signatures.
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             self._from_isosig(name, remove_finite_vertices)
 * 
 */
  __pyx_t_2 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_2) {

    /* "cython/core/triangulation.pyx":218
 *         # Step 8. Regina/Burton isomorphism signatures.
 *         if self.c_triangulation == NULL:
 *             self._from_isosig(name, remove_finite_vertices)             # <<<<<<<<<<<<<<
 * 
 *         # Step 9. If all else fails, try to load a manifold from a file.
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_from_isosig); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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[3] = {__pyx_t_4, __pyx_v_name, __pyx_v_remove_finite_vertices};
      __pyx_t_15 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

    /* "cython/core/triangulation.pyx":217
 * 
 *         # Step 8. Regina/Burton isomorphism signatures.
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             self._from_isosig(name, remove_finite_vertices)
 * 
 */
  }

  /* "cython/core/triangulation.pyx":221
 * 
 *         # Step 9. If all else fails, try to load a manifold from a file.
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             self.get_from_file(name, remove_finite_vertices)
 * 
 */
  __pyx_t_2 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_2) {

    /* "cython/core/triangulation.pyx":222
 *         # Step 9. If all else fails, try to load a manifold from a file.
 *         if self.c_triangulation == NULL:
 *             self.get_from_file(name, remove_finite_vertices)             # <<<<<<<<<<<<<<
 * 
 *         # Set the dehn fillings
 */
    __pyx_t_19.__pyx_n = 1;
    __pyx_t_19.remove_finite_vertices = __pyx_v_remove_finite_vertices;
    __pyx_t_15 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->get_from_file(__pyx_v_self, __pyx_v_name, &__pyx_t_19); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

    /* "cython/core/triangulation.pyx":221
 * 
 *         # Step 9. If all else fails, try to load a manifold from a file.
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             self.get_from_file(name, remove_finite_vertices)
 * 
 */
  }

  /* "cython/core/triangulation.pyx":225
 * 
 *         # Set the dehn fillings
 *         Triangulation.dehn_fill(self, fillings)             # <<<<<<<<<<<<<<
 * 
 *     cdef get_HT_knot(self, crossings, alternation, index, remove_finite_vertices):
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6SnapPy_Triangulation), __pyx_n_s_dehn_fill); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __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[3] = {__pyx_t_4, ((PyObject *)__pyx_v_self), __pyx_v_fillings};
    __pyx_t_15 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

  /* "cython/core/triangulation.pyx":122
 *               'link complement.')
 * 
 *     cdef get_triangulation(self, spec, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         # Step -1 Check for an entire-triangulation-file-in-a-string
 *         if isinstance(spec, bytes) and spec.startswith(b'pickle:'):
 */

  /* 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_13);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("SnapPy.Triangulation.get_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_fillings);
  __Pyx_XDECREF(__pyx_v_db);
  __Pyx_XDECREF(__pyx_v_regex);
  __Pyx_XDECREF(__pyx_v_rolfsen_name);
  __Pyx_XDECREF(__pyx_v_word);
  __Pyx_XDECREF(__pyx_v_num_strands);
  __Pyx_XDECREF(__pyx_v_code);
  __Pyx_XDECREF(__pyx_v_knot);
  __Pyx_XDECREF(__pyx_v_klp);
  __Pyx_XDECREF(__pyx_v_shortened_name);
  __Pyx_XDECREF(__pyx_v_mb);
  __Pyx_XDECREF(__pyx_v_ms);
  __Pyx_XDECREF(__pyx_v_func);
  __Pyx_XDECREF(__pyx_v_tri_as_string);
  __Pyx_XDECREF(__pyx_9genexpr11__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":227
 *         Triangulation.dehn_fill(self, fillings)
 * 
 *     cdef get_HT_knot(self, crossings, alternation, index, remove_finite_vertices):             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation* c_triangulation
 *         DT = [get_HT_knot_DT(crossings, alternation, index)]
 */

static PyObject *__pyx_f_6SnapPy_13Triangulation_get_HT_knot(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_crossings, PyObject *__pyx_v_alternation, PyObject *__pyx_v_index, PyObject *__pyx_v_remove_finite_vertices) {
  Triangulation *__pyx_v_c_triangulation;
  PyObject *__pyx_v_DT = NULL;
  PyObject *__pyx_v_knot = NULL;
  PyObject *__pyx_v_name = 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;
  Triangulation *__pyx_t_5;
  struct __pyx_opt_args_6SnapPy_get_triangulation_from_PythonKLP __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_HT_knot", 1);

  /* "cython/core/triangulation.pyx":229
 *     cdef get_HT_knot(self, crossings, alternation, index, remove_finite_vertices):
 *         cdef c_Triangulation* c_triangulation
 *         DT = [get_HT_knot_DT(crossings, alternation, index)]             # <<<<<<<<<<<<<<
 *         knot = spherogram.DTcodec(DT)
 *         c_triangulation = get_triangulation_from_PythonKLP(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_get_HT_knot_DT); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 229, __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[4] = {__pyx_t_3, __pyx_v_crossings, __pyx_v_alternation, __pyx_v_index};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(3, 229, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_v_DT = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":230
 *         cdef c_Triangulation* c_triangulation
 *         DT = [get_HT_knot_DT(crossings, alternation, index)]
 *         knot = spherogram.DTcodec(DT)             # <<<<<<<<<<<<<<
 *         c_triangulation = get_triangulation_from_PythonKLP(
 *             knot.KLPProjection(), remove_finite_vertices)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_spherogram); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DTcodec); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 230, __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_DT};
    __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(3, 230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_knot = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":232
 *         knot = spherogram.DTcodec(DT)
 *         c_triangulation = get_triangulation_from_PythonKLP(
 *             knot.KLPProjection(), remove_finite_vertices)             # <<<<<<<<<<<<<<
 *         name = to_byte_str('%d' % crossings + alternation + '%d' % index)
 *         set_triangulation_name(c_triangulation, name)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_knot, __pyx_n_s_KLPProjection); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(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, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }

  /* "cython/core/triangulation.pyx":231
 *         DT = [get_HT_knot_DT(crossings, alternation, index)]
 *         knot = spherogram.DTcodec(DT)
 *         c_triangulation = get_triangulation_from_PythonKLP(             # <<<<<<<<<<<<<<
 *             knot.KLPProjection(), remove_finite_vertices)
 *         name = to_byte_str('%d' % crossings + alternation + '%d' % index)
 */
  __pyx_t_6.__pyx_n = 1;
  __pyx_t_6.remove_finite_vertices = __pyx_v_remove_finite_vertices;
  __pyx_t_5 = __pyx_f_6SnapPy_get_triangulation_from_PythonKLP(__pyx_t_2, &__pyx_t_6); if (unlikely(__pyx_t_5 == ((Triangulation *)NULL) && PyErr_Occurred())) __PYX_ERR(3, 231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_c_triangulation = __pyx_t_5;

  /* "cython/core/triangulation.pyx":233
 *         c_triangulation = get_triangulation_from_PythonKLP(
 *             knot.KLPProjection(), remove_finite_vertices)
 *         name = to_byte_str('%d' % crossings + alternation + '%d' % index)             # <<<<<<<<<<<<<<
 *         set_triangulation_name(c_triangulation, name)
 *         self._set_DTcode(knot)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_to_byte_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_d, __pyx_v_crossings); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyNumber_Add(__pyx_t_1, __pyx_v_alternation); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_d, __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __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_t_8};
    __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;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":234
 *             knot.KLPProjection(), remove_finite_vertices)
 *         name = to_byte_str('%d' % crossings + alternation + '%d' % index)
 *         set_triangulation_name(c_triangulation, name)             # <<<<<<<<<<<<<<
 *         self._set_DTcode(knot)
 *         self.set_c_triangulation(c_triangulation)
 */
  __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_name); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(3, 234, __pyx_L1_error)
  set_triangulation_name(__pyx_v_c_triangulation, __pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 234, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":235
 *         name = to_byte_str('%d' % crossings + alternation + '%d' % index)
 *         set_triangulation_name(c_triangulation, name)
 *         self._set_DTcode(knot)             # <<<<<<<<<<<<<<
 *         self.set_c_triangulation(c_triangulation)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_DTcode); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_knot};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 235, __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;

  /* "cython/core/triangulation.pyx":236
 *         set_triangulation_name(c_triangulation, name)
 *         self._set_DTcode(knot)
 *         self.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *     cdef get_punctured_torus_bundle(self, match):
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->set_c_triangulation(__pyx_v_self, __pyx_v_c_triangulation); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":227
 *         Triangulation.dehn_fill(self, fillings)
 * 
 *     cdef get_HT_knot(self, crossings, alternation, index, remove_finite_vertices):             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation* c_triangulation
 *         DT = [get_HT_knot_DT(crossings, alternation, index)]
 */

  /* 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_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("SnapPy.Triangulation.get_HT_knot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_DT);
  __Pyx_XDECREF(__pyx_v_knot);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":238
 *         self.set_c_triangulation(c_triangulation)
 * 
 *     cdef get_punctured_torus_bundle(self, match):             # <<<<<<<<<<<<<<
 *         cdef LRFactorization* gluing
 *         cdef size_t LRlength, i
 */

static PyObject *__pyx_f_6SnapPy_13Triangulation_get_punctured_torus_bundle(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_match) {
  LRFactorization *__pyx_v_gluing;
  size_t __pyx_v_LRlength;
  size_t __pyx_v_i;
  char *__pyx_v_LRstring;
  PyObject *__pyx_v_LRpart = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  char *__pyx_t_9;
  LRFactorization *__pyx_t_10;
  Boolean __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  size_t __pyx_t_14;
  Triangulation *__pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_punctured_torus_bundle", 1);

  /* "cython/core/triangulation.pyx":243
 *         cdef char* LRstring
 * 
 *         LRpart = to_byte_str(match.group(3).upper())             # <<<<<<<<<<<<<<
 *         LRlength = len(LRpart)
 *         LRstring = LRpart
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_to_byte_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_int_3};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 243, __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_upper); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_7 = 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_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_LRpart = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":244
 * 
 *         LRpart = to_byte_str(match.group(3).upper())
 *         LRlength = len(LRpart)             # <<<<<<<<<<<<<<
 *         LRstring = LRpart
 *         gluing = alloc_LR_factorization(<int>LRlength)
 */
  __pyx_t_8 = PyObject_Length(__pyx_v_LRpart); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 244, __pyx_L1_error)
  __pyx_v_LRlength = __pyx_t_8;

  /* "cython/core/triangulation.pyx":245
 *         LRpart = to_byte_str(match.group(3).upper())
 *         LRlength = len(LRpart)
 *         LRstring = LRpart             # <<<<<<<<<<<<<<
 *         gluing = alloc_LR_factorization(<int>LRlength)
 *         gluing.is_available = True
 */
  __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_v_LRpart); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(3, 245, __pyx_L1_error)
  __pyx_v_LRstring = __pyx_t_9;

  /* "cython/core/triangulation.pyx":246
 *         LRlength = len(LRpart)
 *         LRstring = LRpart
 *         gluing = alloc_LR_factorization(<int>LRlength)             # <<<<<<<<<<<<<<
 *         gluing.is_available = True
 *         gluing.negative_determinant = 1 if match.group(1) in ['-', 'n'] else 0
 */
  __pyx_t_10 = alloc_LR_factorization(((int)__pyx_v_LRlength)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 246, __pyx_L1_error)
  __pyx_v_gluing = __pyx_t_10;

  /* "cython/core/triangulation.pyx":247
 *         LRstring = LRpart
 *         gluing = alloc_LR_factorization(<int>LRlength)
 *         gluing.is_available = True             # <<<<<<<<<<<<<<
 *         gluing.negative_determinant = 1 if match.group(1) in ['-', 'n'] else 0
 *         gluing.negative_trace = 0 if match.group(2) == '+' else 1
 */
  __pyx_v_gluing->is_available = 1;

  /* "cython/core/triangulation.pyx":248
 *         gluing = alloc_LR_factorization(<int>LRlength)
 *         gluing.is_available = True
 *         gluing.negative_determinant = 1 if match.group(1) in ['-', 'n'] else 0             # <<<<<<<<<<<<<<
 *         gluing.negative_trace = 0 if match.group(2) == '+' else 1
 *         for i from 0 <= i < LRlength:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_7 = 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_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_int_1};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__32, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(3, 248, __pyx_L1_error)
  if (!__pyx_t_13) {
  } else {
    __pyx_t_12 = __pyx_t_13;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_n, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(3, 248, __pyx_L1_error)
  __pyx_t_12 = __pyx_t_13;
  __pyx_L3_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_13 = __pyx_t_12;
  if (__pyx_t_13) {
    __pyx_t_11 = 1;
  } else {
    __pyx_t_11 = 0;
  }
  __pyx_v_gluing->negative_determinant = __pyx_t_11;

  /* "cython/core/triangulation.pyx":249
 *         gluing.is_available = True
 *         gluing.negative_determinant = 1 if match.group(1) in ['-', 'n'] else 0
 *         gluing.negative_trace = 0 if match.group(2) == '+' else 1             # <<<<<<<<<<<<<<
 *         for i from 0 <= i < LRlength:
 *             gluing.LR_factors[i] = LRstring[i]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_7 = 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_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_int_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__33, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(3, 249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_13) {
    __pyx_t_11 = 0;
  } else {
    __pyx_t_11 = 1;
  }
  __pyx_v_gluing->negative_trace = __pyx_t_11;

  /* "cython/core/triangulation.pyx":250
 *         gluing.negative_determinant = 1 if match.group(1) in ['-', 'n'] else 0
 *         gluing.negative_trace = 0 if match.group(2) == '+' else 1
 *         for i from 0 <= i < LRlength:             # <<<<<<<<<<<<<<
 *             gluing.LR_factors[i] = LRstring[i]
 *         self.set_c_triangulation(triangulate_punctured_torus_bundle(gluing))
 */
  __pyx_t_14 = __pyx_v_LRlength;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_14; __pyx_v_i++) {

    /* "cython/core/triangulation.pyx":251
 *         gluing.negative_trace = 0 if match.group(2) == '+' else 1
 *         for i from 0 <= i < LRlength:
 *             gluing.LR_factors[i] = LRstring[i]             # <<<<<<<<<<<<<<
 *         self.set_c_triangulation(triangulate_punctured_torus_bundle(gluing))
 *         free_LR_factorization(gluing)
 */
    (__pyx_v_gluing->LR_factors[__pyx_v_i]) = (__pyx_v_LRstring[__pyx_v_i]);
  }

  /* "cython/core/triangulation.pyx":252
 *         for i from 0 <= i < LRlength:
 *             gluing.LR_factors[i] = LRstring[i]
 *         self.set_c_triangulation(triangulate_punctured_torus_bundle(gluing))             # <<<<<<<<<<<<<<
 *         free_LR_factorization(gluing)
 * 
 */
  __pyx_t_15 = triangulate_punctured_torus_bundle(__pyx_v_gluing); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 252, __pyx_L1_error)
  __pyx_t_1 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->set_c_triangulation(__pyx_v_self, __pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":253
 *             gluing.LR_factors[i] = LRstring[i]
 *         self.set_c_triangulation(triangulate_punctured_torus_bundle(gluing))
 *         free_LR_factorization(gluing)             # <<<<<<<<<<<<<<
 * 
 *     def _get_from_link_data(self, data, remove_finite_vertices=True):
 */
  free_LR_factorization(__pyx_v_gluing); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 253, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":238
 *         self.set_c_triangulation(c_triangulation)
 * 
 *     cdef get_punctured_torus_bundle(self, match):             # <<<<<<<<<<<<<<
 *         cdef LRFactorization* gluing
 *         cdef size_t LRlength, i
 */

  /* 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_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.Triangulation.get_punctured_torus_bundle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_LRpart);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":255
 *         free_LR_factorization(gluing)
 * 
 *     def _get_from_link_data(self, data, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         if self.c_triangulation != NULL:
 *             free_triangulation(self.c_triangulation)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_3_get_from_link_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_6SnapPy_13Triangulation_2_get_from_link_data, "Triangulation._get_from_link_data(self, data, remove_finite_vertices=True)");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_3_get_from_link_data = {"_get_from_link_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_3_get_from_link_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_2_get_from_link_data};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_3_get_from_link_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_data = 0;
  PyObject *__pyx_v_remove_finite_vertices = 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("_get_from_link_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_data,&__pyx_n_s_remove_finite_vertices,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    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_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 255, __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_remove_finite_vertices);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 255, __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_from_link_data") < 0)) __PYX_ERR(3, 255, __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_data = values[0];
    __pyx_v_remove_finite_vertices = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_get_from_link_data", 0, 1, 2, __pyx_nargs); __PYX_ERR(3, 255, __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("SnapPy.Triangulation._get_from_link_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_2_get_from_link_data(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_data, __pyx_v_remove_finite_vertices);

  /* 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_6SnapPy_13Triangulation_2_get_from_link_data(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_remove_finite_vertices) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Triangulation *__pyx_t_2;
  struct __pyx_opt_args_6SnapPy_get_triangulation_from_PythonKLP __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_from_link_data", 1);

  /* "cython/core/triangulation.pyx":256
 * 
 *     def _get_from_link_data(self, data, remove_finite_vertices=True):
 *         if self.c_triangulation != NULL:             # <<<<<<<<<<<<<<
 *             free_triangulation(self.c_triangulation)
 *         self.c_triangulation = get_triangulation_from_PythonKLP(data, remove_finite_vertices)
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation != NULL);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":257
 *     def _get_from_link_data(self, data, remove_finite_vertices=True):
 *         if self.c_triangulation != NULL:
 *             free_triangulation(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         self.c_triangulation = get_triangulation_from_PythonKLP(data, remove_finite_vertices)
 * 
 */
    free_triangulation(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 257, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":256
 * 
 *     def _get_from_link_data(self, data, remove_finite_vertices=True):
 *         if self.c_triangulation != NULL:             # <<<<<<<<<<<<<<
 *             free_triangulation(self.c_triangulation)
 *         self.c_triangulation = get_triangulation_from_PythonKLP(data, remove_finite_vertices)
 */
  }

  /* "cython/core/triangulation.pyx":258
 *         if self.c_triangulation != NULL:
 *             free_triangulation(self.c_triangulation)
 *         self.c_triangulation = get_triangulation_from_PythonKLP(data, remove_finite_vertices)             # <<<<<<<<<<<<<<
 * 
 *     cdef get_from_file(self, name, remove_finite_vertices=True):
 */
  __pyx_t_3.__pyx_n = 1;
  __pyx_t_3.remove_finite_vertices = __pyx_v_remove_finite_vertices;
  __pyx_t_2 = __pyx_f_6SnapPy_get_triangulation_from_PythonKLP(__pyx_v_data, &__pyx_t_3); if (unlikely(__pyx_t_2 == ((Triangulation *)NULL) && PyErr_Occurred())) __PYX_ERR(3, 258, __pyx_L1_error)
  __pyx_v_self->c_triangulation = __pyx_t_2;

  /* "cython/core/triangulation.pyx":255
 *         free_LR_factorization(gluing)
 * 
 *     def _get_from_link_data(self, data, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         if self.c_triangulation != NULL:
 *             free_triangulation(self.c_triangulation)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("SnapPy.Triangulation._get_from_link_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":260
 *         self.c_triangulation = get_triangulation_from_PythonKLP(data, remove_finite_vertices)
 * 
 *     cdef get_from_file(self, name, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         try:
 *             locations = [os.curdir, os.environ['SNAPPEA_MANIFOLD_DIRECTORY']]
 */

static PyObject *__pyx_f_6SnapPy_13Triangulation_get_from_file(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_name, struct __pyx_opt_args_6SnapPy_13Triangulation_get_from_file *__pyx_optional_args) {
  PyObject *__pyx_v_remove_finite_vertices = ((PyObject *)Py_True);
  PyObject *__pyx_v_locations = NULL;
  PyObject *__pyx_v_location = NULL;
  PyObject *__pyx_v_pathname = NULL;
  PyObject *__pyx_v_file = NULL;
  PyObject *__pyx_v_first_line = NULL;
  PyObject *__pyx_v_LM = NULL;
  PyObject *__pyx_v_klp = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Triangulation *__pyx_t_14;
  struct __pyx_opt_args_6SnapPy_get_triangulation_from_PythonKLP __pyx_t_15;
  char *__pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_from_file", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_remove_finite_vertices = __pyx_optional_args->remove_finite_vertices;
    }
  }

  /* "cython/core/triangulation.pyx":261
 * 
 *     cdef get_from_file(self, name, remove_finite_vertices=True):
 *         try:             # <<<<<<<<<<<<<<
 *             locations = [os.curdir, os.environ['SNAPPEA_MANIFOLD_DIRECTORY']]
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "cython/core/triangulation.pyx":262
 *     cdef get_from_file(self, name, remove_finite_vertices=True):
 *         try:
 *             locations = [os.curdir, os.environ['SNAPPEA_MANIFOLD_DIRECTORY']]             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             locations = [os.curdir]
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 262, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_curdir); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 262, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 262, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_environ); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 262, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_s_SNAPPEA_MANIFOLD_DIRECTORY); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 262, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 262, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_5)) __PYX_ERR(3, 262, __pyx_L3_error);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_4)) __PYX_ERR(3, 262, __pyx_L3_error);
      __pyx_t_5 = 0;
      __pyx_t_4 = 0;
      __pyx_v_locations = ((PyObject*)__pyx_t_6);
      __pyx_t_6 = 0;

      /* "cython/core/triangulation.pyx":261
 * 
 *     cdef get_from_file(self, name, remove_finite_vertices=True):
 *         try:             # <<<<<<<<<<<<<<
 *             locations = [os.curdir, os.environ['SNAPPEA_MANIFOLD_DIRECTORY']]
 *         except KeyError:
 */
    }
    __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;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "cython/core/triangulation.pyx":263
 *         try:
 *             locations = [os.curdir, os.environ['SNAPPEA_MANIFOLD_DIRECTORY']]
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             locations = [os.curdir]
 *         for location in locations:
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("SnapPy.Triangulation.get_from_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(3, 263, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);

      /* "cython/core/triangulation.pyx":264
 *             locations = [os.curdir, os.environ['SNAPPEA_MANIFOLD_DIRECTORY']]
 *         except KeyError:
 *             locations = [os.curdir]             # <<<<<<<<<<<<<<
 *         for location in locations:
 *             pathname = os.path.join(location, name)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 264, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_curdir); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 264, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 264, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_9);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_9)) __PYX_ERR(3, 264, __pyx_L5_except_error);
      __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_locations, ((PyObject*)__pyx_t_8));
      __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cython/core/triangulation.pyx":261
 * 
 *     cdef get_from_file(self, name, remove_finite_vertices=True):
 *         try:             # <<<<<<<<<<<<<<
 *             locations = [os.curdir, os.environ['SNAPPEA_MANIFOLD_DIRECTORY']]
 *         except KeyError:
 */
    __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:;
  }

  /* "cython/core/triangulation.pyx":265
 *         except KeyError:
 *             locations = [os.curdir]
 *         for location in locations:             # <<<<<<<<<<<<<<
 *             pathname = os.path.join(location, name)
 *             if os.path.isfile(pathname):
 */
  __pyx_t_5 = __pyx_v_locations; __Pyx_INCREF(__pyx_t_5);
  __pyx_t_10 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 265, __pyx_L1_error)
      #endif
      if (__pyx_t_10 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(3, 265, __pyx_L1_error)
    #else
    __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_location, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":266
 *             locations = [os.curdir]
 *         for location in locations:
 *             pathname = os.path.join(location, name)             # <<<<<<<<<<<<<<
 *             if os.path.isfile(pathname):
 *                 file = open(pathname, 'r')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 266, __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(3, 266, __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(3, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    __pyx_t_7 = 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_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_location, __pyx_v_name};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 266, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_pathname, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":267
 *         for location in locations:
 *             pathname = os.path.join(location, name)
 *             if os.path.isfile(pathname):             # <<<<<<<<<<<<<<
 *                 file = open(pathname, 'r')
 *                 first_line = file.readline()[:-1]
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_os); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 267, __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(3, 267, __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_isfile); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    __pyx_t_7 = 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_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_pathname};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 267, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(3, 267, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_11) {

      /* "cython/core/triangulation.pyx":268
 *             pathname = os.path.join(location, name)
 *             if os.path.isfile(pathname):
 *                 file = open(pathname, 'r')             # <<<<<<<<<<<<<<
 *                 first_line = file.readline()[:-1]
 *                 file.close()
 */
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_pathname);
      __Pyx_GIVEREF(__pyx_v_pathname);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pathname)) __PYX_ERR(3, 268, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_r);
      __Pyx_GIVEREF(__pyx_n_s_r);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_r)) __PYX_ERR(3, 268, __pyx_L1_error);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_file, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "cython/core/triangulation.pyx":269
 *             if os.path.isfile(pathname):
 *                 file = open(pathname, 'r')
 *                 first_line = file.readline()[:-1]             # <<<<<<<<<<<<<<
 *                 file.close()
 *                 if first_line.find('% Link Projection') > -1:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_file, __pyx_n_s_readline); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 269, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 269, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_t_6, 0, -1L, NULL, NULL, &__pyx_slice__34, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 269, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_first_line, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "cython/core/triangulation.pyx":270
 *                 file = open(pathname, 'r')
 *                 first_line = file.readline()[:-1]
 *                 file.close()             # <<<<<<<<<<<<<<
 *                 if first_line.find('% Link Projection') > -1:
 *                     LM = LinkManager()
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_file, __pyx_n_s_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 270, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = NULL;
      __pyx_t_7 = 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_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 270, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/triangulation.pyx":271
 *                 first_line = file.readline()[:-1]
 *                 file.close()
 *                 if first_line.find('% Link Projection') > -1:             # <<<<<<<<<<<<<<
 *                     LM = LinkManager()
 *                     LM._from_string(open(pathname, 'r').read())
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_first_line, __pyx_n_s_find); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 271, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = NULL;
      __pyx_t_7 = 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_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_kp_s_Link_Projection};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 271, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_int_neg_1, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 271, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(3, 271, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_11) {

        /* "cython/core/triangulation.pyx":272
 *                 file.close()
 *                 if first_line.find('% Link Projection') > -1:
 *                     LM = LinkManager()             # <<<<<<<<<<<<<<
 *                     LM._from_string(open(pathname, 'r').read())
 *                     klp = LM.SnapPea_KLPProjection()
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_LinkManager); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 272, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 272, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_XDECREF_SET(__pyx_v_LM, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "cython/core/triangulation.pyx":273
 *                 if first_line.find('% Link Projection') > -1:
 *                     LM = LinkManager()
 *                     LM._from_string(open(pathname, 'r').read())             # <<<<<<<<<<<<<<
 *                     klp = LM.SnapPea_KLPProjection()
 *                     self._link_file_full_path = os.path.abspath(pathname)
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_LM, __pyx_n_s_from_string); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 273, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 273, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_v_pathname);
        __Pyx_GIVEREF(__pyx_v_pathname);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_pathname)) __PYX_ERR(3, 273, __pyx_L1_error);
        __Pyx_INCREF(__pyx_n_s_r);
        __Pyx_GIVEREF(__pyx_n_s_r);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_n_s_r)) __PYX_ERR(3, 273, __pyx_L1_error);
        __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_9, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 273, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_read); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 273, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
          __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 273, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        __pyx_t_9 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_8};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 273, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "cython/core/triangulation.pyx":274
 *                     LM = LinkManager()
 *                     LM._from_string(open(pathname, 'r').read())
 *                     klp = LM.SnapPea_KLPProjection()             # <<<<<<<<<<<<<<
 *                     self._link_file_full_path = os.path.abspath(pathname)
 *                     self._set_DTcode(spherogram.DTcodec(*LM.DT_code()))
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_LM, __pyx_n_s_SnapPea_KLPProjection); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 274, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 274, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_XDECREF_SET(__pyx_v_klp, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "cython/core/triangulation.pyx":275
 *                     LM._from_string(open(pathname, 'r').read())
 *                     klp = LM.SnapPea_KLPProjection()
 *                     self._link_file_full_path = os.path.abspath(pathname)             # <<<<<<<<<<<<<<
 *                     self._set_DTcode(spherogram.DTcodec(*LM.DT_code()))
 *                     self._set_PDcode(LM.PD_code())
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 275, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 275, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_abspath); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 275, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_pathname};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 275, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_GIVEREF(__pyx_t_6);
        __Pyx_GOTREF(__pyx_v_self->_link_file_full_path);
        __Pyx_DECREF(__pyx_v_self->_link_file_full_path);
        __pyx_v_self->_link_file_full_path = __pyx_t_6;
        __pyx_t_6 = 0;

        /* "cython/core/triangulation.pyx":276
 *                     klp = LM.SnapPea_KLPProjection()
 *                     self._link_file_full_path = os.path.abspath(pathname)
 *                     self._set_DTcode(spherogram.DTcodec(*LM.DT_code()))             # <<<<<<<<<<<<<<
 *                     self._set_PDcode(LM.PD_code())
 *                     self.set_c_triangulation(
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_DTcode); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 276, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_spherogram); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 276, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_DTcodec); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 276, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_LM, __pyx_n_s_DT_code); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 276, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = NULL;
        __pyx_t_7 = 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_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL};
          __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 276, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
        __pyx_t_12 = __Pyx_PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 276, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 276, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_8};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 276, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "cython/core/triangulation.pyx":277
 *                     self._link_file_full_path = os.path.abspath(pathname)
 *                     self._set_DTcode(spherogram.DTcodec(*LM.DT_code()))
 *                     self._set_PDcode(LM.PD_code())             # <<<<<<<<<<<<<<
 *                     self.set_c_triangulation(
 *                         get_triangulation_from_PythonKLP(klp, remove_finite_vertices))
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_PDcode); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 277, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_LM, __pyx_n_s_PD_code); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 277, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_9 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
          __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 277, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
        __pyx_t_12 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_8};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 277, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "cython/core/triangulation.pyx":279
 *                     self._set_PDcode(LM.PD_code())
 *                     self.set_c_triangulation(
 *                         get_triangulation_from_PythonKLP(klp, remove_finite_vertices))             # <<<<<<<<<<<<<<
 *                 else:
 *                     self.set_c_triangulation(read_triangulation(to_byte_str(pathname)))
 */
        __pyx_t_15.__pyx_n = 1;
        __pyx_t_15.remove_finite_vertices = __pyx_v_remove_finite_vertices;
        __pyx_t_14 = __pyx_f_6SnapPy_get_triangulation_from_PythonKLP(__pyx_v_klp, &__pyx_t_15); if (unlikely(__pyx_t_14 == ((Triangulation *)NULL) && PyErr_Occurred())) __PYX_ERR(3, 279, __pyx_L1_error)

        /* "cython/core/triangulation.pyx":278
 *                     self._set_DTcode(spherogram.DTcodec(*LM.DT_code()))
 *                     self._set_PDcode(LM.PD_code())
 *                     self.set_c_triangulation(             # <<<<<<<<<<<<<<
 *                         get_triangulation_from_PythonKLP(klp, remove_finite_vertices))
 *                 else:
 */
        __pyx_t_6 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->set_c_triangulation(__pyx_v_self, __pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 278, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "cython/core/triangulation.pyx":271
 *                 first_line = file.readline()[:-1]
 *                 file.close()
 *                 if first_line.find('% Link Projection') > -1:             # <<<<<<<<<<<<<<
 *                     LM = LinkManager()
 *                     LM._from_string(open(pathname, 'r').read())
 */
        goto __pyx_L14;
      }

      /* "cython/core/triangulation.pyx":281
 *                         get_triangulation_from_PythonKLP(klp, remove_finite_vertices))
 *                 else:
 *                     self.set_c_triangulation(read_triangulation(to_byte_str(pathname)))             # <<<<<<<<<<<<<<
 * 
 *         if self.c_triangulation == NULL:
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_to_byte_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 281, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_pathname};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 281, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __pyx_t_16 = __Pyx_PyObject_AsWritableString(__pyx_t_6); if (unlikely((!__pyx_t_16) && PyErr_Occurred())) __PYX_ERR(3, 281, __pyx_L1_error)
        __pyx_t_4 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->set_c_triangulation(__pyx_v_self, read_triangulation(__pyx_t_16)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 281, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_L14:;

      /* "cython/core/triangulation.pyx":267
 *         for location in locations:
 *             pathname = os.path.join(location, name)
 *             if os.path.isfile(pathname):             # <<<<<<<<<<<<<<
 *                 file = open(pathname, 'r')
 *                 first_line = file.readline()[:-1]
 */
    }

    /* "cython/core/triangulation.pyx":265
 *         except KeyError:
 *             locations = [os.curdir]
 *         for location in locations:             # <<<<<<<<<<<<<<
 *             pathname = os.path.join(location, name)
 *             if os.path.isfile(pathname):
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/triangulation.pyx":283
 *                     self.set_c_triangulation(read_triangulation(to_byte_str(pathname)))
 * 
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             raise IOError('The manifold file %s was not found.\n%s'%
 *                           (name, triangulation_help % 'Triangulation or Manifold'))
 */
  __pyx_t_11 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_11)) {

    /* "cython/core/triangulation.pyx":285
 *         if self.c_triangulation == NULL:
 *             raise IOError('The manifold file %s was not found.\n%s'%
 *                           (name, triangulation_help % 'Triangulation or Manifold'))             # <<<<<<<<<<<<<<
 *         else:
 *             if remove_finite_vertices:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_triangulation_help); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyNumber_Remainder(__pyx_t_5, __pyx_kp_s_Triangulation_or_Manifold); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_name);
    __Pyx_GIVEREF(__pyx_v_name);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_name)) __PYX_ERR(3, 285, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(3, 285, __pyx_L1_error);
    __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":284
 * 
 *         if self.c_triangulation == NULL:
 *             raise IOError('The manifold file %s was not found.\n%s'%             # <<<<<<<<<<<<<<
 *                           (name, triangulation_help % 'Triangulation or Manifold'))
 *         else:
 */
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_The_manifold_file_s_was_not_foun, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(3, 284, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":283
 *                     self.set_c_triangulation(read_triangulation(to_byte_str(pathname)))
 * 
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             raise IOError('The manifold file %s was not found.\n%s'%
 *                           (name, triangulation_help % 'Triangulation or Manifold'))
 */
  }

  /* "cython/core/triangulation.pyx":287
 *                           (name, triangulation_help % 'Triangulation or Manifold'))
 *         else:
 *             if remove_finite_vertices:             # <<<<<<<<<<<<<<
 *                 self._remove_finite_vertices()
 * 
 */
  /*else*/ {
    __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_remove_finite_vertices); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(3, 287, __pyx_L1_error)
    if (__pyx_t_11) {

      /* "cython/core/triangulation.pyx":288
 *         else:
 *             if remove_finite_vertices:
 *                 self._remove_finite_vertices()             # <<<<<<<<<<<<<<
 * 
 *     def _remove_finite_vertices(self):
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_finite_vertices_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 288, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 288, __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;

      /* "cython/core/triangulation.pyx":287
 *                           (name, triangulation_help % 'Triangulation or Manifold'))
 *         else:
 *             if remove_finite_vertices:             # <<<<<<<<<<<<<<
 *                 self._remove_finite_vertices()
 * 
 */
    }
  }

  /* "cython/core/triangulation.pyx":260
 *         self.c_triangulation = get_triangulation_from_PythonKLP(data, remove_finite_vertices)
 * 
 *     cdef get_from_file(self, name, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         try:
 *             locations = [os.curdir, os.environ['SNAPPEA_MANIFOLD_DIRECTORY']]
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("SnapPy.Triangulation.get_from_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_locations);
  __Pyx_XDECREF(__pyx_v_location);
  __Pyx_XDECREF(__pyx_v_pathname);
  __Pyx_XDECREF(__pyx_v_file);
  __Pyx_XDECREF(__pyx_v_first_line);
  __Pyx_XDECREF(__pyx_v_LM);
  __Pyx_XDECREF(__pyx_v_klp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":290
 *                 self._remove_finite_vertices()
 * 
 *     def _remove_finite_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Removing any finite vertices by simplification and drilling.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_5_remove_finite_vertices(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_6SnapPy_13Triangulation_4_remove_finite_vertices, "Triangulation._remove_finite_vertices(self)\n\n        Removing any finite vertices by simplification and drilling.\n\n        >>> isosig = 'kLLLLMQkccfigghjijjlnabnwnpsii'\n        >>> T = Triangulation(isosig, remove_finite_vertices=False)\n        >>> T.triangulation_isosig(decorated=False) == isosig\n        True\n        >>> T.num_cusps(),  T._num_fake_cusps()\n        (0, 1)\n        >>> T._remove_finite_vertices()\n        >>> T.num_cusps(),  T._num_fake_cusps()\n        (1, 0)\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_5_remove_finite_vertices = {"_remove_finite_vertices", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_5_remove_finite_vertices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_4_remove_finite_vertices};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_5_remove_finite_vertices(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("_remove_finite_vertices (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("_remove_finite_vertices", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_remove_finite_vertices", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_4_remove_finite_vertices(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_4_remove_finite_vertices(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_remove_finite_vertices", 1);

  /* "cython/core/triangulation.pyx":304
 *         (1, 0)
 *         """
 *         if self.c_triangulation != NULL:             # <<<<<<<<<<<<<<
 *             count_cusps(self.c_triangulation)
 *             if get_num_fake_cusps(self.c_triangulation) > 0:
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation != NULL);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":305
 *         """
 *         if self.c_triangulation != NULL:
 *             count_cusps(self.c_triangulation)             # <<<<<<<<<<<<<<
 *             if get_num_fake_cusps(self.c_triangulation) > 0:
 *                 remove_finite_vertices(self.c_triangulation)
 */
    count_cusps(__pyx_v_self->c_triangulation);

    /* "cython/core/triangulation.pyx":306
 *         if self.c_triangulation != NULL:
 *             count_cusps(self.c_triangulation)
 *             if get_num_fake_cusps(self.c_triangulation) > 0:             # <<<<<<<<<<<<<<
 *                 remove_finite_vertices(self.c_triangulation)
 *                 count_cusps(self.c_triangulation)
 */
    __pyx_t_2 = get_num_fake_cusps(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 306, __pyx_L1_error)
    __pyx_t_1 = (__pyx_t_2 > 0);
    if (__pyx_t_1) {

      /* "cython/core/triangulation.pyx":307
 *             count_cusps(self.c_triangulation)
 *             if get_num_fake_cusps(self.c_triangulation) > 0:
 *                 remove_finite_vertices(self.c_triangulation)             # <<<<<<<<<<<<<<
 *                 count_cusps(self.c_triangulation)
 * 
 */
      remove_finite_vertices(__pyx_v_self->c_triangulation);

      /* "cython/core/triangulation.pyx":308
 *             if get_num_fake_cusps(self.c_triangulation) > 0:
 *                 remove_finite_vertices(self.c_triangulation)
 *                 count_cusps(self.c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *     def cover_info(self):
 */
      count_cusps(__pyx_v_self->c_triangulation);

      /* "cython/core/triangulation.pyx":306
 *         if self.c_triangulation != NULL:
 *             count_cusps(self.c_triangulation)
 *             if get_num_fake_cusps(self.c_triangulation) > 0:             # <<<<<<<<<<<<<<
 *                 remove_finite_vertices(self.c_triangulation)
 *                 count_cusps(self.c_triangulation)
 */
    }

    /* "cython/core/triangulation.pyx":304
 *         (1, 0)
 *         """
 *         if self.c_triangulation != NULL:             # <<<<<<<<<<<<<<
 *             count_cusps(self.c_triangulation)
 *             if get_num_fake_cusps(self.c_triangulation) > 0:
 */
  }

  /* "cython/core/triangulation.pyx":290
 *                 self._remove_finite_vertices()
 * 
 *     def _remove_finite_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Removing any finite vertices by simplification and drilling.
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("SnapPy.Triangulation._remove_finite_vertices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":310
 *                 count_cusps(self.c_triangulation)
 * 
 *     def cover_info(self):             # <<<<<<<<<<<<<<
 *         """
 *         If this is a manifold or triangulation which was constructed as
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_7cover_info(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_6SnapPy_13Triangulation_6cover_info, "Triangulation.cover_info(self)\n\n        If this is a manifold or triangulation which was constructed as\n        a covering space, return a dictionary describing the cover.  Otherwise\n        return 0.  The dictionary keys are 'base', 'type' and 'degree'.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_7cover_info = {"cover_info", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_7cover_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_6cover_info};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_7cover_info(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("cover_info (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("cover_info", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "cover_info", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_6cover_info(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_6cover_info(struct __pyx_obj_6SnapPy_Triangulation *__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("cover_info", 1);

  /* "cython/core/triangulation.pyx":316
 *         return 0.  The dictionary keys are 'base', 'type' and 'degree'.
 *         """
 *         if self._cover_info:             # <<<<<<<<<<<<<<
 *             return dict(self._cover_info)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_cover_info); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 316, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":317
 *         """
 *         if self._cover_info:
 *             return dict(self._cover_info)             # <<<<<<<<<<<<<<
 * 
 *     def plink(self):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_self->_cover_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":316
 *         return 0.  The dictionary keys are 'base', 'type' and 'degree'.
 *         """
 *         if self._cover_info:             # <<<<<<<<<<<<<<
 *             return dict(self._cover_info)
 * 
 */
  }

  /* "cython/core/triangulation.pyx":310
 *                 count_cusps(self.c_triangulation)
 * 
 *     def cover_info(self):             # <<<<<<<<<<<<<<
 *         """
 *         If this is a manifold or triangulation which was constructed as
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.Triangulation.cover_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":319
 *             return dict(self._cover_info)
 * 
 *     def plink(self):             # <<<<<<<<<<<<<<
 *         """
 *         Brings up a link editor window if the manifold is stored
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_9plink(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_6SnapPy_13Triangulation_8plink, "Triangulation.plink(self)\n\n        Brings up a link editor window if the manifold is stored\n        as a link complement in your current session.\n\n        >>> M = Manifold('4_1') # stored as a triangulation with a link\n        >>> M.link()\n        <Link: 1 comp; 4 cross>\n        >>> N = Manifold('m004') # stored as a triangulation without a link\n        >>> N.link() #doctest: +ELLIPSIS\n        Traceback (most recent call last):\n        ...\n        ValueError: No associated link known.\n\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_9plink = {"plink", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_9plink, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_8plink};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_9plink(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("plink (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("plink", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "plink", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_8plink(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_8plink(struct __pyx_obj_6SnapPy_Triangulation *__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;
  struct __pyx_opt_args_6SnapPy_13Triangulation_get_from_new_plink __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("plink", 1);

  /* "cython/core/triangulation.pyx":334
 * 
 *         """
 *         if self.LE is not None:             # <<<<<<<<<<<<<<
 *             self.LE.reopen()
 *         elif self._link_file_full_path is not None:
 */
  __pyx_t_1 = (__pyx_v_self->LE != Py_None);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":335
 *         """
 *         if self.LE is not None:
 *             self.LE.reopen()             # <<<<<<<<<<<<<<
 *         elif self._link_file_full_path is not None:
 *             self.get_from_new_plink(self._link_file_full_path)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->LE, __pyx_n_s_reopen); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 335, __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(3, 335, __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;

    /* "cython/core/triangulation.pyx":334
 * 
 *         """
 *         if self.LE is not None:             # <<<<<<<<<<<<<<
 *             self.LE.reopen()
 *         elif self._link_file_full_path is not None:
 */
    goto __pyx_L3;
  }

  /* "cython/core/triangulation.pyx":336
 *         if self.LE is not None:
 *             self.LE.reopen()
 *         elif self._link_file_full_path is not None:             # <<<<<<<<<<<<<<
 *             self.get_from_new_plink(self._link_file_full_path)
 *         elif self.DT_code() is not None:
 */
  __pyx_t_1 = (__pyx_v_self->_link_file_full_path != Py_None);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":337
 *             self.LE.reopen()
 *         elif self._link_file_full_path is not None:
 *             self.get_from_new_plink(self._link_file_full_path)             # <<<<<<<<<<<<<<
 *         elif self.DT_code() is not None:
 *             self.get_from_new_plink()
 */
    __pyx_t_2 = __pyx_v_self->_link_file_full_path;
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_6.__pyx_n = 1;
    __pyx_t_6.file_name = __pyx_t_2;
    __pyx_t_3 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->get_from_new_plink(__pyx_v_self, &__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 337, __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;

    /* "cython/core/triangulation.pyx":336
 *         if self.LE is not None:
 *             self.LE.reopen()
 *         elif self._link_file_full_path is not None:             # <<<<<<<<<<<<<<
 *             self.get_from_new_plink(self._link_file_full_path)
 *         elif self.DT_code() is not None:
 */
    goto __pyx_L3;
  }

  /* "cython/core/triangulation.pyx":338
 *         elif self._link_file_full_path is not None:
 *             self.get_from_new_plink(self._link_file_full_path)
 *         elif self.DT_code() is not None:             # <<<<<<<<<<<<<<
 *             self.get_from_new_plink()
 *             L = spherogram.DTcodec(*self.DT_code(flips=True)).link()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DT_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 338, __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(3, 338, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_1 = (__pyx_t_3 != Py_None);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":339
 *             self.get_from_new_plink(self._link_file_full_path)
 *         elif self.DT_code() is not None:
 *             self.get_from_new_plink()             # <<<<<<<<<<<<<<
 *             L = spherogram.DTcodec(*self.DT_code(flips=True)).link()
 *             L.view(self.LE)
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->get_from_new_plink(__pyx_v_self, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 339, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":340
 *         elif self.DT_code() is not None:
 *             self.get_from_new_plink()
 *             L = spherogram.DTcodec(*self.DT_code(flips=True)).link()             # <<<<<<<<<<<<<<
 *             L.view(self.LE)
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_spherogram); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DTcodec); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DT_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_flips, Py_True) < 0) __PYX_ERR(3, 340, __pyx_L1_error)
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PySequence_Tuple(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_link); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 340, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __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_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_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 340, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_v_L = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":341
 *             self.get_from_new_plink()
 *             L = spherogram.DTcodec(*self.DT_code(flips=True)).link()
 *             L.view(self.LE)             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('No associated link known.')
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_L, __pyx_n_s_view); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    __pyx_t_5 = 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_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_self->LE};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 341, __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;

    /* "cython/core/triangulation.pyx":338
 *         elif self._link_file_full_path is not None:
 *             self.get_from_new_plink(self._link_file_full_path)
 *         elif self.DT_code() is not None:             # <<<<<<<<<<<<<<
 *             self.get_from_new_plink()
 *             L = spherogram.DTcodec(*self.DT_code(flips=True)).link()
 */
    goto __pyx_L3;
  }

  /* "cython/core/triangulation.pyx":343
 *             L.view(self.LE)
 *         else:
 *             raise ValueError('No associated link known.')             # <<<<<<<<<<<<<<
 * 
 *     def link(self):
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 343, __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(3, 343, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cython/core/triangulation.pyx":319
 *             return dict(self._cover_info)
 * 
 *     def plink(self):             # <<<<<<<<<<<<<<
 *         """
 *         Brings up a link editor window if the manifold is stored
 */

  /* 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_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("SnapPy.Triangulation.plink", __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;
}

/* "cython/core/triangulation.pyx":345
 *             raise ValueError('No associated link known.')
 * 
 *     def link(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the manifold is stored as a link complement in your
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_11link(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_6SnapPy_13Triangulation_10link, "Triangulation.link(self)\n\n        If the manifold is stored as a link complement in your\n        current session then it returns the number of components\n        and crossing of the link. To view and interact with the\n        link see :py:meth:`spherogram.Link.view`\n        and :py:meth:`Manifold.plink`.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_11link = {"link", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_11link, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_10link};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_11link(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("link (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("link", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "link", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_10link(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_10link(struct __pyx_obj_6SnapPy_Triangulation *__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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("link", 1);

  /* "cython/core/triangulation.pyx":353
 *         and :py:meth:`Manifold.plink`.
 *         """
 *         if self._PDcode is not None:             # <<<<<<<<<<<<<<
 *             return spherogram.Link(self._PDcode)
 *         elif self.DT_code() is not None:
 */
  __pyx_t_1 = (__pyx_v_self->_PDcode != Py_None);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":354
 *         """
 *         if self._PDcode is not None:
 *             return spherogram.Link(self._PDcode)             # <<<<<<<<<<<<<<
 *         elif self.DT_code() is not None:
 *             return spherogram.DTcodec(*self.DT_code(flips=True)).link()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_spherogram); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Link); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 354, __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_v_self->_PDcode};
      __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(3, 354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":353
 *         and :py:meth:`Manifold.plink`.
 *         """
 *         if self._PDcode is not None:             # <<<<<<<<<<<<<<
 *             return spherogram.Link(self._PDcode)
 *         elif self.DT_code() is not None:
 */
  }

  /* "cython/core/triangulation.pyx":355
 *         if self._PDcode is not None:
 *             return spherogram.Link(self._PDcode)
 *         elif self.DT_code() is not None:             # <<<<<<<<<<<<<<
 *             return spherogram.DTcodec(*self.DT_code(flips=True)).link()
 *         else:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DT_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(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, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 355, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_1 = (__pyx_t_2 != Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":356
 *             return spherogram.Link(self._PDcode)
 *         elif self.DT_code() is not None:
 *             return spherogram.DTcodec(*self.DT_code(flips=True)).link()             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError('No associated link known.')
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_spherogram); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DTcodec); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_DT_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_flips, Py_True) < 0) __PYX_ERR(3, 356, __pyx_L1_error)
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PySequence_Tuple(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_link); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 356, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_5 = 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_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __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(3, 356, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":355
 *         if self._PDcode is not None:
 *             return spherogram.Link(self._PDcode)
 *         elif self.DT_code() is not None:             # <<<<<<<<<<<<<<
 *             return spherogram.DTcodec(*self.DT_code(flips=True)).link()
 *         else:
 */
  }

  /* "cython/core/triangulation.pyx":358
 *             return spherogram.DTcodec(*self.DT_code(flips=True)).link()
 *         else:
 *             raise ValueError('No associated link known.')             # <<<<<<<<<<<<<<
 * 
 *     cdef set_c_triangulation(self, c_Triangulation* c_triangulation):
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 358, __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(3, 358, __pyx_L1_error)
  }

  /* "cython/core/triangulation.pyx":345
 *             raise ValueError('No associated link known.')
 * 
 *     def link(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the manifold is stored as a link complement in your
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.Triangulation.link", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":360
 *             raise ValueError('No associated link known.')
 * 
 *     cdef set_c_triangulation(self, c_Triangulation* c_triangulation):             # <<<<<<<<<<<<<<
 *         self.c_triangulation = c_triangulation
 * 
 */

static PyObject *__pyx_f_6SnapPy_13Triangulation_set_c_triangulation(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, Triangulation *__pyx_v_c_triangulation) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_c_triangulation", 1);

  /* "cython/core/triangulation.pyx":361
 * 
 *     cdef set_c_triangulation(self, c_Triangulation* c_triangulation):
 *         self.c_triangulation = c_triangulation             # <<<<<<<<<<<<<<
 * 
 *     def num_cusps(self, cusp_type='all'):
 */
  __pyx_v_self->c_triangulation = __pyx_v_c_triangulation;

  /* "cython/core/triangulation.pyx":360
 *             raise ValueError('No associated link known.')
 * 
 *     cdef set_c_triangulation(self, c_Triangulation* c_triangulation):             # <<<<<<<<<<<<<<
 *         self.c_triangulation = c_triangulation
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":363
 *         self.c_triangulation = c_triangulation
 * 
 *     def num_cusps(self, cusp_type='all'):             # <<<<<<<<<<<<<<
 *         """
 *         Return the total number of cusps.  By giving the optional argument
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_13num_cusps(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_6SnapPy_13Triangulation_12num_cusps, "Triangulation.num_cusps(self, cusp_type='all')\n\n        Return the total number of cusps.  By giving the optional argument\n        'orientable' or 'nonorientable' it will only count cusps of that type.\n\n        >>> M = Triangulation('m125')\n        >>> M.num_cusps()\n        2\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_13num_cusps = {"num_cusps", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_13num_cusps, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_12num_cusps};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_13num_cusps(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_cusp_type = 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("num_cusps (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_cusp_type,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_s_all));
    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_cusp_type);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 363, __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, "num_cusps") < 0)) __PYX_ERR(3, 363, __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_cusp_type = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("num_cusps", 0, 0, 1, __pyx_nargs); __PYX_ERR(3, 363, __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("SnapPy.Triangulation.num_cusps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_12num_cusps(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_cusp_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_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6SnapPy_13Triangulation_12num_cusps(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_cusp_type) {
  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("num_cusps", 1);

  /* "cython/core/triangulation.pyx":372
 *         2
 *         """
 *         if cusp_type == 'all':             # <<<<<<<<<<<<<<
 *             return get_num_cusps(self.c_triangulation)
 *         elif cusp_type == 'orientable':
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_cusp_type, __pyx_n_s_all, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 372, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":373
 *         """
 *         if cusp_type == 'all':
 *             return get_num_cusps(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         elif cusp_type == 'orientable':
 *             return get_num_or_cusps(self.c_triangulation)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = get_num_cusps(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 373, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":372
 *         2
 *         """
 *         if cusp_type == 'all':             # <<<<<<<<<<<<<<
 *             return get_num_cusps(self.c_triangulation)
 *         elif cusp_type == 'orientable':
 */
  }

  /* "cython/core/triangulation.pyx":374
 *         if cusp_type == 'all':
 *             return get_num_cusps(self.c_triangulation)
 *         elif cusp_type == 'orientable':             # <<<<<<<<<<<<<<
 *             return get_num_or_cusps(self.c_triangulation)
 *         elif cusp_type == 'nonorientable':
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_cusp_type, __pyx_n_s_orientable, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 374, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":375
 *             return get_num_cusps(self.c_triangulation)
 *         elif cusp_type == 'orientable':
 *             return get_num_or_cusps(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         elif cusp_type == 'nonorientable':
 *             return get_num_nonor_cusps(self.c_triangulation)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = get_num_or_cusps(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 375, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":374
 *         if cusp_type == 'all':
 *             return get_num_cusps(self.c_triangulation)
 *         elif cusp_type == 'orientable':             # <<<<<<<<<<<<<<
 *             return get_num_or_cusps(self.c_triangulation)
 *         elif cusp_type == 'nonorientable':
 */
  }

  /* "cython/core/triangulation.pyx":376
 *         elif cusp_type == 'orientable':
 *             return get_num_or_cusps(self.c_triangulation)
 *         elif cusp_type == 'nonorientable':             # <<<<<<<<<<<<<<
 *             return get_num_nonor_cusps(self.c_triangulation)
 *         else:
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_cusp_type, __pyx_n_s_nonorientable, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 376, __pyx_L1_error)
  if (likely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":377
 *             return get_num_or_cusps(self.c_triangulation)
 *         elif cusp_type == 'nonorientable':
 *             return get_num_nonor_cusps(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError("Acceptable cusp types are "
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = get_num_nonor_cusps(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 377, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":376
 *         elif cusp_type == 'orientable':
 *             return get_num_or_cusps(self.c_triangulation)
 *         elif cusp_type == 'nonorientable':             # <<<<<<<<<<<<<<
 *             return get_num_nonor_cusps(self.c_triangulation)
 *         else:
 */
  }

  /* "cython/core/triangulation.pyx":379
 *             return get_num_nonor_cusps(self.c_triangulation)
 *         else:
 *             raise ValueError("Acceptable cusp types are "             # <<<<<<<<<<<<<<
 *                              "['all', 'orientable', 'nonorientable'].")
 * 
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 379, __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(3, 379, __pyx_L1_error)
  }

  /* "cython/core/triangulation.pyx":363
 *         self.c_triangulation = c_triangulation
 * 
 *     def num_cusps(self, cusp_type='all'):             # <<<<<<<<<<<<<<
 *         """
 *         Return the total number of cusps.  By giving the optional argument
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.Triangulation.num_cusps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":382
 *                              "['all', 'orientable', 'nonorientable'].")
 * 
 *     def _num_fake_cusps(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the number of "fake" cusps, which is typically the number
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_15_num_fake_cusps(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_6SnapPy_13Triangulation_14_num_fake_cusps, "Triangulation._num_fake_cusps(self)\n\n        Returns the number of \"fake\" cusps, which is typically the number\n        of finite vertices.\n\n        >>> M = Triangulation('m004(1,2)')\n        >>> F = M.filled_triangulation()\n        >>> F.num_cusps(),  F._num_fake_cusps()\n        (0, 1)\n        >>> S = Triangulation('bkaagb', remove_finite_vertices=False)\n        >>> S.num_cusps(),  S._num_fake_cusps()\n        (0, 2)\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_15_num_fake_cusps = {"_num_fake_cusps", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_15_num_fake_cusps, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_14_num_fake_cusps};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_15_num_fake_cusps(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("_num_fake_cusps (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("_num_fake_cusps", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_num_fake_cusps", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_14_num_fake_cusps(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_14_num_fake_cusps(struct __pyx_obj_6SnapPy_Triangulation *__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("_num_fake_cusps", 1);

  /* "cython/core/triangulation.pyx":395
 *         (0, 2)
 *         """
 *         count_cusps(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         return get_num_fake_cusps(self.c_triangulation)
 * 
 */
  count_cusps(__pyx_v_self->c_triangulation);

  /* "cython/core/triangulation.pyx":396
 *         """
 *         count_cusps(self.c_triangulation)
 *         return get_num_fake_cusps(self.c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *     def orientation_cover(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = get_num_fake_cusps(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 396, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":382
 *                              "['all', 'orientable', 'nonorientable'].")
 * 
 *     def _num_fake_cusps(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the number of "fake" cusps, which is typically the number
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.Triangulation._num_fake_cusps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":398
 *         return get_num_fake_cusps(self.c_triangulation)
 * 
 *     def orientation_cover(self):             # <<<<<<<<<<<<<<
 *         """
 *         For a non-orientable Triangulation, returns the 2-fold cover which
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_17orientation_cover(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_6SnapPy_13Triangulation_16orientation_cover, "Triangulation.orientation_cover(self)\n\n        For a non-orientable Triangulation, returns the 2-fold cover which\n        is orientable.\n\n        >>> X = Triangulation('x123')\n        >>> Y = X.orientation_cover()\n        >>> (X.is_orientable(), Y.is_orientable())\n        (False, True)\n        >>> Y\n        x123~(0,0)(0,0)\n        >>> Y.cover_info()['type']\n        'cyclic'\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_17orientation_cover = {"orientation_cover", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_17orientation_cover, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_16orientation_cover};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_17orientation_cover(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("orientation_cover (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("orientation_cover", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "orientation_cover", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_16orientation_cover(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_16orientation_cover(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  Triangulation *__pyx_v_cover_c_triangulation;
  struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_new_tri = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  Triangulation *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("orientation_cover", 1);

  /* "cython/core/triangulation.pyx":412
 *         'cyclic'
 *         """
 *         if self.is_orientable():             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is already orientable.')
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_orientable); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 412, __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(3, 412, __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(3, 412, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_5)) {

    /* "cython/core/triangulation.pyx":413
 *         """
 *         if self.is_orientable():
 *             raise ValueError('The Triangulation is already orientable.')             # <<<<<<<<<<<<<<
 * 
 *         cdef c_Triangulation* cover_c_triangulation = NULL
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 413, __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(3, 413, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":412
 *         'cyclic'
 *         """
 *         if self.is_orientable():             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is already orientable.')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":415
 *             raise ValueError('The Triangulation is already orientable.')
 * 
 *         cdef c_Triangulation* cover_c_triangulation = NULL             # <<<<<<<<<<<<<<
 *         cdef Triangulation new_tri
 * 
 */
  __pyx_v_cover_c_triangulation = NULL;

  /* "cython/core/triangulation.pyx":418
 *         cdef Triangulation new_tri
 * 
 *         cover_c_triangulation = double_cover(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         new_tri = self.__class__('empty')
 *         new_tri.set_c_triangulation(cover_c_triangulation)
 */
  __pyx_t_6 = double_cover(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 418, __pyx_L1_error)
  __pyx_v_cover_c_triangulation = __pyx_t_6;

  /* "cython/core/triangulation.pyx":419
 * 
 *         cover_c_triangulation = double_cover(self.c_triangulation)
 *         new_tri = self.__class__('empty')             # <<<<<<<<<<<<<<
 *         new_tri.set_c_triangulation(cover_c_triangulation)
 *         new_tri.set_name(self.name() + '~')
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 419, __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, __pyx_n_s_empty};
    __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(3, 419, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6SnapPy_Triangulation))))) __PYX_ERR(3, 419, __pyx_L1_error)
  __pyx_v_new_tri = ((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":420
 *         cover_c_triangulation = double_cover(self.c_triangulation)
 *         new_tri = self.__class__('empty')
 *         new_tri.set_c_triangulation(cover_c_triangulation)             # <<<<<<<<<<<<<<
 *         new_tri.set_name(self.name() + '~')
 *         new_tri._cover_info = {'base'   : self.name(),
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_new_tri->__pyx_vtab)->set_c_triangulation(__pyx_v_new_tri, __pyx_v_cover_c_triangulation); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":421
 *         new_tri = self.__class__('empty')
 *         new_tri.set_c_triangulation(cover_c_triangulation)
 *         new_tri.set_name(self.name() + '~')             # <<<<<<<<<<<<<<
 *         new_tri._cover_info = {'base'   : self.name(),
 *                                'type'   : 'cyclic',
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_new_tri), __pyx_n_s_set_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __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, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_t_7 = PyNumber_Add(__pyx_t_3, __pyx_kp_s__38); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __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_t_7};
    __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_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 421, __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;

  /* "cython/core/triangulation.pyx":422
 *         new_tri.set_c_triangulation(cover_c_triangulation)
 *         new_tri.set_name(self.name() + '~')
 *         new_tri._cover_info = {'base'   : self.name(),             # <<<<<<<<<<<<<<
 *                                'type'   : 'cyclic',
 *                                'degree' : 2}
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_base, __pyx_t_2) < 0) __PYX_ERR(3, 422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_type, __pyx_n_s_cyclic) < 0) __PYX_ERR(3, 422, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_degree, __pyx_int_2) < 0) __PYX_ERR(3, 422, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_new_tri->_cover_info);
  __Pyx_DECREF(__pyx_v_new_tri->_cover_info);
  __pyx_v_new_tri->_cover_info = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":425
 *                                'type'   : 'cyclic',
 *                                'degree' : 2}
 *         return new_tri             # <<<<<<<<<<<<<<
 * 
 *     def is_orientable(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_new_tri);
  __pyx_r = ((PyObject *)__pyx_v_new_tri);
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":398
 *         return get_num_fake_cusps(self.c_triangulation)
 * 
 *     def orientation_cover(self):             # <<<<<<<<<<<<<<
 *         """
 *         For a non-orientable Triangulation, returns the 2-fold cover which
 */

  /* 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_AddTraceback("SnapPy.Triangulation.orientation_cover", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_new_tri);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":427
 *         return new_tri
 * 
 *     def is_orientable(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the underlying 3-manifold is orientable.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_19is_orientable(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_6SnapPy_13Triangulation_18is_orientable, "Triangulation.is_orientable(self)\n\n        Return whether the underlying 3-manifold is orientable.\n\n        >>> M = Triangulation('x124')\n        >>> M.is_orientable()\n        False\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_19is_orientable = {"is_orientable", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_19is_orientable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_18is_orientable};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_19is_orientable(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("is_orientable (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("is_orientable", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_orientable", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_18is_orientable(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_18is_orientable(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  PyObject *__pyx_v_orientability = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Orientability __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("is_orientable", 1);

  /* "cython/core/triangulation.pyx":435
 *         False
 *         """
 *         orientability = Orientability[get_orientability(self.c_triangulation)]             # <<<<<<<<<<<<<<
 *         if orientability == 'orientable':
 *             return True
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Orientability); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = get_orientability(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 435, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_Orientability(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 435, __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_v_orientability = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":436
 *         """
 *         orientability = Orientability[get_orientability(self.c_triangulation)]
 *         if orientability == 'orientable':             # <<<<<<<<<<<<<<
 *             return True
 *         if orientability == 'nonorientable':
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_orientability, __pyx_n_s_orientable, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 436, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "cython/core/triangulation.pyx":437
 *         orientability = Orientability[get_orientability(self.c_triangulation)]
 *         if orientability == 'orientable':
 *             return True             # <<<<<<<<<<<<<<
 *         if orientability == 'nonorientable':
 *             return False
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":436
 *         """
 *         orientability = Orientability[get_orientability(self.c_triangulation)]
 *         if orientability == 'orientable':             # <<<<<<<<<<<<<<
 *             return True
 *         if orientability == 'nonorientable':
 */
  }

  /* "cython/core/triangulation.pyx":438
 *         if orientability == 'orientable':
 *             return True
 *         if orientability == 'nonorientable':             # <<<<<<<<<<<<<<
 *             return False
 *         return None
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_orientability, __pyx_n_s_nonorientable, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 438, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "cython/core/triangulation.pyx":439
 *             return True
 *         if orientability == 'nonorientable':
 *             return False             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":438
 *         if orientability == 'orientable':
 *             return True
 *         if orientability == 'nonorientable':             # <<<<<<<<<<<<<<
 *             return False
 *         return None
 */
  }

  /* "cython/core/triangulation.pyx":440
 *         if orientability == 'nonorientable':
 *             return False
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     def copy(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":427
 *         return new_tri
 * 
 *     def is_orientable(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the underlying 3-manifold is orientable.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("SnapPy.Triangulation.is_orientable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_orientability);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":442
 *         return None
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a copy of the triangulation.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_21copy(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_6SnapPy_13Triangulation_20copy, "Triangulation.copy(self)\n\n        Returns a copy of the triangulation.\n\n        >>> M = Triangulation('m125')\n        >>> N = M.copy()\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_21copy = {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_21copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_20copy};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_21copy(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("copy (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("copy", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_20copy(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_20copy(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  Triangulation *__pyx_v_copy_c_triangulation;
  struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_new_tri = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy", 1);

  /* "cython/core/triangulation.pyx":449
 *         >>> N = M.copy()
 *         """
 *         cdef c_Triangulation* copy_c_triangulation = NULL             # <<<<<<<<<<<<<<
 *         cdef Triangulation new_tri
 * 
 */
  __pyx_v_copy_c_triangulation = NULL;

  /* "cython/core/triangulation.pyx":452
 *         cdef Triangulation new_tri
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return self.__class__('empty')
 *         copy_triangulation(self.c_triangulation, &copy_c_triangulation)
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":453
 * 
 *         if self.c_triangulation is NULL:
 *             return self.__class__('empty')             # <<<<<<<<<<<<<<
 *         copy_triangulation(self.c_triangulation, &copy_c_triangulation)
 *         new_tri = self.__class__('empty')
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 453, __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_empty};
      __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(3, 453, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":452
 *         cdef Triangulation new_tri
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return self.__class__('empty')
 *         copy_triangulation(self.c_triangulation, &copy_c_triangulation)
 */
  }

  /* "cython/core/triangulation.pyx":454
 *         if self.c_triangulation is NULL:
 *             return self.__class__('empty')
 *         copy_triangulation(self.c_triangulation, &copy_c_triangulation)             # <<<<<<<<<<<<<<
 *         new_tri = self.__class__('empty')
 *         new_tri.set_c_triangulation(copy_c_triangulation)
 */
  copy_triangulation(__pyx_v_self->c_triangulation, (&__pyx_v_copy_c_triangulation)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 454, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":455
 *             return self.__class__('empty')
 *         copy_triangulation(self.c_triangulation, &copy_c_triangulation)
 *         new_tri = self.__class__('empty')             # <<<<<<<<<<<<<<
 *         new_tri.set_c_triangulation(copy_c_triangulation)
 *         return new_tri
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 455, __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_empty};
    __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(3, 455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6SnapPy_Triangulation))))) __PYX_ERR(3, 455, __pyx_L1_error)
  __pyx_v_new_tri = ((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":456
 *         copy_triangulation(self.c_triangulation, &copy_c_triangulation)
 *         new_tri = self.__class__('empty')
 *         new_tri.set_c_triangulation(copy_c_triangulation)             # <<<<<<<<<<<<<<
 *         return new_tri
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_new_tri->__pyx_vtab)->set_c_triangulation(__pyx_v_new_tri, __pyx_v_copy_c_triangulation); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":457
 *         new_tri = self.__class__('empty')
 *         new_tri.set_c_triangulation(copy_c_triangulation)
 *         return new_tri             # <<<<<<<<<<<<<<
 * 
 *     def randomize(self, blowup_multiple=4, passes_at_fours=6):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_new_tri);
  __pyx_r = ((PyObject *)__pyx_v_new_tri);
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":442
 *         return None
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a copy of the triangulation.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("SnapPy.Triangulation.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_new_tri);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":459
 *         return new_tri
 * 
 *     def randomize(self, blowup_multiple=4, passes_at_fours=6):             # <<<<<<<<<<<<<<
 *         """
 *         Perform random Pachner moves on the underlying triangulation,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_23randomize(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_6SnapPy_13Triangulation_22randomize, "Triangulation.randomize(self, blowup_multiple=4, passes_at_fours=6)\n\n        Perform random Pachner moves on the underlying triangulation,\n        including some initial 3 -> 2 moves that increase the number of\n        tetrahedra by blowup_multiple.\n\n        >>> M = Triangulation('Braid:[1,2,-3,-3,1,2]')\n        >>> M.randomize()\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_23randomize = {"randomize", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_23randomize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_22randomize};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_23randomize(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_blowup_multiple = 0;
  PyObject *__pyx_v_passes_at_fours = 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("randomize (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_blowup_multiple,&__pyx_n_s_passes_at_fours,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_4));
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_6));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_blowup_multiple);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 459, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_passes_at_fours);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 459, __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, "randomize") < 0)) __PYX_ERR(3, 459, __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);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_blowup_multiple = values[0];
    __pyx_v_passes_at_fours = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("randomize", 0, 0, 2, __pyx_nargs); __PYX_ERR(3, 459, __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("SnapPy.Triangulation.randomize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_22randomize(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_blowup_multiple, __pyx_v_passes_at_fours);

  /* 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_6SnapPy_13Triangulation_22randomize(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_blowup_multiple, PyObject *__pyx_v_passes_at_fours) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("randomize", 1);

  /* "cython/core/triangulation.pyx":468
 *         >>> M.randomize()
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return
 *         randomize_triangulation_with_options(self.c_triangulation, passes_at_fours, blowup_multiple)
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":469
 *         """
 *         if self.c_triangulation is NULL:
 *             return             # <<<<<<<<<<<<<<
 *         randomize_triangulation_with_options(self.c_triangulation, passes_at_fours, blowup_multiple)
 *         self._cache.clear(message='randomize')
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":468
 *         >>> M.randomize()
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return
 *         randomize_triangulation_with_options(self.c_triangulation, passes_at_fours, blowup_multiple)
 */
  }

  /* "cython/core/triangulation.pyx":470
 *         if self.c_triangulation is NULL:
 *             return
 *         randomize_triangulation_with_options(self.c_triangulation, passes_at_fours, blowup_multiple)             # <<<<<<<<<<<<<<
 *         self._cache.clear(message='randomize')
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_passes_at_fours); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 470, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_blowup_multiple); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 470, __pyx_L1_error)
  randomize_triangulation_with_options(__pyx_v_self->c_triangulation, __pyx_t_2, __pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 470, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":471
 *             return
 *         randomize_triangulation_with_options(self.c_triangulation, passes_at_fours, blowup_multiple)
 *         self._cache.clear(message='randomize')             # <<<<<<<<<<<<<<
 * 
 *     def simplify(self, passes_at_fours=6):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_cache, __pyx_n_s_clear); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_message, __pyx_n_s_randomize) < 0) __PYX_ERR(3, 471, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cython/core/triangulation.pyx":459
 *         return new_tri
 * 
 *     def randomize(self, blowup_multiple=4, passes_at_fours=6):             # <<<<<<<<<<<<<<
 *         """
 *         Perform random Pachner moves on the underlying triangulation,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.Triangulation.randomize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":473
 *         self._cache.clear(message='randomize')
 * 
 *     def simplify(self, passes_at_fours=6):             # <<<<<<<<<<<<<<
 *         """
 *         Try to simplify the triangulation by doing Pachner moves.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_25simplify(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_6SnapPy_13Triangulation_24simplify, "Triangulation.simplify(self, passes_at_fours=6)\n\n        Try to simplify the triangulation by doing Pachner moves.\n\n        >>> M = Triangulation('12n123')\n        >>> M.simplify()\n\n        It does four kinds of moves that reduce the number of\n        tetrahedra:\n\n        * 3 -> 2 and 2 -> 0 Pacher moves, which eliminate one or two\n          tetrahedra respectively.\n\n        * On suitable valence-1 edges, does a 2 -> 3 and then 2 -> 0 move,\n          which removes a tetrahedron and creates a new valence-1 edge.\n\n        * When a 2-simplex has two edges of valence-4 giving rise to the\n          suspension of a pentagon, replace these 6 tetrahedra with a\n          single edge of valence 5.\n\n        It also does random 4 -> 4 moves in hopes of setting up a\n        simplfication.  The argument passes_at_fours is the number of\n        times it goes through the valence-4 edges without progress\n        before giving up.\n\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_25simplify = {"simplify", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_25simplify, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_24simplify};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_25simplify(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_passes_at_fours = 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("simplify (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_passes_at_fours,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_6));
    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_passes_at_fours);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 473, __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, "simplify") < 0)) __PYX_ERR(3, 473, __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_passes_at_fours = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("simplify", 0, 0, 1, __pyx_nargs); __PYX_ERR(3, 473, __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("SnapPy.Triangulation.simplify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_24simplify(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_passes_at_fours);

  /* 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_6SnapPy_13Triangulation_24simplify(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_passes_at_fours) {
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("simplify", 1);

  /* "cython/core/triangulation.pyx":499
 * 
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return
 *         basic_simplification_with_options(self.c_triangulation, passes_at_fours)
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":500
 *         """
 *         if self.c_triangulation is NULL:
 *             return             # <<<<<<<<<<<<<<
 *         basic_simplification_with_options(self.c_triangulation, passes_at_fours)
 *         self._cache.clear(message='simplify')
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":499
 * 
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return
 *         basic_simplification_with_options(self.c_triangulation, passes_at_fours)
 */
  }

  /* "cython/core/triangulation.pyx":501
 *         if self.c_triangulation is NULL:
 *             return
 *         basic_simplification_with_options(self.c_triangulation, passes_at_fours)             # <<<<<<<<<<<<<<
 *         self._cache.clear(message='simplify')
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_passes_at_fours); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 501, __pyx_L1_error)
  basic_simplification_with_options(__pyx_v_self->c_triangulation, __pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 501, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":502
 *             return
 *         basic_simplification_with_options(self.c_triangulation, passes_at_fours)
 *         self._cache.clear(message='simplify')             # <<<<<<<<<<<<<<
 * 
 *     def _two_to_three(self, tet_num, face_index):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_cache, __pyx_n_s_clear); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_message, __pyx_n_s_simplify) < 0) __PYX_ERR(3, 502, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/triangulation.pyx":473
 *         self._cache.clear(message='randomize')
 * 
 *     def simplify(self, passes_at_fours=6):             # <<<<<<<<<<<<<<
 *         """
 *         Try to simplify the triangulation by doing Pachner moves.
 */

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

/* "cython/core/triangulation.pyx":504
 *         self._cache.clear(message='simplify')
 * 
 *     def _two_to_three(self, tet_num, face_index):             # <<<<<<<<<<<<<<
 *         """
 *         Performs a 2-3 move which removes a given face.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_27_two_to_three(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_6SnapPy_13Triangulation_26_two_to_three, "Triangulation._two_to_three(self, tet_num, face_index)\n\n        Performs a 2-3 move which removes a given face.\n\n        The face is specified by giving the index of one of the\n        tetrahedra which contains the face, as well as the index of that\n        face within the tetrahedron (i.e. the index of the vertex\n        opposite the face).\n\n        If the face is not adjacent to two distinct tetrahedra, this\n        function does nothing and returns a non-zero value.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_27_two_to_three = {"_two_to_three", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_27_two_to_three, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_26_two_to_three};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_27_two_to_three(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_tet_num = 0;
  PyObject *__pyx_v_face_index = 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("_two_to_three (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_tet_num,&__pyx_n_s_face_index,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_tet_num)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 504, __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_face_index)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 504, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_two_to_three", 1, 2, 2, 1); __PYX_ERR(3, 504, __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, "_two_to_three") < 0)) __PYX_ERR(3, 504, __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_tet_num = values[0];
    __pyx_v_face_index = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_two_to_three", 1, 2, 2, __pyx_nargs); __PYX_ERR(3, 504, __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("SnapPy.Triangulation._two_to_three", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_26_two_to_three(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_tet_num, __pyx_v_face_index);

  /* 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_6SnapPy_13Triangulation_26_two_to_three(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_tet_num, PyObject *__pyx_v_face_index) {
  FuncResult __pyx_v_result;
  Tetrahedron *__pyx_v_tet;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_f = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Tetrahedron *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_two_to_three", 1);

  /* "cython/core/triangulation.pyx":520
 *         cdef c_Tetrahedron* tet
 * 
 *         n = valid_index(             # <<<<<<<<<<<<<<
 *             tet_num, self.num_tetrahedra(),
 *             "The specified tetrahedron (%s) does not exist.")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_valid_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cython/core/triangulation.pyx":521
 * 
 *         n = valid_index(
 *             tet_num, self.num_tetrahedra(),             # <<<<<<<<<<<<<<
 *             "The specified tetrahedron (%s) does not exist.")
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_tetrahedra); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 521, __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(3, 521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __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_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_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_tet_num, __pyx_t_3, __pyx_kp_s_The_specified_tetrahedron_s_does};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_n = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":524
 *             "The specified tetrahedron (%s) does not exist.")
 * 
 *         f = valid_index(             # <<<<<<<<<<<<<<
 *             face_index, 4,
 *             "The specified face index (%s) is invalid.")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_valid_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cython/core/triangulation.pyx":525
 * 
 *         f = valid_index(
 *             face_index, 4,             # <<<<<<<<<<<<<<
 *             "The specified face index (%s) is invalid.")
 * 
 */
  __pyx_t_3 = NULL;
  __pyx_t_6 = 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_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_face_index, __pyx_int_4, __pyx_kp_s_The_specified_face_index_s_is_in};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 524, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_f = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":528
 *             "The specified face index (%s) is invalid.")
 * 
 *         tet = self.c_triangulation.tet_list_begin.next             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             tet = tet.next
 */
  __pyx_t_7 = __pyx_v_self->c_triangulation->tet_list_begin.next;
  __pyx_v_tet = __pyx_t_7;

  /* "cython/core/triangulation.pyx":529
 * 
 *         tet = self.c_triangulation.tet_list_begin.next
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             tet = tet.next
 *         result = two_to_three(tet, f, &self.c_triangulation.num_tetrahedra)
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  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_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 529, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_9)) {
      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(3, 529, __pyx_L1_error)
          #endif
          if (__pyx_t_8 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 529, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 529, __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(3, 529, __pyx_L1_error)
          #endif
          if (__pyx_t_8 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 529, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 529, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_9(__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(3, 529, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cython/core/triangulation.pyx":530
 *         tet = self.c_triangulation.tet_list_begin.next
 *         for i in range(n):
 *             tet = tet.next             # <<<<<<<<<<<<<<
 *         result = two_to_three(tet, f, &self.c_triangulation.num_tetrahedra)
 * 
 */
    __pyx_t_7 = __pyx_v_tet->next;
    __pyx_v_tet = __pyx_t_7;

    /* "cython/core/triangulation.pyx":529
 * 
 *         tet = self.c_triangulation.tet_list_begin.next
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             tet = tet.next
 *         result = two_to_three(tet, f, &self.c_triangulation.num_tetrahedra)
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":531
 *         for i in range(n):
 *             tet = tet.next
 *         result = two_to_three(tet, f, &self.c_triangulation.num_tetrahedra)             # <<<<<<<<<<<<<<
 * 
 *         if result == func_OK:
 */
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_f); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 531, __pyx_L1_error)
  __pyx_v_result = two_to_three(__pyx_v_tet, __pyx_t_6, (&__pyx_v_self->c_triangulation->num_tetrahedra));

  /* "cython/core/triangulation.pyx":533
 *         result = two_to_three(tet, f, &self.c_triangulation.num_tetrahedra)
 * 
 *         if result == func_OK:             # <<<<<<<<<<<<<<
 *             self._cache.clear(message = '2-3 move')
 *             self._polish_hyperbolic_structures()
 */
  __pyx_t_10 = (__pyx_v_result == func_OK);
  if (__pyx_t_10) {

    /* "cython/core/triangulation.pyx":534
 * 
 *         if result == func_OK:
 *             self._cache.clear(message = '2-3 move')             # <<<<<<<<<<<<<<
 *             self._polish_hyperbolic_structures()
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_cache, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_message, __pyx_kp_s_2_3_move) < 0) __PYX_ERR(3, 534, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 534, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":535
 *         if result == func_OK:
 *             self._cache.clear(message = '2-3 move')
 *             self._polish_hyperbolic_structures()             # <<<<<<<<<<<<<<
 * 
 *         return result
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_polish_hyperbolic_structures); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 535, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 535, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":533
 *         result = two_to_three(tet, f, &self.c_triangulation.num_tetrahedra)
 * 
 *         if result == func_OK:             # <<<<<<<<<<<<<<
 *             self._cache.clear(message = '2-3 move')
 *             self._polish_hyperbolic_structures()
 */
  }

  /* "cython/core/triangulation.pyx":537
 *             self._polish_hyperbolic_structures()
 * 
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def _three_to_two(self, tet_num, edge_index):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_FuncResult(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":504
 *         self._cache.clear(message='simplify')
 * 
 *     def _two_to_three(self, tet_num, face_index):             # <<<<<<<<<<<<<<
 *         """
 *         Performs a 2-3 move which removes a given face.
 */

  /* 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("SnapPy.Triangulation._two_to_three", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":539
 *         return result
 * 
 *     def _three_to_two(self, tet_num, edge_index):             # <<<<<<<<<<<<<<
 *         r"""
 *         Perform a 3-2 move which removes a given 3-valent edge.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_29_three_to_two(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_6SnapPy_13Triangulation_28_three_to_two, "Triangulation._three_to_two(self, tet_num, edge_index)\n\n        Perform a 3-2 move which removes a given 3-valent edge.\n\n        The edge is specified by giving the index of one of the tetrahedra which\n        contains the edge, as well as the index of that edge within the\n        tetrahedron (see below).\n\n        If specified edge is not 3-valent or the three adjacent tetrahedra are\n        not distinct, the function does nothing and returns a non-zero value.\n\n                 1\n                /|\\\n               / | \\\n              2  5  1\n             /   |   \\\n            2--0-|----3\n             \\   |   /\n              4  |  3\n               \\ | /\n                \\|/\n                 0\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_29_three_to_two = {"_three_to_two", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_29_three_to_two, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_28_three_to_two};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_29_three_to_two(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_tet_num = 0;
  PyObject *__pyx_v_edge_index = 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("_three_to_two (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_tet_num,&__pyx_n_s_edge_index,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_tet_num)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 539, __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_edge_index)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 539, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_three_to_two", 1, 2, 2, 1); __PYX_ERR(3, 539, __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, "_three_to_two") < 0)) __PYX_ERR(3, 539, __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_tet_num = values[0];
    __pyx_v_edge_index = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_three_to_two", 1, 2, 2, __pyx_nargs); __PYX_ERR(3, 539, __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("SnapPy.Triangulation._three_to_two", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_28_three_to_two(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_tet_num, __pyx_v_edge_index);

  /* 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_6SnapPy_13Triangulation_28_three_to_two(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_tet_num, PyObject *__pyx_v_edge_index) {
  FuncResult __pyx_v_result;
  Tetrahedron *__pyx_v_tet;
  EdgeClass *__pyx_v_where_to_resume;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  PyObject *__pyx_v_e = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Tetrahedron *__pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_three_to_two", 1);

  /* "cython/core/triangulation.pyx":566
 *         cdef EdgeClass* where_to_resume
 * 
 *         _ = valid_index(             # <<<<<<<<<<<<<<
 *             tet_num, self.num_tetrahedra(),
 *             "The specified tetrahedron (%s) does not exist.")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_valid_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cython/core/triangulation.pyx":567
 * 
 *         _ = valid_index(
 *             tet_num, self.num_tetrahedra(),             # <<<<<<<<<<<<<<
 *             "The specified tetrahedron (%s) does not exist.")
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_tetrahedra); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 567, __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(3, 567, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __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_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_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_tet_num, __pyx_t_3, __pyx_kp_s_The_specified_tetrahedron_s_does};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v__ = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":570
 *             "The specified tetrahedron (%s) does not exist.")
 * 
 *         e = valid_index(             # <<<<<<<<<<<<<<
 *             edge_index, 6,
 *             "The specified edge index (%s) is invalid.")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_valid_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cython/core/triangulation.pyx":571
 * 
 *         e = valid_index(
 *             edge_index, 6,             # <<<<<<<<<<<<<<
 *             "The specified edge index (%s) is invalid.")
 * 
 */
  __pyx_t_3 = NULL;
  __pyx_t_6 = 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_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_edge_index, __pyx_int_6, __pyx_kp_s_The_specified_edge_index_s_is_in};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 570, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_e = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":574
 *             "The specified edge index (%s) is invalid.")
 * 
 *         tet = self.c_triangulation.tet_list_begin.next             # <<<<<<<<<<<<<<
 *         for i in range(tet_num):
 *             tet = tet.next
 */
  __pyx_t_7 = __pyx_v_self->c_triangulation->tet_list_begin.next;
  __pyx_v_tet = __pyx_t_7;

  /* "cython/core/triangulation.pyx":575
 * 
 *         tet = self.c_triangulation.tet_list_begin.next
 *         for i in range(tet_num):             # <<<<<<<<<<<<<<
 *             tet = tet.next
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_tet_num); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  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_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 575, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_9)) {
      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(3, 575, __pyx_L1_error)
          #endif
          if (__pyx_t_8 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 575, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 575, __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(3, 575, __pyx_L1_error)
          #endif
          if (__pyx_t_8 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 575, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 575, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_9(__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(3, 575, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cython/core/triangulation.pyx":576
 *         tet = self.c_triangulation.tet_list_begin.next
 *         for i in range(tet_num):
 *             tet = tet.next             # <<<<<<<<<<<<<<
 * 
 *         if tet.edge_class[e].order != 3:
 */
    __pyx_t_7 = __pyx_v_tet->next;
    __pyx_v_tet = __pyx_t_7;

    /* "cython/core/triangulation.pyx":575
 * 
 *         tet = self.c_triangulation.tet_list_begin.next
 *         for i in range(tet_num):             # <<<<<<<<<<<<<<
 *             tet = tet.next
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":578
 *             tet = tet.next
 * 
 *         if tet.edge_class[e].order != 3:             # <<<<<<<<<<<<<<
 *             return func_failed
 * 
 */
  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_e); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 578, __pyx_L1_error)
  __pyx_t_10 = ((__pyx_v_tet->edge_class[__pyx_t_8])->order != 3);
  if (__pyx_t_10) {

    /* "cython/core/triangulation.pyx":579
 * 
 *         if tet.edge_class[e].order != 3:
 *             return func_failed             # <<<<<<<<<<<<<<
 * 
 *         result = three_to_two(tet.edge_class[e], &where_to_resume,
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_FuncResult(func_failed); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":578
 *             tet = tet.next
 * 
 *         if tet.edge_class[e].order != 3:             # <<<<<<<<<<<<<<
 *             return func_failed
 * 
 */
  }

  /* "cython/core/triangulation.pyx":581
 *             return func_failed
 * 
 *         result = three_to_two(tet.edge_class[e], &where_to_resume,             # <<<<<<<<<<<<<<
 *                               &self.c_triangulation.num_tetrahedra)
 * 
 */
  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_e); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 581, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":582
 * 
 *         result = three_to_two(tet.edge_class[e], &where_to_resume,
 *                               &self.c_triangulation.num_tetrahedra)             # <<<<<<<<<<<<<<
 * 
 *         if result == func_OK:
 */
  __pyx_v_result = three_to_two((__pyx_v_tet->edge_class[__pyx_t_8]), (&__pyx_v_where_to_resume), (&__pyx_v_self->c_triangulation->num_tetrahedra));

  /* "cython/core/triangulation.pyx":584
 *                               &self.c_triangulation.num_tetrahedra)
 * 
 *         if result == func_OK:             # <<<<<<<<<<<<<<
 *             self._cache.clear(message = '3-2 move')
 *             self._polish_hyperbolic_structures()
 */
  __pyx_t_10 = (__pyx_v_result == func_OK);
  if (__pyx_t_10) {

    /* "cython/core/triangulation.pyx":585
 * 
 *         if result == func_OK:
 *             self._cache.clear(message = '3-2 move')             # <<<<<<<<<<<<<<
 *             self._polish_hyperbolic_structures()
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_cache, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_message, __pyx_kp_s_3_2_move) < 0) __PYX_ERR(3, 585, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":586
 *         if result == func_OK:
 *             self._cache.clear(message = '3-2 move')
 *             self._polish_hyperbolic_structures()             # <<<<<<<<<<<<<<
 * 
 *         return result
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_polish_hyperbolic_structures); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 586, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 586, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":584
 *                               &self.c_triangulation.num_tetrahedra)
 * 
 *         if result == func_OK:             # <<<<<<<<<<<<<<
 *             self._cache.clear(message = '3-2 move')
 *             self._polish_hyperbolic_structures()
 */
  }

  /* "cython/core/triangulation.pyx":588
 *             self._polish_hyperbolic_structures()
 * 
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def with_hyperbolic_structure(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_FuncResult(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 588, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":539
 *         return result
 * 
 *     def _three_to_two(self, tet_num, edge_index):             # <<<<<<<<<<<<<<
 *         r"""
 *         Perform a 3-2 move which removes a given 3-valent edge.
 */

  /* 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("SnapPy.Triangulation._three_to_two", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":590
 *         return result
 * 
 *     def with_hyperbolic_structure(self):             # <<<<<<<<<<<<<<
 *         """
 *         Add a (possibly degenerate) hyperbolic structure, turning the
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_31with_hyperbolic_structure(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_6SnapPy_13Triangulation_30with_hyperbolic_structure, "Triangulation.with_hyperbolic_structure(self)\n\n        Add a (possibly degenerate) hyperbolic structure, turning the\n        Triangulation into a Manifold.\n\n        >>> M = Triangulation('m004')\n        >>> N = M.with_hyperbolic_structure()\n        >>> N.volume() # doctest: +NUMERIC6\n        2.02988321\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_31with_hyperbolic_structure = {"with_hyperbolic_structure", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_31with_hyperbolic_structure, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_30with_hyperbolic_structure};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_31with_hyperbolic_structure(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("with_hyperbolic_structure (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("with_hyperbolic_structure", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "with_hyperbolic_structure", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_30with_hyperbolic_structure(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_30with_hyperbolic_structure(struct __pyx_obj_6SnapPy_Triangulation *__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("with_hyperbolic_structure", 1);

  /* "cython/core/triangulation.pyx":600
 *         2.02988321
 *         """
 *         return Manifold_from_Triangulation(self)             # <<<<<<<<<<<<<<
 * 
 *     def _polish_hyperbolic_structures(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Manifold_from_Triangulation); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 600, __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, ((PyObject *)__pyx_v_self)};
    __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(3, 600, __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;

  /* "cython/core/triangulation.pyx":590
 *         return result
 * 
 *     def with_hyperbolic_structure(self):             # <<<<<<<<<<<<<<
 *         """
 *         Add a (possibly degenerate) hyperbolic structure, turning the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.Triangulation.with_hyperbolic_structure", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":602
 *         return Manifold_from_Triangulation(self)
 * 
 *     def _polish_hyperbolic_structures(self):             # <<<<<<<<<<<<<<
 *         """
 *         This function does nothing for Triangulation. It is overloaded in
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_33_polish_hyperbolic_structures(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_6SnapPy_13Triangulation_32_polish_hyperbolic_structures, "Triangulation._polish_hyperbolic_structures(self)\n\n        This function does nothing for Triangulation. It is overloaded in\n        Manifold.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_33_polish_hyperbolic_structures = {"_polish_hyperbolic_structures", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_33_polish_hyperbolic_structures, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_32_polish_hyperbolic_structures};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_33_polish_hyperbolic_structures(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("_polish_hyperbolic_structures (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("_polish_hyperbolic_structures", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_polish_hyperbolic_structures", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_32_polish_hyperbolic_structures(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_32_polish_hyperbolic_structures(CYTHON_UNUSED struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_polish_hyperbolic_structures", 1);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":609
 *         pass
 * 
 *     def _empty_save(self):             # <<<<<<<<<<<<<<
 *         """
 *         Called by save when no file name is specified, so that in
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_35_empty_save(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_6SnapPy_13Triangulation_34_empty_save, "Triangulation._empty_save(self)\n\n        Called by save when no file name is specified, so that in\n        theory it can be overloaded by the UI.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_35_empty_save = {"_empty_save", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_35_empty_save, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_34_empty_save};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_35_empty_save(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("_empty_save (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("_empty_save", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_empty_save", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_34_empty_save(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_34_empty_save(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  PyObject *__pyx_v_savefile = NULL;
  PyObject *__pyx_v_filename = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_empty_save", 1);

  /* "cython/core/triangulation.pyx":614
 *         theory it can be overloaded by the UI.
 *         """
 *         if asksaveasfile:             # <<<<<<<<<<<<<<
 *             savefile = asksaveasfile(
 *                 mode='w', title='Save Triangulation', defaultextension='.tri',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asksaveasfile); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 614, __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(3, 614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cython/core/triangulation.pyx":615
 *         """
 *         if asksaveasfile:
 *             savefile = asksaveasfile(             # <<<<<<<<<<<<<<
 *                 mode='w', title='Save Triangulation', defaultextension='.tri',
 *                 filetypes = [
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_asksaveasfile); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cython/core/triangulation.pyx":616
 *         if asksaveasfile:
 *             savefile = asksaveasfile(
 *                 mode='w', title='Save Triangulation', defaultextension='.tri',             # <<<<<<<<<<<<<<
 *                 filetypes = [
 *                     ('Triangulation and text files', '*.tri *.txt', 'TEXT'),
 */
    __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_mode, __pyx_n_s_w) < 0) __PYX_ERR(3, 616, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_title, __pyx_kp_s_Save_Triangulation) < 0) __PYX_ERR(3, 616, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_defaultextension, __pyx_kp_s_tri) < 0) __PYX_ERR(3, 616, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":617
 *             savefile = asksaveasfile(
 *                 mode='w', title='Save Triangulation', defaultextension='.tri',
 *                 filetypes = [             # <<<<<<<<<<<<<<
 *                     ('Triangulation and text files', '*.tri *.txt', 'TEXT'),
 *                     ('All text files', '', 'TEXT'),
 */
    __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_tuple__39);
    __Pyx_GIVEREF(__pyx_tuple__39);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_tuple__39)) __PYX_ERR(3, 617, __pyx_L1_error);
    __Pyx_INCREF(__pyx_tuple__40);
    __Pyx_GIVEREF(__pyx_tuple__40);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_tuple__40)) __PYX_ERR(3, 617, __pyx_L1_error);
    __Pyx_INCREF(__pyx_tuple__41);
    __Pyx_GIVEREF(__pyx_tuple__41);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_tuple__41)) __PYX_ERR(3, 617, __pyx_L1_error);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_filetypes, __pyx_t_4) < 0) __PYX_ERR(3, 616, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":615
 *         """
 *         if asksaveasfile:
 *             savefile = asksaveasfile(             # <<<<<<<<<<<<<<
 *                 mode='w', title='Save Triangulation', defaultextension='.tri',
 *                 filetypes = [
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 615, __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_v_savefile = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":621
 *                     ('All text files', '', 'TEXT'),
 *                     ('All files', '')])
 *             if savefile:             # <<<<<<<<<<<<<<
 *                 filename = savefile.name
 *                 savefile.close()
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_savefile); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 621, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "cython/core/triangulation.pyx":622
 *                     ('All files', '')])
 *             if savefile:
 *                 filename = savefile.name             # <<<<<<<<<<<<<<
 *                 savefile.close()
 *                 self.save(filename)
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_savefile, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 622, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_filename = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "cython/core/triangulation.pyx":623
 *             if savefile:
 *                 filename = savefile.name
 *                 savefile.close()             # <<<<<<<<<<<<<<
 *                 self.save(filename)
 *                 return
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_savefile, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 623, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(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_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 623, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/triangulation.pyx":624
 *                 filename = savefile.name
 *                 savefile.close()
 *                 self.save(filename)             # <<<<<<<<<<<<<<
 *                 return
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_save); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 624, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(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_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_filename};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 624, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/triangulation.pyx":625
 *                 savefile.close()
 *                 self.save(filename)
 *                 return             # <<<<<<<<<<<<<<
 * 
 *         raise ValueError('Please specify a file name.')
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "cython/core/triangulation.pyx":621
 *                     ('All text files', '', 'TEXT'),
 *                     ('All files', '')])
 *             if savefile:             # <<<<<<<<<<<<<<
 *                 filename = savefile.name
 *                 savefile.close()
 */
    }

    /* "cython/core/triangulation.pyx":614
 *         theory it can be overloaded by the UI.
 *         """
 *         if asksaveasfile:             # <<<<<<<<<<<<<<
 *             savefile = asksaveasfile(
 *                 mode='w', title='Save Triangulation', defaultextension='.tri',
 */
  }

  /* "cython/core/triangulation.pyx":627
 *                 return
 * 
 *         raise ValueError('Please specify a file name.')             # <<<<<<<<<<<<<<
 * 
 *     def save(self, file_name=None):
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __PYX_ERR(3, 627, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":609
 *         pass
 * 
 *     def _empty_save(self):             # <<<<<<<<<<<<<<
 *         """
 *         Called by save when no file name is specified, so that in
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("SnapPy.Triangulation._empty_save", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_savefile);
  __Pyx_XDECREF(__pyx_v_filename);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":629
 *         raise ValueError('Please specify a file name.')
 * 
 *     def save(self, file_name=None):             # <<<<<<<<<<<<<<
 *         """
 *         Save the triangulation as a SnapPea triangulation file.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_37save(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_6SnapPy_13Triangulation_36save, "Triangulation.save(self, file_name=None)\n\n        Save the triangulation as a SnapPea triangulation file.\n\n        >>> M = Triangulation('m004')\n        >>> M.save('fig-eight.tri')     #doctest: +SKIP\n\n        To retrieve a SnapPea triangulation from the saved file\n        you can do the following. The first command creates a cusped\n        manifold M. The second one creates the filled manifold M1\n        with Dehn coefficients (2,3).\n\n        >>> M = Manifold('fig-eight.tri')   #doctest: +SKIP\n        >>> M1 = Manifold('fig-eight.tri(2,3)')   #doctest: +SKIP\n\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_37save = {"save", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_37save, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_36save};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_37save(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_file_name = 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("save (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_file_name,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_file_name);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 629, __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, "save") < 0)) __PYX_ERR(3, 629, __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_file_name = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("save", 0, 0, 1, __pyx_nargs); __PYX_ERR(3, 629, __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("SnapPy.Triangulation.save", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_36save(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_file_name);

  /* 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_6SnapPy_13Triangulation_36save(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_file_name) {
  PyObject *__pyx_v_b_file_name = 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;
  char *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("save", 1);

  /* "cython/core/triangulation.pyx":645
 * 
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         if file_name is None:
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":646
 *         """
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         if file_name is None:
 *             self._empty_save()
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 646, __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(3, 646, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":645
 * 
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         if file_name is None:
 */
  }

  /* "cython/core/triangulation.pyx":647
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         if file_name is None:             # <<<<<<<<<<<<<<
 *             self._empty_save()
 *         else:
 */
  __pyx_t_1 = (__pyx_v_file_name == Py_None);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":648
 *             raise ValueError('The Triangulation is empty.')
 *         if file_name is None:
 *             self._empty_save()             # <<<<<<<<<<<<<<
 *         else:
 *             b_file_name = to_byte_str(file_name)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_empty_save); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 648, __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(3, 648, __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;

    /* "cython/core/triangulation.pyx":647
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         if file_name is None:             # <<<<<<<<<<<<<<
 *             self._empty_save()
 *         else:
 */
    goto __pyx_L4;
  }

  /* "cython/core/triangulation.pyx":650
 *             self._empty_save()
 *         else:
 *             b_file_name = to_byte_str(file_name)             # <<<<<<<<<<<<<<
 *             write_triangulation(self.c_triangulation, b_file_name)
 * 
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_to_byte_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 650, __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_v_file_name};
      __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(3, 650, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_b_file_name = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/triangulation.pyx":651
 *         else:
 *             b_file_name = to_byte_str(file_name)
 *             write_triangulation(self.c_triangulation, b_file_name)             # <<<<<<<<<<<<<<
 * 
 *     def _to_string(self):
 */
    __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_b_file_name); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 651, __pyx_L1_error)
    (void)(write_triangulation(__pyx_v_self->c_triangulation, __pyx_t_6));
  }
  __pyx_L4:;

  /* "cython/core/triangulation.pyx":629
 *         raise ValueError('Please specify a file name.')
 * 
 *     def save(self, file_name=None):             # <<<<<<<<<<<<<<
 *         """
 *         Save the triangulation as a SnapPea triangulation file.
 */

  /* 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("SnapPy.Triangulation.save", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b_file_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":653
 *             write_triangulation(self.c_triangulation, b_file_name)
 * 
 *     def _to_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a string containing the contents of a SnapPea triangulation
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_39_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_6SnapPy_13Triangulation_38_to_string, "Triangulation._to_string(self)\n\n        Return a string containing the contents of a SnapPea triangulation\n        file.\n        >>> M = Manifold('7_4')\n        >>> seed = M._to_string()\n        >>> N = Manifold(seed)\n        >>> N == M\n        True\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_39_to_string = {"_to_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_39_to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_38_to_string};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_39_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("_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("_to_string", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_to_string", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_38_to_string(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_38_to_string(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  char *__pyx_v_c_string;
  PyObject *__pyx_v_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  char const *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_to_string", 1);

  /* "cython/core/triangulation.pyx":665
 *         cdef char *c_string
 *         cdef result
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         else:
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":666
 *         cdef result
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         else:
 *             try:
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 666, __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(3, 666, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":665
 *         cdef char *c_string
 *         cdef result
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         else:
 */
  }

  /* "cython/core/triangulation.pyx":668
 *             raise ValueError('The Triangulation is empty.')
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 c_string = string_triangulation(self.c_triangulation)
 *                 result = c_string
 */
  /*else*/ {
    /*try:*/ {

      /* "cython/core/triangulation.pyx":669
 *         else:
 *             try:
 *                 c_string = string_triangulation(self.c_triangulation)             # <<<<<<<<<<<<<<
 *                 result = c_string
 *             finally:
 */
      __pyx_v_c_string = string_triangulation(__pyx_v_self->c_triangulation);

      /* "cython/core/triangulation.pyx":670
 *             try:
 *                 c_string = string_triangulation(self.c_triangulation)
 *                 result = c_string             # <<<<<<<<<<<<<<
 *             finally:
 *                 free(c_string)
 */
      __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_c_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 670, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_result = __pyx_t_2;
      __pyx_t_2 = 0;
    }

    /* "cython/core/triangulation.pyx":672
 *                 result = c_string
 *             finally:
 *                 free(c_string)             # <<<<<<<<<<<<<<
 *             return to_str(result)
 * 
 */
    /*finally:*/ {
      /*normal exit:*/{
        free(__pyx_v_c_string);
        goto __pyx_L6;
      }
      __pyx_L5_error:;
      /*exception exit:*/{
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
        if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __pyx_t_3 = __pyx_lineno; __pyx_t_4 = __pyx_clineno; __pyx_t_5 = __pyx_filename;
        {
          free(__pyx_v_c_string);
        }
        if (PY_MAJOR_VERSION >= 3) {
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
        }
        __Pyx_XGIVEREF(__pyx_t_6);
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_ErrRestore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
        __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
        __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_4; __pyx_filename = __pyx_t_5;
        goto __pyx_L1_error;
      }
      __pyx_L6:;
    }

    /* "cython/core/triangulation.pyx":673
 *             finally:
 *                 free(c_string)
 *             return to_str(result)             # <<<<<<<<<<<<<<
 * 
 *     def _from_string(self, string, remove_finite_vertices=True):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_to_str); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 673, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(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_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_v_result};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 673, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "cython/core/triangulation.pyx":653
 *             write_triangulation(self.c_triangulation, b_file_name)
 * 
 *     def _to_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a string containing the contents of a SnapPea triangulation
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("SnapPy.Triangulation._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":675
 *             return to_str(result)
 * 
 *     def _from_string(self, string, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         """
 *         WARNING: Users should not use this function directly.  To
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_41_from_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_6SnapPy_13Triangulation_40_from_string, "Triangulation._from_string(self, string, remove_finite_vertices=True)\n\n        WARNING: Users should not use this function directly.  To\n        create a Triangulation or Manifold or ManifoldHP from a string\n        containing the contents of a triangulation file, simply do:\n\n        >>> M = Manifold('7_4')\n        >>> seed = M._to_string()\n        >>> N = Manifold(seed)\n        >>> N == M\n        True\n\n        Fill an empty Triangulation from a string generated by\n        _to_string.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_41_from_string = {"_from_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_41_from_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_40_from_string};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_41_from_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
) {
  PyObject *__pyx_v_string = 0;
  PyObject *__pyx_v_remove_finite_vertices = 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("_from_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);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_string,&__pyx_n_s_remove_finite_vertices,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    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_string)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 675, __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_remove_finite_vertices);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 675, __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, "_from_string") < 0)) __PYX_ERR(3, 675, __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_string = values[0];
    __pyx_v_remove_finite_vertices = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_string", 0, 1, 2, __pyx_nargs); __PYX_ERR(3, 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_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("SnapPy.Triangulation._from_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_40_from_string(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_string, __pyx_v_remove_finite_vertices);

  /* 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_6SnapPy_13Triangulation_40_from_string(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_string, PyObject *__pyx_v_remove_finite_vertices) {
  Triangulation *__pyx_v_c_triangulation;
  PyObject *__pyx_v_b_string = 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;
  char *__pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_from_string", 1);

  /* "cython/core/triangulation.pyx":690
 *         _to_string.
 *         """
 *         cdef c_Triangulation* c_triangulation = NULL             # <<<<<<<<<<<<<<
 *         if self.c_triangulation is not NULL:
 *             raise ValueError('The Triangulation must be empty.')
 */
  __pyx_v_c_triangulation = NULL;

  /* "cython/core/triangulation.pyx":691
 *         """
 *         cdef c_Triangulation* c_triangulation = NULL
 *         if self.c_triangulation is not NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation must be empty.')
 *         b_string = to_byte_str(string)
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation != NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":692
 *         cdef c_Triangulation* c_triangulation = NULL
 *         if self.c_triangulation is not NULL:
 *             raise ValueError('The Triangulation must be empty.')             # <<<<<<<<<<<<<<
 *         b_string = to_byte_str(string)
 *         c_triangulation = read_triangulation_from_string(b_string)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 692, __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(3, 692, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":691
 *         """
 *         cdef c_Triangulation* c_triangulation = NULL
 *         if self.c_triangulation is not NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation must be empty.')
 *         b_string = to_byte_str(string)
 */
  }

  /* "cython/core/triangulation.pyx":693
 *         if self.c_triangulation is not NULL:
 *             raise ValueError('The Triangulation must be empty.')
 *         b_string = to_byte_str(string)             # <<<<<<<<<<<<<<
 *         c_triangulation = read_triangulation_from_string(b_string)
 *         self.set_c_triangulation(c_triangulation)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_to_byte_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 693, __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_v_string};
    __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(3, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_b_string = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":694
 *             raise ValueError('The Triangulation must be empty.')
 *         b_string = to_byte_str(string)
 *         c_triangulation = read_triangulation_from_string(b_string)             # <<<<<<<<<<<<<<
 *         self.set_c_triangulation(c_triangulation)
 *         if remove_finite_vertices:
 */
  __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_b_string); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(3, 694, __pyx_L1_error)
  __pyx_v_c_triangulation = read_triangulation_from_string(__pyx_t_6);

  /* "cython/core/triangulation.pyx":695
 *         b_string = to_byte_str(string)
 *         c_triangulation = read_triangulation_from_string(b_string)
 *         self.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 *         if remove_finite_vertices:
 *             self._remove_finite_vertices()
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->set_c_triangulation(__pyx_v_self, __pyx_v_c_triangulation); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":696
 *         c_triangulation = read_triangulation_from_string(b_string)
 *         self.set_c_triangulation(c_triangulation)
 *         if remove_finite_vertices:             # <<<<<<<<<<<<<<
 *             self._remove_finite_vertices()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_remove_finite_vertices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 696, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":697
 *         self.set_c_triangulation(c_triangulation)
 *         if remove_finite_vertices:
 *             self._remove_finite_vertices()             # <<<<<<<<<<<<<<
 * 
 *     def _to_bytes(self):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_finite_vertices_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 697, __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(3, 697, __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;

    /* "cython/core/triangulation.pyx":696
 *         c_triangulation = read_triangulation_from_string(b_string)
 *         self.set_c_triangulation(c_triangulation)
 *         if remove_finite_vertices:             # <<<<<<<<<<<<<<
 *             self._remove_finite_vertices()
 * 
 */
  }

  /* "cython/core/triangulation.pyx":675
 *             return to_str(result)
 * 
 *     def _from_string(self, string, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         """
 *         WARNING: Users should not use this function directly.  To
 */

  /* 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("SnapPy.Triangulation._from_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b_string);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":699
 *             self._remove_finite_vertices()
 * 
 *     def _to_bytes(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a reasonably short byte sequence which encodes the
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_43_to_bytes(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_6SnapPy_13Triangulation_42_to_bytes, "Triangulation._to_bytes(self)\n\n        Return a reasonably short byte sequence which encodes the\n        combinatorics of this triangulation.\n        >>> M = Manifold('m125')\n        >>> seed = M._to_bytes()\n        >>> len(seed)\n        12\n        >>> N = Manifold('empty')\n        >>> N._from_bytes(seed)\n        >>> N == M\n        True\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_43_to_bytes = {"_to_bytes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_43_to_bytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_42_to_bytes};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_43_to_bytes(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("_to_bytes (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("_to_bytes", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_to_bytes", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_42_to_bytes(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_42_to_bytes(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  TerseTriangulation *__pyx_v_c_terse;
  int __pyx_v_n;
  int __pyx_v_byte;
  PyObject *__pyx_v_byteseq = NULL;
  PyObject *__pyx_v_bit = NULL;
  PyObject *__pyx_9genexpr12__pyx_v_c = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  TerseTriangulation *__pyx_t_9;
  long __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_to_bytes", 1);

  /* "cython/core/triangulation.pyx":714
 *         cdef TerseTriangulation* c_terse
 *         cdef int n, byte
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         if False in [ c.is_complete for c in self.cusp_info()]:
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":715
 *         cdef int n, byte
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         if False in [ c.is_complete for c in self.cusp_info()]:
 *             raise ValueError('Byte encoding requires complete cusps.')
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 715, __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(3, 715, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":714
 *         cdef TerseTriangulation* c_terse
 *         cdef int n, byte
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         if False in [ c.is_complete for c in self.cusp_info()]:
 */
  }

  /* "cython/core/triangulation.pyx":716
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         if False in [ c.is_complete for c in self.cusp_info()]:             # <<<<<<<<<<<<<<
 *             raise ValueError('Byte encoding requires complete cusps.')
 *         c_terse = tri_to_terse(self.c_triangulation)
 */
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 716, __pyx_L7_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 716, __pyx_L7_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(3, 716, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 716, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 716, __pyx_L7_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_8)) {
        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(3, 716, __pyx_L7_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(3, 716, __pyx_L7_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 716, __pyx_L7_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(3, 716, __pyx_L7_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(3, 716, __pyx_L7_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 716, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_8(__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(3, 716, __pyx_L7_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_c, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr12__pyx_v_c, __pyx_n_s_is_complete); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 716, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(3, 716, __pyx_L7_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_c); __pyx_9genexpr12__pyx_v_c = 0;
    goto __pyx_L11_exit_scope;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_c); __pyx_9genexpr12__pyx_v_c = 0;
    goto __pyx_L1_error;
    __pyx_L11_exit_scope:;
  } /* exit inner scope */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(Py_False, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 716, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":717
 *             raise ValueError('The Triangulation is empty.')
 *         if False in [ c.is_complete for c in self.cusp_info()]:
 *             raise ValueError('Byte encoding requires complete cusps.')             # <<<<<<<<<<<<<<
 *         c_terse = tri_to_terse(self.c_triangulation)
 *         byteseq = bytearray([c_terse.num_tetrahedra])
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 717, __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(3, 717, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":716
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         if False in [ c.is_complete for c in self.cusp_info()]:             # <<<<<<<<<<<<<<
 *             raise ValueError('Byte encoding requires complete cusps.')
 *         c_terse = tri_to_terse(self.c_triangulation)
 */
  }

  /* "cython/core/triangulation.pyx":718
 *         if False in [ c.is_complete for c in self.cusp_info()]:
 *             raise ValueError('Byte encoding requires complete cusps.')
 *         c_terse = tri_to_terse(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         byteseq = bytearray([c_terse.num_tetrahedra])
 *         byte, bit = 0, 0
 */
  __pyx_t_9 = tri_to_terse(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 718, __pyx_L1_error)
  __pyx_v_c_terse = __pyx_t_9;

  /* "cython/core/triangulation.pyx":719
 *             raise ValueError('Byte encoding requires complete cusps.')
 *         c_terse = tri_to_terse(self.c_triangulation)
 *         byteseq = bytearray([c_terse.num_tetrahedra])             # <<<<<<<<<<<<<<
 *         byte, bit = 0, 0
 *         for n from 0 <= n < 2*c_terse.num_tetrahedra:
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_c_terse->num_tetrahedra); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(3, 719, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_byteseq = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":720
 *         c_terse = tri_to_terse(self.c_triangulation)
 *         byteseq = bytearray([c_terse.num_tetrahedra])
 *         byte, bit = 0, 0             # <<<<<<<<<<<<<<
 *         for n from 0 <= n < 2*c_terse.num_tetrahedra:
 *             if c_terse.glues_to_old_tet[n]:
 */
  __pyx_t_6 = 0;
  __pyx_t_2 = __pyx_int_0;
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_byte = __pyx_t_6;
  __pyx_v_bit = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":721
 *         byteseq = bytearray([c_terse.num_tetrahedra])
 *         byte, bit = 0, 0
 *         for n from 0 <= n < 2*c_terse.num_tetrahedra:             # <<<<<<<<<<<<<<
 *             if c_terse.glues_to_old_tet[n]:
 *                 byte |= 1 << bit
 */
  __pyx_t_10 = (2 * __pyx_v_c_terse->num_tetrahedra);
  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_10; __pyx_v_n++) {

    /* "cython/core/triangulation.pyx":722
 *         byte, bit = 0, 0
 *         for n from 0 <= n < 2*c_terse.num_tetrahedra:
 *             if c_terse.glues_to_old_tet[n]:             # <<<<<<<<<<<<<<
 *                 byte |= 1 << bit
 *             bit += 1
 */
    __pyx_t_1 = ((__pyx_v_c_terse->glues_to_old_tet[__pyx_v_n]) != 0);
    if (__pyx_t_1) {

      /* "cython/core/triangulation.pyx":723
 *         for n from 0 <= n < 2*c_terse.num_tetrahedra:
 *             if c_terse.glues_to_old_tet[n]:
 *                 byte |= 1 << bit             # <<<<<<<<<<<<<<
 *             bit += 1
 *             if bit % 8 == 0:
 */
      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_byte); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 723, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyNumber_Lshift(__pyx_int_1, __pyx_v_bit); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 723, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyNumber_InPlaceOr(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 723, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 723, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_byte = __pyx_t_6;

      /* "cython/core/triangulation.pyx":722
 *         byte, bit = 0, 0
 *         for n from 0 <= n < 2*c_terse.num_tetrahedra:
 *             if c_terse.glues_to_old_tet[n]:             # <<<<<<<<<<<<<<
 *                 byte |= 1 << bit
 *             bit += 1
 */
    }

    /* "cython/core/triangulation.pyx":724
 *             if c_terse.glues_to_old_tet[n]:
 *                 byte |= 1 << bit
 *             bit += 1             # <<<<<<<<<<<<<<
 *             if bit % 8 == 0:
 *                 byteseq.append(byte)
 */
    __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_bit, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 724, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_bit, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":725
 *                 byte |= 1 << bit
 *             bit += 1
 *             if bit % 8 == 0:             # <<<<<<<<<<<<<<
 *                 byteseq.append(byte)
 *                 byte, bit = 0, 0
 */
    __pyx_t_3 = __Pyx_PyInt_RemainderObjC(__pyx_v_bit, __pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 725, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_3, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 725, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "cython/core/triangulation.pyx":726
 *             bit += 1
 *             if bit % 8 == 0:
 *                 byteseq.append(byte)             # <<<<<<<<<<<<<<
 *                 byte, bit = 0, 0
 *         if bit:
 */
      __pyx_t_11 = __Pyx_PyByteArray_Append(__pyx_v_byteseq, __pyx_v_byte); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(3, 726, __pyx_L1_error)

      /* "cython/core/triangulation.pyx":727
 *             if bit % 8 == 0:
 *                 byteseq.append(byte)
 *                 byte, bit = 0, 0             # <<<<<<<<<<<<<<
 *         if bit:
 *             byteseq.append(byte)
 */
      __pyx_t_6 = 0;
      __pyx_t_3 = __pyx_int_0;
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_byte = __pyx_t_6;
      __Pyx_DECREF_SET(__pyx_v_bit, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cython/core/triangulation.pyx":725
 *                 byte |= 1 << bit
 *             bit += 1
 *             if bit % 8 == 0:             # <<<<<<<<<<<<<<
 *                 byteseq.append(byte)
 *                 byte, bit = 0, 0
 */
    }
  }

  /* "cython/core/triangulation.pyx":728
 *                 byteseq.append(byte)
 *                 byte, bit = 0, 0
 *         if bit:             # <<<<<<<<<<<<<<
 *             byteseq.append(byte)
 *         for n from 0 <= n < 1 + c_terse.num_tetrahedra:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_bit); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 728, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":729
 *                 byte, bit = 0, 0
 *         if bit:
 *             byteseq.append(byte)             # <<<<<<<<<<<<<<
 *         for n from 0 <= n < 1 + c_terse.num_tetrahedra:
 *             byteseq.append(c_terse.which_old_tet[n])
 */
    __pyx_t_11 = __Pyx_PyByteArray_Append(__pyx_v_byteseq, __pyx_v_byte); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(3, 729, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":728
 *                 byteseq.append(byte)
 *                 byte, bit = 0, 0
 *         if bit:             # <<<<<<<<<<<<<<
 *             byteseq.append(byte)
 *         for n from 0 <= n < 1 + c_terse.num_tetrahedra:
 */
  }

  /* "cython/core/triangulation.pyx":730
 *         if bit:
 *             byteseq.append(byte)
 *         for n from 0 <= n < 1 + c_terse.num_tetrahedra:             # <<<<<<<<<<<<<<
 *             byteseq.append(c_terse.which_old_tet[n])
 *         for n from 0 <= n < 1 + c_terse.num_tetrahedra:
 */
  __pyx_t_10 = (1 + __pyx_v_c_terse->num_tetrahedra);
  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_10; __pyx_v_n++) {

    /* "cython/core/triangulation.pyx":731
 *             byteseq.append(byte)
 *         for n from 0 <= n < 1 + c_terse.num_tetrahedra:
 *             byteseq.append(c_terse.which_old_tet[n])             # <<<<<<<<<<<<<<
 *         for n from 0 <= n < 1 + c_terse.num_tetrahedra:
 *             byteseq.append(c_terse.which_gluing[n])
 */
    __pyx_t_11 = __Pyx_PyByteArray_Append(__pyx_v_byteseq, (__pyx_v_c_terse->which_old_tet[__pyx_v_n])); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(3, 731, __pyx_L1_error)
  }

  /* "cython/core/triangulation.pyx":732
 *         for n from 0 <= n < 1 + c_terse.num_tetrahedra:
 *             byteseq.append(c_terse.which_old_tet[n])
 *         for n from 0 <= n < 1 + c_terse.num_tetrahedra:             # <<<<<<<<<<<<<<
 *             byteseq.append(c_terse.which_gluing[n])
 *         free_terse_triangulation(c_terse)
 */
  __pyx_t_10 = (1 + __pyx_v_c_terse->num_tetrahedra);
  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_10; __pyx_v_n++) {

    /* "cython/core/triangulation.pyx":733
 *             byteseq.append(c_terse.which_old_tet[n])
 *         for n from 0 <= n < 1 + c_terse.num_tetrahedra:
 *             byteseq.append(c_terse.which_gluing[n])             # <<<<<<<<<<<<<<
 *         free_terse_triangulation(c_terse)
 *         return bytearray_to_bytes(byteseq)
 */
    __pyx_t_11 = __Pyx_PyByteArray_Append(__pyx_v_byteseq, (__pyx_v_c_terse->which_gluing[__pyx_v_n])); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(3, 733, __pyx_L1_error)
  }

  /* "cython/core/triangulation.pyx":734
 *         for n from 0 <= n < 1 + c_terse.num_tetrahedra:
 *             byteseq.append(c_terse.which_gluing[n])
 *         free_terse_triangulation(c_terse)             # <<<<<<<<<<<<<<
 *         return bytearray_to_bytes(byteseq)
 * 
 */
  free_terse_triangulation(__pyx_v_c_terse); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 734, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":735
 *             byteseq.append(c_terse.which_gluing[n])
 *         free_terse_triangulation(c_terse)
 *         return bytearray_to_bytes(byteseq)             # <<<<<<<<<<<<<<
 * 
 *     def _from_bytes(self, bytestring, *args):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_bytearray_to_bytes); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_byteseq};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 735, __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;

  /* "cython/core/triangulation.pyx":699
 *             self._remove_finite_vertices()
 * 
 *     def _to_bytes(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a reasonably short byte sequence which encodes the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("SnapPy.Triangulation._to_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_byteseq);
  __Pyx_XDECREF(__pyx_v_bit);
  __Pyx_XDECREF(__pyx_9genexpr12__pyx_v_c);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":737
 *         return bytearray_to_bytes(byteseq)
 * 
 *     def _from_bytes(self, bytestring, *args):             # <<<<<<<<<<<<<<
 *         """
 *         Fill an empty triangulation from a byte sequence generated by
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_45_from_bytes(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_6SnapPy_13Triangulation_44_from_bytes, "Triangulation._from_bytes(self, bytestring, *args)\n\n        Fill an empty triangulation from a byte sequence generated by\n        _to_bytes.\n        >>> M = Manifold('m125')\n        >>> seed = M._to_bytes()\n        >>> len(seed)\n        12\n        >>> N = Manifold('empty')\n        >>> N._from_bytes(seed)\n        >>> N == M\n        True\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_45_from_bytes = {"_from_bytes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_45_from_bytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_44_from_bytes};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_45_from_bytes(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_bytestring = 0;
  CYTHON_UNUSED PyObject *__pyx_v_args = 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("_from_bytes (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);
  __pyx_v_args = __Pyx_ArgsSlice_FASTCALL(__pyx_args, 1, __pyx_nargs);
  if (unlikely(!__pyx_v_args)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_v_args);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bytestring,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        default:
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
      }
      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_bytestring)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 737, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        const Py_ssize_t used_pos_args = (kwd_pos_args < 1) ? kwd_pos_args : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, used_pos_args, "_from_bytes") < 0)) __PYX_ERR(3, 737, __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_bytestring = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_bytes", 0, 1, 1, __pyx_nargs); __PYX_ERR(3, 737, __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_DECREF(__pyx_v_args); __pyx_v_args = 0;
  __Pyx_AddTraceback("SnapPy.Triangulation._from_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_44_from_bytes(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_bytestring, __pyx_v_args);

  /* function exit code */
  __Pyx_DECREF(__pyx_v_args);
  {
    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_6SnapPy_13Triangulation_44_from_bytes(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_bytestring, CYTHON_UNUSED PyObject *__pyx_v_args) {
  Triangulation *__pyx_v_c_triangulation;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Triangulation *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_from_bytes", 1);

  /* "cython/core/triangulation.pyx":750
 *         True
 *         """
 *         cdef c_Triangulation* c_triangulation = NULL             # <<<<<<<<<<<<<<
 *         if self.c_triangulation is not NULL:
 *             raise ValueError('The Triangulation must be empty.')
 */
  __pyx_v_c_triangulation = NULL;

  /* "cython/core/triangulation.pyx":751
 *         """
 *         cdef c_Triangulation* c_triangulation = NULL
 *         if self.c_triangulation is not NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation must be empty.')
 *         c_triangulation = triangulation_from_bytes(bytestring)
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation != NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":752
 *         cdef c_Triangulation* c_triangulation = NULL
 *         if self.c_triangulation is not NULL:
 *             raise ValueError('The Triangulation must be empty.')             # <<<<<<<<<<<<<<
 *         c_triangulation = triangulation_from_bytes(bytestring)
 *         self.set_c_triangulation(c_triangulation)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 752, __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(3, 752, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":751
 *         """
 *         cdef c_Triangulation* c_triangulation = NULL
 *         if self.c_triangulation is not NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation must be empty.')
 *         c_triangulation = triangulation_from_bytes(bytestring)
 */
  }

  /* "cython/core/triangulation.pyx":753
 *         if self.c_triangulation is not NULL:
 *             raise ValueError('The Triangulation must be empty.')
 *         c_triangulation = triangulation_from_bytes(bytestring)             # <<<<<<<<<<<<<<
 *         self.set_c_triangulation(c_triangulation)
 * 
 */
  __pyx_t_3 = __pyx_f_6SnapPy_triangulation_from_bytes(__pyx_v_bytestring); if (unlikely(__pyx_t_3 == ((Triangulation *)NULL) && PyErr_Occurred())) __PYX_ERR(3, 753, __pyx_L1_error)
  __pyx_v_c_triangulation = __pyx_t_3;

  /* "cython/core/triangulation.pyx":754
 *             raise ValueError('The Triangulation must be empty.')
 *         c_triangulation = triangulation_from_bytes(bytestring)
 *         self.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *     def _from_pickle(self, bytestring, remove_finite_vertices=True):
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->set_c_triangulation(__pyx_v_self, __pyx_v_c_triangulation); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":737
 *         return bytearray_to_bytes(byteseq)
 * 
 *     def _from_bytes(self, bytestring, *args):             # <<<<<<<<<<<<<<
 *         """
 *         Fill an empty triangulation from a byte sequence generated by
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.Triangulation._from_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":756
 *         self.set_c_triangulation(c_triangulation)
 * 
 *     def _from_pickle(self, bytestring, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         """
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_47_from_pickle(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_6SnapPy_13Triangulation_46_from_pickle, "Triangulation._from_pickle(self, bytestring, remove_finite_vertices=True)\n\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_47_from_pickle = {"_from_pickle", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_47_from_pickle, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_46_from_pickle};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_47_from_pickle(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_bytestring = 0;
  PyObject *__pyx_v_remove_finite_vertices = 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("_from_pickle (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_bytestring,&__pyx_n_s_remove_finite_vertices,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    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_bytestring)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 756, __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_remove_finite_vertices);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 756, __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, "_from_pickle") < 0)) __PYX_ERR(3, 756, __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_bytestring = values[0];
    __pyx_v_remove_finite_vertices = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_pickle", 0, 1, 2, __pyx_nargs); __PYX_ERR(3, 756, __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("SnapPy.Triangulation._from_pickle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_46_from_pickle(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_bytestring, __pyx_v_remove_finite_vertices);

  /* 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_6SnapPy_13Triangulation_46_from_pickle(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_bytestring, PyObject *__pyx_v_remove_finite_vertices) {
  Triangulation *__pyx_v_c_triangulation;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Triangulation *__pyx_t_3;
  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("_from_pickle", 1);

  /* "cython/core/triangulation.pyx":759
 *         """
 *         """
 *         cdef c_Triangulation* c_triangulation = NULL             # <<<<<<<<<<<<<<
 *         if self.c_triangulation is not NULL:
 *             raise ValueError('The Triangulation must be empty.')
 */
  __pyx_v_c_triangulation = NULL;

  /* "cython/core/triangulation.pyx":760
 *         """
 *         cdef c_Triangulation* c_triangulation = NULL
 *         if self.c_triangulation is not NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation must be empty.')
 *         c_triangulation = unpickle_triangulation(bytestring)
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation != NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":761
 *         cdef c_Triangulation* c_triangulation = NULL
 *         if self.c_triangulation is not NULL:
 *             raise ValueError('The Triangulation must be empty.')             # <<<<<<<<<<<<<<
 *         c_triangulation = unpickle_triangulation(bytestring)
 *         self.set_c_triangulation(c_triangulation)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 761, __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(3, 761, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":760
 *         """
 *         cdef c_Triangulation* c_triangulation = NULL
 *         if self.c_triangulation is not NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation must be empty.')
 *         c_triangulation = unpickle_triangulation(bytestring)
 */
  }

  /* "cython/core/triangulation.pyx":762
 *         if self.c_triangulation is not NULL:
 *             raise ValueError('The Triangulation must be empty.')
 *         c_triangulation = unpickle_triangulation(bytestring)             # <<<<<<<<<<<<<<
 *         self.set_c_triangulation(c_triangulation)
 *         if remove_finite_vertices:
 */
  if (!(likely(PyBytes_CheckExact(__pyx_v_bytestring))||((__pyx_v_bytestring) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_v_bytestring))) __PYX_ERR(3, 762, __pyx_L1_error)
  __pyx_t_3 = __pyx_f_6SnapPy_unpickle_triangulation(((PyObject*)__pyx_v_bytestring)); if (unlikely(__pyx_t_3 == ((Triangulation *)NULL) && PyErr_Occurred())) __PYX_ERR(3, 762, __pyx_L1_error)
  __pyx_v_c_triangulation = __pyx_t_3;

  /* "cython/core/triangulation.pyx":763
 *             raise ValueError('The Triangulation must be empty.')
 *         c_triangulation = unpickle_triangulation(bytestring)
 *         self.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 *         if remove_finite_vertices:
 *             self._remove_finite_vertices()
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->set_c_triangulation(__pyx_v_self, __pyx_v_c_triangulation); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":764
 *         c_triangulation = unpickle_triangulation(bytestring)
 *         self.set_c_triangulation(c_triangulation)
 *         if remove_finite_vertices:             # <<<<<<<<<<<<<<
 *             self._remove_finite_vertices()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_remove_finite_vertices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 764, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":765
 *         self.set_c_triangulation(c_triangulation)
 *         if remove_finite_vertices:
 *             self._remove_finite_vertices()             # <<<<<<<<<<<<<<
 * 
 *     def _from_tetrahedra_gluing_data(self, tetrahedra_data,
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_finite_vertices_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 765, __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_2 = __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_2)) __PYX_ERR(3, 765, __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;

    /* "cython/core/triangulation.pyx":764
 *         c_triangulation = unpickle_triangulation(bytestring)
 *         self.set_c_triangulation(c_triangulation)
 *         if remove_finite_vertices:             # <<<<<<<<<<<<<<
 *             self._remove_finite_vertices()
 * 
 */
  }

  /* "cython/core/triangulation.pyx":756
 *         self.set_c_triangulation(c_triangulation)
 * 
 *     def _from_pickle(self, bytestring, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         """
 *         """
 */

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("SnapPy.Triangulation._from_pickle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":767
 *             self._remove_finite_vertices()
 * 
 *     def _from_tetrahedra_gluing_data(self, tetrahedra_data,             # <<<<<<<<<<<<<<
 *                                      num_or_cusps=0,
 *                                      num_nonor_cusps=0,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_49_from_tetrahedra_gluing_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_6SnapPy_13Triangulation_48_from_tetrahedra_gluing_data, "Triangulation._from_tetrahedra_gluing_data(self, tetrahedra_data, num_or_cusps=0, num_nonor_cusps=0, cusp_indices=None, peripheral_curves=None, remove_finite_vertices=True)\n\n        >>> data = [([1, 1, 2, 2], [[0, 1, 3, 2], [2, 3, 1, 0], [0, 1, 3, 2], [3, 0, 1, 2]]),\n        ...         ([0, 2, 2, 0], [[0, 1, 3, 2], [1, 0, 2, 3], [2, 3, 1, 0], [3, 2, 0, 1]]),\n        ...         ([1, 1, 0, 0], [[1, 0, 2, 3], [3, 2, 0, 1], [1, 2, 3, 0], [0, 1, 3, 2]])]\n        >>> M = Triangulation('empty')\n        >>> M._from_tetrahedra_gluing_data(data)\n        >>> N = Triangulation('m007')\n        >>> M == N\n        True\n\n        Check that cusp indices are transmitted. This manfiold has two\n        cusps and trivial symmetry group and we interchange the two\n        cusps.\n\n        >>> M = Manifold('o9_44133')\n        >>> tet_data = M._get_tetrahedra_gluing_data()\n        >>> cusp_data = M._get_cusp_indices_and_peripheral_curve_data()[0]\n        >>> cusp_data = [[1 - c for c in tet_cusps] for tet_cusps in cusp_data]\n        >>> N = Manifold('empty')\n        >>> N._from_tetrahedra_gluing_data(tet_data, num_or_cusps=2, cusp_indices=cusp_data)\n        >>> M.is_isometric_to(N, True)[0].cusp_images()\n        [1, 0]\n\n        A nonorientable example.\n\n        >>> Y = Triangulation('y885')\n        >>> Y.set_peripheral_curves([([1, 0], [0, 1]), ([-1, 0], [0, -1]), ([1, 7], [1, 8])])\n        >>> tets = Y._get_tetrahedra_gluing_data()\n        >>> cusps, curves = Y._get_cusp_indices_and_peripheral_curve_data()\n        >>> max(sum(curves, []))\n        9\n        >>> X = Triangulation('empty')\n        >>> X._from_tetrahedra_gluing_data(tets, 1, 2, cusps, curves)\n        >>> X._get_cusp_indices_and_peripheral_curve_data() == (cusps, curves)\n        True\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_49_from_tetrahedra_gluing_data = {"_from_tetrahedra_gluing_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_49_from_tetrahedra_gluing_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_48_from_tetrahedra_gluing_data};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_49_from_tetrahedra_gluing_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_tetrahedra_data = 0;
  PyObject *__pyx_v_num_or_cusps = 0;
  PyObject *__pyx_v_num_nonor_cusps = 0;
  PyObject *__pyx_v_cusp_indices = 0;
  PyObject *__pyx_v_peripheral_curves = 0;
  PyObject *__pyx_v_remove_finite_vertices = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_from_tetrahedra_gluing_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_tetrahedra_data,&__pyx_n_s_num_or_cusps,&__pyx_n_s_num_nonor_cusps,&__pyx_n_s_cusp_indices,&__pyx_n_s_peripheral_curves,&__pyx_n_s_remove_finite_vertices,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_0));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_0));

    /* "cython/core/triangulation.pyx":770
 *                                      num_or_cusps=0,
 *                                      num_nonor_cusps=0,
 *                                      cusp_indices=None,             # <<<<<<<<<<<<<<
 *                                      peripheral_curves=None,
 *                                      remove_finite_vertices=True):
 */
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "cython/core/triangulation.pyx":771
 *                                      num_nonor_cusps=0,
 *                                      cusp_indices=None,
 *                                      peripheral_curves=None,             # <<<<<<<<<<<<<<
 *                                      remove_finite_vertices=True):
 *         """
 */
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "cython/core/triangulation.pyx":772
 *                                      cusp_indices=None,
 *                                      peripheral_curves=None,
 *                                      remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         """
 *         >>> data = [([1, 1, 2, 2], [[0, 1, 3, 2], [2, 3, 1, 0], [0, 1, 3, 2], [3, 0, 1, 2]]),
 */
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        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_tetrahedra_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 767, __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_num_or_cusps);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 767, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_nonor_cusps);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 767, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cusp_indices);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 767, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_peripheral_curves);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 767, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_remove_finite_vertices);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 767, __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, "_from_tetrahedra_gluing_data") < 0)) __PYX_ERR(3, 767, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        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);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_tetrahedra_data = values[0];
    __pyx_v_num_or_cusps = values[1];
    __pyx_v_num_nonor_cusps = values[2];
    __pyx_v_cusp_indices = values[3];
    __pyx_v_peripheral_curves = values[4];
    __pyx_v_remove_finite_vertices = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_tetrahedra_gluing_data", 0, 1, 6, __pyx_nargs); __PYX_ERR(3, 767, __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("SnapPy.Triangulation._from_tetrahedra_gluing_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_48_from_tetrahedra_gluing_data(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_tetrahedra_data, __pyx_v_num_or_cusps, __pyx_v_num_nonor_cusps, __pyx_v_cusp_indices, __pyx_v_peripheral_curves, __pyx_v_remove_finite_vertices);

  /* "cython/core/triangulation.pyx":767
 *             self._remove_finite_vertices()
 * 
 *     def _from_tetrahedra_gluing_data(self, tetrahedra_data,             # <<<<<<<<<<<<<<
 *                                      num_or_cusps=0,
 *                                      num_nonor_cusps=0,
 */

  /* 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_6SnapPy_13Triangulation_48_from_tetrahedra_gluing_data(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_tetrahedra_data, PyObject *__pyx_v_num_or_cusps, PyObject *__pyx_v_num_nonor_cusps, PyObject *__pyx_v_cusp_indices, PyObject *__pyx_v_peripheral_curves, PyObject *__pyx_v_remove_finite_vertices) {
  Triangulation *__pyx_v_c_triangulation;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Triangulation *__pyx_t_3;
  struct __pyx_opt_args_6SnapPy_listlike_to_triangulation __pyx_t_4;
  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("_from_tetrahedra_gluing_data", 1);

  /* "cython/core/triangulation.pyx":809
 *         True
 *         """
 *         cdef c_Triangulation* c_triangulation = NULL             # <<<<<<<<<<<<<<
 *         if self.c_triangulation is not NULL:
 *             raise ValueError('The Triangulation must be empty.')
 */
  __pyx_v_c_triangulation = NULL;

  /* "cython/core/triangulation.pyx":810
 *         """
 *         cdef c_Triangulation* c_triangulation = NULL
 *         if self.c_triangulation is not NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation must be empty.')
 *         c_triangulation = listlike_to_triangulation(tetrahedra_data,
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation != NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":811
 *         cdef c_Triangulation* c_triangulation = NULL
 *         if self.c_triangulation is not NULL:
 *             raise ValueError('The Triangulation must be empty.')             # <<<<<<<<<<<<<<
 *         c_triangulation = listlike_to_triangulation(tetrahedra_data,
 *                                                     num_or_cusps,
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 811, __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(3, 811, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":810
 *         """
 *         cdef c_Triangulation* c_triangulation = NULL
 *         if self.c_triangulation is not NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation must be empty.')
 *         c_triangulation = listlike_to_triangulation(tetrahedra_data,
 */
  }

  /* "cython/core/triangulation.pyx":812
 *         if self.c_triangulation is not NULL:
 *             raise ValueError('The Triangulation must be empty.')
 *         c_triangulation = listlike_to_triangulation(tetrahedra_data,             # <<<<<<<<<<<<<<
 *                                                     num_or_cusps,
 *                                                     num_nonor_cusps,
 */
  __pyx_t_4.__pyx_n = 4;
  __pyx_t_4.num_or_cusps = __pyx_v_num_or_cusps;
  __pyx_t_4.num_nonor_cusps = __pyx_v_num_nonor_cusps;
  __pyx_t_4.cusp_indices = __pyx_v_cusp_indices;
  __pyx_t_4.peripheral_curves = __pyx_v_peripheral_curves;
  __pyx_t_3 = __pyx_f_6SnapPy_listlike_to_triangulation(__pyx_v_tetrahedra_data, &__pyx_t_4); if (unlikely(__pyx_t_3 == ((Triangulation *)NULL) && PyErr_Occurred())) __PYX_ERR(3, 812, __pyx_L1_error)
  __pyx_v_c_triangulation = __pyx_t_3;

  /* "cython/core/triangulation.pyx":817
 *                                                     cusp_indices,
 *                                                     peripheral_curves)
 *         self.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 *         if remove_finite_vertices:
 *             self._remove_finite_vertices()
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->set_c_triangulation(__pyx_v_self, __pyx_v_c_triangulation); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":818
 *                                                     peripheral_curves)
 *         self.set_c_triangulation(c_triangulation)
 *         if remove_finite_vertices:             # <<<<<<<<<<<<<<
 *             self._remove_finite_vertices()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_remove_finite_vertices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 818, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":819
 *         self.set_c_triangulation(c_triangulation)
 *         if remove_finite_vertices:
 *             self._remove_finite_vertices()             # <<<<<<<<<<<<<<
 * 
 *     def _from_isosig(self, isosig, remove_finite_vertices=True):
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_finite_vertices_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/triangulation.pyx":818
 *                                                     peripheral_curves)
 *         self.set_c_triangulation(c_triangulation)
 *         if remove_finite_vertices:             # <<<<<<<<<<<<<<
 *             self._remove_finite_vertices()
 * 
 */
  }

  /* "cython/core/triangulation.pyx":767
 *             self._remove_finite_vertices()
 * 
 *     def _from_tetrahedra_gluing_data(self, tetrahedra_data,             # <<<<<<<<<<<<<<
 *                                      num_or_cusps=0,
 *                                      num_nonor_cusps=0,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.Triangulation._from_tetrahedra_gluing_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":821
 *             self._remove_finite_vertices()
 * 
 *     def _from_isosig(self, isosig, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         """
 *         WARNING: Users should not use this function directly.  To
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_51_from_isosig(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_6SnapPy_13Triangulation_50_from_isosig, "Triangulation._from_isosig(self, isosig, remove_finite_vertices=True)\n\n        WARNING: Users should not use this function directly.  To\n        create a Triangulation or Manifold or ManifoldHP from an isosig,\n        simply do:\n\n        >>> M = Manifold('empty')\n        >>> M._from_isosig('jLAwLMQbcbdghgiiixxnxhhxkwv')\n        >>> N = Manifold('o9_10894')\n        >>> M == N\n        True\n\n        Fill an empty Triangulation from an isosig generated by\n        triangulation_isosig.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_51_from_isosig = {"_from_isosig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_51_from_isosig, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_50_from_isosig};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_51_from_isosig(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_isosig = 0;
  PyObject *__pyx_v_remove_finite_vertices = 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("_from_isosig (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_isosig,&__pyx_n_s_remove_finite_vertices,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    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_isosig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 821, __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_remove_finite_vertices);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 821, __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, "_from_isosig") < 0)) __PYX_ERR(3, 821, __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_isosig = values[0];
    __pyx_v_remove_finite_vertices = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_isosig", 0, 1, 2, __pyx_nargs); __PYX_ERR(3, 821, __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("SnapPy.Triangulation._from_isosig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_50_from_isosig(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_isosig, __pyx_v_remove_finite_vertices);

  /* 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_6SnapPy_13Triangulation_50_from_isosig(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_isosig, PyObject *__pyx_v_remove_finite_vertices) {
  PyObject *__pyx_v_match = NULL;
  PyObject *__pyx_v_decoration = 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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  char *__pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_from_isosig", 0);
  __Pyx_INCREF(__pyx_v_isosig);

  /* "cython/core/triangulation.pyx":837
 *         """
 * 
 *         if self.c_triangulation is not NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation must be empty.')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation != NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":838
 * 
 *         if self.c_triangulation is not NULL:
 *             raise ValueError('The Triangulation must be empty.')             # <<<<<<<<<<<<<<
 * 
 *         match = is_decorated_isosig.match(isosig)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 838, __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(3, 838, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":837
 *         """
 * 
 *         if self.c_triangulation is not NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation must be empty.')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":840
 *             raise ValueError('The Triangulation must be empty.')
 * 
 *         match = is_decorated_isosig.match(isosig)             # <<<<<<<<<<<<<<
 *         if match:
 *             isosig, decoration = match.groups()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_is_decorated_isosig); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_match); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 840, __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_v_isosig};
    __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(3, 840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_match = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":841
 * 
 *         match = is_decorated_isosig.match(isosig)
 *         if match:             # <<<<<<<<<<<<<<
 *             isosig, decoration = match.groups()
 *         elif is_isosig.match(isosig):
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_match); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 841, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":842
 *         match = is_decorated_isosig.match(isosig)
 *         if match:
 *             isosig, decoration = match.groups()             # <<<<<<<<<<<<<<
 *         elif is_isosig.match(isosig):
 *             decoration = None
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_match, __pyx_n_s_groups); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 842, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(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, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      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(3, 842, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 842, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(3, 842, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(3, 842, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __Pyx_DECREF_SET(__pyx_v_isosig, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_v_decoration = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":841
 * 
 *         match = is_decorated_isosig.match(isosig)
 *         if match:             # <<<<<<<<<<<<<<
 *             isosig, decoration = match.groups()
 *         elif is_isosig.match(isosig):
 */
    goto __pyx_L4;
  }

  /* "cython/core/triangulation.pyx":843
 *         if match:
 *             isosig, decoration = match.groups()
 *         elif is_isosig.match(isosig):             # <<<<<<<<<<<<<<
 *             decoration = None
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_is_isosig); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_match); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 843, __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_v_isosig};
    __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(3, 843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 843, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":844
 *             isosig, decoration = match.groups()
 *         elif is_isosig.match(isosig):
 *             decoration = None             # <<<<<<<<<<<<<<
 *         else:
 *             # Did not match regular expression, bail
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_decoration = Py_None;

    /* "cython/core/triangulation.pyx":843
 *         if match:
 *             isosig, decoration = match.groups()
 *         elif is_isosig.match(isosig):             # <<<<<<<<<<<<<<
 *             decoration = None
 *         else:
 */
    goto __pyx_L4;
  }

  /* "cython/core/triangulation.pyx":847
 *         else:
 *             # Did not match regular expression, bail
 *             return             # <<<<<<<<<<<<<<
 * 
 *         self.set_c_triangulation(
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }
  __pyx_L4:;

  /* "cython/core/triangulation.pyx":850
 * 
 *         self.set_c_triangulation(
 *             triangulation_from_isomorphism_signature(isosig.encode('ascii')))             # <<<<<<<<<<<<<<
 * 
 *         # Not a valid isomorphism signature, bail
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_isosig, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(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_n_s_ascii};
    __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(3, 850, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_t_2); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(3, 850, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":849
 *             return
 * 
 *         self.set_c_triangulation(             # <<<<<<<<<<<<<<
 *             triangulation_from_isomorphism_signature(isosig.encode('ascii')))
 * 
 */
  __pyx_t_4 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->set_c_triangulation(__pyx_v_self, triangulation_from_isomorphism_signature(__pyx_t_8)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 849, __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;

  /* "cython/core/triangulation.pyx":853
 * 
 *         # Not a valid isomorphism signature, bail
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":854
 *         # Not a valid isomorphism signature, bail
 *         if self.c_triangulation == NULL:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         if remove_finite_vertices:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":853
 * 
 *         # Not a valid isomorphism signature, bail
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "cython/core/triangulation.pyx":856
 *             return
 * 
 *         if remove_finite_vertices:             # <<<<<<<<<<<<<<
 *             self._remove_finite_vertices()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_remove_finite_vertices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 856, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":857
 * 
 *         if remove_finite_vertices:
 *             self._remove_finite_vertices()             # <<<<<<<<<<<<<<
 * 
 *         if decoration:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove_finite_vertices_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 857, __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[2] = {__pyx_t_3, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 857, __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;

    /* "cython/core/triangulation.pyx":856
 *             return
 * 
 *         if remove_finite_vertices:             # <<<<<<<<<<<<<<
 *             self._remove_finite_vertices()
 * 
 */
  }

  /* "cython/core/triangulation.pyx":859
 *             self._remove_finite_vertices()
 * 
 *         if decoration:             # <<<<<<<<<<<<<<
 *             decorated_isosig.set_peripheral_from_decoration(self, decoration)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_decoration); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 859, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":860
 * 
 *         if decoration:
 *             decorated_isosig.set_peripheral_from_decoration(self, decoration)             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_decorated_isosig); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 860, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_set_peripheral_from_decoration); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 860, __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 (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_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_decoration};
      __pyx_t_4 = __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_4)) __PYX_ERR(3, 860, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":859
 *             self._remove_finite_vertices()
 * 
 *         if decoration:             # <<<<<<<<<<<<<<
 *             decorated_isosig.set_peripheral_from_decoration(self, decoration)
 * 
 */
  }

  /* "cython/core/triangulation.pyx":821
 *             self._remove_finite_vertices()
 * 
 *     def _from_isosig(self, isosig, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         """
 *         WARNING: Users should not use this function directly.  To
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.Triangulation._from_isosig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_match);
  __Pyx_XDECREF(__pyx_v_decoration);
  __Pyx_XDECREF(__pyx_v_isosig);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":862
 *             decorated_isosig.set_peripheral_from_decoration(self, decoration)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Used by pickle.dumps.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_53__reduce__(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_6SnapPy_13Triangulation_52__reduce__, "Triangulation.__reduce__(self)\n\n        Used by pickle.dumps.\n\n        >>> from pickle import loads, dumps\n        >>> from spherogram import random_link\n        >>> M = Manifold('m125')\n        >>> M == loads(dumps(M))\n        True\n        >>> M.dehn_fill((2,3),0)\n        >>> len(dumps(M)) < len(M._to_string())\n        True\n        >>> N = loads(dumps(M))\n        >>> N\n        m125(2,3)(0,0)\n        >>> M.is_isometric_to(N)\n        True\n        >>> M = Manifold('m024')\n        >>> M.is_orientable()\n        False\n        >>> N = loads(dumps(M))\n        >>> N == M\n        True\n        >>> N.volume() == M.volume()\n        True\n        >>> while True:\n        ...    M = random_link(500).exterior()\n        ...    if M.num_tetrahedra() > 256:\n        ...       break\n        ...\n        >>> M == loads(dumps(M))\n        True\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_53__reduce__ = {"__reduce__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_53__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_52__reduce__};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_53__reduce__(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__ (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__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce__", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_52__reduce__(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_52__reduce__(struct __pyx_obj_6SnapPy_Triangulation *__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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce__", 1);

  /* "cython/core/triangulation.pyx":895
 *         True
 *         """
 *         return (self.__class__, (self.pickle(),))             # <<<<<<<<<<<<<<
 * 
 *     def pickle(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pickle_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 895, __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(3, 895, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(3, 895, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(3, 895, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(3, 895, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":862
 *             decorated_isosig.set_peripheral_from_decoration(self, decoration)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Used by pickle.dumps.
 */

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

/* "cython/core/triangulation.pyx":897
 *         return (self.__class__, (self.pickle(),))
 * 
 *     def pickle(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return pickle_triangulation(self.c_triangulation)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_55pickle(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_6SnapPy_13Triangulation_54pickle, "Triangulation.pickle(self)");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_55pickle = {"pickle", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_55pickle, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_54pickle};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_55pickle(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("pickle (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("pickle", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "pickle", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_54pickle(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_54pickle(struct __pyx_obj_6SnapPy_Triangulation *__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;
  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("pickle", 1);

  /* "cython/core/triangulation.pyx":898
 * 
 *     def pickle(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return pickle_triangulation(self.c_triangulation)
 *         except ValueError:
 */
  {
    __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:*/ {

      /* "cython/core/triangulation.pyx":899
 *     def pickle(self):
 *         try:
 *             return pickle_triangulation(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             # When M has > 255 cusps or does not have integer filling
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = __pyx_f_6SnapPy_pickle_triangulation(__pyx_v_self->c_triangulation); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 899, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "cython/core/triangulation.pyx":898
 * 
 *     def pickle(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return pickle_triangulation(self.c_triangulation)
 *         except ValueError:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":900
 *         try:
 *             return pickle_triangulation(self.c_triangulation)
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             # When M has > 255 cusps or does not have integer filling
 *             # coefficients and curve weights in the interval [-128, 127] we use
 */
    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("SnapPy.Triangulation.pickle", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 900, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "cython/core/triangulation.pyx":904
 *             # coefficients and curve weights in the interval [-128, 127] we use
 *             # _to_string.
 *             return self._to_string()             # <<<<<<<<<<<<<<
 * 
 *     def _reindex_cusps(self, permutation):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_string); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 904, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_5 = 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_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 904, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "cython/core/triangulation.pyx":898
 * 
 *     def pickle(self):
 *         try:             # <<<<<<<<<<<<<<
 *             return pickle_triangulation(self.c_triangulation)
 *         except ValueError:
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_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;
  }

  /* "cython/core/triangulation.pyx":897
 *         return (self.__class__, (self.pickle(),))
 * 
 *     def pickle(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return pickle_triangulation(self.c_triangulation)
 */

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

/* "cython/core/triangulation.pyx":906
 *             return self._to_string()
 * 
 *     def _reindex_cusps(self, permutation):             # <<<<<<<<<<<<<<
 *         """
 *         >>> import itertools
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_57_reindex_cusps(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_6SnapPy_13Triangulation_56_reindex_cusps, "Triangulation._reindex_cusps(self, permutation)\n\n        >>> import itertools\n        >>> M = Manifold('L14n62484')\n        >>> ['%.5f' % z.real() for z in M.cusp_info('shape')]\n        ['0.10384', '1.17955', '-1.89674', '0.86324']\n        >>> perms = itertools.permutations(range(4))\n        >>> for perm in perms:\n        ...     shapes = M.cusp_info('shape')\n        ...     M._reindex_cusps(perm)\n        ...     new_shapes = M.cusp_info('shape')\n        ...     for i in range(4):\n        ...         assert new_shapes[perm[i]] == shapes[i]\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_57_reindex_cusps = {"_reindex_cusps", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_57_reindex_cusps, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_56_reindex_cusps};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_57_reindex_cusps(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_permutation = 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("_reindex_cusps (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_permutation,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_permutation)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 906, __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, "_reindex_cusps") < 0)) __PYX_ERR(3, 906, __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_permutation = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_reindex_cusps", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 906, __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("SnapPy.Triangulation._reindex_cusps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_56_reindex_cusps(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_permutation);

  /* 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_6SnapPy_13Triangulation_56_reindex_cusps(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_permutation) {
  int *__pyx_v_indices;
  int __pyx_v_n;
  int __pyx_v_num;
  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;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_reindex_cusps", 1);

  /* "cython/core/triangulation.pyx":921
 *         """
 *         cdef int* indices
 *         cdef int n, num = self.num_cusps()             # <<<<<<<<<<<<<<
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 921, __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(3, 921, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 921, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_num = __pyx_t_4;

  /* "cython/core/triangulation.pyx":922
 *         cdef int* indices
 *         cdef int n, num = self.num_cusps()
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         if ( len(permutation) != num or set(permutation) != set(range(num)) ):
 */
  __pyx_t_5 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_5)) {

    /* "cython/core/triangulation.pyx":923
 *         cdef int n, num = self.num_cusps()
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         if ( len(permutation) != num or set(permutation) != set(range(num)) ):
 *             raise ValueError('Not a valid permutation')
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 923, __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(3, 923, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":922
 *         cdef int* indices
 *         cdef int n, num = self.num_cusps()
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         if ( len(permutation) != num or set(permutation) != set(range(num)) ):
 */
  }

  /* "cython/core/triangulation.pyx":924
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         if ( len(permutation) != num or set(permutation) != set(range(num)) ):             # <<<<<<<<<<<<<<
 *             raise ValueError('Not a valid permutation')
 *         indices = <int *>malloc(num*sizeof(int))
 */
  __pyx_t_6 = PyObject_Length(__pyx_v_permutation); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 924, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_6 != __pyx_v_num);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_1 = PySet_New(__pyx_v_permutation); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_num); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PySet_New(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 924, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(3, 924, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __pyx_t_7;
  __pyx_L5_bool_binop_done:;
  if (unlikely(__pyx_t_5)) {

    /* "cython/core/triangulation.pyx":925
 *             raise ValueError('The Triangulation is empty.')
 *         if ( len(permutation) != num or set(permutation) != set(range(num)) ):
 *             raise ValueError('Not a valid permutation')             # <<<<<<<<<<<<<<
 *         indices = <int *>malloc(num*sizeof(int))
 *         for n in range(num):
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 925, __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(3, 925, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":924
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         if ( len(permutation) != num or set(permutation) != set(range(num)) ):             # <<<<<<<<<<<<<<
 *             raise ValueError('Not a valid permutation')
 *         indices = <int *>malloc(num*sizeof(int))
 */
  }

  /* "cython/core/triangulation.pyx":926
 *         if ( len(permutation) != num or set(permutation) != set(range(num)) ):
 *             raise ValueError('Not a valid permutation')
 *         indices = <int *>malloc(num*sizeof(int))             # <<<<<<<<<<<<<<
 *         for n in range(num):
 *             indices[n] = permutation[n]
 */
  __pyx_v_indices = ((int *)malloc((__pyx_v_num * (sizeof(int)))));

  /* "cython/core/triangulation.pyx":927
 *             raise ValueError('Not a valid permutation')
 *         indices = <int *>malloc(num*sizeof(int))
 *         for n in range(num):             # <<<<<<<<<<<<<<
 *             indices[n] = permutation[n]
 *         reindex_cusps(self.c_triangulation, indices)
 */
  __pyx_t_4 = __pyx_v_num;
  __pyx_t_8 = __pyx_t_4;
  for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
    __pyx_v_n = __pyx_t_9;

    /* "cython/core/triangulation.pyx":928
 *         indices = <int *>malloc(num*sizeof(int))
 *         for n in range(num):
 *             indices[n] = permutation[n]             # <<<<<<<<<<<<<<
 *         reindex_cusps(self.c_triangulation, indices)
 *         free(indices)
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_permutation, __pyx_v_n, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 928, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_indices[__pyx_v_n]) = __pyx_t_10;
  }

  /* "cython/core/triangulation.pyx":929
 *         for n in range(num):
 *             indices[n] = permutation[n]
 *         reindex_cusps(self.c_triangulation, indices)             # <<<<<<<<<<<<<<
 *         free(indices)
 * 
 */
  reindex_cusps(__pyx_v_self->c_triangulation, __pyx_v_indices);

  /* "cython/core/triangulation.pyx":930
 *             indices[n] = permutation[n]
 *         reindex_cusps(self.c_triangulation, indices)
 *         free(indices)             # <<<<<<<<<<<<<<
 * 
 *     def _get_cusp_indices_and_peripheral_curve_data(self):
 */
  free(__pyx_v_indices);

  /* "cython/core/triangulation.pyx":906
 *             return self._to_string()
 * 
 *     def _reindex_cusps(self, permutation):             # <<<<<<<<<<<<<<
 *         """
 *         >>> import itertools
 */

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

/* "cython/core/triangulation.pyx":932
 *         free(indices)
 * 
 *     def _get_cusp_indices_and_peripheral_curve_data(self):             # <<<<<<<<<<<<<<
 *         cdef int i, j, k, v, f
 *         cdef TriangulationData* data
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_59_get_cusp_indices_and_peripheral_curve_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_6SnapPy_13Triangulation_58_get_cusp_indices_and_peripheral_curve_data, "Triangulation._get_cusp_indices_and_peripheral_curve_data(self)");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_59_get_cusp_indices_and_peripheral_curve_data = {"_get_cusp_indices_and_peripheral_curve_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_59_get_cusp_indices_and_peripheral_curve_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_58_get_cusp_indices_and_peripheral_curve_data};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_59_get_cusp_indices_and_peripheral_curve_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("_get_cusp_indices_and_peripheral_curve_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("_get_cusp_indices_and_peripheral_curve_data", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_get_cusp_indices_and_peripheral_curve_data", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_58_get_cusp_indices_and_peripheral_curve_data(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_58_get_cusp_indices_and_peripheral_curve_data(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_k;
  TriangulationData *__pyx_v_data;
  PyObject *__pyx_v_result_cusp_indices = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_v_result_curves = NULL;
  int (*__pyx_v_data_ijk)[4];
  int __pyx_9genexpr13__pyx_v_v;
  int __pyx_9genexpr14__pyx_v_v;
  int __pyx_9genexpr14__pyx_v_f;
  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;
  long __pyx_t_5;
  long __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_cusp_indices_and_peripheral_curve_data", 1);

  /* "cython/core/triangulation.pyx":935
 *         cdef int i, j, k, v, f
 *         cdef TriangulationData* data
 *         triangulation_to_data(self.c_triangulation, &data)             # <<<<<<<<<<<<<<
 * 
 *         result_cusp_indices = []
 */
  triangulation_to_data(__pyx_v_self->c_triangulation, (&__pyx_v_data)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 935, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":937
 *         triangulation_to_data(self.c_triangulation, &data)
 * 
 *         result_cusp_indices = []             # <<<<<<<<<<<<<<
 *         for i in range(self.num_tetrahedra()):
 *             row = [data.tetrahedron_data[i].cusp_index[v]
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result_cusp_indices = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":938
 * 
 *         result_cusp_indices = []
 *         for i in range(self.num_tetrahedra()):             # <<<<<<<<<<<<<<
 *             row = [data.tetrahedron_data[i].cusp_index[v]
 *                    for v in range(4)]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_tetrahedra); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 938, __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(3, 938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_5 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_5 == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 938, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_6; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "cython/core/triangulation.pyx":939
 *         result_cusp_indices = []
 *         for i in range(self.num_tetrahedra()):
 *             row = [data.tetrahedron_data[i].cusp_index[v]             # <<<<<<<<<<<<<<
 *                    for v in range(4)]
 *             result_cusp_indices.append(row)
 */
    { /* enter inner scope */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 939, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cython/core/triangulation.pyx":940
 *         for i in range(self.num_tetrahedra()):
 *             row = [data.tetrahedron_data[i].cusp_index[v]
 *                    for v in range(4)]             # <<<<<<<<<<<<<<
 *             result_cusp_indices.append(row)
 * 
 */
      for (__pyx_t_7 = 0; __pyx_t_7 < 4; __pyx_t_7+=1) {
        __pyx_9genexpr13__pyx_v_v = __pyx_t_7;

        /* "cython/core/triangulation.pyx":939
 *         result_cusp_indices = []
 *         for i in range(self.num_tetrahedra()):
 *             row = [data.tetrahedron_data[i].cusp_index[v]             # <<<<<<<<<<<<<<
 *                    for v in range(4)]
 *             result_cusp_indices.append(row)
 */
        __pyx_t_2 = __Pyx_PyInt_From_int(((__pyx_v_data->tetrahedron_data[__pyx_v_i]).cusp_index[__pyx_9genexpr13__pyx_v_v])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 939, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(3, 939, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    } /* exit inner scope */
    __Pyx_XDECREF_SET(__pyx_v_row, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "cython/core/triangulation.pyx":941
 *             row = [data.tetrahedron_data[i].cusp_index[v]
 *                    for v in range(4)]
 *             result_cusp_indices.append(row)             # <<<<<<<<<<<<<<
 * 
 *         result_curves = []
 */
    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result_cusp_indices, __pyx_v_row); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 941, __pyx_L1_error)
  }

  /* "cython/core/triangulation.pyx":943
 *             result_cusp_indices.append(row)
 * 
 *         result_curves = []             # <<<<<<<<<<<<<<
 *         for i in range(self.num_tetrahedra()):
 *             for j in range(2):         # meridian, longitude
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result_curves = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":944
 * 
 *         result_curves = []
 *         for i in range(self.num_tetrahedra()):             # <<<<<<<<<<<<<<
 *             for j in range(2):         # meridian, longitude
 *                 for k in range(2):     # righthanded, lefthanded
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_tetrahedra); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 944, __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(3, 944, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_5 = __Pyx_PyInt_As_long(__pyx_t_1); if (unlikely((__pyx_t_5 == (long)-1) && PyErr_Occurred())) __PYX_ERR(3, 944, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_6; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "cython/core/triangulation.pyx":945
 *         result_curves = []
 *         for i in range(self.num_tetrahedra()):
 *             for j in range(2):         # meridian, longitude             # <<<<<<<<<<<<<<
 *                 for k in range(2):     # righthanded, lefthanded
 *                     data_ijk = data.tetrahedron_data[i].curve[j][k]
 */
    for (__pyx_t_7 = 0; __pyx_t_7 < 2; __pyx_t_7+=1) {
      __pyx_v_j = __pyx_t_7;

      /* "cython/core/triangulation.pyx":946
 *         for i in range(self.num_tetrahedra()):
 *             for j in range(2):         # meridian, longitude
 *                 for k in range(2):     # righthanded, lefthanded             # <<<<<<<<<<<<<<
 *                     data_ijk = data.tetrahedron_data[i].curve[j][k]
 *                     row = [data_ijk[v][f] for v in range(4) for f in range(4)]
 */
      for (__pyx_t_9 = 0; __pyx_t_9 < 2; __pyx_t_9+=1) {
        __pyx_v_k = __pyx_t_9;

        /* "cython/core/triangulation.pyx":947
 *             for j in range(2):         # meridian, longitude
 *                 for k in range(2):     # righthanded, lefthanded
 *                     data_ijk = data.tetrahedron_data[i].curve[j][k]             # <<<<<<<<<<<<<<
 *                     row = [data_ijk[v][f] for v in range(4) for f in range(4)]
 *                     result_curves.append(row)
 */
        __pyx_v_data_ijk = (((__pyx_v_data->tetrahedron_data[__pyx_v_i]).curve[__pyx_v_j])[__pyx_v_k]);

        /* "cython/core/triangulation.pyx":948
 *                 for k in range(2):     # righthanded, lefthanded
 *                     data_ijk = data.tetrahedron_data[i].curve[j][k]
 *                     row = [data_ijk[v][f] for v in range(4) for f in range(4)]             # <<<<<<<<<<<<<<
 *                     result_curves.append(row)
 * 
 */
        { /* enter inner scope */
          __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 948, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          for (__pyx_t_10 = 0; __pyx_t_10 < 4; __pyx_t_10+=1) {
            __pyx_9genexpr14__pyx_v_v = __pyx_t_10;
            for (__pyx_t_11 = 0; __pyx_t_11 < 4; __pyx_t_11+=1) {
              __pyx_9genexpr14__pyx_v_f = __pyx_t_11;
              __pyx_t_2 = __Pyx_PyInt_From_int(((__pyx_v_data_ijk[__pyx_9genexpr14__pyx_v_v])[__pyx_9genexpr14__pyx_v_f])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 948, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(3, 948, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            }
          }
        } /* exit inner scope */
        __Pyx_XDECREF_SET(__pyx_v_row, ((PyObject*)__pyx_t_1));
        __pyx_t_1 = 0;

        /* "cython/core/triangulation.pyx":949
 *                     data_ijk = data.tetrahedron_data[i].curve[j][k]
 *                     row = [data_ijk[v][f] for v in range(4) for f in range(4)]
 *                     result_curves.append(row)             # <<<<<<<<<<<<<<
 * 
 *         free_triangulation_data(data)
 */
        __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result_curves, __pyx_v_row); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(3, 949, __pyx_L1_error)
      }
    }
  }

  /* "cython/core/triangulation.pyx":951
 *                     result_curves.append(row)
 * 
 *         free_triangulation_data(data)             # <<<<<<<<<<<<<<
 *         return (result_cusp_indices, result_curves)
 * 
 */
  free_triangulation_data(__pyx_v_data); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 951, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":952
 * 
 *         free_triangulation_data(data)
 *         return (result_cusp_indices, result_curves)             # <<<<<<<<<<<<<<
 * 
 *     def _get_tetrahedra_gluing_data(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_result_cusp_indices);
  __Pyx_GIVEREF(__pyx_v_result_cusp_indices);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_result_cusp_indices)) __PYX_ERR(3, 952, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_result_curves);
  __Pyx_GIVEREF(__pyx_v_result_curves);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_result_curves)) __PYX_ERR(3, 952, __pyx_L1_error);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":932
 *         free(indices)
 * 
 *     def _get_cusp_indices_and_peripheral_curve_data(self):             # <<<<<<<<<<<<<<
 *         cdef int i, j, k, v, f
 *         cdef TriangulationData* data
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.Triangulation._get_cusp_indices_and_peripheral_curve_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result_cusp_indices);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_result_curves);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":954
 *         return (result_cusp_indices, result_curves)
 * 
 *     def _get_tetrahedra_gluing_data(self):             # <<<<<<<<<<<<<<
 *         cdef int i, j, k
 *         cdef TriangulationData* data
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_61_get_tetrahedra_gluing_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_6SnapPy_13Triangulation_60_get_tetrahedra_gluing_data, "Triangulation._get_tetrahedra_gluing_data(self)");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_61_get_tetrahedra_gluing_data = {"_get_tetrahedra_gluing_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_61_get_tetrahedra_gluing_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_60_get_tetrahedra_gluing_data};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_61_get_tetrahedra_gluing_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("_get_tetrahedra_gluing_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("_get_tetrahedra_gluing_data", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_get_tetrahedra_gluing_data", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_60_get_tetrahedra_gluing_data(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_60_get_tetrahedra_gluing_data(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  int __pyx_v_i;
  TriangulationData *__pyx_v_data;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_neighbors = NULL;
  PyObject *__pyx_v_perms = NULL;
  int __pyx_9genexpr15__pyx_v_j;
  int __pyx_9genexpr16__pyx_v_j;
  int __pyx_9genexpr17__pyx_v_k;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_tetrahedra_gluing_data", 1);

  /* "cython/core/triangulation.pyx":957
 *         cdef int i, j, k
 *         cdef TriangulationData* data
 *         triangulation_to_data(self.c_triangulation, &data)             # <<<<<<<<<<<<<<
 *         result = []
 *         for i from 0 <= i < data.num_tetrahedra:
 */
  triangulation_to_data(__pyx_v_self->c_triangulation, (&__pyx_v_data)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 957, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":958
 *         cdef TriangulationData* data
 *         triangulation_to_data(self.c_triangulation, &data)
 *         result = []             # <<<<<<<<<<<<<<
 *         for i from 0 <= i < data.num_tetrahedra:
 *             neighbors = [data.tetrahedron_data[i].neighbor_index[j]
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":959
 *         triangulation_to_data(self.c_triangulation, &data)
 *         result = []
 *         for i from 0 <= i < data.num_tetrahedra:             # <<<<<<<<<<<<<<
 *             neighbors = [data.tetrahedron_data[i].neighbor_index[j]
 *                          for j in range(4)]
 */
  __pyx_t_2 = __pyx_v_data->num_tetrahedra;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) {

    /* "cython/core/triangulation.pyx":960
 *         result = []
 *         for i from 0 <= i < data.num_tetrahedra:
 *             neighbors = [data.tetrahedron_data[i].neighbor_index[j]             # <<<<<<<<<<<<<<
 *                          for j in range(4)]
 *             perms = [[data.tetrahedron_data[i].gluing[j][k]
 */
    { /* enter inner scope */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 960, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cython/core/triangulation.pyx":961
 *         for i from 0 <= i < data.num_tetrahedra:
 *             neighbors = [data.tetrahedron_data[i].neighbor_index[j]
 *                          for j in range(4)]             # <<<<<<<<<<<<<<
 *             perms = [[data.tetrahedron_data[i].gluing[j][k]
 *                       for k in range(4)] for j in range(4)]
 */
      for (__pyx_t_3 = 0; __pyx_t_3 < 4; __pyx_t_3+=1) {
        __pyx_9genexpr15__pyx_v_j = __pyx_t_3;

        /* "cython/core/triangulation.pyx":960
 *         result = []
 *         for i from 0 <= i < data.num_tetrahedra:
 *             neighbors = [data.tetrahedron_data[i].neighbor_index[j]             # <<<<<<<<<<<<<<
 *                          for j in range(4)]
 *             perms = [[data.tetrahedron_data[i].gluing[j][k]
 */
        __pyx_t_4 = __Pyx_PyInt_From_int(((__pyx_v_data->tetrahedron_data[__pyx_v_i]).neighbor_index[__pyx_9genexpr15__pyx_v_j])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 960, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(3, 960, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    } /* exit inner scope */
    __Pyx_XDECREF_SET(__pyx_v_neighbors, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "cython/core/triangulation.pyx":962
 *             neighbors = [data.tetrahedron_data[i].neighbor_index[j]
 *                          for j in range(4)]
 *             perms = [[data.tetrahedron_data[i].gluing[j][k]             # <<<<<<<<<<<<<<
 *                       for k in range(4)] for j in range(4)]
 * 
 */
    { /* enter inner scope */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 962, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cython/core/triangulation.pyx":963
 *                          for j in range(4)]
 *             perms = [[data.tetrahedron_data[i].gluing[j][k]
 *                       for k in range(4)] for j in range(4)]             # <<<<<<<<<<<<<<
 * 
 *             result.append((neighbors, perms))
 */
      for (__pyx_t_3 = 0; __pyx_t_3 < 4; __pyx_t_3+=1) {
        __pyx_9genexpr16__pyx_v_j = __pyx_t_3;
        { /* enter inner scope */

          /* "cython/core/triangulation.pyx":962
 *             neighbors = [data.tetrahedron_data[i].neighbor_index[j]
 *                          for j in range(4)]
 *             perms = [[data.tetrahedron_data[i].gluing[j][k]             # <<<<<<<<<<<<<<
 *                       for k in range(4)] for j in range(4)]
 * 
 */
          __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 962, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);

          /* "cython/core/triangulation.pyx":963
 *                          for j in range(4)]
 *             perms = [[data.tetrahedron_data[i].gluing[j][k]
 *                       for k in range(4)] for j in range(4)]             # <<<<<<<<<<<<<<
 * 
 *             result.append((neighbors, perms))
 */
          for (__pyx_t_5 = 0; __pyx_t_5 < 4; __pyx_t_5+=1) {
            __pyx_9genexpr17__pyx_v_k = __pyx_t_5;

            /* "cython/core/triangulation.pyx":962
 *             neighbors = [data.tetrahedron_data[i].neighbor_index[j]
 *                          for j in range(4)]
 *             perms = [[data.tetrahedron_data[i].gluing[j][k]             # <<<<<<<<<<<<<<
 *                       for k in range(4)] for j in range(4)]
 * 
 */
            __pyx_t_6 = __Pyx_PyInt_From_int((((__pyx_v_data->tetrahedron_data[__pyx_v_i]).gluing[__pyx_9genexpr16__pyx_v_j])[__pyx_9genexpr17__pyx_v_k])); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 962, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(3, 962, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          }
        } /* exit inner scope */
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(3, 962, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    } /* exit inner scope */
    __Pyx_XDECREF_SET(__pyx_v_perms, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "cython/core/triangulation.pyx":965
 *                       for k in range(4)] for j in range(4)]
 * 
 *             result.append((neighbors, perms))             # <<<<<<<<<<<<<<
 *         free_triangulation_data(data)
 *         return result
 */
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_neighbors);
    __Pyx_GIVEREF(__pyx_v_neighbors);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_neighbors)) __PYX_ERR(3, 965, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_perms);
    __Pyx_GIVEREF(__pyx_v_perms);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_perms)) __PYX_ERR(3, 965, __pyx_L1_error);
    __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(3, 965, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "cython/core/triangulation.pyx":966
 * 
 *             result.append((neighbors, perms))
 *         free_triangulation_data(data)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  free_triangulation_data(__pyx_v_data); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 966, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":967
 *             result.append((neighbors, perms))
 *         free_triangulation_data(data)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def isomorphisms_to(self, Triangulation other not None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":954
 *         return (result_cusp_indices, result_curves)
 * 
 *     def _get_tetrahedra_gluing_data(self):             # <<<<<<<<<<<<<<
 *         cdef int i, j, k
 *         cdef TriangulationData* data
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.Triangulation._get_tetrahedra_gluing_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_neighbors);
  __Pyx_XDECREF(__pyx_v_perms);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":969
 *         return result
 * 
 *     def isomorphisms_to(self, Triangulation other not None):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a complete list of combinatorial isomorphisms between
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_63isomorphisms_to(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_6SnapPy_13Triangulation_62isomorphisms_to, "Triangulation.isomorphisms_to(self, Triangulation other)\n\n        Returns a complete list of combinatorial isomorphisms between\n        the two triangulations:\n\n        >>> M = Manifold('5^2_1')\n        >>> N = Manifold('5^2_1')\n        >>> N.set_peripheral_curves([[[2,3],[-1,-1]],[[1,1],[0,1]]])\n        >>> isoms = M.isomorphisms_to(N)\n        >>> isoms[6]\n        0 -> 1  1 -> 0\n        [ 1 0]  [-1 1]\n        [-1 1]  [-3 2]\n        Does not extend to link\n\n        Each transformation between cusps is given by a matrix which\n        acts on the left.  That is, the two *columns* of the matrix\n        give the image of the meridian and longitude respectively.  In\n        the above example, the meridian of cusp 0 is sent to the\n        meridian of cusp 1.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_63isomorphisms_to = {"isomorphisms_to", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_63isomorphisms_to, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_62isomorphisms_to};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_63isomorphisms_to(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_6SnapPy_Triangulation *__pyx_v_other = 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("isomorphisms_to (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_other,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_other)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 969, __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, "isomorphisms_to") < 0)) __PYX_ERR(3, 969, __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_other = ((struct __pyx_obj_6SnapPy_Triangulation *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isomorphisms_to", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 969, __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("SnapPy.Triangulation.isomorphisms_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_6SnapPy_Triangulation, 0, "other", 0))) __PYX_ERR(3, 969, __pyx_L1_error)
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_62isomorphisms_to(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_other);

  /* 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_6SnapPy_13Triangulation_62isomorphisms_to(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_other) {
  IsometryList *__pyx_v_isometries;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isomorphisms_to", 1);

  /* "cython/core/triangulation.pyx":990
 *         meridian of cusp 1.
 *         """
 *         cdef IsometryList *isometries = NULL             # <<<<<<<<<<<<<<
 * 
 *         if self.c_triangulation is NULL or other.c_triangulation is NULL:
 */
  __pyx_v_isometries = NULL;

  /* "cython/core/triangulation.pyx":992
 *         cdef IsometryList *isometries = NULL
 * 
 *         if self.c_triangulation is NULL or other.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('Manifolds must be non-empty.')
 * 
 */
  __pyx_t_2 = (__pyx_v_self->c_triangulation == NULL);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_other->c_triangulation == NULL);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":993
 * 
 *         if self.c_triangulation is NULL or other.c_triangulation is NULL:
 *             raise ValueError('Manifolds must be non-empty.')             # <<<<<<<<<<<<<<
 * 
 *         compute_cusped_isomorphisms(self.c_triangulation,
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 993, __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(3, 993, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":992
 *         cdef IsometryList *isometries = NULL
 * 
 *         if self.c_triangulation is NULL or other.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('Manifolds must be non-empty.')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":995
 *             raise ValueError('Manifolds must be non-empty.')
 * 
 *         compute_cusped_isomorphisms(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                     other.c_triangulation,
 *                                     &isometries,
 */
  compute_cusped_isomorphisms(__pyx_v_self->c_triangulation, __pyx_v_other->c_triangulation, (&__pyx_v_isometries), NULL);

  /* "cython/core/triangulation.pyx":1000
 *                                     NULL)
 * 
 *         if isometry_list_size(isometries) == 0:             # <<<<<<<<<<<<<<
 *             result = []
 *         else:
 */
  __pyx_t_4 = isometry_list_size(__pyx_v_isometries); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1000, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_4 == 0);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":1001
 * 
 *         if isometry_list_size(isometries) == 0:
 *             result = []             # <<<<<<<<<<<<<<
 *         else:
 *             result = IsometryListToIsometries(isometries)
 */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_result = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":1000
 *                                     NULL)
 * 
 *         if isometry_list_size(isometries) == 0:             # <<<<<<<<<<<<<<
 *             result = []
 *         else:
 */
    goto __pyx_L6;
  }

  /* "cython/core/triangulation.pyx":1003
 *             result = []
 *         else:
 *             result = IsometryListToIsometries(isometries)             # <<<<<<<<<<<<<<
 *         free_isometry_list(isometries)
 *         return result
 */
  /*else*/ {
    __pyx_t_3 = __pyx_f_6SnapPy_IsometryListToIsometries(__pyx_v_isometries); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_result = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L6:;

  /* "cython/core/triangulation.pyx":1004
 *         else:
 *             result = IsometryListToIsometries(isometries)
 *         free_isometry_list(isometries)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  free_isometry_list(__pyx_v_isometries); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1004, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1005
 *             result = IsometryListToIsometries(isometries)
 *         free_isometry_list(isometries)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":969
 *         return result
 * 
 *     def isomorphisms_to(self, Triangulation other not None):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a complete list of combinatorial isomorphisms between
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.Triangulation.isomorphisms_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1007
 *         return result
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.c_triangulation is not NULL:
 *             free_triangulation(self.c_triangulation)
 */

/* Python wrapper */
static void __pyx_pw_6SnapPy_13Triangulation_65__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6SnapPy_13Triangulation_65__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_6SnapPy_13Triangulation_64__dealloc__(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static void __pyx_pf_6SnapPy_13Triangulation_64__dealloc__(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "cython/core/triangulation.pyx":1008
 * 
 *     def __dealloc__(self):
 *         if self.c_triangulation is not NULL:             # <<<<<<<<<<<<<<
 *             free_triangulation(self.c_triangulation)
 * 
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation != NULL);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":1009
 *     def __dealloc__(self):
 *         if self.c_triangulation is not NULL:
 *             free_triangulation(self.c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(Triangulation self, Triangulation other, op):
 */
    free_triangulation(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1009, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1008
 * 
 *     def __dealloc__(self):
 *         if self.c_triangulation is not NULL:             # <<<<<<<<<<<<<<
 *             free_triangulation(self.c_triangulation)
 * 
 */
  }

  /* "cython/core/triangulation.pyx":1007
 *         return result
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.c_triangulation is not NULL:
 *             free_triangulation(self.c_triangulation)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("SnapPy.Triangulation.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
}

/* "cython/core/triangulation.pyx":1011
 *             free_triangulation(self.c_triangulation)
 * 
 *     def __richcmp__(Triangulation self, Triangulation other, op):             # <<<<<<<<<<<<<<
 *         """
 *         Two triangulations are equal if they are combinatorially
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_67__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_arg_op); /*proto*/
static PyObject *__pyx_pw_6SnapPy_13Triangulation_67__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_arg_op) {
  PyObject *__pyx_v_op = 0;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_v_op = __Pyx_PyInt_From_int(__pyx_arg_op); if (unlikely(!__pyx_v_op)) __PYX_ERR(3, 1011, __pyx_L3_error)
  __Pyx_GOTREF(__pyx_v_op);
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("SnapPy.Triangulation.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_6SnapPy_Triangulation, 1, "other", 0))) __PYX_ERR(3, 1011, __pyx_L1_error)
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_66__richcmp__(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), ((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_other), ((PyObject *)__pyx_v_op));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_66__richcmp__(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_other, PyObject *__pyx_v_op) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  Boolean __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__richcmp__", 1);

  /* "cython/core/triangulation.pyx":1025
 *         ValueError: Can't compare triangulations of manifolds with Dehn fillings.
 *         """
 *         if op != 2:             # <<<<<<<<<<<<<<
 *             return NotImplemented
 *         if type(self) != type(other):
 */
  __pyx_t_1 = (__Pyx_PyInt_BoolNeObjC(__pyx_v_op, __pyx_int_2, 2, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1025, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":1026
 *         """
 *         if op != 2:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 *         if type(self) != type(other):
 *             return False
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":1025
 *         ValueError: Can't compare triangulations of manifolds with Dehn fillings.
 *         """
 *         if op != 2:             # <<<<<<<<<<<<<<
 *             return NotImplemented
 *         if type(self) != type(other):
 */
  }

  /* "cython/core/triangulation.pyx":1027
 *         if op != 2:
 *             return NotImplemented
 *         if type(self) != type(other):             # <<<<<<<<<<<<<<
 *             return False
 *         if False in ( self.cusp_info('is_complete') +
 */
  __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))), ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_other))), Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1027, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1027, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":1028
 *             return NotImplemented
 *         if type(self) != type(other):
 *             return False             # <<<<<<<<<<<<<<
 *         if False in ( self.cusp_info('is_complete') +
 *                       other.cusp_info('is_complete') ):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":1027
 *         if op != 2:
 *             return NotImplemented
 *         if type(self) != type(other):             # <<<<<<<<<<<<<<
 *             return False
 *         if False in ( self.cusp_info('is_complete') +
 */
  }

  /* "cython/core/triangulation.pyx":1029
 *         if type(self) != type(other):
 *             return False
 *         if False in ( self.cusp_info('is_complete') +             # <<<<<<<<<<<<<<
 *                       other.cusp_info('is_complete') ):
 *             raise ValueError("Can't compare triangulations of manifolds "
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1029, __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_is_complete};
    __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(3, 1029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }

  /* "cython/core/triangulation.pyx":1030
 *             return False
 *         if False in ( self.cusp_info('is_complete') +
 *                       other.cusp_info('is_complete') ):             # <<<<<<<<<<<<<<
 *             raise ValueError("Can't compare triangulations of manifolds "
 *                              "with Dehn fillings.")
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_n_s_is_complete};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1030, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }

  /* "cython/core/triangulation.pyx":1029
 *         if type(self) != type(other):
 *             return False
 *         if False in ( self.cusp_info('is_complete') +             # <<<<<<<<<<<<<<
 *                       other.cusp_info('is_complete') ):
 *             raise ValueError("Can't compare triangulations of manifolds "
 */
  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1029, __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_1 = (__Pyx_PySequence_ContainsTF(Py_False, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1029, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":1031
 *         if False in ( self.cusp_info('is_complete') +
 *                       other.cusp_info('is_complete') ):
 *             raise ValueError("Can't compare triangulations of manifolds "             # <<<<<<<<<<<<<<
 *                              "with Dehn fillings.")
 *         return bool(same_triangulation(self.c_triangulation,
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1031, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(3, 1031, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1029
 *         if type(self) != type(other):
 *             return False
 *         if False in ( self.cusp_info('is_complete') +             # <<<<<<<<<<<<<<
 *                       other.cusp_info('is_complete') ):
 *             raise ValueError("Can't compare triangulations of manifolds "
 */
  }

  /* "cython/core/triangulation.pyx":1033
 *             raise ValueError("Can't compare triangulations of manifolds "
 *                              "with Dehn fillings.")
 *         return bool(same_triangulation(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                        other.c_triangulation))
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "cython/core/triangulation.pyx":1034
 *                              "with Dehn fillings.")
 *         return bool(same_triangulation(self.c_triangulation,
 *                                        other.c_triangulation))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_7 = same_triangulation(__pyx_v_self->c_triangulation, __pyx_v_other->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1033, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1033
 *             raise ValueError("Can't compare triangulations of manifolds "
 *                              "with Dehn fillings.")
 *         return bool(same_triangulation(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                        other.c_triangulation))
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_From_Boolean(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1033, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1011
 *             free_triangulation(self.c_triangulation)
 * 
 *     def __richcmp__(Triangulation self, Triangulation other, op):             # <<<<<<<<<<<<<<
 *         """
 *         Two triangulations are equal if they are combinatorially
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.Triangulation.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1036
 *                                        other.c_triangulation))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self.c_triangulation is NULL:
 *             return 'Empty Triangulation'
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_69__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6SnapPy_13Triangulation_69__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_6SnapPy_13Triangulation_68__repr__(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_68__repr__(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  PyObject *__pyx_v_repr = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_info = 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;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "cython/core/triangulation.pyx":1037
 * 
 *     def __repr__(self):
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return 'Empty Triangulation'
 *         else:
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":1038
 *     def __repr__(self):
 *         if self.c_triangulation is NULL:
 *             return 'Empty Triangulation'             # <<<<<<<<<<<<<<
 *         else:
 *             repr = self.name()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_s_Empty_Triangulation);
    __pyx_r = __pyx_kp_s_Empty_Triangulation;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":1037
 * 
 *     def __repr__(self):
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return 'Empty Triangulation'
 *         else:
 */
  }

  /* "cython/core/triangulation.pyx":1040
 *             return 'Empty Triangulation'
 *         else:
 *             repr = self.name()             # <<<<<<<<<<<<<<
 *             for i in range(self.num_cusps()):
 *                 info = self.cusp_info(i)
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1040, __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(3, 1040, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_repr = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/triangulation.pyx":1041
 *         else:
 *             repr = self.name()
 *             for i in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *                 info = self.cusp_info(i)
 *                 if info.is_complete:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1041, __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(3, 1041, __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_range, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1041, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1041, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1041, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        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(3, 1041, __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_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 1041, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1041, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #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(3, 1041, __pyx_L1_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 1041, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1041, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_7(__pyx_t_2);
        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(3, 1041, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cython/core/triangulation.pyx":1042
 *             repr = self.name()
 *             for i in range(self.num_cusps()):
 *                 info = self.cusp_info(i)             # <<<<<<<<<<<<<<
 *                 if info.is_complete:
 *                     repr += '(0,0)'
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1042, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_i};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1042, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_info, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cython/core/triangulation.pyx":1043
 *             for i in range(self.num_cusps()):
 *                 info = self.cusp_info(i)
 *                 if info.is_complete:             # <<<<<<<<<<<<<<
 *                     repr += '(0,0)'
 *                 else:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_info, __pyx_n_s_is_complete); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1043, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_1) {

        /* "cython/core/triangulation.pyx":1044
 *                 info = self.cusp_info(i)
 *                 if info.is_complete:
 *                     repr += '(0,0)'             # <<<<<<<<<<<<<<
 *                 else:
 *                     repr += '(%g,%g)'% info['filling']
 */
        __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_repr, __pyx_kp_s_0_0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1044, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_repr, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "cython/core/triangulation.pyx":1043
 *             for i in range(self.num_cusps()):
 *                 info = self.cusp_info(i)
 *                 if info.is_complete:             # <<<<<<<<<<<<<<
 *                     repr += '(0,0)'
 *                 else:
 */
        goto __pyx_L6;
      }

      /* "cython/core/triangulation.pyx":1046
 *                     repr += '(0,0)'
 *                 else:
 *                     repr += '(%g,%g)'% info['filling']             # <<<<<<<<<<<<<<
 *             return repr
 * 
 */
      /*else*/ {
        __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_info, __pyx_n_s_filling); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1046, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_g_g, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1046, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_repr, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1046, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF_SET(__pyx_v_repr, __pyx_t_3);
        __pyx_t_3 = 0;
      }
      __pyx_L6:;

      /* "cython/core/triangulation.pyx":1041
 *         else:
 *             repr = self.name()
 *             for i in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *                 info = self.cusp_info(i)
 *                 if info.is_complete:
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/triangulation.pyx":1047
 *                 else:
 *                     repr += '(%g,%g)'% info['filling']
 *             return repr             # <<<<<<<<<<<<<<
 * 
 *     def name(self):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_repr);
    __pyx_r = __pyx_v_repr;
    goto __pyx_L0;
  }

  /* "cython/core/triangulation.pyx":1036
 *                                        other.c_triangulation))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self.c_triangulation is NULL:
 *             return 'Empty Triangulation'
 */

  /* 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_8);
  __Pyx_AddTraceback("SnapPy.Triangulation.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_repr);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_info);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1049
 *             return repr
 * 
 *     def name(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the name of the triangulation.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_71name(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_6SnapPy_13Triangulation_70name, "Triangulation.name(self)\n\n        Return the name of the triangulation.\n\n        >>> M = Triangulation('4_1')\n        >>> M.name()\n        '4_1'\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_71name = {"name", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_71name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_70name};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_71name(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("name (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("name", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "name", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_70name(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_70name(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  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("name", 1);

  /* "cython/core/triangulation.pyx":1057
 *         '4_1'
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return
 *         return to_str(get_triangulation_name(self.c_triangulation))
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":1058
 *         """
 *         if self.c_triangulation is NULL:
 *             return             # <<<<<<<<<<<<<<
 *         return to_str(get_triangulation_name(self.c_triangulation))
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":1057
 *         '4_1'
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return
 *         return to_str(get_triangulation_name(self.c_triangulation))
 */
  }

  /* "cython/core/triangulation.pyx":1059
 *         if self.c_triangulation is NULL:
 *             return
 *         return to_str(get_triangulation_name(self.c_triangulation))             # <<<<<<<<<<<<<<
 * 
 *     def set_name(self, new_name):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_to_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = get_triangulation_name(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1059, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1049
 *             return repr
 * 
 *     def name(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the name of the triangulation.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.Triangulation.name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1061
 *         return to_str(get_triangulation_name(self.c_triangulation))
 * 
 *     def set_name(self, new_name):             # <<<<<<<<<<<<<<
 *         """
 *         Give the triangulation a new name.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_73set_name(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_6SnapPy_13Triangulation_72set_name, "Triangulation.set_name(self, new_name)\n\n        Give the triangulation a new name.\n\n        >>> M = Triangulation('4_1')\n        >>> M.set_name('figure-eight-comp')\n        >>> M\n        figure-eight-comp(0,0)\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_73set_name = {"set_name", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_73set_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_72set_name};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_73set_name(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_new_name = 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("set_name (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_new_name,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_new_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1061, __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, "set_name") < 0)) __PYX_ERR(3, 1061, __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_new_name = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 1061, __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("SnapPy.Triangulation.set_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_72set_name(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_new_name);

  /* 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_6SnapPy_13Triangulation_72set_name(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_new_name) {
  PyObject *__pyx_v_b_new_name = NULL;
  char *__pyx_v_c_new_name;
  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;
  char *__pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_name", 1);

  /* "cython/core/triangulation.pyx":1070
 *         figure-eight-comp(0,0)
 *         """
 *         b_new_name = to_byte_str(new_name)             # <<<<<<<<<<<<<<
 *         cdef char* c_new_name = b_new_name
 *         if self.c_triangulation is NULL:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_to_byte_str); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1070, __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, __pyx_v_new_name};
    __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(3, 1070, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_b_new_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":1071
 *         """
 *         b_new_name = to_byte_str(new_name)
 *         cdef char* c_new_name = b_new_name             # <<<<<<<<<<<<<<
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The empty triangulation has no name.')
 */
  __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_v_b_new_name); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 1071, __pyx_L1_error)
  __pyx_v_c_new_name = __pyx_t_5;

  /* "cython/core/triangulation.pyx":1072
 *         b_new_name = to_byte_str(new_name)
 *         cdef char* c_new_name = b_new_name
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The empty triangulation has no name.')
 *         set_triangulation_name(self.c_triangulation, c_new_name)
 */
  __pyx_t_6 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_6)) {

    /* "cython/core/triangulation.pyx":1073
 *         cdef char* c_new_name = b_new_name
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The empty triangulation has no name.')             # <<<<<<<<<<<<<<
 *         set_triangulation_name(self.c_triangulation, c_new_name)
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1073, __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(3, 1073, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1072
 *         b_new_name = to_byte_str(new_name)
 *         cdef char* c_new_name = b_new_name
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The empty triangulation has no name.')
 *         set_triangulation_name(self.c_triangulation, c_new_name)
 */
  }

  /* "cython/core/triangulation.pyx":1074
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The empty triangulation has no name.')
 *         set_triangulation_name(self.c_triangulation, c_new_name)             # <<<<<<<<<<<<<<
 * 
 *     def DT_code(self, alpha=False, flips=False):
 */
  set_triangulation_name(__pyx_v_self->c_triangulation, __pyx_v_c_new_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1074, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1061
 *         return to_str(get_triangulation_name(self.c_triangulation))
 * 
 *     def set_name(self, new_name):             # <<<<<<<<<<<<<<
 *         """
 *         Give the triangulation a new name.
 */

  /* 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("SnapPy.Triangulation.set_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_b_new_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1076
 *         set_triangulation_name(self.c_triangulation, c_new_name)
 * 
 *     def DT_code(self, alpha=False, flips=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return the Dowker-Thistlethwaite code of this link complement,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_75DT_code(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_6SnapPy_13Triangulation_74DT_code, "Triangulation.DT_code(self, alpha=False, flips=False)\n\n        Return the Dowker-Thistlethwaite code of this link complement,\n        if it is a link complement. The DT code is intended to be an\n        immutable attribute, for use with knot and link exteriors\n        only, which is set only when the manifold was created.\n\n        Here is the Whitehead link:\n\n        >>> M = Manifold('L5a1')\n        >>> M.DT_code()\n        [(6, 8), (2, 10, 4)]\n        >>> M.DT_code(alpha=True)\n        'ebbccdaeb'\n        >>> M.DT_code(alpha=True, flips=True)\n        'ebbccdaeb.01110'\n        >>> M.DT_code(flips=True)\n        ([(6, 8), (2, 10, 4)], [0, 1, 1, 1, 0])\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_75DT_code = {"DT_code", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_75DT_code, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_74DT_code};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_75DT_code(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_alpha = 0;
  PyObject *__pyx_v_flips = 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("DT_code (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_alpha,&__pyx_n_s_flips,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_alpha);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1076, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_flips);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1076, __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, "DT_code") < 0)) __PYX_ERR(3, 1076, __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);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_alpha = values[0];
    __pyx_v_flips = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("DT_code", 0, 0, 2, __pyx_nargs); __PYX_ERR(3, 1076, __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("SnapPy.Triangulation.DT_code", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_74DT_code(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_alpha, __pyx_v_flips);

  /* 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_6SnapPy_13Triangulation_74DT_code(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_alpha, PyObject *__pyx_v_flips) {
  PyObject *__pyx_v_codec = NULL;
  PyObject *__pyx_9genexpr18__pyx_v_x = NULL;
  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_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("DT_code", 1);

  /* "cython/core/triangulation.pyx":1095
 *         ([(6, 8), (2, 10, 4)], [0, 1, 1, 1, 0])
 *         """
 *         codec = self._DTcode             # <<<<<<<<<<<<<<
 *         if codec is None:
 *             return None
 */
  __pyx_t_1 = __pyx_v_self->_DTcode;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_codec = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":1096
 *         """
 *         codec = self._DTcode
 *         if codec is None:             # <<<<<<<<<<<<<<
 *             return None
 *         elif not isinstance(codec, spherogram.DTcodec):
 */
  __pyx_t_2 = (__pyx_v_codec == Py_None);
  if (__pyx_t_2) {

    /* "cython/core/triangulation.pyx":1097
 *         codec = self._DTcode
 *         if codec is None:
 *             return None             # <<<<<<<<<<<<<<
 *         elif not isinstance(codec, spherogram.DTcodec):
 *             self._DTcode = codec = spherogram.DTcodec(codec)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":1096
 *         """
 *         codec = self._DTcode
 *         if codec is None:             # <<<<<<<<<<<<<<
 *             return None
 *         elif not isinstance(codec, spherogram.DTcodec):
 */
  }

  /* "cython/core/triangulation.pyx":1098
 *         if codec is None:
 *             return None
 *         elif not isinstance(codec, spherogram.DTcodec):             # <<<<<<<<<<<<<<
 *             self._DTcode = codec = spherogram.DTcodec(codec)
 *         if alpha:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_spherogram); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DTcodec); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_codec, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 1098, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = (!__pyx_t_2);
  if (__pyx_t_4) {

    /* "cython/core/triangulation.pyx":1099
 *             return None
 *         elif not isinstance(codec, spherogram.DTcodec):
 *             self._DTcode = codec = spherogram.DTcodec(codec)             # <<<<<<<<<<<<<<
 *         if alpha:
 *             return codec.encode(header=False, flips=flips)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_spherogram); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1099, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DTcodec); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1099, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_codec};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1099, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __Pyx_GOTREF(__pyx_v_self->_DTcode);
    __Pyx_DECREF(__pyx_v_self->_DTcode);
    __pyx_v_self->_DTcode = __pyx_t_3;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_codec, __pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":1098
 *         if codec is None:
 *             return None
 *         elif not isinstance(codec, spherogram.DTcodec):             # <<<<<<<<<<<<<<
 *             self._DTcode = codec = spherogram.DTcodec(codec)
 *         if alpha:
 */
  }

  /* "cython/core/triangulation.pyx":1100
 *         elif not isinstance(codec, spherogram.DTcodec):
 *             self._DTcode = codec = spherogram.DTcodec(codec)
 *         if alpha:             # <<<<<<<<<<<<<<
 *             return codec.encode(header=False, flips=flips)
 *         else:
 */
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_alpha); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(3, 1100, __pyx_L1_error)
  if (__pyx_t_4) {

    /* "cython/core/triangulation.pyx":1101
 *             self._DTcode = codec = spherogram.DTcodec(codec)
 *         if alpha:
 *             return codec.encode(header=False, flips=flips)             # <<<<<<<<<<<<<<
 *         else:
 *             if flips:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_codec, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_header, Py_False) < 0) __PYX_ERR(3, 1101, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_flips, __pyx_v_flips) < 0) __PYX_ERR(3, 1101, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":1100
 *         elif not isinstance(codec, spherogram.DTcodec):
 *             self._DTcode = codec = spherogram.DTcodec(codec)
 *         if alpha:             # <<<<<<<<<<<<<<
 *             return codec.encode(header=False, flips=flips)
 *         else:
 */
  }

  /* "cython/core/triangulation.pyx":1103
 *             return codec.encode(header=False, flips=flips)
 *         else:
 *             if flips:             # <<<<<<<<<<<<<<
 *                 return codec.code, [int(x) for x in codec.flips]
 *             else:
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_flips); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(3, 1103, __pyx_L1_error)
    if (__pyx_t_4) {

      /* "cython/core/triangulation.pyx":1104
 *         else:
 *             if flips:
 *                 return codec.code, [int(x) for x in codec.flips]             # <<<<<<<<<<<<<<
 *             else:
 *                 return codec.code
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_codec, __pyx_n_s_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1104, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      { /* enter inner scope */
        __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1104, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_codec, __pyx_n_s_flips); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1104, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
          __pyx_t_7 = __pyx_t_3; __Pyx_INCREF(__pyx_t_7);
          __pyx_t_8 = 0;
          __pyx_t_9 = NULL;
        } else {
          __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1104, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 1104, __pyx_L8_error)
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        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(3, 1104, __pyx_L8_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_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 1104, __pyx_L8_error)
              #else
              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1104, __pyx_L8_error)
              __Pyx_GOTREF(__pyx_t_3);
              #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(3, 1104, __pyx_L8_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_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 1104, __pyx_L8_error)
              #else
              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1104, __pyx_L8_error)
              __Pyx_GOTREF(__pyx_t_3);
              #endif
            }
          } else {
            __pyx_t_3 = __pyx_t_9(__pyx_t_7);
            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(3, 1104, __pyx_L8_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_XDECREF_SET(__pyx_9genexpr18__pyx_v_x, __pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_9genexpr18__pyx_v_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1104, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_3))) __PYX_ERR(3, 1104, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_x); __pyx_9genexpr18__pyx_v_x = 0;
        goto __pyx_L12_exit_scope;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_x); __pyx_9genexpr18__pyx_v_x = 0;
        goto __pyx_L1_error;
        __pyx_L12_exit_scope:;
      } /* exit inner scope */
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1104, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1)) __PYX_ERR(3, 1104, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5)) __PYX_ERR(3, 1104, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_5 = 0;
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L0;

      /* "cython/core/triangulation.pyx":1103
 *             return codec.encode(header=False, flips=flips)
 *         else:
 *             if flips:             # <<<<<<<<<<<<<<
 *                 return codec.code, [int(x) for x in codec.flips]
 *             else:
 */
    }

    /* "cython/core/triangulation.pyx":1106
 *                 return codec.code, [int(x) for x in codec.flips]
 *             else:
 *                 return codec.code             # <<<<<<<<<<<<<<
 * 
 *     def _set_DTcode(self, code, lazy=True):
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_codec, __pyx_n_s_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1106, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L0;
    }
  }

  /* "cython/core/triangulation.pyx":1076
 *         set_triangulation_name(self.c_triangulation, c_new_name)
 * 
 *     def DT_code(self, alpha=False, flips=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return the Dowker-Thistlethwaite code of this link complement,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.Triangulation.DT_code", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_codec);
  __Pyx_XDECREF(__pyx_9genexpr18__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1108
 *                 return codec.code
 * 
 *     def _set_DTcode(self, code, lazy=True):             # <<<<<<<<<<<<<<
 *         if not lazy and not isinstance(code, spherogram.DTcodec):
 *             code = spherogram.DTcodec(code)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_77_set_DTcode(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_6SnapPy_13Triangulation_76_set_DTcode, "Triangulation._set_DTcode(self, code, lazy=True)");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_77_set_DTcode = {"_set_DTcode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_77_set_DTcode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_76_set_DTcode};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_77_set_DTcode(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_code = 0;
  PyObject *__pyx_v_lazy = 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("_set_DTcode (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_code,&__pyx_n_s_lazy,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    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_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1108, __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_lazy);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1108, __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, "_set_DTcode") < 0)) __PYX_ERR(3, 1108, __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_code = values[0];
    __pyx_v_lazy = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_set_DTcode", 0, 1, 2, __pyx_nargs); __PYX_ERR(3, 1108, __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("SnapPy.Triangulation._set_DTcode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_76_set_DTcode(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_code, __pyx_v_lazy);

  /* 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_6SnapPy_13Triangulation_76_set_DTcode(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_code, PyObject *__pyx_v_lazy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_set_DTcode", 0);
  __Pyx_INCREF(__pyx_v_code);

  /* "cython/core/triangulation.pyx":1109
 * 
 *     def _set_DTcode(self, code, lazy=True):
 *         if not lazy and not isinstance(code, spherogram.DTcodec):             # <<<<<<<<<<<<<<
 *             code = spherogram.DTcodec(code)
 *         self._DTcode = code
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lazy); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 1109, __pyx_L1_error)
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_spherogram); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DTcodec); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = PyObject_IsInstance(__pyx_v_code, __pyx_t_5); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(3, 1109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = (!__pyx_t_3);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":1110
 *     def _set_DTcode(self, code, lazy=True):
 *         if not lazy and not isinstance(code, spherogram.DTcodec):
 *             code = spherogram.DTcodec(code)             # <<<<<<<<<<<<<<
 *         self._DTcode = code
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_spherogram); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_DTcodec); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1110, __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_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_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_code};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1110, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_code, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cython/core/triangulation.pyx":1109
 * 
 *     def _set_DTcode(self, code, lazy=True):
 *         if not lazy and not isinstance(code, spherogram.DTcodec):             # <<<<<<<<<<<<<<
 *             code = spherogram.DTcodec(code)
 *         self._DTcode = code
 */
  }

  /* "cython/core/triangulation.pyx":1111
 *         if not lazy and not isinstance(code, spherogram.DTcodec):
 *             code = spherogram.DTcodec(code)
 *         self._DTcode = code             # <<<<<<<<<<<<<<
 * 
 *     def _set_PDcode(self, code):
 */
  __Pyx_INCREF(__pyx_v_code);
  __Pyx_GIVEREF(__pyx_v_code);
  __Pyx_GOTREF(__pyx_v_self->_DTcode);
  __Pyx_DECREF(__pyx_v_self->_DTcode);
  __pyx_v_self->_DTcode = __pyx_v_code;

  /* "cython/core/triangulation.pyx":1108
 *                 return codec.code
 * 
 *     def _set_DTcode(self, code, lazy=True):             # <<<<<<<<<<<<<<
 *         if not lazy and not isinstance(code, spherogram.DTcodec):
 *             code = spherogram.DTcodec(code)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.Triangulation._set_DTcode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_code);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1113
 *         self._DTcode = code
 * 
 *     def _set_PDcode(self, code):             # <<<<<<<<<<<<<<
 *         self._PDcode = code
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_79_set_PDcode(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_6SnapPy_13Triangulation_78_set_PDcode, "Triangulation._set_PDcode(self, code)");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_79_set_PDcode = {"_set_PDcode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_79_set_PDcode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_78_set_PDcode};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_79_set_PDcode(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_code = 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("_set_PDcode (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_code,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_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1113, __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, "_set_PDcode") < 0)) __PYX_ERR(3, 1113, __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_code = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_set_PDcode", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 1113, __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("SnapPy.Triangulation._set_PDcode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_78_set_PDcode(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_code);

  /* 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_6SnapPy_13Triangulation_78_set_PDcode(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_code) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_set_PDcode", 1);

  /* "cython/core/triangulation.pyx":1114
 * 
 *     def _set_PDcode(self, code):
 *         self._PDcode = code             # <<<<<<<<<<<<<<
 * 
 *     def num_tetrahedra(self):
 */
  __Pyx_INCREF(__pyx_v_code);
  __Pyx_GIVEREF(__pyx_v_code);
  __Pyx_GOTREF(__pyx_v_self->_PDcode);
  __Pyx_DECREF(__pyx_v_self->_PDcode);
  __pyx_v_self->_PDcode = __pyx_v_code;

  /* "cython/core/triangulation.pyx":1113
 *         self._DTcode = code
 * 
 *     def _set_PDcode(self, code):             # <<<<<<<<<<<<<<
 *         self._PDcode = code
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1116
 *         self._PDcode = code
 * 
 *     def num_tetrahedra(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of tetrahedra in the triangulation.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_81num_tetrahedra(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_6SnapPy_13Triangulation_80num_tetrahedra, "Triangulation.num_tetrahedra(self)\n\n        Return the number of tetrahedra in the triangulation.\n\n        >>> M = Triangulation('m004')\n        >>> M.num_tetrahedra()\n        2\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_81num_tetrahedra = {"num_tetrahedra", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_81num_tetrahedra, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_80num_tetrahedra};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_81num_tetrahedra(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("num_tetrahedra (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("num_tetrahedra", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "num_tetrahedra", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_80num_tetrahedra(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_80num_tetrahedra(struct __pyx_obj_6SnapPy_Triangulation *__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("num_tetrahedra", 1);

  /* "cython/core/triangulation.pyx":1124
 *         2
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return 0
 *         return get_num_tetrahedra(self.c_triangulation)
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":1125
 *         """
 *         if self.c_triangulation is NULL:
 *             return 0             # <<<<<<<<<<<<<<
 *         return get_num_tetrahedra(self.c_triangulation)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_r = __pyx_int_0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":1124
 *         2
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return 0
 *         return get_num_tetrahedra(self.c_triangulation)
 */
  }

  /* "cython/core/triangulation.pyx":1126
 *         if self.c_triangulation is NULL:
 *             return 0
 *         return get_num_tetrahedra(self.c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *     def dehn_fill(self, filling_data, which_cusp=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = get_num_tetrahedra(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1126, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1126, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1116
 *         self._PDcode = code
 * 
 *     def num_tetrahedra(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of tetrahedra in the triangulation.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.Triangulation.num_tetrahedra", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1128
 *         return get_num_tetrahedra(self.c_triangulation)
 * 
 *     def dehn_fill(self, filling_data, which_cusp=None):             # <<<<<<<<<<<<<<
 *         """
 *         Set the Dehn filling coefficients of the cusps.  This can be
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_83dehn_fill(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_6SnapPy_13Triangulation_82dehn_fill, "Triangulation.dehn_fill(self, filling_data, which_cusp=None)\n\n        Set the Dehn filling coefficients of the cusps.  This can be\n        specified in the following ways, where the cusps are numbered\n        by 0,1,...,(num_cusps - 1).\n\n        - Fill cusp 2:\n\n          >>> M = Triangulation('8^4_1')\n          >>> M.dehn_fill((2,3), 2)\n          >>> M\n          8^4_1(0,0)(0,0)(2,3)(0,0)\n\n        - Fill the last cusp:\n\n          >>> M.dehn_fill((1,5), -1)\n          >>> M\n          8^4_1(0,0)(0,0)(2,3)(1,5)\n\n        - Fill the first two cusps:\n\n          >>> M.dehn_fill( [ (3,0), (1, -4) ])\n          >>> M\n          8^4_1(3,0)(1,-4)(2,3)(1,5)\n\n        - When there is only one cusp, there's a shortcut\n\n          >>> N = Triangulation('m004')\n          >>> N.dehn_fill( (-3,4) )\n          >>> N\n          m004(-3,4)\n\n        Does not return a new Triangulation.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_83dehn_fill = {"dehn_fill", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_83dehn_fill, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_82dehn_fill};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_83dehn_fill(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_filling_data = 0;
  PyObject *__pyx_v_which_cusp = 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("dehn_fill (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_filling_data,&__pyx_n_s_which_cusp,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_filling_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1128, __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_which_cusp);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1128, __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, "dehn_fill") < 0)) __PYX_ERR(3, 1128, __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_filling_data = values[0];
    __pyx_v_which_cusp = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dehn_fill", 0, 1, 2, __pyx_nargs); __PYX_ERR(3, 1128, __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("SnapPy.Triangulation.dehn_fill", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_82dehn_fill(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_filling_data, __pyx_v_which_cusp);

  /* 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_6SnapPy_13Triangulation_82dehn_fill(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_filling_data, PyObject *__pyx_v_which_cusp) {
  PyObject *__pyx_v_num_cusps = NULL;
  PyObject *__pyx_v_meridian = NULL;
  PyObject *__pyx_v_longitude = NULL;
  PyObject *__pyx_v_complete = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_fill = 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;
  PyObject *(*__pyx_t_6)(PyObject *);
  Boolean __pyx_t_7;
  __pyx_t_6SnapPy_Real __pyx_t_8;
  __pyx_t_6SnapPy_Real __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  int __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("dehn_fill", 0);
  __Pyx_INCREF(__pyx_v_which_cusp);

  /* "cython/core/triangulation.pyx":1162
 *         Does not return a new Triangulation.
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":1163
 *         """
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 * 
 *         num_cusps = self.num_cusps()
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1163, __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(3, 1163, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1162
 *         Does not return a new Triangulation.
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":1165
 *             raise ValueError('The Triangulation is empty.')
 * 
 *         num_cusps = self.num_cusps()             # <<<<<<<<<<<<<<
 * 
 *         if which_cusp is not None:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1165, __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(3, 1165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_num_cusps = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":1167
 *         num_cusps = self.num_cusps()
 * 
 *         if which_cusp is not None:             # <<<<<<<<<<<<<<
 *             which_cusp = valid_index(
 *                 which_cusp, num_cusps,
 */
  __pyx_t_1 = (__pyx_v_which_cusp != Py_None);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":1168
 * 
 *         if which_cusp is not None:
 *             which_cusp = valid_index(             # <<<<<<<<<<<<<<
 *                 which_cusp, num_cusps,
 *                 'The specified cusp (%s) does not exist.')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_valid_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "cython/core/triangulation.pyx":1169
 *         if which_cusp is not None:
 *             which_cusp = valid_index(
 *                 which_cusp, num_cusps,             # <<<<<<<<<<<<<<
 *                 'The specified cusp (%s) does not exist.')
 * 
 */
    __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[4] = {__pyx_t_4, __pyx_v_which_cusp, __pyx_v_num_cusps, __pyx_kp_s_The_specified_cusp_s_does_not_ex};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_which_cusp, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/triangulation.pyx":1172
 *                 'The specified cusp (%s) does not exist.')
 * 
 *             meridian, longitude = filling_data             # <<<<<<<<<<<<<<
 *             complete = ( meridian == 0 and longitude == 0)
 *             set_cusp_info(self.c_triangulation,
 */
    if ((likely(PyTuple_CheckExact(__pyx_v_filling_data))) || (PyList_CheckExact(__pyx_v_filling_data))) {
      PyObject* sequence = __pyx_v_filling_data;
      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(3, 1172, __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(3, 1172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
    } else {
      Py_ssize_t index = -1;
      __pyx_t_4 = PyObject_GetIter(__pyx_v_filling_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
      index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_4), 2) < 0) __PYX_ERR(3, 1172, __pyx_L1_error)
      __pyx_t_6 = NULL;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_6 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(3, 1172, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __pyx_v_meridian = __pyx_t_2;
    __pyx_t_2 = 0;
    __pyx_v_longitude = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":1173
 * 
 *             meridian, longitude = filling_data
 *             complete = ( meridian == 0 and longitude == 0)             # <<<<<<<<<<<<<<
 *             set_cusp_info(self.c_triangulation,
 *                           which_cusp, complete,
 */
    __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v_meridian, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1173, __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(3, 1173, __pyx_L1_error)
    if (__pyx_t_1) {
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = __pyx_t_2;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v_longitude, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = __pyx_t_2;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_L7_bool_binop_done:;
    __pyx_v_complete = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":1175
 *             complete = ( meridian == 0 and longitude == 0)
 *             set_cusp_info(self.c_triangulation,
 *                           which_cusp, complete,             # <<<<<<<<<<<<<<
 *                           Object2Real(meridian),
 *                           Object2Real(longitude))
 */
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_which_cusp); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1175, __pyx_L1_error)
    __pyx_t_7 = __Pyx_PyInt_As_Boolean(__pyx_v_complete); if (unlikely((__pyx_t_7 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1175, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1176
 *             set_cusp_info(self.c_triangulation,
 *                           which_cusp, complete,
 *                           Object2Real(meridian),             # <<<<<<<<<<<<<<
 *                           Object2Real(longitude))
 *             self._cache.clear(message='dehn_fill')
 */
    __pyx_t_8 = __pyx_f_6SnapPy_Object2Real(__pyx_v_meridian); if (unlikely(__pyx_t_8 == ((__pyx_t_6SnapPy_Real)-1) && PyErr_Occurred())) __PYX_ERR(3, 1176, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1177
 *                           which_cusp, complete,
 *                           Object2Real(meridian),
 *                           Object2Real(longitude))             # <<<<<<<<<<<<<<
 *             self._cache.clear(message='dehn_fill')
 *         else:
 */
    __pyx_t_9 = __pyx_f_6SnapPy_Object2Real(__pyx_v_longitude); if (unlikely(__pyx_t_9 == ((__pyx_t_6SnapPy_Real)-1) && PyErr_Occurred())) __PYX_ERR(3, 1177, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1174
 *             meridian, longitude = filling_data
 *             complete = ( meridian == 0 and longitude == 0)
 *             set_cusp_info(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                           which_cusp, complete,
 *                           Object2Real(meridian),
 */
    set_cusp_info(__pyx_v_self->c_triangulation, __pyx_t_5, __pyx_t_7, __pyx_t_8, __pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1174, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1178
 *                           Object2Real(meridian),
 *                           Object2Real(longitude))
 *             self._cache.clear(message='dehn_fill')             # <<<<<<<<<<<<<<
 *         else:
 *             if num_cusps > 1 and len(filling_data) == 2:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_cache, __pyx_n_s_clear); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_message, __pyx_n_s_dehn_fill) < 0) __PYX_ERR(3, 1178, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":1167
 *         num_cusps = self.num_cusps()
 * 
 *         if which_cusp is not None:             # <<<<<<<<<<<<<<
 *             which_cusp = valid_index(
 *                 which_cusp, num_cusps,
 */
    goto __pyx_L4;
  }

  /* "cython/core/triangulation.pyx":1180
 *             self._cache.clear(message='dehn_fill')
 *         else:
 *             if num_cusps > 1 and len(filling_data) == 2:             # <<<<<<<<<<<<<<
 *                 if ( not hasattr(filling_data, '__getitem__')
 *                      or not hasattr(filling_data[0], '__getitem__') ):
 */
  /*else*/ {
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_num_cusps, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1180, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(3, 1180, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_10) {
    } else {
      __pyx_t_1 = __pyx_t_10;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_11 = PyObject_Length(__pyx_v_filling_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1180, __pyx_L1_error)
    __pyx_t_10 = (__pyx_t_11 == 2);
    __pyx_t_1 = __pyx_t_10;
    __pyx_L10_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cython/core/triangulation.pyx":1181
 *         else:
 *             if num_cusps > 1 and len(filling_data) == 2:
 *                 if ( not hasattr(filling_data, '__getitem__')             # <<<<<<<<<<<<<<
 *                      or not hasattr(filling_data[0], '__getitem__') ):
 *                     raise IndexError('If there is more than one cusp '
 */
      __pyx_t_10 = __Pyx_HasAttr(__pyx_v_filling_data, __pyx_n_s_getitem); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 1181, __pyx_L1_error)
      __pyx_t_12 = (!__pyx_t_10);
      if (!__pyx_t_12) {
      } else {
        __pyx_t_1 = __pyx_t_12;
        goto __pyx_L13_bool_binop_done;
      }

      /* "cython/core/triangulation.pyx":1182
 *             if num_cusps > 1 and len(filling_data) == 2:
 *                 if ( not hasattr(filling_data, '__getitem__')
 *                      or not hasattr(filling_data[0], '__getitem__') ):             # <<<<<<<<<<<<<<
 *                     raise IndexError('If there is more than one cusp '
 *                                      'you must specify which one you\n'
 */
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_filling_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1182, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_12 = __Pyx_HasAttr(__pyx_t_4, __pyx_n_s_getitem); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(3, 1182, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_10 = (!__pyx_t_12);
      __pyx_t_1 = __pyx_t_10;
      __pyx_L13_bool_binop_done:;

      /* "cython/core/triangulation.pyx":1181
 *         else:
 *             if num_cusps > 1 and len(filling_data) == 2:
 *                 if ( not hasattr(filling_data, '__getitem__')             # <<<<<<<<<<<<<<
 *                      or not hasattr(filling_data[0], '__getitem__') ):
 *                     raise IndexError('If there is more than one cusp '
 */
      if (unlikely(__pyx_t_1)) {

        /* "cython/core/triangulation.pyx":1183
 *                 if ( not hasattr(filling_data, '__getitem__')
 *                      or not hasattr(filling_data[0], '__getitem__') ):
 *                     raise IndexError('If there is more than one cusp '             # <<<<<<<<<<<<<<
 *                                      'you must specify which one you\n'
 *                                      'are filling, e.g. M.dehn_fill((2,3),1)')
 */
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1183, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(3, 1183, __pyx_L1_error)

        /* "cython/core/triangulation.pyx":1181
 *         else:
 *             if num_cusps > 1 and len(filling_data) == 2:
 *                 if ( not hasattr(filling_data, '__getitem__')             # <<<<<<<<<<<<<<
 *                      or not hasattr(filling_data[0], '__getitem__') ):
 *                     raise IndexError('If there is more than one cusp '
 */
      }

      /* "cython/core/triangulation.pyx":1180
 *             self._cache.clear(message='dehn_fill')
 *         else:
 *             if num_cusps > 1 and len(filling_data) == 2:             # <<<<<<<<<<<<<<
 *                 if ( not hasattr(filling_data, '__getitem__')
 *                      or not hasattr(filling_data[0], '__getitem__') ):
 */
    }

    /* "cython/core/triangulation.pyx":1186
 *                                      'you must specify which one you\n'
 *                                      'are filling, e.g. M.dehn_fill((2,3),1)')
 *             if num_cusps == 1 and len(filling_data) == 2:             # <<<<<<<<<<<<<<
 *                 Triangulation.dehn_fill(self, filling_data, 0)
 *                 return
 */
    __pyx_t_10 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_num_cusps, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(3, 1186, __pyx_L1_error)
    if (__pyx_t_10) {
    } else {
      __pyx_t_1 = __pyx_t_10;
      goto __pyx_L16_bool_binop_done;
    }
    __pyx_t_11 = PyObject_Length(__pyx_v_filling_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1186, __pyx_L1_error)
    __pyx_t_10 = (__pyx_t_11 == 2);
    __pyx_t_1 = __pyx_t_10;
    __pyx_L16_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cython/core/triangulation.pyx":1187
 *                                      'are filling, e.g. M.dehn_fill((2,3),1)')
 *             if num_cusps == 1 and len(filling_data) == 2:
 *                 Triangulation.dehn_fill(self, filling_data, 0)             # <<<<<<<<<<<<<<
 *                 return
 *             if len(filling_data) > num_cusps:
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6SnapPy_Triangulation), __pyx_n_s_dehn_fill); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1187, __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[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_filling_data, __pyx_int_0};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1187, __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;

      /* "cython/core/triangulation.pyx":1188
 *             if num_cusps == 1 and len(filling_data) == 2:
 *                 Triangulation.dehn_fill(self, filling_data, 0)
 *                 return             # <<<<<<<<<<<<<<
 *             if len(filling_data) > num_cusps:
 *                 raise IndexError('You provided filling data for too '
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "cython/core/triangulation.pyx":1186
 *                                      'you must specify which one you\n'
 *                                      'are filling, e.g. M.dehn_fill((2,3),1)')
 *             if num_cusps == 1 and len(filling_data) == 2:             # <<<<<<<<<<<<<<
 *                 Triangulation.dehn_fill(self, filling_data, 0)
 *                 return
 */
    }

    /* "cython/core/triangulation.pyx":1189
 *                 Triangulation.dehn_fill(self, filling_data, 0)
 *                 return
 *             if len(filling_data) > num_cusps:             # <<<<<<<<<<<<<<
 *                 raise IndexError('You provided filling data for too '
 *                                  'many cusps.  There are only %s.'%
 */
    __pyx_t_11 = PyObject_Length(__pyx_v_filling_data); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1189, __pyx_L1_error)
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1189, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_v_num_cusps, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1189, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1189, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__pyx_t_1)) {

      /* "cython/core/triangulation.pyx":1191
 *             if len(filling_data) > num_cusps:
 *                 raise IndexError('You provided filling data for too '
 *                                  'many cusps.  There are only %s.'%             # <<<<<<<<<<<<<<
 *                                  num_cusps)
 *             for i, fill in enumerate(filling_data):
 */
      __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_kp_s_You_provided_filling_data_for_to, __pyx_v_num_cusps); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cython/core/triangulation.pyx":1190
 *                 return
 *             if len(filling_data) > num_cusps:
 *                 raise IndexError('You provided filling data for too '             # <<<<<<<<<<<<<<
 *                                  'many cusps.  There are only %s.'%
 *                                  num_cusps)
 */
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1190, __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(3, 1190, __pyx_L1_error)

      /* "cython/core/triangulation.pyx":1189
 *                 Triangulation.dehn_fill(self, filling_data, 0)
 *                 return
 *             if len(filling_data) > num_cusps:             # <<<<<<<<<<<<<<
 *                 raise IndexError('You provided filling data for too '
 *                                  'many cusps.  There are only %s.'%
 */
    }

    /* "cython/core/triangulation.pyx":1193
 *                                  'many cusps.  There are only %s.'%
 *                                  num_cusps)
 *             for i, fill in enumerate(filling_data):             # <<<<<<<<<<<<<<
 *                 Triangulation.dehn_fill(self, fill, i)
 * 
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_4 = __pyx_int_0;
    if (likely(PyList_CheckExact(__pyx_v_filling_data)) || PyTuple_CheckExact(__pyx_v_filling_data)) {
      __pyx_t_2 = __pyx_v_filling_data; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_11 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_filling_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1193, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_13)) {
        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(3, 1193, __pyx_L1_error)
            #endif
            if (__pyx_t_11 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(3, 1193, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1193, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #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(3, 1193, __pyx_L1_error)
            #endif
            if (__pyx_t_11 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(3, 1193, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1193, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_13(__pyx_t_2);
        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(3, 1193, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_fill, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
      __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1193, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4);
      __pyx_t_4 = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "cython/core/triangulation.pyx":1194
 *                                  num_cusps)
 *             for i, fill in enumerate(filling_data):
 *                 Triangulation.dehn_fill(self, fill, i)             # <<<<<<<<<<<<<<
 * 
 *     # When doctesting, the M,L coefficients acquire an accuracy of 8.
 */
      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6SnapPy_Triangulation), __pyx_n_s_dehn_fill); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 1194, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_15 = NULL;
      __pyx_t_5 = 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_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_15, ((PyObject *)__pyx_v_self), __pyx_v_fill, __pyx_v_i};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1194, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cython/core/triangulation.pyx":1193
 *                                  'many cusps.  There are only %s.'%
 *                                  num_cusps)
 *             for i, fill in enumerate(filling_data):             # <<<<<<<<<<<<<<
 *                 Triangulation.dehn_fill(self, fill, i)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_L4:;

  /* "cython/core/triangulation.pyx":1128
 *         return get_num_tetrahedra(self.c_triangulation)
 * 
 *     def dehn_fill(self, filling_data, which_cusp=None):             # <<<<<<<<<<<<<<
 *         """
 *         Set the Dehn filling coefficients of the cusps.  This can be
 */

  /* 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_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("SnapPy.Triangulation.dehn_fill", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_num_cusps);
  __Pyx_XDECREF(__pyx_v_meridian);
  __Pyx_XDECREF(__pyx_v_longitude);
  __Pyx_XDECREF(__pyx_v_complete);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_fill);
  __Pyx_XDECREF(__pyx_v_which_cusp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1198
 *     # When doctesting, the M,L coefficients acquire an accuracy of 8.
 *     # So we have to include the zeros in the doctest string.
 *     def cusp_info(self, data_spec=None):             # <<<<<<<<<<<<<<
 *         """
 *         Returns an info object containing information about the given
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_85cusp_info(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_6SnapPy_13Triangulation_84cusp_info, "Triangulation.cusp_info(self, data_spec=None)\n\n        Returns an info object containing information about the given\n        cusp.   Usage:\n\n        >>> M = Triangulation('v3227(0,0)(1,2)(3,2)')\n        >>> M.cusp_info(1)\n        Cusp 1 : torus cusp with Dehn filling coefficients (M, L) = (1.0, 2.0)\n        >>> c = M.cusp_info(1)\n        >>> c.is_complete\n        False\n        >>> sorted(c.keys())\n        ['filling', 'index', 'is_complete', 'topology']\n\n        You can get information about multiple cusps at once:\n\n        >>> M.cusp_info()\n        [Cusp 0 : torus cusp, not filled,\n         Cusp 1 : torus cusp with Dehn filling coefficients (M, L) = (1.0, 2.0),\n         Cusp 2 : torus cusp with Dehn filling coefficients (M, L) = (3.0, 2.0)]\n        >>> M.cusp_info('is_complete')\n        [True, False, False]\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_85cusp_info = {"cusp_info", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_85cusp_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_84cusp_info};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_85cusp_info(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_data_spec = 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("cusp_info (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_data_spec,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_data_spec);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1198, __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, "cusp_info") < 0)) __PYX_ERR(3, 1198, __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_data_spec = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cusp_info", 0, 0, 1, __pyx_nargs); __PYX_ERR(3, 1198, __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("SnapPy.Triangulation.cusp_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_84cusp_info(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_data_spec);

  /* 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_6SnapPy_13Triangulation_84cusp_info(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_data_spec) {
  int __pyx_v_cusp_index;
  CuspTopology __pyx_v_topology;
  Boolean __pyx_v_is_complete;
  __pyx_t_6SnapPy_Real __pyx_v_m;
  __pyx_t_6SnapPy_Real __pyx_v_l;
  Complex __pyx_v_initial_shape;
  Complex __pyx_v_current_shape;
  int __pyx_v_initial_shape_accuracy;
  int __pyx_v_current_shape_accuracy;
  Complex __pyx_v_initial_modulus;
  Complex __pyx_v_current_modulus;
  PyObject *__pyx_v_info = NULL;
  PyObject *__pyx_9genexpr19__pyx_v_i = NULL;
  PyObject *__pyx_9genexpr20__pyx_v_c = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cusp_info", 1);

  /* "cython/core/triangulation.pyx":1229
 *         cdef Complex initial_modulus, current_modulus
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         if data_spec is None:
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":1230
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         if data_spec is None:
 *             return ListOnePerLine([self.cusp_info(i)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1230, __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(3, 1230, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1229
 *         cdef Complex initial_modulus, current_modulus
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         if data_spec is None:
 */
  }

  /* "cython/core/triangulation.pyx":1231
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         if data_spec is None:             # <<<<<<<<<<<<<<
 *             return ListOnePerLine([self.cusp_info(i)
 *                                    for i in range(self.num_cusps())])
 */
  __pyx_t_1 = (__pyx_v_data_spec == Py_None);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":1232
 *             raise ValueError('The Triangulation is empty.')
 *         if data_spec is None:
 *             return ListOnePerLine([self.cusp_info(i)             # <<<<<<<<<<<<<<
 *                                    for i in range(self.num_cusps())])
 *         if isinstance(data_spec, str):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ListOnePerLine); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    { /* enter inner scope */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1232, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_4);

      /* "cython/core/triangulation.pyx":1233
 *         if data_spec is None:
 *             return ListOnePerLine([self.cusp_info(i)
 *                                    for i in range(self.num_cusps())])             # <<<<<<<<<<<<<<
 *         if isinstance(data_spec, str):
 *             return [c[data_spec] for c in self.cusp_info()]
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1233, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_6);
      __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, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1233, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1233, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
        __pyx_t_5 = __pyx_t_6; __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_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1233, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1233, __pyx_L7_error)
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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(3, 1233, __pyx_L7_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 1233, __pyx_L7_error)
            #else
            __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1233, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_6);
            #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(3, 1233, __pyx_L7_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 1233, __pyx_L7_error)
            #else
            __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1233, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_6);
            #endif
          }
        } else {
          __pyx_t_6 = __pyx_t_10(__pyx_t_5);
          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(3, 1233, __pyx_L7_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_6);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr19__pyx_v_i, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "cython/core/triangulation.pyx":1232
 *             raise ValueError('The Triangulation is empty.')
 *         if data_spec is None:
 *             return ListOnePerLine([self.cusp_info(i)             # <<<<<<<<<<<<<<
 *                                    for i in range(self.num_cusps())])
 *         if isinstance(data_spec, str):
 */
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1232, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_11 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_9genexpr19__pyx_v_i};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1232, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_6))) __PYX_ERR(3, 1232, __pyx_L7_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "cython/core/triangulation.pyx":1233
 *         if data_spec is None:
 *             return ListOnePerLine([self.cusp_info(i)
 *                                    for i in range(self.num_cusps())])             # <<<<<<<<<<<<<<
 *         if isinstance(data_spec, str):
 *             return [c[data_spec] for c in self.cusp_info()]
 */
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_i); __pyx_9genexpr19__pyx_v_i = 0;
      goto __pyx_L11_exit_scope;
      __pyx_L7_error:;
      __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_i); __pyx_9genexpr19__pyx_v_i = 0;
      goto __pyx_L1_error;
      __pyx_L11_exit_scope:;
    } /* exit inner scope */
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1232, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":1231
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         if data_spec is None:             # <<<<<<<<<<<<<<
 *             return ListOnePerLine([self.cusp_info(i)
 *                                    for i in range(self.num_cusps())])
 */
  }

  /* "cython/core/triangulation.pyx":1234
 *             return ListOnePerLine([self.cusp_info(i)
 *                                    for i in range(self.num_cusps())])
 *         if isinstance(data_spec, str):             # <<<<<<<<<<<<<<
 *             return [c[data_spec] for c in self.cusp_info()]
 *         cusp_index = valid_index(
 */
  __pyx_t_1 = PyString_Check(__pyx_v_data_spec); 
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":1235
 *                                    for i in range(self.num_cusps())])
 *         if isinstance(data_spec, str):
 *             return [c[data_spec] for c in self.cusp_info()]             # <<<<<<<<<<<<<<
 *         cusp_index = valid_index(
 *             data_spec, self.num_cusps(),
 */
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1235, __pyx_L15_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1235, __pyx_L15_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      __pyx_t_8 = 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_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1235, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
        __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4);
        __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1235, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 1235, __pyx_L15_error)
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (likely(!__pyx_t_10)) {
          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(3, 1235, __pyx_L15_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 1235, __pyx_L15_error)
            #else
            __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1235, __pyx_L15_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(3, 1235, __pyx_L15_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 1235, __pyx_L15_error)
            #else
            __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1235, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          }
        } else {
          __pyx_t_3 = __pyx_t_10(__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(3, 1235, __pyx_L15_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr20__pyx_v_c, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_9genexpr20__pyx_v_c, __pyx_v_data_spec); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1235, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(3, 1235, __pyx_L15_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_c); __pyx_9genexpr20__pyx_v_c = 0;
      goto __pyx_L19_exit_scope;
      __pyx_L15_error:;
      __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_c); __pyx_9genexpr20__pyx_v_c = 0;
      goto __pyx_L1_error;
      __pyx_L19_exit_scope:;
    } /* exit inner scope */
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":1234
 *             return ListOnePerLine([self.cusp_info(i)
 *                                    for i in range(self.num_cusps())])
 *         if isinstance(data_spec, str):             # <<<<<<<<<<<<<<
 *             return [c[data_spec] for c in self.cusp_info()]
 *         cusp_index = valid_index(
 */
  }

  /* "cython/core/triangulation.pyx":1236
 *         if isinstance(data_spec, str):
 *             return [c[data_spec] for c in self.cusp_info()]
 *         cusp_index = valid_index(             # <<<<<<<<<<<<<<
 *             data_spec, self.num_cusps(),
 *             'The specified cusp (%s) does not exist.')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_valid_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "cython/core/triangulation.pyx":1237
 *             return [c[data_spec] for c in self.cusp_info()]
 *         cusp_index = valid_index(
 *             data_spec, self.num_cusps(),             # <<<<<<<<<<<<<<
 *             'The specified cusp (%s) does not exist.')
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1237, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = NULL;
  __pyx_t_8 = 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_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_data_spec, __pyx_t_3, __pyx_kp_s_The_specified_cusp_s_does_not_ex};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 3+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }

  /* "cython/core/triangulation.pyx":1236
 *         if isinstance(data_spec, str):
 *             return [c[data_spec] for c in self.cusp_info()]
 *         cusp_index = valid_index(             # <<<<<<<<<<<<<<
 *             data_spec, self.num_cusps(),
 *             'The specified cusp (%s) does not exist.')
 */
  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1236, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_cusp_index = __pyx_t_8;

  /* "cython/core/triangulation.pyx":1240
 *             'The specified cusp (%s) does not exist.')
 * 
 *         get_cusp_info(self.c_triangulation, cusp_index,             # <<<<<<<<<<<<<<
 *                       &topology, &is_complete, &m, &l,
 *                       &initial_shape, &current_shape,
 */
  get_cusp_info(__pyx_v_self->c_triangulation, __pyx_v_cusp_index, (&__pyx_v_topology), (&__pyx_v_is_complete), (&__pyx_v_m), (&__pyx_v_l), (&__pyx_v_initial_shape), (&__pyx_v_current_shape), (&__pyx_v_initial_shape_accuracy), (&__pyx_v_current_shape_accuracy), (&__pyx_v_initial_modulus), (&__pyx_v_current_modulus));

  /* "cython/core/triangulation.pyx":1246
 *                       &initial_modulus, &current_modulus)
 *         info = {
 *            'index' : cusp_index,             # <<<<<<<<<<<<<<
 *            'topology' : CuspTopology[topology],
 *            'is_complete' : B2B(is_complete),
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_cusp_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_index, __pyx_t_4) < 0) __PYX_ERR(3, 1246, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":1247
 *         info = {
 *            'index' : cusp_index,
 *            'topology' : CuspTopology[topology],             # <<<<<<<<<<<<<<
 *            'is_complete' : B2B(is_complete),
 *            'filling' : (Real2float(m), Real2float(l))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CuspTopology); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyInt_From_CuspTopology(__pyx_v_topology); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_topology, __pyx_t_5) < 0) __PYX_ERR(3, 1246, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/triangulation.pyx":1248
 *            'index' : cusp_index,
 *            'topology' : CuspTopology[topology],
 *            'is_complete' : B2B(is_complete),             # <<<<<<<<<<<<<<
 *            'filling' : (Real2float(m), Real2float(l))
 *            }
 */
  __pyx_t_5 = __pyx_f_6SnapPy_B2B(__pyx_v_is_complete); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_is_complete, __pyx_t_5) < 0) __PYX_ERR(3, 1246, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/triangulation.pyx":1249
 *            'topology' : CuspTopology[topology],
 *            'is_complete' : B2B(is_complete),
 *            'filling' : (Real2float(m), Real2float(l))             # <<<<<<<<<<<<<<
 *            }
 * 
 */
  __pyx_t_5 = __pyx_f_6SnapPy_Real2float(__pyx_v_m); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __pyx_f_6SnapPy_Real2float(__pyx_v_l); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(3, 1249, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(3, 1249, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_filling, __pyx_t_4) < 0) __PYX_ERR(3, 1246, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_info = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":1252
 *            }
 * 
 *         return CuspInfo(**info)             # <<<<<<<<<<<<<<
 * 
 *     def reverse_orientation(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CuspInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyDict_Copy(__pyx_v_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1198
 *     # When doctesting, the M,L coefficients acquire an accuracy of 8.
 *     # So we have to include the zeros in the doctest string.
 *     def cusp_info(self, data_spec=None):             # <<<<<<<<<<<<<<
 *         """
 *         Returns an info object containing information about the given
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("SnapPy.Triangulation.cusp_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_info);
  __Pyx_XDECREF(__pyx_9genexpr19__pyx_v_i);
  __Pyx_XDECREF(__pyx_9genexpr20__pyx_v_c);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1254
 *         return CuspInfo(**info)
 * 
 *     def reverse_orientation(self):             # <<<<<<<<<<<<<<
 *         """
 *         Reverses the orientation of the Triangulation, presuming that
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_87reverse_orientation(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_6SnapPy_13Triangulation_86reverse_orientation, "Triangulation.reverse_orientation(self)\n\n        Reverses the orientation of the Triangulation, presuming that\n        it is orientable.\n\n        >>> M = Manifold('m015')\n        >>> cs = M.chern_simons()\n        >>> M.reverse_orientation()\n        >>> abs(cs + M.chern_simons()) # doctest: +NUMERIC9\n        0.0\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_87reverse_orientation = {"reverse_orientation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_87reverse_orientation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_86reverse_orientation};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_87reverse_orientation(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("reverse_orientation (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("reverse_orientation", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reverse_orientation", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_86reverse_orientation(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_86reverse_orientation(struct __pyx_obj_6SnapPy_Triangulation *__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;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reverse_orientation", 1);

  /* "cython/core/triangulation.pyx":1265
 *         0.0
 *         """
 *         if not self.is_orientable():             # <<<<<<<<<<<<<<
 *             raise ValueError("The Manifold is not orientable, so its "
 *                              "orientation can't be reversed.")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_orientable); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1265, __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(3, 1265, __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(3, 1265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (!__pyx_t_5);
  if (unlikely(__pyx_t_6)) {

    /* "cython/core/triangulation.pyx":1266
 *         """
 *         if not self.is_orientable():
 *             raise ValueError("The Manifold is not orientable, so its "             # <<<<<<<<<<<<<<
 *                              "orientation can't be reversed.")
 *         reorient(self.c_triangulation)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1266, __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(3, 1266, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1265
 *         0.0
 *         """
 *         if not self.is_orientable():             # <<<<<<<<<<<<<<
 *             raise ValueError("The Manifold is not orientable, so its "
 *                              "orientation can't be reversed.")
 */
  }

  /* "cython/core/triangulation.pyx":1268
 *             raise ValueError("The Manifold is not orientable, so its "
 *                              "orientation can't be reversed.")
 *         reorient(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         self._cache.clear(message='reverse_orientation')
 * 
 */
  reorient(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1268, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1269
 *                              "orientation can't be reversed.")
 *         reorient(self.c_triangulation)
 *         self._cache.clear(message='reverse_orientation')             # <<<<<<<<<<<<<<
 * 
 *     def filled_triangulation(self, cusps_to_fill='all'):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_cache, __pyx_n_s_clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_message, __pyx_n_s_reverse_orientation) < 0) __PYX_ERR(3, 1269, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1269, __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/triangulation.pyx":1254
 *         return CuspInfo(**info)
 * 
 *     def reverse_orientation(self):             # <<<<<<<<<<<<<<
 *         """
 *         Reverses the orientation of the Triangulation, presuming that
 */

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

/* "cython/core/triangulation.pyx":1271
 *         self._cache.clear(message='reverse_orientation')
 * 
 *     def filled_triangulation(self, cusps_to_fill='all'):             # <<<<<<<<<<<<<<
 *         """
 *         Return a new manifold where the specified cusps have been
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_89filled_triangulation(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_6SnapPy_13Triangulation_88filled_triangulation, "Triangulation.filled_triangulation(self, cusps_to_fill='all')\n\n        Return a new manifold where the specified cusps have been\n        permanently filled in.  Examples:\n\n        Filling all the cusps:\n\n        >>> M = Triangulation('m125(1,2)(3,4)')\n        >>> N = M.filled_triangulation()\n        >>> N.num_cusps()\n        0\n\n        Filling cusps 0 and 2 :\n\n        >>> M = Triangulation('v3227(1,2)(3,4)(5,6)')\n        >>> M.filled_triangulation([0,2])\n        v3227_filled(3,4)\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_89filled_triangulation = {"filled_triangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_89filled_triangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_88filled_triangulation};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_89filled_triangulation(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_cusps_to_fill = 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("filled_triangulation (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_cusps_to_fill,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_s_all));
    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_cusps_to_fill);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1271, __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, "filled_triangulation") < 0)) __PYX_ERR(3, 1271, __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_cusps_to_fill = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("filled_triangulation", 0, 0, 1, __pyx_nargs); __PYX_ERR(3, 1271, __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("SnapPy.Triangulation.filled_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_88filled_triangulation(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_cusps_to_fill);

  /* 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_6SnapPy_13Triangulation_88filled_triangulation(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_cusps_to_fill) {
  PyObject *__pyx_v_n = NULL;
  Triangulation *__pyx_v_c_filled_tri;
  struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_filled_tri = 0;
  Boolean *__pyx_v_fill_cusp_spec;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_fill_all = NULL;
  PyObject *__pyx_9genexpr21__pyx_v_c = NULL;
  PyObject *__pyx_9genexpr22__pyx_v_c = NULL;
  PyObject *__pyx_9genexpr23__pyx_v_c = NULL;
  PyObject *__pyx_9genexpr24__pyx_v_i = 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;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  Boolean __pyx_t_8;
  size_t __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Triangulation *__pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("filled_triangulation", 0);
  __Pyx_INCREF(__pyx_v_cusps_to_fill);

  /* "cython/core/triangulation.pyx":1289
 *         v3227_filled(3,4)
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         n = self.num_cusps()
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":1290
 *         """
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         n = self.num_cusps()
 *         if cusps_to_fill == 'all':
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1290, __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(3, 1290, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1289
 *         v3227_filled(3,4)
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         n = self.num_cusps()
 */
  }

  /* "cython/core/triangulation.pyx":1291
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         n = self.num_cusps()             # <<<<<<<<<<<<<<
 *         if cusps_to_fill == 'all':
 *             cusps_to_fill = [c for c in range(n) if cusp_is_fillable(self.c_triangulation, c)]
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1291, __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(3, 1291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_n = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":1292
 *             raise ValueError('The Triangulation is empty.')
 *         n = self.num_cusps()
 *         if cusps_to_fill == 'all':             # <<<<<<<<<<<<<<
 *             cusps_to_fill = [c for c in range(n) if cusp_is_fillable(self.c_triangulation, c)]
 * 
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_cusps_to_fill, __pyx_n_s_all, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1292, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":1293
 *         n = self.num_cusps()
 *         if cusps_to_fill == 'all':
 *             cusps_to_fill = [c for c in range(n) if cusp_is_fillable(self.c_triangulation, c)]             # <<<<<<<<<<<<<<
 * 
 *         if False in [(c in range(n)) for c in cusps_to_fill]:
 */
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1293, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1293, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
        __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4);
        __pyx_t_6 = 0;
        __pyx_t_7 = NULL;
      } else {
        __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1293, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1293, __pyx_L7_error)
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (likely(!__pyx_t_7)) {
          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(3, 1293, __pyx_L7_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_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 1293, __pyx_L7_error)
            #else
            __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1293, __pyx_L7_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(3, 1293, __pyx_L7_error)
              #endif
              if (__pyx_t_6 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 1293, __pyx_L7_error)
            #else
            __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1293, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          }
        } else {
          __pyx_t_3 = __pyx_t_7(__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(3, 1293, __pyx_L7_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr21__pyx_v_c, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_9genexpr21__pyx_v_c); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1293, __pyx_L7_error)
        __pyx_t_8 = cusp_is_fillable(__pyx_v_self->c_triangulation, __pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1293, __pyx_L7_error)
        __pyx_t_1 = (__pyx_t_8 != 0);
        if (__pyx_t_1) {
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr21__pyx_v_c))) __PYX_ERR(3, 1293, __pyx_L7_error)
        }
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_c); __pyx_9genexpr21__pyx_v_c = 0;
      goto __pyx_L12_exit_scope;
      __pyx_L7_error:;
      __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_c); __pyx_9genexpr21__pyx_v_c = 0;
      goto __pyx_L1_error;
      __pyx_L12_exit_scope:;
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_cusps_to_fill, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/triangulation.pyx":1292
 *             raise ValueError('The Triangulation is empty.')
 *         n = self.num_cusps()
 *         if cusps_to_fill == 'all':             # <<<<<<<<<<<<<<
 *             cusps_to_fill = [c for c in range(n) if cusp_is_fillable(self.c_triangulation, c)]
 * 
 */
  }

  /* "cython/core/triangulation.pyx":1295
 *             cusps_to_fill = [c for c in range(n) if cusp_is_fillable(self.c_triangulation, c)]
 * 
 *         if False in [(c in range(n)) for c in cusps_to_fill]:             # <<<<<<<<<<<<<<
 *             raise IndexError('The specified indices to be filled are beyond '
 *                              'the actual number of cusps.')
 */
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1295, __pyx_L16_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_v_cusps_to_fill)) || PyTuple_CheckExact(__pyx_v_cusps_to_fill)) {
      __pyx_t_4 = __pyx_v_cusps_to_fill; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_cusps_to_fill); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1295, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1295, __pyx_L16_error)
    }
    for (;;) {
      if (likely(!__pyx_t_7)) {
        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(3, 1295, __pyx_L16_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_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 1295, __pyx_L16_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1295, __pyx_L16_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(3, 1295, __pyx_L16_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 1295, __pyx_L16_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1295, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_7(__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(3, 1295, __pyx_L16_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr22__pyx_v_c, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1295, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_9genexpr22__pyx_v_c, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1295, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1295, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(3, 1295, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_c); __pyx_9genexpr22__pyx_v_c = 0;
    goto __pyx_L20_exit_scope;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_c); __pyx_9genexpr22__pyx_v_c = 0;
    goto __pyx_L1_error;
    __pyx_L20_exit_scope:;
  } /* exit inner scope */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(Py_False, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":1296
 * 
 *         if False in [(c in range(n)) for c in cusps_to_fill]:
 *             raise IndexError('The specified indices to be filled are beyond '             # <<<<<<<<<<<<<<
 *                              'the actual number of cusps.')
 *         if 0 in [cusp_is_fillable(self.c_triangulation, c)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1296, __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(3, 1296, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1295
 *             cusps_to_fill = [c for c in range(n) if cusp_is_fillable(self.c_triangulation, c)]
 * 
 *         if False in [(c in range(n)) for c in cusps_to_fill]:             # <<<<<<<<<<<<<<
 *             raise IndexError('The specified indices to be filled are beyond '
 *                              'the actual number of cusps.')
 */
  }

  /* "cython/core/triangulation.pyx":1298
 *             raise IndexError('The specified indices to be filled are beyond '
 *                              'the actual number of cusps.')
 *         if 0 in [cusp_is_fillable(self.c_triangulation, c)             # <<<<<<<<<<<<<<
 *                  for c in cusps_to_fill]:
 *             raise IndexError('To permanently fill a cusp, the Dehn '
 */
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1298, __pyx_L24_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cython/core/triangulation.pyx":1299
 *                              'the actual number of cusps.')
 *         if 0 in [cusp_is_fillable(self.c_triangulation, c)
 *                  for c in cusps_to_fill]:             # <<<<<<<<<<<<<<
 *             raise IndexError('To permanently fill a cusp, the Dehn '
 *                              'filling coefficients must be relatively '
 */
    if (likely(PyList_CheckExact(__pyx_v_cusps_to_fill)) || PyTuple_CheckExact(__pyx_v_cusps_to_fill)) {
      __pyx_t_4 = __pyx_v_cusps_to_fill; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_cusps_to_fill); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1299, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1299, __pyx_L24_error)
    }
    for (;;) {
      if (likely(!__pyx_t_7)) {
        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(3, 1299, __pyx_L24_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_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 1299, __pyx_L24_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1299, __pyx_L24_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(3, 1299, __pyx_L24_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 1299, __pyx_L24_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1299, __pyx_L24_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_7(__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(3, 1299, __pyx_L24_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr23__pyx_v_c, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cython/core/triangulation.pyx":1298
 *             raise IndexError('The specified indices to be filled are beyond '
 *                              'the actual number of cusps.')
 *         if 0 in [cusp_is_fillable(self.c_triangulation, c)             # <<<<<<<<<<<<<<
 *                  for c in cusps_to_fill]:
 *             raise IndexError('To permanently fill a cusp, the Dehn '
 */
      __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_9genexpr23__pyx_v_c); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1298, __pyx_L24_error)
      __pyx_t_8 = cusp_is_fillable(__pyx_v_self->c_triangulation, __pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1298, __pyx_L24_error)
      __pyx_t_3 = __Pyx_PyInt_From_Boolean(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1298, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(3, 1298, __pyx_L24_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cython/core/triangulation.pyx":1299
 *                              'the actual number of cusps.')
 *         if 0 in [cusp_is_fillable(self.c_triangulation, c)
 *                  for c in cusps_to_fill]:             # <<<<<<<<<<<<<<
 *             raise IndexError('To permanently fill a cusp, the Dehn '
 *                              'filling coefficients must be relatively '
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_9genexpr23__pyx_v_c); __pyx_9genexpr23__pyx_v_c = 0;
    goto __pyx_L28_exit_scope;
    __pyx_L24_error:;
    __Pyx_XDECREF(__pyx_9genexpr23__pyx_v_c); __pyx_9genexpr23__pyx_v_c = 0;
    goto __pyx_L1_error;
    __pyx_L28_exit_scope:;
  } /* exit inner scope */
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_int_0, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1298, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":1298
 *             raise IndexError('The specified indices to be filled are beyond '
 *                              'the actual number of cusps.')
 *         if 0 in [cusp_is_fillable(self.c_triangulation, c)             # <<<<<<<<<<<<<<
 *                  for c in cusps_to_fill]:
 *             raise IndexError('To permanently fill a cusp, the Dehn '
 */
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":1300
 *         if 0 in [cusp_is_fillable(self.c_triangulation, c)
 *                  for c in cusps_to_fill]:
 *             raise IndexError('To permanently fill a cusp, the Dehn '             # <<<<<<<<<<<<<<
 *                              'filling coefficients must be relatively '
 *                              'prime integers.')
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1300, __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(3, 1300, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1298
 *             raise IndexError('The specified indices to be filled are beyond '
 *                              'the actual number of cusps.')
 *         if 0 in [cusp_is_fillable(self.c_triangulation, c)             # <<<<<<<<<<<<<<
 *                  for c in cusps_to_fill]:
 *             raise IndexError('To permanently fill a cusp, the Dehn '
 */
  }

  /* "cython/core/triangulation.pyx":1304
 *                              'prime integers.')
 * 
 *         cdef c_Triangulation* c_filled_tri = NULL             # <<<<<<<<<<<<<<
 *         cdef Triangulation filled_tri
 *         cdef Boolean *fill_cusp_spec = NULL
 */
  __pyx_v_c_filled_tri = NULL;

  /* "cython/core/triangulation.pyx":1306
 *         cdef c_Triangulation* c_filled_tri = NULL
 *         cdef Triangulation filled_tri
 *         cdef Boolean *fill_cusp_spec = NULL             # <<<<<<<<<<<<<<
 * 
 *         fill_cusp_spec = <Boolean*>malloc(n*sizeof(Boolean))
 */
  __pyx_v_fill_cusp_spec = NULL;

  /* "cython/core/triangulation.pyx":1308
 *         cdef Boolean *fill_cusp_spec = NULL
 * 
 *         fill_cusp_spec = <Boolean*>malloc(n*sizeof(Boolean))             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             fill_cusp_spec[i] = True if i in cusps_to_fill else False
 */
  __pyx_t_2 = __Pyx_PyInt_FromSize_t((sizeof(Boolean))); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyNumber_Multiply(__pyx_v_n, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_9 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1308, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_fill_cusp_spec = ((Boolean *)malloc(__pyx_t_9));

  /* "cython/core/triangulation.pyx":1309
 * 
 *         fill_cusp_spec = <Boolean*>malloc(n*sizeof(Boolean))
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             fill_cusp_spec[i] = True if i in cusps_to_fill else False
 *         fill_all = all([i in cusps_to_fill for i in range(n)])
 */
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
  } else {
    __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1309, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_7)) {
      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(3, 1309, __pyx_L1_error)
          #endif
          if (__pyx_t_6 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 1309, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1309, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #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(3, 1309, __pyx_L1_error)
          #endif
          if (__pyx_t_6 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 1309, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1309, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_7(__pyx_t_2);
      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(3, 1309, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":1310
 *         fill_cusp_spec = <Boolean*>malloc(n*sizeof(Boolean))
 *         for i in range(n):
 *             fill_cusp_spec[i] = True if i in cusps_to_fill else False             # <<<<<<<<<<<<<<
 *         fill_all = all([i in cusps_to_fill for i in range(n)])
 *         c_filled_tri = fill_cusps(self.c_triangulation,
 */
    __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_i, __pyx_v_cusps_to_fill, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(3, 1310, __pyx_L1_error)
    if (__pyx_t_10) {
      __pyx_t_1 = 1;
    } else {
      __pyx_t_1 = 0;
    }
    __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1310, __pyx_L1_error)
    (__pyx_v_fill_cusp_spec[__pyx_t_11]) = __pyx_t_1;

    /* "cython/core/triangulation.pyx":1309
 * 
 *         fill_cusp_spec = <Boolean*>malloc(n*sizeof(Boolean))
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             fill_cusp_spec[i] = True if i in cusps_to_fill else False
 *         fill_all = all([i in cusps_to_fill for i in range(n)])
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":1311
 *         for i in range(n):
 *             fill_cusp_spec[i] = True if i in cusps_to_fill else False
 *         fill_all = all([i in cusps_to_fill for i in range(n)])             # <<<<<<<<<<<<<<
 *         c_filled_tri = fill_cusps(self.c_triangulation,
 *                                   fill_cusp_spec, '', fill_all)
 */
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1311, __pyx_L34_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1311, __pyx_L34_error)
    __Pyx_GOTREF(__pyx_t_4);
    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_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1311, __pyx_L34_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1311, __pyx_L34_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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(3, 1311, __pyx_L34_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 1311, __pyx_L34_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1311, __pyx_L34_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(3, 1311, __pyx_L34_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 1311, __pyx_L34_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1311, __pyx_L34_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_7(__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(3, 1311, __pyx_L34_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr24__pyx_v_i, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_9genexpr24__pyx_v_i, __pyx_v_cusps_to_fill, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1311, __pyx_L34_error)
      __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1311, __pyx_L34_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(3, 1311, __pyx_L34_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_i); __pyx_9genexpr24__pyx_v_i = 0;
    goto __pyx_L38_exit_scope;
    __pyx_L34_error:;
    __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_i); __pyx_9genexpr24__pyx_v_i = 0;
    goto __pyx_L1_error;
    __pyx_L38_exit_scope:;
  } /* exit inner scope */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_all, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_fill_all = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cython/core/triangulation.pyx":1313
 *         fill_all = all([i in cusps_to_fill for i in range(n)])
 *         c_filled_tri = fill_cusps(self.c_triangulation,
 *                                   fill_cusp_spec, '', fill_all)             # <<<<<<<<<<<<<<
 *         free(fill_cusp_spec)
 *         filled_tri = self.__class__('empty')
 */
  __pyx_t_8 = __Pyx_PyInt_As_Boolean(__pyx_v_fill_all); if (unlikely((__pyx_t_8 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(3, 1313, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1312
 *             fill_cusp_spec[i] = True if i in cusps_to_fill else False
 *         fill_all = all([i in cusps_to_fill for i in range(n)])
 *         c_filled_tri = fill_cusps(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                   fill_cusp_spec, '', fill_all)
 *         free(fill_cusp_spec)
 */
  __pyx_t_12 = fill_cusps(__pyx_v_self->c_triangulation, __pyx_v_fill_cusp_spec, ((char *)""), __pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1312, __pyx_L1_error)
  __pyx_v_c_filled_tri = __pyx_t_12;

  /* "cython/core/triangulation.pyx":1314
 *         c_filled_tri = fill_cusps(self.c_triangulation,
 *                                   fill_cusp_spec, '', fill_all)
 *         free(fill_cusp_spec)             # <<<<<<<<<<<<<<
 *         filled_tri = self.__class__('empty')
 *         filled_tri.set_c_triangulation(c_filled_tri)
 */
  free(__pyx_v_fill_cusp_spec);

  /* "cython/core/triangulation.pyx":1315
 *                                   fill_cusp_spec, '', fill_all)
 *         free(fill_cusp_spec)
 *         filled_tri = self.__class__('empty')             # <<<<<<<<<<<<<<
 *         filled_tri.set_c_triangulation(c_filled_tri)
 *         filled_tri.set_name(self.name() + '_filled')
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1315, __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, __pyx_n_s_empty};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1315, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6SnapPy_Triangulation))))) __PYX_ERR(3, 1315, __pyx_L1_error)
  __pyx_v_filled_tri = ((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cython/core/triangulation.pyx":1316
 *         free(fill_cusp_spec)
 *         filled_tri = self.__class__('empty')
 *         filled_tri.set_c_triangulation(c_filled_tri)             # <<<<<<<<<<<<<<
 *         filled_tri.set_name(self.name() + '_filled')
 *         return filled_tri
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_filled_tri->__pyx_vtab)->set_c_triangulation(__pyx_v_filled_tri, __pyx_v_c_filled_tri); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/triangulation.pyx":1317
 *         filled_tri = self.__class__('empty')
 *         filled_tri.set_c_triangulation(c_filled_tri)
 *         filled_tri.set_name(self.name() + '_filled')             # <<<<<<<<<<<<<<
 *         return filled_tri
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_filled_tri), __pyx_n_s_set_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_14 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_14)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __pyx_t_13 = PyNumber_Add(__pyx_t_4, __pyx_n_s_filled); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __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_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, __pyx_t_13};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1317, __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;

  /* "cython/core/triangulation.pyx":1318
 *         filled_tri.set_c_triangulation(c_filled_tri)
 *         filled_tri.set_name(self.name() + '_filled')
 *         return filled_tri             # <<<<<<<<<<<<<<
 * 
 *     def _unsimplified_filled_triangulation(self, method='fold'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_filled_tri);
  __pyx_r = ((PyObject *)__pyx_v_filled_tri);
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1271
 *         self._cache.clear(message='reverse_orientation')
 * 
 *     def filled_triangulation(self, cusps_to_fill='all'):             # <<<<<<<<<<<<<<
 *         """
 *         Return a new manifold where the specified cusps have been
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("SnapPy.Triangulation.filled_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF((PyObject *)__pyx_v_filled_tri);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_fill_all);
  __Pyx_XDECREF(__pyx_9genexpr21__pyx_v_c);
  __Pyx_XDECREF(__pyx_9genexpr22__pyx_v_c);
  __Pyx_XDECREF(__pyx_9genexpr23__pyx_v_c);
  __Pyx_XDECREF(__pyx_9genexpr24__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_cusps_to_fill);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1320
 *         return filled_tri
 * 
 *     def _unsimplified_filled_triangulation(self, method='fold'):             # <<<<<<<<<<<<<<
 *         """
 *         For a Triangulation that describes a closed manifold, returns
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_91_unsimplified_filled_triangulation(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_6SnapPy_13Triangulation_90_unsimplified_filled_triangulation, "Triangulation._unsimplified_filled_triangulation(self, method='fold')\n\n        For a Triangulation that describes a closed manifold, returns\n        the unsimplified finite triangulation that the kernel builds.\n\n        >>> M = Triangulation('m004(1, 2)')\n        >>> F = M._unsimplified_filled_triangulation()\n        >>> F.num_tetrahedra(), F._num_fake_cusps()\n        (58, 7)\n\n        The default is to use the kernel's original fold method as\n        the final step to close off the cusp. Specifying\n        method='layered' uses a 1-tetrahedron solid torus instead.\n        For method='layered_and_marked', the core solid tori are marked\n        internally so that any calls to simplify/randomize will leave\n        these in place.\n\n        >>> M = Triangulation('m004(1, 2)')\n        >>> F = M._unsimplified_filled_triangulation(method='layered')\n        >>> F.num_tetrahedra(), F._num_fake_cusps()\n        (60, 7)\n        >>> F.simplify(); F.num_tetrahedra() < 15\n        True\n        >>> M = Triangulation('K8n1(1,0)')\n        >>> F = M._unsimplified_filled_triangulation(method='layered_and_marked')\n        >>> F.num_tetrahedra() > 2\n        True\n\n        You can determine which tets are the cores, and remove the\n        marks to allow unrestricted simplification.\n\n        >>> any(F._marked_tetrahedra(clear_marks=True))\n        True\n        >>> F.simplify()\n        >>> F.num_tetrahedra() <= 2\n        True\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_91_unsimplified_filled_triangulation = {"_unsimplified_filled_triangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_91_unsimplified_filled_triangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_90_unsimplified_filled_triangulation};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_91_unsimplified_filled_triangulation(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_method = 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("_unsimplified_filled_triangulation (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_method,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_s_fold));
    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_method);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1320, __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, "_unsimplified_filled_triangulation") < 0)) __PYX_ERR(3, 1320, __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_method = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_unsimplified_filled_triangulation", 0, 0, 1, __pyx_nargs); __PYX_ERR(3, 1320, __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("SnapPy.Triangulation._unsimplified_filled_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_90_unsimplified_filled_triangulation(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_method);

  /* 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_gb_6SnapPy_13Triangulation_34_unsimplified_filled_triangulation_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cython/core/triangulation.pyx":1360
 *             raise ValueError('The Triangulation is empty.')
 *         n = self.num_cusps()
 *         if not all(cusp_is_fillable(self.c_triangulation, c) for c in range(n)):             # <<<<<<<<<<<<<<
 *             raise IndexError('All cusps must be fillable.')
 *         cdef c_Triangulation* c_new_tri = NULL
 */

static PyObject *__pyx_pf_6SnapPy_13Triangulation_34_unsimplified_filled_triangulation_genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
  struct __pyx_obj_6SnapPy___pyx_scope_struct_2_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_6SnapPy___pyx_scope_struct_2_genexpr *)__pyx_tp_new_6SnapPy___pyx_scope_struct_2_genexpr(__pyx_ptype_6SnapPy___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_2_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(3, 1360, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation *) __pyx_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_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_6SnapPy_13Triangulation_34_unsimplified_filled_triangulation_2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_unsimplified_filled_triangulati, __pyx_n_s_SnapPy); if (unlikely(!gen)) __PYX_ERR(3, 1360, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("SnapPy.Triangulation._unsimplified_filled_triangulation.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_6SnapPy_13Triangulation_34_unsimplified_filled_triangulation_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6SnapPy___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_2_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;
  Boolean __pyx_t_6;
  int __pyx_t_7;
  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(3, 1360, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(3, 1360, __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(3, 1360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1360, __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(3, 1360, __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(3, 1360, __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(3, 1360, __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(3, 1360, __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(3, 1360, __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(3, 1360, __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(3, 1360, __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;
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(3, 1360, __pyx_L1_error) }
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_c); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1360, __pyx_L1_error)
    __pyx_t_6 = cusp_is_fillable(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->c_triangulation, __pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1360, __pyx_L1_error)
    __pyx_t_7 = (!(__pyx_t_6 != 0));
    if (__pyx_t_7) {
      __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;
}

/* "cython/core/triangulation.pyx":1320
 *         return filled_tri
 * 
 *     def _unsimplified_filled_triangulation(self, method='fold'):             # <<<<<<<<<<<<<<
 *         """
 *         For a Triangulation that describes a closed manifold, returns
 */

static PyObject *__pyx_pf_6SnapPy_13Triangulation_90_unsimplified_filled_triangulation(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_method) {
  struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation *__pyx_cur_scope;
  PyObject *__pyx_v_n = NULL;
  Triangulation *__pyx_v_c_new_tri;
  struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_filled_tri = 0;
  Boolean *__pyx_v_fill_cusp_spec;
  Boolean __pyx_v_fill_by_fold;
  int __pyx_v_mark_solid_tori;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_gb_6SnapPy_13Triangulation_34_unsimplified_filled_triangulation_2generator1 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  char *__pyx_t_9;
  Triangulation *__pyx_t_10;
  size_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  Py_ssize_t __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_unsimplified_filled_triangulation", 0);
  __pyx_cur_scope = (struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation *)__pyx_tp_new_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation(__pyx_ptype_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(3, 1320, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);

  /* "cython/core/triangulation.pyx":1357
 *         True
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         n = self.num_cusps()
 */
  __pyx_t_1 = (__pyx_cur_scope->__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":1358
 *         """
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         n = self.num_cusps()
 *         if not all(cusp_is_fillable(self.c_triangulation, c) for c in range(n)):
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1358, __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(3, 1358, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1357
 *         True
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         n = self.num_cusps()
 */
  }

  /* "cython/core/triangulation.pyx":1359
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         n = self.num_cusps()             # <<<<<<<<<<<<<<
 *         if not all(cusp_is_fillable(self.c_triangulation, c) for c in range(n)):
 *             raise IndexError('All cusps must be fillable.')
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1359, __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(3, 1359, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_n = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":1360
 *             raise ValueError('The Triangulation is empty.')
 *         n = self.num_cusps()
 *         if not all(cusp_is_fillable(self.c_triangulation, c) for c in range(n)):             # <<<<<<<<<<<<<<
 *             raise IndexError('All cusps must be fillable.')
 *         cdef c_Triangulation* c_new_tri = NULL
 */
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __pyx_pf_6SnapPy_13Triangulation_34_unsimplified_filled_triangulation_genexpr(((PyObject*)__pyx_cur_scope), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1360, __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(3, 1360, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = (!__pyx_t_1);
  if (unlikely(__pyx_t_6)) {

    /* "cython/core/triangulation.pyx":1361
 *         n = self.num_cusps()
 *         if not all(cusp_is_fillable(self.c_triangulation, c) for c in range(n)):
 *             raise IndexError('All cusps must be fillable.')             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation* c_new_tri = NULL
 *         cdef Triangulation filled_tri
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1361, __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(3, 1361, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1360
 *             raise ValueError('The Triangulation is empty.')
 *         n = self.num_cusps()
 *         if not all(cusp_is_fillable(self.c_triangulation, c) for c in range(n)):             # <<<<<<<<<<<<<<
 *             raise IndexError('All cusps must be fillable.')
 *         cdef c_Triangulation* c_new_tri = NULL
 */
  }

  /* "cython/core/triangulation.pyx":1362
 *         if not all(cusp_is_fillable(self.c_triangulation, c) for c in range(n)):
 *             raise IndexError('All cusps must be fillable.')
 *         cdef c_Triangulation* c_new_tri = NULL             # <<<<<<<<<<<<<<
 *         cdef Triangulation filled_tri
 *         cdef Boolean *fill_cusp_spec = NULL
 */
  __pyx_v_c_new_tri = NULL;

  /* "cython/core/triangulation.pyx":1364
 *         cdef c_Triangulation* c_new_tri = NULL
 *         cdef Triangulation filled_tri
 *         cdef Boolean *fill_cusp_spec = NULL             # <<<<<<<<<<<<<<
 *         cdef Boolean fill_by_fold
 *         if method == 'fold':
 */
  __pyx_v_fill_cusp_spec = NULL;

  /* "cython/core/triangulation.pyx":1366
 *         cdef Boolean *fill_cusp_spec = NULL
 *         cdef Boolean fill_by_fold
 *         if method == 'fold':             # <<<<<<<<<<<<<<
 *             fill_by_fold = True
 *         elif method == 'layered':
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_method, __pyx_n_s_fold, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(3, 1366, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "cython/core/triangulation.pyx":1367
 *         cdef Boolean fill_by_fold
 *         if method == 'fold':
 *             fill_by_fold = True             # <<<<<<<<<<<<<<
 *         elif method == 'layered':
 *             fill_by_fold = False
 */
    __pyx_v_fill_by_fold = 1;

    /* "cython/core/triangulation.pyx":1366
 *         cdef Boolean *fill_cusp_spec = NULL
 *         cdef Boolean fill_by_fold
 *         if method == 'fold':             # <<<<<<<<<<<<<<
 *             fill_by_fold = True
 *         elif method == 'layered':
 */
    goto __pyx_L5;
  }

  /* "cython/core/triangulation.pyx":1368
 *         if method == 'fold':
 *             fill_by_fold = True
 *         elif method == 'layered':             # <<<<<<<<<<<<<<
 *             fill_by_fold = False
 *             mark_solid_tori = False
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_method, __pyx_n_s_layered, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(3, 1368, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "cython/core/triangulation.pyx":1369
 *             fill_by_fold = True
 *         elif method == 'layered':
 *             fill_by_fold = False             # <<<<<<<<<<<<<<
 *             mark_solid_tori = False
 *         elif method == 'layered_and_marked':
 */
    __pyx_v_fill_by_fold = 0;

    /* "cython/core/triangulation.pyx":1370
 *         elif method == 'layered':
 *             fill_by_fold = False
 *             mark_solid_tori = False             # <<<<<<<<<<<<<<
 *         elif method == 'layered_and_marked':
 *             fill_by_fold = False
 */
    __pyx_v_mark_solid_tori = 0;

    /* "cython/core/triangulation.pyx":1368
 *         if method == 'fold':
 *             fill_by_fold = True
 *         elif method == 'layered':             # <<<<<<<<<<<<<<
 *             fill_by_fold = False
 *             mark_solid_tori = False
 */
    goto __pyx_L5;
  }

  /* "cython/core/triangulation.pyx":1371
 *             fill_by_fold = False
 *             mark_solid_tori = False
 *         elif method == 'layered_and_marked':             # <<<<<<<<<<<<<<
 *             fill_by_fold = False
 *             mark_solid_tori = True
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_method, __pyx_n_s_layered_and_marked, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(3, 1371, __pyx_L1_error)
  if (likely(__pyx_t_6)) {

    /* "cython/core/triangulation.pyx":1372
 *             mark_solid_tori = False
 *         elif method == 'layered_and_marked':
 *             fill_by_fold = False             # <<<<<<<<<<<<<<
 *             mark_solid_tori = True
 *         else:
 */
    __pyx_v_fill_by_fold = 0;

    /* "cython/core/triangulation.pyx":1373
 *         elif method == 'layered_and_marked':
 *             fill_by_fold = False
 *             mark_solid_tori = True             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError("The method must be 'fold' or 'layered' or 'layered_and_marked'")
 */
    __pyx_v_mark_solid_tori = 1;

    /* "cython/core/triangulation.pyx":1371
 *             fill_by_fold = False
 *             mark_solid_tori = False
 *         elif method == 'layered_and_marked':             # <<<<<<<<<<<<<<
 *             fill_by_fold = False
 *             mark_solid_tori = True
 */
    goto __pyx_L5;
  }

  /* "cython/core/triangulation.pyx":1375
 *             mark_solid_tori = True
 *         else:
 *             raise ValueError("The method must be 'fold' or 'layered' or 'layered_and_marked'")             # <<<<<<<<<<<<<<
 * 
 *         c_new_tri = subdivide(self.c_triangulation, to_byte_str(self.name() + '_filled'))
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1375, __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(3, 1375, __pyx_L1_error)
  }
  __pyx_L5:;

  /* "cython/core/triangulation.pyx":1377
 *             raise ValueError("The method must be 'fold' or 'layered' or 'layered_and_marked'")
 * 
 *         c_new_tri = subdivide(self.c_triangulation, to_byte_str(self.name() + '_filled'))             # <<<<<<<<<<<<<<
 *         fill_cusp_spec = <Boolean*>malloc(n*sizeof(Boolean))
 *         for i in range(n):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_to_byte_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_5 = 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_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_t_7 = PyNumber_Add(__pyx_t_4, __pyx_n_s_filled); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1377, __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(3, 1377, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_9 = __Pyx_PyObject_AsWritableString(__pyx_t_2); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) __PYX_ERR(3, 1377, __pyx_L1_error)
  __pyx_t_10 = subdivide(__pyx_cur_scope->__pyx_v_self->c_triangulation, __pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1377, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_c_new_tri = __pyx_t_10;

  /* "cython/core/triangulation.pyx":1378
 * 
 *         c_new_tri = subdivide(self.c_triangulation, to_byte_str(self.name() + '_filled'))
 *         fill_cusp_spec = <Boolean*>malloc(n*sizeof(Boolean))             # <<<<<<<<<<<<<<
 *         for i in range(n):
 *             fill_cusp_spec[i] = True
 */
  __pyx_t_2 = __Pyx_PyInt_FromSize_t((sizeof(Boolean))); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_v_n, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_11 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1378, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fill_cusp_spec = ((Boolean *)malloc(__pyx_t_11));

  /* "cython/core/triangulation.pyx":1379
 *         c_new_tri = subdivide(self.c_triangulation, to_byte_str(self.name() + '_filled'))
 *         fill_cusp_spec = <Boolean*>malloc(n*sizeof(Boolean))
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             fill_cusp_spec[i] = True
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_12 = 0;
    __pyx_t_13 = NULL;
  } else {
    __pyx_t_12 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1379, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_13)) {
      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(3, 1379, __pyx_L1_error)
          #endif
          if (__pyx_t_12 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(3, 1379, __pyx_L1_error)
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1379, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #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(3, 1379, __pyx_L1_error)
          #endif
          if (__pyx_t_12 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(3, 1379, __pyx_L1_error)
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1379, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_13(__pyx_t_2);
      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(3, 1379, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":1380
 *         fill_cusp_spec = <Boolean*>malloc(n*sizeof(Boolean))
 *         for i in range(n):
 *             fill_cusp_spec[i] = True             # <<<<<<<<<<<<<<
 * 
 *         close_cusps(c_new_tri, fill_cusp_spec, fill_by_fold, mark_solid_tori)
 */
    __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1380, __pyx_L1_error)
    (__pyx_v_fill_cusp_spec[__pyx_t_14]) = 1;

    /* "cython/core/triangulation.pyx":1379
 *         c_new_tri = subdivide(self.c_triangulation, to_byte_str(self.name() + '_filled'))
 *         fill_cusp_spec = <Boolean*>malloc(n*sizeof(Boolean))
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             fill_cusp_spec[i] = True
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":1382
 *             fill_cusp_spec[i] = True
 * 
 *         close_cusps(c_new_tri, fill_cusp_spec, fill_by_fold, mark_solid_tori)             # <<<<<<<<<<<<<<
 *         number_the_tetrahedra(c_new_tri)
 *         number_the_edge_classes(c_new_tri)
 */
  close_cusps(__pyx_v_c_new_tri, __pyx_v_fill_cusp_spec, __pyx_v_fill_by_fold, __pyx_v_mark_solid_tori);

  /* "cython/core/triangulation.pyx":1383
 * 
 *         close_cusps(c_new_tri, fill_cusp_spec, fill_by_fold, mark_solid_tori)
 *         number_the_tetrahedra(c_new_tri)             # <<<<<<<<<<<<<<
 *         number_the_edge_classes(c_new_tri)
 *         create_fake_cusps(c_new_tri)
 */
  number_the_tetrahedra(__pyx_v_c_new_tri);

  /* "cython/core/triangulation.pyx":1384
 *         close_cusps(c_new_tri, fill_cusp_spec, fill_by_fold, mark_solid_tori)
 *         number_the_tetrahedra(c_new_tri)
 *         number_the_edge_classes(c_new_tri)             # <<<<<<<<<<<<<<
 *         create_fake_cusps(c_new_tri)
 *         count_cusps(c_new_tri)
 */
  number_the_edge_classes(__pyx_v_c_new_tri);

  /* "cython/core/triangulation.pyx":1385
 *         number_the_tetrahedra(c_new_tri)
 *         number_the_edge_classes(c_new_tri)
 *         create_fake_cusps(c_new_tri)             # <<<<<<<<<<<<<<
 *         count_cusps(c_new_tri)
 *         filled_tri = _triangulation_class('empty')
 */
  create_fake_cusps(__pyx_v_c_new_tri);

  /* "cython/core/triangulation.pyx":1386
 *         number_the_edge_classes(c_new_tri)
 *         create_fake_cusps(c_new_tri)
 *         count_cusps(c_new_tri)             # <<<<<<<<<<<<<<
 *         filled_tri = _triangulation_class('empty')
 *         filled_tri.set_c_triangulation(c_new_tri)
 */
  count_cusps(__pyx_v_c_new_tri);

  /* "cython/core/triangulation.pyx":1387
 *         create_fake_cusps(c_new_tri)
 *         count_cusps(c_new_tri)
 *         filled_tri = _triangulation_class('empty')             # <<<<<<<<<<<<<<
 *         filled_tri.set_c_triangulation(c_new_tri)
 *         free(fill_cusp_spec)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_triangulation_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1387, __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_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, __pyx_n_s_empty};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6SnapPy_Triangulation))))) __PYX_ERR(3, 1387, __pyx_L1_error)
  __pyx_v_filled_tri = ((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":1388
 *         count_cusps(c_new_tri)
 *         filled_tri = _triangulation_class('empty')
 *         filled_tri.set_c_triangulation(c_new_tri)             # <<<<<<<<<<<<<<
 *         free(fill_cusp_spec)
 *         return filled_tri
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_filled_tri->__pyx_vtab)->set_c_triangulation(__pyx_v_filled_tri, __pyx_v_c_new_tri); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":1389
 *         filled_tri = _triangulation_class('empty')
 *         filled_tri.set_c_triangulation(c_new_tri)
 *         free(fill_cusp_spec)             # <<<<<<<<<<<<<<
 *         return filled_tri
 * 
 */
  free(__pyx_v_fill_cusp_spec);

  /* "cython/core/triangulation.pyx":1390
 *         filled_tri.set_c_triangulation(c_new_tri)
 *         free(fill_cusp_spec)
 *         return filled_tri             # <<<<<<<<<<<<<<
 * 
 *     def _marked_tetrahedra(self, clear_marks=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_filled_tri);
  __pyx_r = ((PyObject *)__pyx_v_filled_tri);
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1320
 *         return filled_tri
 * 
 *     def _unsimplified_filled_triangulation(self, method='fold'):             # <<<<<<<<<<<<<<
 *         """
 *         For a Triangulation that describes a closed manifold, returns
 */

  /* 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_AddTraceback("SnapPy.Triangulation._unsimplified_filled_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF((PyObject *)__pyx_v_filled_tri);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_gb_6SnapPy_13Triangulation_34_unsimplified_filled_triangulation_2generator1);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1392
 *         return filled_tri
 * 
 *     def _marked_tetrahedra(self, clear_marks=False):             # <<<<<<<<<<<<<<
 *         cdef int *marked = NULL
 *         n = self.num_tetrahedra()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_93_marked_tetrahedra(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_6SnapPy_13Triangulation_92_marked_tetrahedra, "Triangulation._marked_tetrahedra(self, clear_marks=False)");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_93_marked_tetrahedra = {"_marked_tetrahedra", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_93_marked_tetrahedra, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_92_marked_tetrahedra};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_93_marked_tetrahedra(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_clear_marks = 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("_marked_tetrahedra (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_clear_marks,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_clear_marks);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1392, __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, "_marked_tetrahedra") < 0)) __PYX_ERR(3, 1392, __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_clear_marks = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_marked_tetrahedra", 0, 0, 1, __pyx_nargs); __PYX_ERR(3, 1392, __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("SnapPy.Triangulation._marked_tetrahedra", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_92_marked_tetrahedra(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_clear_marks);

  /* 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_6SnapPy_13Triangulation_92_marked_tetrahedra(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_clear_marks) {
  int *__pyx_v_marked;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_ans = NULL;
  PyObject *__pyx_9genexpr26__pyx_v_i = 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;
  size_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_marked_tetrahedra", 1);

  /* "cython/core/triangulation.pyx":1393
 * 
 *     def _marked_tetrahedra(self, clear_marks=False):
 *         cdef int *marked = NULL             # <<<<<<<<<<<<<<
 *         n = self.num_tetrahedra()
 *         marked = <int*>malloc(n*sizeof(int))
 */
  __pyx_v_marked = NULL;

  /* "cython/core/triangulation.pyx":1394
 *     def _marked_tetrahedra(self, clear_marks=False):
 *         cdef int *marked = NULL
 *         n = self.num_tetrahedra()             # <<<<<<<<<<<<<<
 *         marked = <int*>malloc(n*sizeof(int))
 *         unchangeable_tetrahedra(self.c_triangulation, marked)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_tetrahedra); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1394, __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(3, 1394, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_n = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":1395
 *         cdef int *marked = NULL
 *         n = self.num_tetrahedra()
 *         marked = <int*>malloc(n*sizeof(int))             # <<<<<<<<<<<<<<
 *         unchangeable_tetrahedra(self.c_triangulation, marked)
 *         ans = [marked[i] for i in range(n)]
 */
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(int))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Multiply(__pyx_v_n, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_5 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1395, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_marked = ((int *)malloc(__pyx_t_5));

  /* "cython/core/triangulation.pyx":1396
 *         n = self.num_tetrahedra()
 *         marked = <int*>malloc(n*sizeof(int))
 *         unchangeable_tetrahedra(self.c_triangulation, marked)             # <<<<<<<<<<<<<<
 *         ans = [marked[i] for i in range(n)]
 *         free(marked)
 */
  unchangeable_tetrahedra(__pyx_v_self->c_triangulation, __pyx_v_marked); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1396, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1397
 *         marked = <int*>malloc(n*sizeof(int))
 *         unchangeable_tetrahedra(self.c_triangulation, marked)
 *         ans = [marked[i] for i in range(n)]             # <<<<<<<<<<<<<<
 *         free(marked)
 *         if clear_marks:
 */
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1397, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1397, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_3 = __pyx_t_1; __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_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1397, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1397, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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(3, 1397, __pyx_L5_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 1397, __pyx_L5_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1397, __pyx_L5_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(3, 1397, __pyx_L5_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 1397, __pyx_L5_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1397, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_7(__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(3, 1397, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr26__pyx_v_i, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_9genexpr26__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1397, __pyx_L5_error)
      __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_marked[__pyx_t_8])); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1397, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_1))) __PYX_ERR(3, 1397, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_i); __pyx_9genexpr26__pyx_v_i = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_i); __pyx_9genexpr26__pyx_v_i = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_v_ans = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":1398
 *         unchangeable_tetrahedra(self.c_triangulation, marked)
 *         ans = [marked[i] for i in range(n)]
 *         free(marked)             # <<<<<<<<<<<<<<
 *         if clear_marks:
 *             all_tetrahedra_changeable(self.c_triangulation)
 */
  free(__pyx_v_marked);

  /* "cython/core/triangulation.pyx":1399
 *         ans = [marked[i] for i in range(n)]
 *         free(marked)
 *         if clear_marks:             # <<<<<<<<<<<<<<
 *             all_tetrahedra_changeable(self.c_triangulation)
 *         return ans
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_clear_marks); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(3, 1399, __pyx_L1_error)
  if (__pyx_t_9) {

    /* "cython/core/triangulation.pyx":1400
 *         free(marked)
 *         if clear_marks:
 *             all_tetrahedra_changeable(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         return ans
 * 
 */
    all_tetrahedra_changeable(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1400, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1399
 *         ans = [marked[i] for i in range(n)]
 *         free(marked)
 *         if clear_marks:             # <<<<<<<<<<<<<<
 *             all_tetrahedra_changeable(self.c_triangulation)
 *         return ans
 */
  }

  /* "cython/core/triangulation.pyx":1401
 *         if clear_marks:
 *             all_tetrahedra_changeable(self.c_triangulation)
 *         return ans             # <<<<<<<<<<<<<<
 * 
 *     def edge_valences(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ans);
  __pyx_r = __pyx_v_ans;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1392
 *         return filled_tri
 * 
 *     def _marked_tetrahedra(self, clear_marks=False):             # <<<<<<<<<<<<<<
 *         cdef int *marked = NULL
 *         n = self.num_tetrahedra()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.Triangulation._marked_tetrahedra", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_ans);
  __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1403
 *         return ans
 * 
 *     def edge_valences(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a dictionary whose keys are the valences of the edges
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_95edge_valences(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_6SnapPy_13Triangulation_94edge_valences, "Triangulation.edge_valences(self)\n\n        Returns a dictionary whose keys are the valences of the edges\n        in the triangulation, and the value associated to a key is the\n        number of edges of that valence.\n\n        >>> M = Triangulation('v3227')\n        >>> M.edge_valences()     # doctest: +SKIP\n        {10: 1, 4: 1, 5: 2, 6: 3}\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_95edge_valences = {"edge_valences", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_95edge_valences, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_94edge_valences};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_95edge_valences(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("edge_valences (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("edge_valences", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "edge_valences", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_94edge_valences(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_94edge_valences(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  int __pyx_v_c;
  int __pyx_v_v;
  PyObject *__pyx_v_ans = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("edge_valences", 1);

  /* "cython/core/triangulation.pyx":1413
 *         {10: 1, 4: 1, 5: 2, 6: 3}
 *         """
 *         cdef int c, v = 1             # <<<<<<<<<<<<<<
 *         ans = {}
 *         if self.c_triangulation is NULL:
 */
  __pyx_v_v = 1;

  /* "cython/core/triangulation.pyx":1414
 *         """
 *         cdef int c, v = 1
 *         ans = {}             # <<<<<<<<<<<<<<
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_ans = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":1415
 *         cdef int c, v = 1
 *         ans = {}
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         while get_num_edge_classes(self.c_triangulation, v, 1) > 0:
 */
  __pyx_t_2 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_2)) {

    /* "cython/core/triangulation.pyx":1416
 *         ans = {}
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         while get_num_edge_classes(self.c_triangulation, v, 1) > 0:
 *             c = get_num_edge_classes(self.c_triangulation, v, 0)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1416, __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(3, 1416, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1415
 *         cdef int c, v = 1
 *         ans = {}
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         while get_num_edge_classes(self.c_triangulation, v, 1) > 0:
 */
  }

  /* "cython/core/triangulation.pyx":1417
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         while get_num_edge_classes(self.c_triangulation, v, 1) > 0:             # <<<<<<<<<<<<<<
 *             c = get_num_edge_classes(self.c_triangulation, v, 0)
 *             if c > 0:
 */
  while (1) {
    __pyx_t_3 = get_num_edge_classes(__pyx_v_self->c_triangulation, __pyx_v_v, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1417, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_3 > 0);
    if (!__pyx_t_2) break;

    /* "cython/core/triangulation.pyx":1418
 *             raise ValueError('The Triangulation is empty.')
 *         while get_num_edge_classes(self.c_triangulation, v, 1) > 0:
 *             c = get_num_edge_classes(self.c_triangulation, v, 0)             # <<<<<<<<<<<<<<
 *             if c > 0:
 *                 ans[v] = c
 */
    __pyx_t_3 = get_num_edge_classes(__pyx_v_self->c_triangulation, __pyx_v_v, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1418, __pyx_L1_error)
    __pyx_v_c = __pyx_t_3;

    /* "cython/core/triangulation.pyx":1419
 *         while get_num_edge_classes(self.c_triangulation, v, 1) > 0:
 *             c = get_num_edge_classes(self.c_triangulation, v, 0)
 *             if c > 0:             # <<<<<<<<<<<<<<
 *                 ans[v] = c
 *             v += 1
 */
    __pyx_t_2 = (__pyx_v_c > 0);
    if (__pyx_t_2) {

      /* "cython/core/triangulation.pyx":1420
 *             c = get_num_edge_classes(self.c_triangulation, v, 0)
 *             if c > 0:
 *                 ans[v] = c             # <<<<<<<<<<<<<<
 *             v += 1
 *         return ans
 */
      __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_c); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1420, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1420, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely((PyDict_SetItem(__pyx_v_ans, __pyx_t_4, __pyx_t_1) < 0))) __PYX_ERR(3, 1420, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cython/core/triangulation.pyx":1419
 *         while get_num_edge_classes(self.c_triangulation, v, 1) > 0:
 *             c = get_num_edge_classes(self.c_triangulation, v, 0)
 *             if c > 0:             # <<<<<<<<<<<<<<
 *                 ans[v] = c
 *             v += 1
 */
    }

    /* "cython/core/triangulation.pyx":1421
 *             if c > 0:
 *                 ans[v] = c
 *             v += 1             # <<<<<<<<<<<<<<
 *         return ans
 * 
 */
    __pyx_v_v = (__pyx_v_v + 1);
  }

  /* "cython/core/triangulation.pyx":1422
 *                 ans[v] = c
 *             v += 1
 *         return ans             # <<<<<<<<<<<<<<
 * 
 *     def gluing_equations_pgl(self, N=2, equation_type='all'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ans);
  __pyx_r = __pyx_v_ans;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1403
 *         return ans
 * 
 *     def edge_valences(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a dictionary whose keys are the valences of the edges
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("SnapPy.Triangulation.edge_valences", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ans);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1424
 *         return ans
 * 
 *     def gluing_equations_pgl(self, N=2, equation_type='all'):             # <<<<<<<<<<<<<<
 * 
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_97gluing_equations_pgl(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_6SnapPy_13Triangulation_96gluing_equations_pgl, "Triangulation.gluing_equations_pgl(self, N=2, equation_type='all')\n\n        M.gluing_equations_pgl(N = 2, equation_type='all')\n\n        Returns a NeumannZagierTypeEquations object that contains a matrix\n        encoding the gluing equations for boundary-parabolic PGL(N,C)\n        representations together with explanations of the meaning\n        of the rows and the columns of the matrix.\n\n        This method generalizes gluing_equations() to PGL(N,C)-representations\n        as described in\n        Stavros Garoufalidis, Matthias Goerner, Christian K. Zickert:\n        \"Gluing Equations for PGL(n,C)-Representations of 3-Manifolds\"\n        (http://arxiv.org/abs/1207.6711).\n\n        The result of the traditional gluing_equations() can be obtained from\n        the general method by:\n\n        >>> M = Triangulation('m004')\n        >>> M.gluing_equations_pgl().matrix\n        [ 2  1  0  1  0  2]\n        [ 0  1  2  1  2  0]\n        [ 1  0  0  0 -1  0]\n        [ 0  0  0  0 -2  2]\n\n        But besides the matrix, the method also returns explanations of\n        the columns and rows:\n\n        >>> M = Triangulation(\"m004\")\n        >>> M.gluing_equations_pgl()\n        NeumannZagierTypeEquations(\n          [ 2  1  0  1  0  2]\n          [ 0  1  2  1  2  0]\n          [ 1  0  0  0 -1  0]\n          [ 0  0  0  0 -2  2],\n          explain_columns = ['z_0000_0', 'zp_0000_0', 'zpp_0000_0', 'z_0000_1', 'zp_0000_1', 'zpp_0000_1'],\n          explain_rows = ['edge_0_0', 'edge_0_1', 'meridian_0_0', 'longitude_0_0'])\n\n        The first row of the matrix means that the edge equation for\n        edge 0 is\n\n           z_0000_0 ^ 2 * zp_0000_0 * z_0000_1 * zpp_0000_1 ^ 2 = 1.\n\n        Similarly, the next row encodes the edge equation for the other edge\n        and the next two rows encode peripheral equations.\n\n        Following the SnapPy convention, a z denotes the cross ratio z at the\n        edge (0,1), a zp the cross ratio z' at the edge (0,2) and"" a zpp the cross\n        ratio z\" at the edge (1,2). The entire symbol z_xxxx_y then\n        denotes the cross ratio belonging to the subsimplex at integral\n        point xxxx (always 0000 for N = 2) of the simplex y. Note: the\n        SnapPy convention is different from the paper\n        mentioned above, e.g., compare\n        kernel_code/edge_classes.c with Figure 3. We follow the SnapPy\n        convention here so that all computations done in SnapPy are\n        consistent.\n\n        The explanations of the rows and columns can be obtained explicitly by:\n\n        >>> M.gluing_equations_pgl(N = 3, equation_type = 'peripheral').explain_rows\n        ['meridian_0_0', 'meridian_1_0', 'longitude_0_0', 'longitude_1_0']\n        >>> M.gluing_equations_pgl(N = 2).explain_columns\n        ['z_0000_0', 'zp_0000_0', 'zpp_0000_0', 'z_0000_1', 'zp_0000_1', 'zpp_0000_1']\n\n        A subset of all gluing equations can be obtained by setting the\n        equation_type:\n\n        * all gluing equations: 'all'\n        * non-peripheral equations: 'non_peripheral'\n\n          * edge gluing equations: 'edge'\n          * face gluing equations: 'face'\n          * internal gluing equations: 'internal'\n\n        * cusp gluing equations: 'peripheral'\n\n          * cusp gluing equations for meridians: 'meridian'\n          * cusp gluing equations for longitudes: 'longitude'\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_97gluing_equations_pgl = {"gluing_equations_pgl", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_97gluing_equations_pgl, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_96gluing_equations_pgl};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_97gluing_equations_pgl(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_N = 0;
  PyObject *__pyx_v_equation_type = 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("gluing_equations_pgl (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_N,&__pyx_n_s_equation_type,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_2));
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_s_all));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_N);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1424, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_equation_type);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1424, __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, "gluing_equations_pgl") < 0)) __PYX_ERR(3, 1424, __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);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_N = values[0];
    __pyx_v_equation_type = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("gluing_equations_pgl", 0, 0, 2, __pyx_nargs); __PYX_ERR(3, 1424, __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("SnapPy.Triangulation.gluing_equations_pgl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_96gluing_equations_pgl(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_N, __pyx_v_equation_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_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6SnapPy_13Triangulation_96gluing_equations_pgl(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_N, PyObject *__pyx_v_equation_type) {
  Integer_matrix_with_explanations __pyx_v_c_matrix;
  PyObject *__pyx_v_equations = NULL;
  PyObject *__pyx_v_explain_rows = NULL;
  PyObject *__pyx_v_explain_cols = NULL;
  PyObject *__pyx_v_eqns = NULL;
  PyObject *__pyx_v_r = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_cusp_info = NULL;
  PyObject *__pyx_v_to_do = NULL;
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_9genexpr27__pyx_v_j = NULL;
  PyObject *__pyx_9genexpr28__pyx_v_j = NULL;
  PyObject *__pyx_9genexpr29__pyx_v_j = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  Py_ssize_t __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gluing_equations_pgl", 1);

  /* "cython/core/triangulation.pyx":1507
 *         cdef Integer_matrix_with_explanations c_matrix
 * 
 *         if N < 2 or N > 15:             # <<<<<<<<<<<<<<
 *             raise ValueError('N has to be 2...15')
 * 
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_N, __pyx_int_2, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1507, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1507, __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 = PyObject_RichCompare(__pyx_v_N, __pyx_int_15, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1507, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":1508
 * 
 *         if N < 2 or N > 15:
 *             raise ValueError('N has to be 2...15')             # <<<<<<<<<<<<<<
 * 
 *         if equation_type not in ['all',
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 1508, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1507
 *         cdef Integer_matrix_with_explanations c_matrix
 * 
 *         if N < 2 or N > 15:             # <<<<<<<<<<<<<<
 *             raise ValueError('N has to be 2...15')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":1510
 *             raise ValueError('N has to be 2...15')
 * 
 *         if equation_type not in ['all',             # <<<<<<<<<<<<<<
 *                                  'non_peripheral',
 *                                  'edge', 'face', 'internal',
 */
  __Pyx_INCREF(__pyx_v_equation_type);
  __pyx_t_2 = __pyx_v_equation_type;
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_all, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1510, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_non_peripheral, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1510, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_edge, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1510, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_face, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1510, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_internal, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1510, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_peripheral, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1510, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_longitude, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1510, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L7_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_meridian, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1510, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_3;
  __pyx_L7_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __pyx_t_1;
  if (unlikely(__pyx_t_3)) {

    /* "cython/core/triangulation.pyx":1515
 *                                  'peripheral',
 *                                  'longitude', 'meridian']:
 *             raise ValueError('Wrong equation_type')             # <<<<<<<<<<<<<<
 * 
 *         if self.c_triangulation is NULL:
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1515, __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(3, 1515, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1510
 *             raise ValueError('N has to be 2...15')
 * 
 *         if equation_type not in ['all',             # <<<<<<<<<<<<<<
 *                                  'non_peripheral',
 *                                  'edge', 'face', 'internal',
 */
  }

  /* "cython/core/triangulation.pyx":1517
 *             raise ValueError('Wrong equation_type')
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  __pyx_t_3 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_3)) {

    /* "cython/core/triangulation.pyx":1518
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 * 
 *         equations = []
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1518, __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(3, 1518, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1517
 *             raise ValueError('Wrong equation_type')
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":1520
 *             raise ValueError('The Triangulation is empty.')
 * 
 *         equations = []             # <<<<<<<<<<<<<<
 *         explain_rows = []
 *         explain_cols = []
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_equations = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":1521
 * 
 *         equations = []
 *         explain_rows = []             # <<<<<<<<<<<<<<
 *         explain_cols = []
 * 
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_explain_rows = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":1522
 *         equations = []
 *         explain_rows = []
 *         explain_cols = []             # <<<<<<<<<<<<<<
 * 
 *         if equation_type in [ 'all', 'non_peripheral', 'edge']:
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_explain_cols = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":1524
 *         explain_cols = []
 * 
 *         if equation_type in [ 'all', 'non_peripheral', 'edge']:             # <<<<<<<<<<<<<<
 * 
 *             # Add edge equations
 */
  __Pyx_INCREF(__pyx_v_equation_type);
  __pyx_t_2 = __pyx_v_equation_type;
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_all, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1524, __pyx_L1_error)
  if (!__pyx_t_1) {
  } else {
    __pyx_t_3 = __pyx_t_1;
    goto __pyx_L17_bool_binop_done;
  }
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_non_peripheral, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1524, __pyx_L1_error)
  if (!__pyx_t_1) {
  } else {
    __pyx_t_3 = __pyx_t_1;
    goto __pyx_L17_bool_binop_done;
  }
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_edge, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1524, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_1;
  __pyx_L17_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_3;
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":1528
 *             # Add edge equations
 *             get_edge_gluing_equations_pgl(self.c_triangulation,
 *                                           &c_matrix, N)             # <<<<<<<<<<<<<<
 *             eqns, r, explain_cols = convert_and_free_integer_matrix(c_matrix)
 *             equations += eqns
 */
    __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_N); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1528, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1527
 * 
 *             # Add edge equations
 *             get_edge_gluing_equations_pgl(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                           &c_matrix, N)
 *             eqns, r, explain_cols = convert_and_free_integer_matrix(c_matrix)
 */
    get_edge_gluing_equations_pgl(__pyx_v_self->c_triangulation, (&__pyx_v_c_matrix), __pyx_t_4);

    /* "cython/core/triangulation.pyx":1529
 *             get_edge_gluing_equations_pgl(self.c_triangulation,
 *                                           &c_matrix, N)
 *             eqns, r, explain_cols = convert_and_free_integer_matrix(c_matrix)             # <<<<<<<<<<<<<<
 *             equations += eqns
 *             explain_rows += r
 */
    __pyx_t_2 = __pyx_f_6SnapPy_convert_and_free_integer_matrix(__pyx_v_c_matrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 3)) {
        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(3, 1529, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1529, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1529, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1529, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1529, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
      index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L20_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L20_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L20_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) __PYX_ERR(3, 1529, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L21_unpacking_done;
      __pyx_L20_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(3, 1529, __pyx_L1_error)
      __pyx_L21_unpacking_done:;
    }
    __pyx_v_eqns = __pyx_t_5;
    __pyx_t_5 = 0;
    __pyx_v_r = __pyx_t_6;
    __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_explain_cols, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "cython/core/triangulation.pyx":1530
 *                                           &c_matrix, N)
 *             eqns, r, explain_cols = convert_and_free_integer_matrix(c_matrix)
 *             equations += eqns             # <<<<<<<<<<<<<<
 *             explain_rows += r
 * 
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_equations, __pyx_v_eqns); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_equations, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/triangulation.pyx":1531
 *             eqns, r, explain_cols = convert_and_free_integer_matrix(c_matrix)
 *             equations += eqns
 *             explain_rows += r             # <<<<<<<<<<<<<<
 * 
 *         if equation_type in [ 'all', 'non_peripheral', 'face']:
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_explain_rows, __pyx_v_r); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1531, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_explain_rows, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/triangulation.pyx":1524
 *         explain_cols = []
 * 
 *         if equation_type in [ 'all', 'non_peripheral', 'edge']:             # <<<<<<<<<<<<<<
 * 
 *             # Add edge equations
 */
  }

  /* "cython/core/triangulation.pyx":1533
 *             explain_rows += r
 * 
 *         if equation_type in [ 'all', 'non_peripheral', 'face']:             # <<<<<<<<<<<<<<
 * 
 *             # Add face equations
 */
  __Pyx_INCREF(__pyx_v_equation_type);
  __pyx_t_2 = __pyx_v_equation_type;
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_all, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1533, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L23_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_non_peripheral, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1533, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L23_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_face, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1533, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_3;
  __pyx_L23_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __pyx_t_1;
  if (__pyx_t_3) {

    /* "cython/core/triangulation.pyx":1537
 *             # Add face equations
 *             get_face_gluing_equations_pgl(self.c_triangulation,
 *                                           &c_matrix, N)             # <<<<<<<<<<<<<<
 *             eqns, r, explain_cols = convert_and_free_integer_matrix(c_matrix)
 *             equations += eqns
 */
    __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_N); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1537, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1536
 * 
 *             # Add face equations
 *             get_face_gluing_equations_pgl(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                           &c_matrix, N)
 *             eqns, r, explain_cols = convert_and_free_integer_matrix(c_matrix)
 */
    get_face_gluing_equations_pgl(__pyx_v_self->c_triangulation, (&__pyx_v_c_matrix), __pyx_t_4);

    /* "cython/core/triangulation.pyx":1538
 *             get_face_gluing_equations_pgl(self.c_triangulation,
 *                                           &c_matrix, N)
 *             eqns, r, explain_cols = convert_and_free_integer_matrix(c_matrix)             # <<<<<<<<<<<<<<
 *             equations += eqns
 *             explain_rows += r
 */
    __pyx_t_2 = __pyx_f_6SnapPy_convert_and_free_integer_matrix(__pyx_v_c_matrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1538, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 3)) {
        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(3, 1538, __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_6 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      #else
      __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
      index = 0; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L26_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L26_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 2; __pyx_t_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L26_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) __PYX_ERR(3, 1538, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L27_unpacking_done;
      __pyx_L26_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(3, 1538, __pyx_L1_error)
      __pyx_L27_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_eqns, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_explain_cols, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cython/core/triangulation.pyx":1539
 *                                           &c_matrix, N)
 *             eqns, r, explain_cols = convert_and_free_integer_matrix(c_matrix)
 *             equations += eqns             # <<<<<<<<<<<<<<
 *             explain_rows += r
 * 
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_equations, __pyx_v_eqns); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1539, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_equations, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/triangulation.pyx":1540
 *             eqns, r, explain_cols = convert_and_free_integer_matrix(c_matrix)
 *             equations += eqns
 *             explain_rows += r             # <<<<<<<<<<<<<<
 * 
 *         if equation_type in [ 'all', 'non_peripheral',  'internal']:
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_explain_rows, __pyx_v_r); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_explain_rows, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/triangulation.pyx":1533
 *             explain_rows += r
 * 
 *         if equation_type in [ 'all', 'non_peripheral', 'face']:             # <<<<<<<<<<<<<<
 * 
 *             # Add face equations
 */
  }

  /* "cython/core/triangulation.pyx":1542
 *             explain_rows += r
 * 
 *         if equation_type in [ 'all', 'non_peripheral',  'internal']:             # <<<<<<<<<<<<<<
 * 
 *             # Add internal equations
 */
  __Pyx_INCREF(__pyx_v_equation_type);
  __pyx_t_2 = __pyx_v_equation_type;
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_all, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1542, __pyx_L1_error)
  if (!__pyx_t_1) {
  } else {
    __pyx_t_3 = __pyx_t_1;
    goto __pyx_L29_bool_binop_done;
  }
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_non_peripheral, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1542, __pyx_L1_error)
  if (!__pyx_t_1) {
  } else {
    __pyx_t_3 = __pyx_t_1;
    goto __pyx_L29_bool_binop_done;
  }
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_internal, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1542, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_1;
  __pyx_L29_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_3;
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":1546
 *             # Add internal equations
 *             get_internal_gluing_equations_pgl(self.c_triangulation,
 *                                               &c_matrix, N)             # <<<<<<<<<<<<<<
 *             eqns, r, explain_cols = convert_and_free_integer_matrix(c_matrix)
 *             equations += eqns
 */
    __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_N); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1546, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1545
 * 
 *             # Add internal equations
 *             get_internal_gluing_equations_pgl(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                               &c_matrix, N)
 *             eqns, r, explain_cols = convert_and_free_integer_matrix(c_matrix)
 */
    get_internal_gluing_equations_pgl(__pyx_v_self->c_triangulation, (&__pyx_v_c_matrix), __pyx_t_4);

    /* "cython/core/triangulation.pyx":1547
 *             get_internal_gluing_equations_pgl(self.c_triangulation,
 *                                               &c_matrix, N)
 *             eqns, r, explain_cols = convert_and_free_integer_matrix(c_matrix)             # <<<<<<<<<<<<<<
 *             equations += eqns
 *             explain_rows += r
 */
    __pyx_t_2 = __pyx_f_6SnapPy_convert_and_free_integer_matrix(__pyx_v_c_matrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 3)) {
        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(3, 1547, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      #else
      __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1547, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1547, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1547, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1547, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
      index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_5)) goto __pyx_L32_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_5);
      index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L32_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L32_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) __PYX_ERR(3, 1547, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L33_unpacking_done;
      __pyx_L32_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(3, 1547, __pyx_L1_error)
      __pyx_L33_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_eqns, __pyx_t_5);
    __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_6);
    __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_explain_cols, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "cython/core/triangulation.pyx":1548
 *                                               &c_matrix, N)
 *             eqns, r, explain_cols = convert_and_free_integer_matrix(c_matrix)
 *             equations += eqns             # <<<<<<<<<<<<<<
 *             explain_rows += r
 * 
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_equations, __pyx_v_eqns); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1548, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_equations, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/triangulation.pyx":1549
 *             eqns, r, explain_cols = convert_and_free_integer_matrix(c_matrix)
 *             equations += eqns
 *             explain_rows += r             # <<<<<<<<<<<<<<
 * 
 *         if equation_type in ['all', 'peripheral', 'longitude', 'meridian']:
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_explain_rows, __pyx_v_r); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_explain_rows, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/triangulation.pyx":1542
 *             explain_rows += r
 * 
 *         if equation_type in [ 'all', 'non_peripheral',  'internal']:             # <<<<<<<<<<<<<<
 * 
 *             # Add internal equations
 */
  }

  /* "cython/core/triangulation.pyx":1551
 *             explain_rows += r
 * 
 *         if equation_type in ['all', 'peripheral', 'longitude', 'meridian']:             # <<<<<<<<<<<<<<
 * 
 *             # Add peripheral equations
 */
  __Pyx_INCREF(__pyx_v_equation_type);
  __pyx_t_2 = __pyx_v_equation_type;
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_all, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1551, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L35_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_peripheral, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1551, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L35_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_longitude, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1551, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L35_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_meridian, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1551, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_3;
  __pyx_L35_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __pyx_t_1;
  if (__pyx_t_3) {

    /* "cython/core/triangulation.pyx":1555
 *             # Add peripheral equations
 * 
 *             for i in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *                 cusp_info = self.cusp_info(i)
 * 
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1555, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
      __pyx_t_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1555, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 1555, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    for (;;) {
      if (likely(!__pyx_t_11)) {
        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(3, 1555, __pyx_L1_error)
            #endif
            if (__pyx_t_10 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(3, 1555, __pyx_L1_error)
          #else
          __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1555, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #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(3, 1555, __pyx_L1_error)
            #endif
            if (__pyx_t_10 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(3, 1555, __pyx_L1_error)
          #else
          __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1555, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        }
      } else {
        __pyx_t_7 = __pyx_t_11(__pyx_t_2);
        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(3, 1555, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "cython/core/triangulation.pyx":1556
 * 
 *             for i in range(self.num_cusps()):
 *                 cusp_info = self.cusp_info(i)             # <<<<<<<<<<<<<<
 * 
 *                 to_do = []
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1556, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = NULL;
      __pyx_t_4 = 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_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_i};
        __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1556, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_cusp_info, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "cython/core/triangulation.pyx":1558
 *                 cusp_info = self.cusp_info(i)
 * 
 *                 to_do = []             # <<<<<<<<<<<<<<
 *                 # keep a todo list where we add (meridian, longitude)
 *                 # pairs to process later
 */
      __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1558, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_XDECREF_SET(__pyx_v_to_do, ((PyObject*)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "cython/core/triangulation.pyx":1562
 *                 # pairs to process later
 * 
 *                 if cusp_info.is_complete:             # <<<<<<<<<<<<<<
 * 
 *                     # Add meridians for complete cusps
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_cusp_info, __pyx_n_s_is_complete); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1562, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1562, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_3) {

        /* "cython/core/triangulation.pyx":1565
 * 
 *                     # Add meridians for complete cusps
 *                     if equation_type in [ 'meridian', 'peripheral', 'all']:             # <<<<<<<<<<<<<<
 *                         to_do += [ (1,0) ]
 *                         explain_rows += [
 */
        __Pyx_INCREF(__pyx_v_equation_type);
        __pyx_t_7 = __pyx_v_equation_type;
        __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_meridian, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1565, __pyx_L1_error)
        if (!__pyx_t_1) {
        } else {
          __pyx_t_3 = __pyx_t_1;
          goto __pyx_L43_bool_binop_done;
        }
        __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_peripheral, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1565, __pyx_L1_error)
        if (!__pyx_t_1) {
        } else {
          __pyx_t_3 = __pyx_t_1;
          goto __pyx_L43_bool_binop_done;
        }
        __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_all, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1565, __pyx_L1_error)
        __pyx_t_3 = __pyx_t_1;
        __pyx_L43_bool_binop_done:;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_1 = __pyx_t_3;
        if (__pyx_t_1) {

          /* "cython/core/triangulation.pyx":1566
 *                     # Add meridians for complete cusps
 *                     if equation_type in [ 'meridian', 'peripheral', 'all']:
 *                         to_do += [ (1,0) ]             # <<<<<<<<<<<<<<
 *                         explain_rows += [
 *                             "meridian_%d_%d" % (j, i) for j in range(N-1) ]
 */
          __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1566, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_INCREF(__pyx_tuple__21);
          __Pyx_GIVEREF(__pyx_tuple__21);
          if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_tuple__21)) __PYX_ERR(3, 1566, __pyx_L1_error);
          __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_to_do, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1566, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF_SET(__pyx_v_to_do, ((PyObject*)__pyx_t_6));
          __pyx_t_6 = 0;

          /* "cython/core/triangulation.pyx":1567
 *                     if equation_type in [ 'meridian', 'peripheral', 'all']:
 *                         to_do += [ (1,0) ]
 *                         explain_rows += [             # <<<<<<<<<<<<<<
 *                             "meridian_%d_%d" % (j, i) for j in range(N-1) ]
 * 
 */
          { /* enter inner scope */
            __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1567, __pyx_L48_error)
            __Pyx_GOTREF(__pyx_t_6);

            /* "cython/core/triangulation.pyx":1568
 *                         to_do += [ (1,0) ]
 *                         explain_rows += [
 *                             "meridian_%d_%d" % (j, i) for j in range(N-1) ]             # <<<<<<<<<<<<<<
 * 
 *                     # Add longitudes for complete cusps
 */
            __pyx_t_7 = __Pyx_PyInt_SubtractObjC(__pyx_v_N, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1568, __pyx_L48_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1568, __pyx_L48_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
              __pyx_t_7 = __pyx_t_5; __Pyx_INCREF(__pyx_t_7);
              __pyx_t_12 = 0;
              __pyx_t_13 = NULL;
            } else {
              __pyx_t_12 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1568, __pyx_L48_error)
              __Pyx_GOTREF(__pyx_t_7);
              __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1568, __pyx_L48_error)
            }
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            for (;;) {
              if (likely(!__pyx_t_13)) {
                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(3, 1568, __pyx_L48_error)
                    #endif
                    if (__pyx_t_12 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_12); __Pyx_INCREF(__pyx_t_5); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(3, 1568, __pyx_L48_error)
                  #else
                  __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1568, __pyx_L48_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  #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(3, 1568, __pyx_L48_error)
                    #endif
                    if (__pyx_t_12 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_12); __Pyx_INCREF(__pyx_t_5); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(3, 1568, __pyx_L48_error)
                  #else
                  __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1568, __pyx_L48_error)
                  __Pyx_GOTREF(__pyx_t_5);
                  #endif
                }
              } else {
                __pyx_t_5 = __pyx_t_13(__pyx_t_7);
                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(3, 1568, __pyx_L48_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_5);
              }
              __Pyx_XDECREF_SET(__pyx_9genexpr27__pyx_v_j, __pyx_t_5);
              __pyx_t_5 = 0;
              __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1568, __pyx_L48_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_INCREF(__pyx_9genexpr27__pyx_v_j);
              __Pyx_GIVEREF(__pyx_9genexpr27__pyx_v_j);
              if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_9genexpr27__pyx_v_j)) __PYX_ERR(3, 1568, __pyx_L48_error);
              __Pyx_INCREF(__pyx_v_i);
              __Pyx_GIVEREF(__pyx_v_i);
              if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_i)) __PYX_ERR(3, 1568, __pyx_L48_error);
              __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_meridian__d__d, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1568, __pyx_L48_error)
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_8))) __PYX_ERR(3, 1567, __pyx_L48_error)
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            }
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_9genexpr27__pyx_v_j); __pyx_9genexpr27__pyx_v_j = 0;
            goto __pyx_L52_exit_scope;
            __pyx_L48_error:;
            __Pyx_XDECREF(__pyx_9genexpr27__pyx_v_j); __pyx_9genexpr27__pyx_v_j = 0;
            goto __pyx_L1_error;
            __pyx_L52_exit_scope:;
          } /* exit inner scope */

          /* "cython/core/triangulation.pyx":1567
 *                     if equation_type in [ 'meridian', 'peripheral', 'all']:
 *                         to_do += [ (1,0) ]
 *                         explain_rows += [             # <<<<<<<<<<<<<<
 *                             "meridian_%d_%d" % (j, i) for j in range(N-1) ]
 * 
 */
          __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_explain_rows, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1567, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_explain_rows, __pyx_t_7);
          __pyx_t_7 = 0;

          /* "cython/core/triangulation.pyx":1565
 * 
 *                     # Add meridians for complete cusps
 *                     if equation_type in [ 'meridian', 'peripheral', 'all']:             # <<<<<<<<<<<<<<
 *                         to_do += [ (1,0) ]
 *                         explain_rows += [
 */
        }

        /* "cython/core/triangulation.pyx":1571
 * 
 *                     # Add longitudes for complete cusps
 *                     if equation_type in [ 'longitude', 'peripheral', 'all']:             # <<<<<<<<<<<<<<
 *                         to_do += [ (0,1) ]
 *                         explain_rows += [
 */
        __Pyx_INCREF(__pyx_v_equation_type);
        __pyx_t_7 = __pyx_v_equation_type;
        __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_longitude, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1571, __pyx_L1_error)
        if (!__pyx_t_3) {
        } else {
          __pyx_t_1 = __pyx_t_3;
          goto __pyx_L54_bool_binop_done;
        }
        __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_peripheral, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1571, __pyx_L1_error)
        if (!__pyx_t_3) {
        } else {
          __pyx_t_1 = __pyx_t_3;
          goto __pyx_L54_bool_binop_done;
        }
        __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_n_s_all, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1571, __pyx_L1_error)
        __pyx_t_1 = __pyx_t_3;
        __pyx_L54_bool_binop_done:;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_3 = __pyx_t_1;
        if (__pyx_t_3) {

          /* "cython/core/triangulation.pyx":1572
 *                     # Add longitudes for complete cusps
 *                     if equation_type in [ 'longitude', 'peripheral', 'all']:
 *                         to_do += [ (0,1) ]             # <<<<<<<<<<<<<<
 *                         explain_rows += [
 *                             "longitude_%d_%d" % (j, i) for j in range(N-1) ]
 */
          __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1572, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_INCREF(__pyx_tuple__20);
          __Pyx_GIVEREF(__pyx_tuple__20);
          if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_tuple__20)) __PYX_ERR(3, 1572, __pyx_L1_error);
          __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_to_do, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1572, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF_SET(__pyx_v_to_do, ((PyObject*)__pyx_t_6));
          __pyx_t_6 = 0;

          /* "cython/core/triangulation.pyx":1573
 *                     if equation_type in [ 'longitude', 'peripheral', 'all']:
 *                         to_do += [ (0,1) ]
 *                         explain_rows += [             # <<<<<<<<<<<<<<
 *                             "longitude_%d_%d" % (j, i) for j in range(N-1) ]
 * 
 */
          { /* enter inner scope */
            __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1573, __pyx_L59_error)
            __Pyx_GOTREF(__pyx_t_6);

            /* "cython/core/triangulation.pyx":1574
 *                         to_do += [ (0,1) ]
 *                         explain_rows += [
 *                             "longitude_%d_%d" % (j, i) for j in range(N-1) ]             # <<<<<<<<<<<<<<
 * 
 *                 else:
 */
            __pyx_t_7 = __Pyx_PyInt_SubtractObjC(__pyx_v_N, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1574, __pyx_L59_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1574, __pyx_L59_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
              __pyx_t_7 = __pyx_t_8; __Pyx_INCREF(__pyx_t_7);
              __pyx_t_12 = 0;
              __pyx_t_13 = NULL;
            } else {
              __pyx_t_12 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1574, __pyx_L59_error)
              __Pyx_GOTREF(__pyx_t_7);
              __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1574, __pyx_L59_error)
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
            for (;;) {
              if (likely(!__pyx_t_13)) {
                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(3, 1574, __pyx_L59_error)
                    #endif
                    if (__pyx_t_12 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(3, 1574, __pyx_L59_error)
                  #else
                  __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1574, __pyx_L59_error)
                  __Pyx_GOTREF(__pyx_t_8);
                  #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(3, 1574, __pyx_L59_error)
                    #endif
                    if (__pyx_t_12 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_12); __Pyx_INCREF(__pyx_t_8); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(3, 1574, __pyx_L59_error)
                  #else
                  __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1574, __pyx_L59_error)
                  __Pyx_GOTREF(__pyx_t_8);
                  #endif
                }
              } else {
                __pyx_t_8 = __pyx_t_13(__pyx_t_7);
                if (unlikely(!__pyx_t_8)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(3, 1574, __pyx_L59_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_8);
              }
              __Pyx_XDECREF_SET(__pyx_9genexpr28__pyx_v_j, __pyx_t_8);
              __pyx_t_8 = 0;
              __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1574, __pyx_L59_error)
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_INCREF(__pyx_9genexpr28__pyx_v_j);
              __Pyx_GIVEREF(__pyx_9genexpr28__pyx_v_j);
              if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_9genexpr28__pyx_v_j)) __PYX_ERR(3, 1574, __pyx_L59_error);
              __Pyx_INCREF(__pyx_v_i);
              __Pyx_GIVEREF(__pyx_v_i);
              if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_i)) __PYX_ERR(3, 1574, __pyx_L59_error);
              __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_longitude__d__d, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1574, __pyx_L59_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
              if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_5))) __PYX_ERR(3, 1573, __pyx_L59_error)
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            }
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_9genexpr28__pyx_v_j); __pyx_9genexpr28__pyx_v_j = 0;
            goto __pyx_L63_exit_scope;
            __pyx_L59_error:;
            __Pyx_XDECREF(__pyx_9genexpr28__pyx_v_j); __pyx_9genexpr28__pyx_v_j = 0;
            goto __pyx_L1_error;
            __pyx_L63_exit_scope:;
          } /* exit inner scope */

          /* "cython/core/triangulation.pyx":1573
 *                     if equation_type in [ 'longitude', 'peripheral', 'all']:
 *                         to_do += [ (0,1) ]
 *                         explain_rows += [             # <<<<<<<<<<<<<<
 *                             "longitude_%d_%d" % (j, i) for j in range(N-1) ]
 * 
 */
          __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_explain_rows, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1573, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF_SET(__pyx_v_explain_rows, __pyx_t_7);
          __pyx_t_7 = 0;

          /* "cython/core/triangulation.pyx":1571
 * 
 *                     # Add longitudes for complete cusps
 *                     if equation_type in [ 'longitude', 'peripheral', 'all']:             # <<<<<<<<<<<<<<
 *                         to_do += [ (0,1) ]
 *                         explain_rows += [
 */
        }

        /* "cython/core/triangulation.pyx":1562
 *                 # pairs to process later
 * 
 *                 if cusp_info.is_complete:             # <<<<<<<<<<<<<<
 * 
 *                     # Add meridians for complete cusps
 */
        goto __pyx_L41;
      }

      /* "cython/core/triangulation.pyx":1579
 * 
 *                     # Add Dehn-filling for incomplete cusp
 *                     to_do += [ cusp_info.filling ]             # <<<<<<<<<<<<<<
 *                     explain_rows += [
 *                         "filling_%d_%d" % (j, i) for j in range(N-1) ]
 */
      /*else*/ {
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_cusp_info, __pyx_n_s_filling); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1579, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1579, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_7);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_7)) __PYX_ERR(3, 1579, __pyx_L1_error);
        __pyx_t_7 = 0;
        __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_to_do, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1579, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF_SET(__pyx_v_to_do, ((PyObject*)__pyx_t_7));
        __pyx_t_7 = 0;

        /* "cython/core/triangulation.pyx":1580
 *                     # Add Dehn-filling for incomplete cusp
 *                     to_do += [ cusp_info.filling ]
 *                     explain_rows += [             # <<<<<<<<<<<<<<
 *                         "filling_%d_%d" % (j, i) for j in range(N-1) ]
 * 
 */
        { /* enter inner scope */
          __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1580, __pyx_L66_error)
          __Pyx_GOTREF(__pyx_t_7);

          /* "cython/core/triangulation.pyx":1581
 *                     to_do += [ cusp_info.filling ]
 *                     explain_rows += [
 *                         "filling_%d_%d" % (j, i) for j in range(N-1) ]             # <<<<<<<<<<<<<<
 * 
 *                 # process the todo list
 */
          __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_v_N, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1581, __pyx_L66_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1581, __pyx_L66_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
            __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6);
            __pyx_t_12 = 0;
            __pyx_t_13 = NULL;
          } else {
            __pyx_t_12 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1581, __pyx_L66_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 1581, __pyx_L66_error)
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          for (;;) {
            if (likely(!__pyx_t_13)) {
              if (likely(PyList_CheckExact(__pyx_t_6))) {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
                  #if !CYTHON_ASSUME_SAFE_MACROS
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 1581, __pyx_L66_error)
                  #endif
                  if (__pyx_t_12 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_5); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(3, 1581, __pyx_L66_error)
                #else
                __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1581, __pyx_L66_error)
                __Pyx_GOTREF(__pyx_t_5);
                #endif
              } else {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
                  #if !CYTHON_ASSUME_SAFE_MACROS
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 1581, __pyx_L66_error)
                  #endif
                  if (__pyx_t_12 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_5); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(3, 1581, __pyx_L66_error)
                #else
                __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1581, __pyx_L66_error)
                __Pyx_GOTREF(__pyx_t_5);
                #endif
              }
            } else {
              __pyx_t_5 = __pyx_t_13(__pyx_t_6);
              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(3, 1581, __pyx_L66_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_5);
            }
            __Pyx_XDECREF_SET(__pyx_9genexpr29__pyx_v_j, __pyx_t_5);
            __pyx_t_5 = 0;
            __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1581, __pyx_L66_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_INCREF(__pyx_9genexpr29__pyx_v_j);
            __Pyx_GIVEREF(__pyx_9genexpr29__pyx_v_j);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_9genexpr29__pyx_v_j)) __PYX_ERR(3, 1581, __pyx_L66_error);
            __Pyx_INCREF(__pyx_v_i);
            __Pyx_GIVEREF(__pyx_v_i);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_i)) __PYX_ERR(3, 1581, __pyx_L66_error);
            __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_filling__d__d, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1581, __pyx_L66_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_8))) __PYX_ERR(3, 1580, __pyx_L66_error)
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          }
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_j); __pyx_9genexpr29__pyx_v_j = 0;
          goto __pyx_L70_exit_scope;
          __pyx_L66_error:;
          __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_j); __pyx_9genexpr29__pyx_v_j = 0;
          goto __pyx_L1_error;
          __pyx_L70_exit_scope:;
        } /* exit inner scope */

        /* "cython/core/triangulation.pyx":1580
 *                     # Add Dehn-filling for incomplete cusp
 *                     to_do += [ cusp_info.filling ]
 *                     explain_rows += [             # <<<<<<<<<<<<<<
 *                         "filling_%d_%d" % (j, i) for j in range(N-1) ]
 * 
 */
        __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_explain_rows, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1580, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF_SET(__pyx_v_explain_rows, __pyx_t_6);
        __pyx_t_6 = 0;
      }
      __pyx_L41:;

      /* "cython/core/triangulation.pyx":1584
 * 
 *                 # process the todo list
 *                 for (m, l) in to_do:             # <<<<<<<<<<<<<<
 * 
 *                     get_cusp_equations_pgl(self.c_triangulation,
 */
      __pyx_t_6 = __pyx_v_to_do; __Pyx_INCREF(__pyx_t_6);
      __pyx_t_12 = 0;
      for (;;) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 1584, __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_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_7); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(3, 1584, __pyx_L1_error)
        #else
        __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1584, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
          PyObject* sequence = __pyx_t_7;
          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(3, 1584, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_5);
          #else
          __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1584, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1584, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_14 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 1584, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_14);
          index = 0; __pyx_t_8 = __pyx_t_9(__pyx_t_14); if (unlikely(!__pyx_t_8)) goto __pyx_L73_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_8);
          index = 1; __pyx_t_5 = __pyx_t_9(__pyx_t_14); if (unlikely(!__pyx_t_5)) goto __pyx_L73_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_5);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_14), 2) < 0) __PYX_ERR(3, 1584, __pyx_L1_error)
          __pyx_t_9 = NULL;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          goto __pyx_L74_unpacking_done;
          __pyx_L73_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_9 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(3, 1584, __pyx_L1_error)
          __pyx_L74_unpacking_done:;
        }
        __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_8);
        __pyx_t_8 = 0;
        __Pyx_XDECREF_SET(__pyx_v_l, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "cython/core/triangulation.pyx":1588
 *                     get_cusp_equations_pgl(self.c_triangulation,
 *                                            &c_matrix,
 *                                            N, i, m, l)             # <<<<<<<<<<<<<<
 * 
 *                     eqns, r, explain_cols = (
 */
        __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_N); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1588, __pyx_L1_error)
        __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1588, __pyx_L1_error)
        __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_v_m); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1588, __pyx_L1_error)
        __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_v_l); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1588, __pyx_L1_error)

        /* "cython/core/triangulation.pyx":1586
 *                 for (m, l) in to_do:
 * 
 *                     get_cusp_equations_pgl(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                            &c_matrix,
 *                                            N, i, m, l)
 */
        get_cusp_equations_pgl(__pyx_v_self->c_triangulation, (&__pyx_v_c_matrix), __pyx_t_4, __pyx_t_15, __pyx_t_16, __pyx_t_17);

        /* "cython/core/triangulation.pyx":1591
 * 
 *                     eqns, r, explain_cols = (
 *                         convert_and_free_integer_matrix(c_matrix))             # <<<<<<<<<<<<<<
 *                     equations += eqns
 * 
 */
        __pyx_t_7 = __pyx_f_6SnapPy_convert_and_free_integer_matrix(__pyx_v_c_matrix); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1591, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
          PyObject* sequence = __pyx_t_7;
          Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
          if (unlikely(size != 3)) {
            if (size > 3) __Pyx_RaiseTooManyValuesError(3);
            else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
            __PYX_ERR(3, 1590, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
            __pyx_t_14 = PyTuple_GET_ITEM(sequence, 2); 
          } else {
            __pyx_t_5 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
            __pyx_t_14 = PyList_GET_ITEM(sequence, 2); 
          }
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_14);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1590, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1590, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_14 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 1590, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          #endif
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_18 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_18)) __PYX_ERR(3, 1590, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_18);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_18);
          index = 0; __pyx_t_5 = __pyx_t_9(__pyx_t_18); if (unlikely(!__pyx_t_5)) goto __pyx_L75_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_5);
          index = 1; __pyx_t_8 = __pyx_t_9(__pyx_t_18); if (unlikely(!__pyx_t_8)) goto __pyx_L75_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_8);
          index = 2; __pyx_t_14 = __pyx_t_9(__pyx_t_18); if (unlikely(!__pyx_t_14)) goto __pyx_L75_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_14);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_18), 3) < 0) __PYX_ERR(3, 1590, __pyx_L1_error)
          __pyx_t_9 = NULL;
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          goto __pyx_L76_unpacking_done;
          __pyx_L75_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
          __pyx_t_9 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(3, 1590, __pyx_L1_error)
          __pyx_L76_unpacking_done:;
        }

        /* "cython/core/triangulation.pyx":1590
 *                                            N, i, m, l)
 * 
 *                     eqns, r, explain_cols = (             # <<<<<<<<<<<<<<
 *                         convert_and_free_integer_matrix(c_matrix))
 *                     equations += eqns
 */
        __Pyx_XDECREF_SET(__pyx_v_eqns, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_8);
        __pyx_t_8 = 0;
        __Pyx_DECREF_SET(__pyx_v_explain_cols, __pyx_t_14);
        __pyx_t_14 = 0;

        /* "cython/core/triangulation.pyx":1592
 *                     eqns, r, explain_cols = (
 *                         convert_and_free_integer_matrix(c_matrix))
 *                     equations += eqns             # <<<<<<<<<<<<<<
 * 
 *         if equations == []:
 */
        __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_equations, __pyx_v_eqns); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1592, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF_SET(__pyx_v_equations, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "cython/core/triangulation.pyx":1584
 * 
 *                 # process the todo list
 *                 for (m, l) in to_do:             # <<<<<<<<<<<<<<
 * 
 *                     get_cusp_equations_pgl(self.c_triangulation,
 */
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cython/core/triangulation.pyx":1555
 *             # Add peripheral equations
 * 
 *             for i in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *                 cusp_info = self.cusp_info(i)
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/triangulation.pyx":1551
 *             explain_rows += r
 * 
 *         if equation_type in ['all', 'peripheral', 'longitude', 'meridian']:             # <<<<<<<<<<<<<<
 * 
 *             # Add peripheral equations
 */
  }

  /* "cython/core/triangulation.pyx":1594
 *                     equations += eqns
 * 
 *         if equations == []:             # <<<<<<<<<<<<<<
 *             # cover cases N = 2, 3 and equation_type = 'internal'
 *             return None
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyObject_RichCompare(__pyx_v_equations, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__pyx_t_3) {

    /* "cython/core/triangulation.pyx":1596
 *         if equations == []:
 *             # cover cases N = 2, 3 and equation_type = 'internal'
 *             return None             # <<<<<<<<<<<<<<
 * 
 *         return NeumannZagierTypeEquations(matrix(equations),
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":1594
 *                     equations += eqns
 * 
 *         if equations == []:             # <<<<<<<<<<<<<<
 *             # cover cases N = 2, 3 and equation_type = 'internal'
 *             return None
 */
  }

  /* "cython/core/triangulation.pyx":1598
 *             return None
 * 
 *         return NeumannZagierTypeEquations(matrix(equations),             # <<<<<<<<<<<<<<
 *                                           explain_rows,
 *                                           explain_cols)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_NeumannZagierTypeEquations); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_matrix); if (unlikely(!__pyx_t_14)) __PYX_ERR(3, 1598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_8 = NULL;
  __pyx_t_17 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_14);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_14, function);
      __pyx_t_17 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_equations};
    __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_17, 1+__pyx_t_17);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  }

  /* "cython/core/triangulation.pyx":1600
 *         return NeumannZagierTypeEquations(matrix(equations),
 *                                           explain_rows,
 *                                           explain_cols)             # <<<<<<<<<<<<<<
 * 
 *     def _ptolemy_equations_identified_face_classes(self):
 */
  __pyx_t_14 = NULL;
  __pyx_t_17 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_14)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_17 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_14, __pyx_t_7, __pyx_v_explain_rows, __pyx_v_explain_cols};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_17, 3+__pyx_t_17);
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1598, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1424
 *         return ans
 * 
 *     def gluing_equations_pgl(self, N=2, equation_type='all'):             # <<<<<<<<<<<<<<
 * 
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("SnapPy.Triangulation.gluing_equations_pgl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_equations);
  __Pyx_XDECREF(__pyx_v_explain_rows);
  __Pyx_XDECREF(__pyx_v_explain_cols);
  __Pyx_XDECREF(__pyx_v_eqns);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_cusp_info);
  __Pyx_XDECREF(__pyx_v_to_do);
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XDECREF(__pyx_9genexpr27__pyx_v_j);
  __Pyx_XDECREF(__pyx_9genexpr28__pyx_v_j);
  __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_j);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1602
 *                                           explain_cols)
 * 
 *     def _ptolemy_equations_identified_face_classes(self):             # <<<<<<<<<<<<<<
 *         """
 *         This function returns an identification structure where s_f_t gets
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_99_ptolemy_equations_identified_face_classes(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_6SnapPy_13Triangulation_98_ptolemy_equations_identified_face_classes, "Triangulation._ptolemy_equations_identified_face_classes(self)\n\n        This function returns an identification structure where s_f_t gets\n        identified with -s_g_u if face f of tetrahedron t is glued to face g of\n        tetrahedron u.\n\n        We can represent a 2-cohomology class H^2(M,boundary M) by denoting by\n        s_f_t the value the 2-cohomology class takes on the face f of\n        tetrahedron t with the orientation being the one induced from the\n        orientation of the tetrahedron.\n        Because a face class of the triangulation has two representatives\n        (tet_index, face_index) and the gluing is orientation-reversing on the\n        face, one s will be the negative of another s.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_99_ptolemy_equations_identified_face_classes = {"_ptolemy_equations_identified_face_classes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_99_ptolemy_equations_identified_face_classes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_98_ptolemy_equations_identified_face_classes};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_99_ptolemy_equations_identified_face_classes(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("_ptolemy_equations_identified_face_classes (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("_ptolemy_equations_identified_face_classes", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_ptolemy_equations_identified_face_classes", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_98_ptolemy_equations_identified_face_classes(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_98_ptolemy_equations_identified_face_classes(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  Identification_of_variables __pyx_v_c_vars;
  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("_ptolemy_equations_identified_face_classes", 1);

  /* "cython/core/triangulation.pyx":1619
 *         cdef Identification_of_variables c_vars
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":1620
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 * 
 *         number_the_tetrahedra(self.c_triangulation)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1620, __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(3, 1620, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1619
 *         cdef Identification_of_variables c_vars
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":1622
 *             raise ValueError('The Triangulation is empty.')
 * 
 *         number_the_tetrahedra(self.c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *         get_ptolemy_equations_identified_face_classes(
 */
  number_the_tetrahedra(__pyx_v_self->c_triangulation);

  /* "cython/core/triangulation.pyx":1624
 *         number_the_tetrahedra(self.c_triangulation)
 * 
 *         get_ptolemy_equations_identified_face_classes(             # <<<<<<<<<<<<<<
 *             self.c_triangulation, &c_vars)
 * 
 */
  get_ptolemy_equations_identified_face_classes(__pyx_v_self->c_triangulation, (&__pyx_v_c_vars));

  /* "cython/core/triangulation.pyx":1627
 *             self.c_triangulation, &c_vars)
 * 
 *         return convert_and_free_identification_of_variables(c_vars)             # <<<<<<<<<<<<<<
 * 
 *     def _ptolemy_equations_identified_coordinates(self, N,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_6SnapPy_convert_and_free_identification_of_variables(__pyx_v_c_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1602
 *                                           explain_cols)
 * 
 *     def _ptolemy_equations_identified_face_classes(self):             # <<<<<<<<<<<<<<
 *         """
 *         This function returns an identification structure where s_f_t gets
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.Triangulation._ptolemy_equations_identified_face_classes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1629
 *         return convert_and_free_identification_of_variables(c_vars)
 * 
 *     def _ptolemy_equations_identified_coordinates(self, N,             # <<<<<<<<<<<<<<
 *                                                   obstruction_class = None):
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_101_ptolemy_equations_identified_coordinates(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_6SnapPy_13Triangulation_100_ptolemy_equations_identified_coordinates, "Triangulation._ptolemy_equations_identified_coordinates(self, N, obstruction_class=None)\n\n        Ptolemy coordinates that need to be identified for the given\n        triangulation when computing pSL(N,C) representations.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_101_ptolemy_equations_identified_coordinates = {"_ptolemy_equations_identified_coordinates", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_101_ptolemy_equations_identified_coordinates, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_100_ptolemy_equations_identified_coordinates};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_101_ptolemy_equations_identified_coordinates(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_N = 0;
  PyObject *__pyx_v_obstruction_class = 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("_ptolemy_equations_identified_coordinates (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_N,&__pyx_n_s_obstruction_class,0};

    /* "cython/core/triangulation.pyx":1630
 * 
 *     def _ptolemy_equations_identified_coordinates(self, N,
 *                                                   obstruction_class = None):             # <<<<<<<<<<<<<<
 * 
 *         """
 */
    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_N)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1629, __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_obstruction_class);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1629, __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, "_ptolemy_equations_identified_coordinates") < 0)) __PYX_ERR(3, 1629, __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_N = values[0];
    __pyx_v_obstruction_class = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_ptolemy_equations_identified_coordinates", 0, 1, 2, __pyx_nargs); __PYX_ERR(3, 1629, __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("SnapPy.Triangulation._ptolemy_equations_identified_coordinates", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_100_ptolemy_equations_identified_coordinates(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_N, __pyx_v_obstruction_class);

  /* "cython/core/triangulation.pyx":1629
 *         return convert_and_free_identification_of_variables(c_vars)
 * 
 *     def _ptolemy_equations_identified_coordinates(self, N,             # <<<<<<<<<<<<<<
 *                                                   obstruction_class = None):
 * 
 */

  /* 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_6SnapPy_13Triangulation_100_ptolemy_equations_identified_coordinates(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_N, PyObject *__pyx_v_obstruction_class) {
  Identification_of_variables __pyx_v_c_vars;
  int *__pyx_v_c_obstruction_class;
  int __pyx_v_T;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_ptolemy_equations_identified_coordinates", 1);

  /* "cython/core/triangulation.pyx":1638
 * 
 *         cdef Identification_of_variables c_vars
 *         cdef int *c_obstruction_class = NULL             # <<<<<<<<<<<<<<
 *         cdef int T
 * 
 */
  __pyx_v_c_obstruction_class = NULL;

  /* "cython/core/triangulation.pyx":1641
 *         cdef int T
 * 
 *         if N < 2 or N > 15:             # <<<<<<<<<<<<<<
 *             raise ValueError('N has to be 2...15')
 * 
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_N, __pyx_int_2, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1641, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1641, __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 = PyObject_RichCompare(__pyx_v_N, __pyx_int_15, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1641, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 1641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":1642
 * 
 *         if N < 2 or N > 15:
 *             raise ValueError('N has to be 2...15')             # <<<<<<<<<<<<<<
 * 
 *         if self.c_triangulation is NULL:
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1642, __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(3, 1642, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1641
 *         cdef int T
 * 
 *         if N < 2 or N > 15:             # <<<<<<<<<<<<<<
 *             raise ValueError('N has to be 2...15')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":1644
 *             raise ValueError('N has to be 2...15')
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":1645
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 * 
 *         if obstruction_class:
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1645, __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(3, 1645, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1644
 *             raise ValueError('N has to be 2...15')
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":1647
 *             raise ValueError('The Triangulation is empty.')
 * 
 *         if obstruction_class:             # <<<<<<<<<<<<<<
 *             T = get_num_tetrahedra(self.c_triangulation)
 *             if 2 * T != len(obstruction_class):
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obstruction_class); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 1647, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":1648
 * 
 *         if obstruction_class:
 *             T = get_num_tetrahedra(self.c_triangulation)             # <<<<<<<<<<<<<<
 *             if 2 * T != len(obstruction_class):
 *                 raise ValueError('Obstruction class has wrong length')
 */
    __pyx_t_4 = get_num_tetrahedra(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1648, __pyx_L1_error)
    __pyx_v_T = __pyx_t_4;

    /* "cython/core/triangulation.pyx":1649
 *         if obstruction_class:
 *             T = get_num_tetrahedra(self.c_triangulation)
 *             if 2 * T != len(obstruction_class):             # <<<<<<<<<<<<<<
 *                 raise ValueError('Obstruction class has wrong length')
 *             c_obstruction_class = <int *>malloc(2*T*sizeof(int))
 */
    __pyx_t_5 = PyObject_Length(__pyx_v_obstruction_class); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(3, 1649, __pyx_L1_error)
    __pyx_t_1 = ((2 * __pyx_v_T) != __pyx_t_5);
    if (unlikely(__pyx_t_1)) {

      /* "cython/core/triangulation.pyx":1650
 *             T = get_num_tetrahedra(self.c_triangulation)
 *             if 2 * T != len(obstruction_class):
 *                 raise ValueError('Obstruction class has wrong length')             # <<<<<<<<<<<<<<
 *             c_obstruction_class = <int *>malloc(2*T*sizeof(int))
 *             for i, c in enumerate(obstruction_class):
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1650, __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(3, 1650, __pyx_L1_error)

      /* "cython/core/triangulation.pyx":1649
 *         if obstruction_class:
 *             T = get_num_tetrahedra(self.c_triangulation)
 *             if 2 * T != len(obstruction_class):             # <<<<<<<<<<<<<<
 *                 raise ValueError('Obstruction class has wrong length')
 *             c_obstruction_class = <int *>malloc(2*T*sizeof(int))
 */
    }

    /* "cython/core/triangulation.pyx":1651
 *             if 2 * T != len(obstruction_class):
 *                 raise ValueError('Obstruction class has wrong length')
 *             c_obstruction_class = <int *>malloc(2*T*sizeof(int))             # <<<<<<<<<<<<<<
 *             for i, c in enumerate(obstruction_class):
 *                 c_obstruction_class[i] = c
 */
    __pyx_v_c_obstruction_class = ((int *)malloc(((2 * __pyx_v_T) * (sizeof(int)))));

    /* "cython/core/triangulation.pyx":1652
 *                 raise ValueError('Obstruction class has wrong length')
 *             c_obstruction_class = <int *>malloc(2*T*sizeof(int))
 *             for i, c in enumerate(obstruction_class):             # <<<<<<<<<<<<<<
 *                 c_obstruction_class[i] = c
 * 
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_2 = __pyx_int_0;
    if (likely(PyList_CheckExact(__pyx_v_obstruction_class)) || PyTuple_CheckExact(__pyx_v_obstruction_class)) {
      __pyx_t_6 = __pyx_v_obstruction_class; __Pyx_INCREF(__pyx_t_6);
      __pyx_t_5 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_obstruction_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1652, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 1652, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 1652, __pyx_L1_error)
            #endif
            if (__pyx_t_5 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_8); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(3, 1652, __pyx_L1_error)
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1652, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 1652, __pyx_L1_error)
            #endif
            if (__pyx_t_5 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_5); __Pyx_INCREF(__pyx_t_8); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(3, 1652, __pyx_L1_error)
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1652, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        }
      } else {
        __pyx_t_8 = __pyx_t_7(__pyx_t_6);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(3, 1652, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
      __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1652, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2);
      __pyx_t_2 = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "cython/core/triangulation.pyx":1653
 *             c_obstruction_class = <int *>malloc(2*T*sizeof(int))
 *             for i, c in enumerate(obstruction_class):
 *                 c_obstruction_class[i] = c             # <<<<<<<<<<<<<<
 * 
 *         number_the_tetrahedra(self.c_triangulation)
 */
      __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_c); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1653, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 1653, __pyx_L1_error)
      (__pyx_v_c_obstruction_class[__pyx_t_9]) = __pyx_t_4;

      /* "cython/core/triangulation.pyx":1652
 *                 raise ValueError('Obstruction class has wrong length')
 *             c_obstruction_class = <int *>malloc(2*T*sizeof(int))
 *             for i, c in enumerate(obstruction_class):             # <<<<<<<<<<<<<<
 *                 c_obstruction_class[i] = c
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/triangulation.pyx":1647
 *             raise ValueError('The Triangulation is empty.')
 * 
 *         if obstruction_class:             # <<<<<<<<<<<<<<
 *             T = get_num_tetrahedra(self.c_triangulation)
 *             if 2 * T != len(obstruction_class):
 */
  }

  /* "cython/core/triangulation.pyx":1655
 *                 c_obstruction_class[i] = c
 * 
 *         number_the_tetrahedra(self.c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *         get_ptolemy_equations_identified_coordinates(
 */
  number_the_tetrahedra(__pyx_v_self->c_triangulation);

  /* "cython/core/triangulation.pyx":1658
 * 
 *         get_ptolemy_equations_identified_coordinates(
 *             self.c_triangulation, &c_vars, N, c_obstruction_class)             # <<<<<<<<<<<<<<
 * 
 *         free(c_obstruction_class)
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_N); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1658, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1657
 *         number_the_tetrahedra(self.c_triangulation)
 * 
 *         get_ptolemy_equations_identified_coordinates(             # <<<<<<<<<<<<<<
 *             self.c_triangulation, &c_vars, N, c_obstruction_class)
 * 
 */
  get_ptolemy_equations_identified_coordinates(__pyx_v_self->c_triangulation, (&__pyx_v_c_vars), __pyx_t_4, __pyx_v_c_obstruction_class);

  /* "cython/core/triangulation.pyx":1660
 *             self.c_triangulation, &c_vars, N, c_obstruction_class)
 * 
 *         free(c_obstruction_class)             # <<<<<<<<<<<<<<
 * 
 *         return convert_and_free_identification_of_variables(c_vars)
 */
  free(__pyx_v_c_obstruction_class);

  /* "cython/core/triangulation.pyx":1662
 *         free(c_obstruction_class)
 * 
 *         return convert_and_free_identification_of_variables(c_vars)             # <<<<<<<<<<<<<<
 * 
 *     def _ptolemy_equations_action_by_decoration_change(self, int N):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_f_6SnapPy_convert_and_free_identification_of_variables(__pyx_v_c_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1629
 *         return convert_and_free_identification_of_variables(c_vars)
 * 
 *     def _ptolemy_equations_identified_coordinates(self, N,             # <<<<<<<<<<<<<<
 *                                                   obstruction_class = None):
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("SnapPy.Triangulation._ptolemy_equations_identified_coordinates", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1664
 *         return convert_and_free_identification_of_variables(c_vars)
 * 
 *     def _ptolemy_equations_action_by_decoration_change(self, int N):             # <<<<<<<<<<<<<<
 *         """
 *         We can change a decoration by multiplying a coset of a cusp by a
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_103_ptolemy_equations_action_by_decoration_change(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_6SnapPy_13Triangulation_102_ptolemy_equations_action_by_decoration_change, "Triangulation._ptolemy_equations_action_by_decoration_change(self, int N)\n\n        We can change a decoration by multiplying a coset of a cusp by a\n        diagonal matrix. Let a diagonal matrix SL(n,C) with diagonal\n        entries 1 1 ... z 1 ... 1 1/z (z at position j) act on cusp i. It\n        changes some Ptolemy coordinate c_p_t by some power z^n.\n        This is expressed in the following matrix as the entry in row\n        labelled c_p_t and the column labelled diagonal_entry_j_on_cusp_i.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_103_ptolemy_equations_action_by_decoration_change = {"_ptolemy_equations_action_by_decoration_change", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_103_ptolemy_equations_action_by_decoration_change, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_102_ptolemy_equations_action_by_decoration_change};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_103_ptolemy_equations_action_by_decoration_change(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
) {
  int __pyx_v_N;
  #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("_ptolemy_equations_action_by_decoration_change (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_N,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_N)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1664, __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, "_ptolemy_equations_action_by_decoration_change") < 0)) __PYX_ERR(3, 1664, __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_N = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_N == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 1664, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_ptolemy_equations_action_by_decoration_change", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 1664, __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("SnapPy.Triangulation._ptolemy_equations_action_by_decoration_change", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_102_ptolemy_equations_action_by_decoration_change(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_N);

  /* 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_6SnapPy_13Triangulation_102_ptolemy_equations_action_by_decoration_change(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, int __pyx_v_N) {
  Integer_matrix_with_explanations __pyx_v_c_matrix;
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_v_explain_rows = NULL;
  PyObject *__pyx_v_explain_cols = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_ptolemy_equations_action_by_decoration_change", 1);

  /* "cython/core/triangulation.pyx":1676
 *         cdef Integer_matrix_with_explanations c_matrix
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":1677
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 * 
 *         number_the_tetrahedra(self.c_triangulation)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1677, __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(3, 1677, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1676
 *         cdef Integer_matrix_with_explanations c_matrix
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":1679
 *             raise ValueError('The Triangulation is empty.')
 * 
 *         number_the_tetrahedra(self.c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *         get_ptolemy_equations_action_by_decoration_change(
 */
  number_the_tetrahedra(__pyx_v_self->c_triangulation);

  /* "cython/core/triangulation.pyx":1681
 *         number_the_tetrahedra(self.c_triangulation)
 * 
 *         get_ptolemy_equations_action_by_decoration_change(             # <<<<<<<<<<<<<<
 *             self.c_triangulation,N, &c_matrix)
 *         m, explain_rows, explain_cols = convert_and_free_integer_matrix(
 */
  get_ptolemy_equations_action_by_decoration_change(__pyx_v_self->c_triangulation, __pyx_v_N, (&__pyx_v_c_matrix));

  /* "cython/core/triangulation.pyx":1683
 *         get_ptolemy_equations_action_by_decoration_change(
 *             self.c_triangulation,N, &c_matrix)
 *         m, explain_rows, explain_cols = convert_and_free_integer_matrix(             # <<<<<<<<<<<<<<
 *             c_matrix)
 * 
 */
  __pyx_t_2 = __pyx_f_6SnapPy_convert_and_free_integer_matrix(__pyx_v_c_matrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(3, 1683, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
    index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 2; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) __PYX_ERR(3, 1683, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(3, 1683, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __pyx_v_m = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_explain_rows = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_explain_cols = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cython/core/triangulation.pyx":1686
 *             c_matrix)
 * 
 *         return m, explain_rows, explain_cols             # <<<<<<<<<<<<<<
 * 
 *     def _ptolemy_equations_boundary_map_3(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_m);
  __Pyx_GIVEREF(__pyx_v_m);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_m)) __PYX_ERR(3, 1686, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_explain_rows);
  __Pyx_GIVEREF(__pyx_v_explain_rows);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_explain_rows)) __PYX_ERR(3, 1686, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_explain_cols);
  __Pyx_GIVEREF(__pyx_v_explain_cols);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_explain_cols)) __PYX_ERR(3, 1686, __pyx_L1_error);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1664
 *         return convert_and_free_identification_of_variables(c_vars)
 * 
 *     def _ptolemy_equations_action_by_decoration_change(self, int N):             # <<<<<<<<<<<<<<
 *         """
 *         We can change a decoration by multiplying a coset of a cusp by a
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.Triangulation._ptolemy_equations_action_by_decoration_change", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_v_explain_rows);
  __Pyx_XDECREF(__pyx_v_explain_cols);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1688
 *         return m, explain_rows, explain_cols
 * 
 *     def _ptolemy_equations_boundary_map_3(self):             # <<<<<<<<<<<<<<
 *         """
 *         Boundary map C_3 -> C_2 in cellular homology represented as matrix
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_105_ptolemy_equations_boundary_map_3(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_6SnapPy_13Triangulation_104_ptolemy_equations_boundary_map_3, "Triangulation._ptolemy_equations_boundary_map_3(self)\n\n        Boundary map C_3 -> C_2 in cellular homology represented as matrix\n\n        The following map represents the boundary map in the cellular chain\n        complex when representing a linear map as a matrix m acting on a column\n        vector v by left-multiplication m * v. With right-multiplication acting\n        on row vectors, the matrix represents the coboundary map in the cochain\n        complex.\n\n        The basis for C_3 are just the oriented tetrahedra of the triangulation.\n        The basis for C_2 are the face classes, see\n        _ptolemy_equations_identified_face_classes.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_105_ptolemy_equations_boundary_map_3 = {"_ptolemy_equations_boundary_map_3", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_105_ptolemy_equations_boundary_map_3, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_104_ptolemy_equations_boundary_map_3};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_105_ptolemy_equations_boundary_map_3(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("_ptolemy_equations_boundary_map_3 (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("_ptolemy_equations_boundary_map_3", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_ptolemy_equations_boundary_map_3", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_104_ptolemy_equations_boundary_map_3(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_104_ptolemy_equations_boundary_map_3(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  Integer_matrix_with_explanations __pyx_v_c_matrix;
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_v_explain_rows = NULL;
  PyObject *__pyx_v_explain_cols = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_ptolemy_equations_boundary_map_3", 1);

  /* "cython/core/triangulation.pyx":1705
 *         cdef Integer_matrix_with_explanations c_matrix
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":1706
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 * 
 *         number_the_tetrahedra(self.c_triangulation)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1706, __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(3, 1706, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1705
 *         cdef Integer_matrix_with_explanations c_matrix
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":1708
 *             raise ValueError('The Triangulation is empty.')
 * 
 *         number_the_tetrahedra(self.c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *         get_ptolemy_equations_boundary_map_3(self.c_triangulation, &c_matrix)
 */
  number_the_tetrahedra(__pyx_v_self->c_triangulation);

  /* "cython/core/triangulation.pyx":1710
 *         number_the_tetrahedra(self.c_triangulation)
 * 
 *         get_ptolemy_equations_boundary_map_3(self.c_triangulation, &c_matrix)             # <<<<<<<<<<<<<<
 * 
 *         m, explain_rows, explain_cols = convert_and_free_integer_matrix(
 */
  get_ptolemy_equations_boundary_map_3(__pyx_v_self->c_triangulation, (&__pyx_v_c_matrix));

  /* "cython/core/triangulation.pyx":1712
 *         get_ptolemy_equations_boundary_map_3(self.c_triangulation, &c_matrix)
 * 
 *         m, explain_rows, explain_cols = convert_and_free_integer_matrix(             # <<<<<<<<<<<<<<
 *             c_matrix)
 * 
 */
  __pyx_t_2 = __pyx_f_6SnapPy_convert_and_free_integer_matrix(__pyx_v_c_matrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(3, 1712, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1712, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
    index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 2; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) __PYX_ERR(3, 1712, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(3, 1712, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __pyx_v_m = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_explain_rows = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_explain_cols = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cython/core/triangulation.pyx":1715
 *             c_matrix)
 * 
 *         return m, explain_rows, explain_cols             # <<<<<<<<<<<<<<
 * 
 *     def _ptolemy_equations_boundary_map_2(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_m);
  __Pyx_GIVEREF(__pyx_v_m);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_m)) __PYX_ERR(3, 1715, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_explain_rows);
  __Pyx_GIVEREF(__pyx_v_explain_rows);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_explain_rows)) __PYX_ERR(3, 1715, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_explain_cols);
  __Pyx_GIVEREF(__pyx_v_explain_cols);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_explain_cols)) __PYX_ERR(3, 1715, __pyx_L1_error);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1688
 *         return m, explain_rows, explain_cols
 * 
 *     def _ptolemy_equations_boundary_map_3(self):             # <<<<<<<<<<<<<<
 *         """
 *         Boundary map C_3 -> C_2 in cellular homology represented as matrix
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.Triangulation._ptolemy_equations_boundary_map_3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_v_explain_rows);
  __Pyx_XDECREF(__pyx_v_explain_cols);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1717
 *         return m, explain_rows, explain_cols
 * 
 *     def _ptolemy_equations_boundary_map_2(self):             # <<<<<<<<<<<<<<
 *         """
 *         Boundary map C_2 -> C_1 in cellular homology represented as matrix.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_107_ptolemy_equations_boundary_map_2(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_6SnapPy_13Triangulation_106_ptolemy_equations_boundary_map_2, "Triangulation._ptolemy_equations_boundary_map_2(self)\n\n        Boundary map C_2 -> C_1 in cellular homology represented as matrix.\n\n        Also see _ptolemy_equations_boundary_map_3.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_107_ptolemy_equations_boundary_map_2 = {"_ptolemy_equations_boundary_map_2", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_107_ptolemy_equations_boundary_map_2, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_106_ptolemy_equations_boundary_map_2};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_107_ptolemy_equations_boundary_map_2(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("_ptolemy_equations_boundary_map_2 (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("_ptolemy_equations_boundary_map_2", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_ptolemy_equations_boundary_map_2", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_106_ptolemy_equations_boundary_map_2(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_106_ptolemy_equations_boundary_map_2(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  Integer_matrix_with_explanations __pyx_v_c_matrix;
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_v_explain_rows = NULL;
  PyObject *__pyx_v_explain_cols = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_ptolemy_equations_boundary_map_2", 1);

  /* "cython/core/triangulation.pyx":1726
 *         cdef Integer_matrix_with_explanations c_matrix
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":1727
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 * 
 *         number_the_tetrahedra(self.c_triangulation)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(3, 1727, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1726
 *         cdef Integer_matrix_with_explanations c_matrix
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":1729
 *             raise ValueError('The Triangulation is empty.')
 * 
 *         number_the_tetrahedra(self.c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *         get_ptolemy_equations_boundary_map_2(self.c_triangulation, &c_matrix)
 */
  number_the_tetrahedra(__pyx_v_self->c_triangulation);

  /* "cython/core/triangulation.pyx":1731
 *         number_the_tetrahedra(self.c_triangulation)
 * 
 *         get_ptolemy_equations_boundary_map_2(self.c_triangulation, &c_matrix)             # <<<<<<<<<<<<<<
 * 
 *         m, explain_rows, explain_cols = convert_and_free_integer_matrix(
 */
  get_ptolemy_equations_boundary_map_2(__pyx_v_self->c_triangulation, (&__pyx_v_c_matrix));

  /* "cython/core/triangulation.pyx":1733
 *         get_ptolemy_equations_boundary_map_2(self.c_triangulation, &c_matrix)
 * 
 *         m, explain_rows, explain_cols = convert_and_free_integer_matrix(             # <<<<<<<<<<<<<<
 *             c_matrix)
 * 
 */
  __pyx_t_2 = __pyx_f_6SnapPy_convert_and_free_integer_matrix(__pyx_v_c_matrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(3, 1733, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1733, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
    index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 2; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) __PYX_ERR(3, 1733, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(3, 1733, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __pyx_v_m = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_explain_rows = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_explain_cols = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cython/core/triangulation.pyx":1736
 *             c_matrix)
 * 
 *         return m, explain_rows, explain_cols             # <<<<<<<<<<<<<<
 * 
 *     def _ptolemy_equations_boundary_map_1(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_m);
  __Pyx_GIVEREF(__pyx_v_m);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_m)) __PYX_ERR(3, 1736, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_explain_rows);
  __Pyx_GIVEREF(__pyx_v_explain_rows);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_explain_rows)) __PYX_ERR(3, 1736, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_explain_cols);
  __Pyx_GIVEREF(__pyx_v_explain_cols);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_explain_cols)) __PYX_ERR(3, 1736, __pyx_L1_error);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1717
 *         return m, explain_rows, explain_cols
 * 
 *     def _ptolemy_equations_boundary_map_2(self):             # <<<<<<<<<<<<<<
 *         """
 *         Boundary map C_2 -> C_1 in cellular homology represented as matrix.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.Triangulation._ptolemy_equations_boundary_map_2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_v_explain_rows);
  __Pyx_XDECREF(__pyx_v_explain_cols);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1738
 *         return m, explain_rows, explain_cols
 * 
 *     def _ptolemy_equations_boundary_map_1(self):             # <<<<<<<<<<<<<<
 *         """
 *         Boundary map C_1 -> C_0 in cellular homology represented as matrix.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_109_ptolemy_equations_boundary_map_1(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_6SnapPy_13Triangulation_108_ptolemy_equations_boundary_map_1, "Triangulation._ptolemy_equations_boundary_map_1(self)\n\n        Boundary map C_1 -> C_0 in cellular homology represented as matrix.\n        This will compute the homology of the cell complex obtained when\n        gluing together the tetrahedra and not of the cusped manifold.\n\n        Also see _ptolemy_equations_boundary_map_3.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_109_ptolemy_equations_boundary_map_1 = {"_ptolemy_equations_boundary_map_1", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_109_ptolemy_equations_boundary_map_1, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_108_ptolemy_equations_boundary_map_1};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_109_ptolemy_equations_boundary_map_1(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("_ptolemy_equations_boundary_map_1 (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("_ptolemy_equations_boundary_map_1", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_ptolemy_equations_boundary_map_1", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_108_ptolemy_equations_boundary_map_1(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_108_ptolemy_equations_boundary_map_1(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  Integer_matrix_with_explanations __pyx_v_c_matrix;
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_v_explain_rows = NULL;
  PyObject *__pyx_v_explain_cols = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_ptolemy_equations_boundary_map_1", 1);

  /* "cython/core/triangulation.pyx":1749
 *         cdef Integer_matrix_with_explanations c_matrix
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":1750
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 * 
 *         number_the_tetrahedra(self.c_triangulation)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1750, __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(3, 1750, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":1749
 *         cdef Integer_matrix_with_explanations c_matrix
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":1752
 *             raise ValueError('The Triangulation is empty.')
 * 
 *         number_the_tetrahedra(self.c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *         get_ptolemy_equations_boundary_map_1(self.c_triangulation, &c_matrix)
 */
  number_the_tetrahedra(__pyx_v_self->c_triangulation);

  /* "cython/core/triangulation.pyx":1754
 *         number_the_tetrahedra(self.c_triangulation)
 * 
 *         get_ptolemy_equations_boundary_map_1(self.c_triangulation, &c_matrix)             # <<<<<<<<<<<<<<
 * 
 *         m, explain_rows, explain_cols = convert_and_free_integer_matrix(
 */
  get_ptolemy_equations_boundary_map_1(__pyx_v_self->c_triangulation, (&__pyx_v_c_matrix));

  /* "cython/core/triangulation.pyx":1756
 *         get_ptolemy_equations_boundary_map_1(self.c_triangulation, &c_matrix)
 * 
 *         m, explain_rows, explain_cols = convert_and_free_integer_matrix(             # <<<<<<<<<<<<<<
 *             c_matrix)
 * 
 */
  __pyx_t_2 = __pyx_f_6SnapPy_convert_and_free_integer_matrix(__pyx_v_c_matrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(3, 1756, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_5);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 1756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 1756, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
    index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    index = 2; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L4_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) __PYX_ERR(3, 1756, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(3, 1756, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __pyx_v_m = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_explain_rows = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_explain_cols = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "cython/core/triangulation.pyx":1759
 *             c_matrix)
 * 
 *         return m, explain_rows, explain_cols             # <<<<<<<<<<<<<<
 * 
 *     def ptolemy_obstruction_classes(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_m);
  __Pyx_GIVEREF(__pyx_v_m);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_m)) __PYX_ERR(3, 1759, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_explain_rows);
  __Pyx_GIVEREF(__pyx_v_explain_rows);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_explain_rows)) __PYX_ERR(3, 1759, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_explain_cols);
  __Pyx_GIVEREF(__pyx_v_explain_cols);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_explain_cols)) __PYX_ERR(3, 1759, __pyx_L1_error);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1738
 *         return m, explain_rows, explain_cols
 * 
 *     def _ptolemy_equations_boundary_map_1(self):             # <<<<<<<<<<<<<<
 *         """
 *         Boundary map C_1 -> C_0 in cellular homology represented as matrix.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.Triangulation._ptolemy_equations_boundary_map_1", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_v_explain_rows);
  __Pyx_XDECREF(__pyx_v_explain_cols);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1761
 *         return m, explain_rows, explain_cols
 * 
 *     def ptolemy_obstruction_classes(self):             # <<<<<<<<<<<<<<
 * 
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_111ptolemy_obstruction_classes(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_6SnapPy_13Triangulation_110ptolemy_obstruction_classes, "Triangulation.ptolemy_obstruction_classes(self)\n\n        Returns the obstruction classes needed to compute\n        pSL(N,C) = SL(N,C)/{+1,-1} representations for even N, i.e., it\n        returns a list with a representative cocycle for each class in\n        H^2(M, boundary M; Z/2). The first element in the list is always\n        representing the trivial obstruction class.\n\n        For example, 4_1 has two obstruction classes:\n\n        >>> M = Manifold(\"4_1\")\n        >>> c = M.ptolemy_obstruction_classes()\n        >>> len(c)\n        2\n\n        The primary use of these obstruction classes is to construct\n        the Ptolemy variety as described in Definition 1.7 of\n        Stavros Garoufalidis, Dylan Thurston, Christian K. Zickert:\n        \"The Complex Volume of SL(n,C)-Representations of 3-Manifolds\"\n        (http://arxiv.org/abs/1111.2828).\n\n        For example, to construct the Ptolemy variety for\n        PSL(2,C)-representations of 4_1 that do not lift to boundary-parabolic\n        SL(2,C)-representations, use:\n\n        >>> p = M.ptolemy_variety(N = 2, obstruction_class = c[1])\n\n        Or the following short-cut:\n\n        >>> p = M.ptolemy_variety(2, obstruction_class = 1)\n\n        Note that this obstruction class only makes sense for even N:\n\n        >>> p = M.ptolemy_variety(3, obstruction_class = c[1])\n        Traceback (most recent call last):\n        ...\n        AssertionError: PtolemyObstructionClass only makes sense for even N, try PtolemyGeneralizedObstructionClass\n\n        To obtain PGL(N,C)-representations for N > 2, use the generalized\n        obstruction class:\n\n        >>> c = M.ptolemy_generalized_obstruction_classes(3)\n        >>> p = M.ptolemy_variety(3, obstruction_class = c[1])\n\n        The original obstruction class encodes a representing cocycle in Z/2 as follows:\n\n        >>> c = M.ptolemy_obstruction_classes()\n        >>> c[1]\n        PtolemyObstructionClass(s_0_0 + 1, s_1_0 - 1, s_2_0 - 1,"" s_3_0 + 1, s_0_0 - s_0_1, s_1_0 - s_3_1, s_2_0 - s_2_1, s_3_0 - s_1_1)\n\n        This means that the cocycle to represent this obstruction class in Z/2\n        takes value 1 in Z/2 on face 0 of tetrahedra 0 (because s_0_0 = -1)\n        and value 0 in Z/2 on face 1 of tetrahedra 0 (because s_1_0 = +1).\n\n        Face 3 of tetrahedra 0 and face 1 of tetrahedra 1 are identified,\n        hence the cocycle takes the same value on those two faces (s_3_0 = s_1_1).\n\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_111ptolemy_obstruction_classes = {"ptolemy_obstruction_classes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_111ptolemy_obstruction_classes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_110ptolemy_obstruction_classes};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_111ptolemy_obstruction_classes(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("ptolemy_obstruction_classes (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("ptolemy_obstruction_classes", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "ptolemy_obstruction_classes", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_110ptolemy_obstruction_classes(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_110ptolemy_obstruction_classes(struct __pyx_obj_6SnapPy_Triangulation *__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("ptolemy_obstruction_classes", 1);

  /* "cython/core/triangulation.pyx":1821
 *         """
 * 
 *         return ptolemyManifoldMethods.get_ptolemy_obstruction_classes(self)             # <<<<<<<<<<<<<<
 * 
 *     def ptolemy_generalized_obstruction_classes(self, N):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ptolemyManifoldMethods); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_ptolemy_obstruction_classes); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1821, __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, ((PyObject *)__pyx_v_self)};
    __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(3, 1821, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1761
 *         return m, explain_rows, explain_cols
 * 
 *     def ptolemy_obstruction_classes(self):             # <<<<<<<<<<<<<<
 * 
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.Triangulation.ptolemy_obstruction_classes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1823
 *         return ptolemyManifoldMethods.get_ptolemy_obstruction_classes(self)
 * 
 *     def ptolemy_generalized_obstruction_classes(self, N):             # <<<<<<<<<<<<<<
 * 
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_113ptolemy_generalized_obstruction_classes(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_6SnapPy_13Triangulation_112ptolemy_generalized_obstruction_classes, "Triangulation.ptolemy_generalized_obstruction_classes(self, N)\n\n        M.ptolemy_generalized_obstruction_classes(N)\n\n        Returns the obstruction classes needed to compute\n        PGL(N,C)-representations for any N, i.e., it returns a list with\n        a representative cocycle for each element in\n        H^2(M, boundary M; Z/N) / (Z/N)^* where (Z/N)^* are the units in Z/N.\n        The first element in the list always corresponds to the trivial\n        obstruction class.\n        The generalized ptolemy obstruction classes are thus a generalization\n        of the ptolemy obstruction classes that allow to find all\n        boundary-unipotent\n        PGL(N,C)-representations including those that do not lift to\n        boundary-unipotent SL(N,C)-representations for N odd or\n        SL(N,C)/{+1,-1}-representations for N even.\n\n        For example, 4_1 has three obstruction classes up to equivalence:\n\n        >>> M = Manifold(\"4_1\")\n        >>> c = M.ptolemy_generalized_obstruction_classes(4)\n        >>> len(c)\n        3\n\n        For 4_1, we only get three obstruction classes even though we have\n        H^2(M, boundary M; Z/4) = Z/4 because the two obstruction classes\n        1 in Z/4 and -1 in Z/4 are related by a unit and thus give\n        isomorphic Ptolemy varieties.\n\n        The primary use of an obstruction class sigma is to construct the\n        Ptolemy variety of sigma. This variety computes boundary-unipotent\n        PGL(N,C)-representations whose obstruction class to a\n        boundary-unipotent lift to SL(N,C) is sigma.\n\n        For example for 4_1, there are 2 obstruction classes for N = 3:\n\n        >>> M = Manifold(\"4_1\")\n        >>> c = M.ptolemy_generalized_obstruction_classes(3)\n        >>> len(c)\n        2\n\n        The Ptolemy variety parametrizing boundary-unipotent\n        SL(3,C)-representations of 4_1 is obtained by\n\n        >>> p = M.ptolemy_variety(N = 3, obstruction_class = c[0])\n\n        and the ""Ptolemy variety parametrizing boundary-unipotent\n        PSL(3,C)-representations of 4_1 that do not lift to\n        boundary-unipotent SL(3,C)-representations is obtained by\n\n        >>> p = M.ptolemy_variety(N = 3, obstruction_class = c[1])\n\n        The cocycle representing the non-trivial obstruction class looks as\n        follows:\n\n        >>> c[1]\n        PtolemyGeneralizedObstructionClass([2, 0, 0, 1])\n\n        This means that the cocycle takes the value -1 in Z/3 on the first face\n        class and 1 on the fourth face class but zero on every other of the\n        four face classes.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_113ptolemy_generalized_obstruction_classes = {"ptolemy_generalized_obstruction_classes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_113ptolemy_generalized_obstruction_classes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_112ptolemy_generalized_obstruction_classes};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_113ptolemy_generalized_obstruction_classes(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_N = 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("ptolemy_generalized_obstruction_classes (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_N,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_N)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1823, __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, "ptolemy_generalized_obstruction_classes") < 0)) __PYX_ERR(3, 1823, __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_N = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ptolemy_generalized_obstruction_classes", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 1823, __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("SnapPy.Triangulation.ptolemy_generalized_obstruction_classes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_112ptolemy_generalized_obstruction_classes(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_N);

  /* 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_6SnapPy_13Triangulation_112ptolemy_generalized_obstruction_classes(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_N) {
  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("ptolemy_generalized_obstruction_classes", 1);

  /* "cython/core/triangulation.pyx":1886
 *         four face classes.
 *         """
 *         return (             # <<<<<<<<<<<<<<
 *             ptolemyManifoldMethods.get_generalized_ptolemy_obstruction_classes(
 *                 self, N))
 */
  __Pyx_XDECREF(__pyx_r);

  /* "cython/core/triangulation.pyx":1887
 *         """
 *         return (
 *             ptolemyManifoldMethods.get_generalized_ptolemy_obstruction_classes(             # <<<<<<<<<<<<<<
 *                 self, N))
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ptolemyManifoldMethods); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 1887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_generalized_ptolemy_obstruct); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":1888
 *         return (
 *             ptolemyManifoldMethods.get_generalized_ptolemy_obstruction_classes(
 *                 self, N))             # <<<<<<<<<<<<<<
 * 
 *     def ptolemy_variety(self, N, obstruction_class = None,
 */
  __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[3] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_N};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 1887, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1823
 *         return ptolemyManifoldMethods.get_ptolemy_obstruction_classes(self)
 * 
 *     def ptolemy_generalized_obstruction_classes(self, N):             # <<<<<<<<<<<<<<
 * 
 *         """
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.Triangulation.ptolemy_generalized_obstruction_classes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":1890
 *                 self, N))
 * 
 *     def ptolemy_variety(self, N, obstruction_class = None,             # <<<<<<<<<<<<<<
 *                         simplify = True, eliminate_fixed_ptolemys = False):
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_115ptolemy_variety(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_6SnapPy_13Triangulation_114ptolemy_variety, "Triangulation.ptolemy_variety(self, N, obstruction_class=None, simplify=True, eliminate_fixed_ptolemys=False)\n\n        M.ptolemy_variety(N, obstruction_class = None, simplify = True, eliminate_fixed_ptolemys = False)\n\n        Returns a Ptolemy variety as described in\n\n        * Stavros Garoufalidis, Dyland Thurston, Christian K. Zickert:\n          \"The Complex Volume of SL(n,C)-Representations of 3-Manifolds\"\n          (http://arxiv.org/abs/1111.2828)\n        * Stavros Garoufalidis, Matthias Goerner, Christian K. Zickert:\n          \"Gluing Equations for PGL(n,C)-Representations of 3-Manifolds \"\n          (http://arxiv.org/abs/1207.6711)\n\n        The variety can be exported to magma or sage and solved there. The\n        solutions can be processed to compute invariants. The method can also\n        be used to automatically look up precomputed solutions from the\n        database at http://ptolemy.unhyperbolic.org/data .\n\n        Example for m011 and PSL(2,C)-representations:\n\n        >>> M = Manifold(\"m011\")\n\n        Obtain all Ptolemy varieties for PSL(2,C)-representations:\n\n        >>> p = M.ptolemy_variety(2, obstruction_class = 'all')\n\n        There are two Ptolemy varieties for the two obstruction classes:\n\n        >>> len(p)\n        2\n\n        Retrieve the solutions from the database\n\n        >>> sols = p.retrieve_solutions() #doctest: +SKIP\n\n        Compute the solutions using magma (default in SnapPy)\n\n        >>> sols = p.compute_solutions(engine = 'magma') #doctest: +SKIP\n\n        Compute the solutions using singular (default in sage)\n\n        >>> sols = p.compute_solutions(engine = 'sage') #doctest: +SKIP\n\n        Note that magma is significantly faster.\n\n        Compute all resulting complex volumes\n\n        >>> cvols = sols.complex_volume_numerical() #doctest: +SKIP\n        >>> cvols  #doctest: +SKIP\n        [[[-4.29405713186238 E-16 + 0.725471193740844*I,\n           -0.942707362776931 + 0.459731436553""693*I,\n           0.942707362776931 + 0.459731436553693*I]],\n         [[3.94159248086745 E-15 + 0.312682687518267*I,\n           4.64549527022581 E-15 + 0.680993020093457*I,\n           -2.78183391239608 - 0.496837853805869*I,\n           2.78183391239608 - 0.496837853805869*I]]]\n\n        Show complex volumes as a non-nested list:\n\n        >>> cvols.flatten(depth=2) #doctest: +SKIP\n        [-4.29405713186238 E-16 + 0.725471193740844*I,\n         -0.942707362776931 + 0.459731436553693*I,\n         0.942707362776931 + 0.459731436553693*I,\n         3.94159248086745 E-15 + 0.312682687518267*I,\n         4.64549527022581 E-15 + 0.680993020093457*I,\n         -2.78183391239608 - 0.496837853805869*I,\n         2.78183391239608 - 0.496837853805869*I]\n\n        For more examples, go to http://ptolemy.unhyperbolic.org/\n\n        === Optional Arguments ===\n\n        obstruction_class --- class from Definition 1.7 of (1).\n        None for trivial class or a value returned from ptolemy_obstruction_classes.\n        Short cuts: obstruction_class = 'all' returns a list of Ptolemy varieties\n        for each obstruction. For easier iteration, can set obstruction_class to\n        an integer.\n\n        simplify --- boolean to indicate whether to simplify the equations which\n        significantly reduces the number of variables.\n        Simplifying means that several identified Ptolemy coordinates x = y = z = ...\n        are eliminated instead of adding relations x - y = 0, y - z = 0, ...\n\n        eliminate_fixed_ptolemys --- boolean to indicate whether to eliminate\n        the Ptolemy coordinates that are set to 1 for fixing the decoration.\n        Even though this simplifies the resulting representation, setting it to\n        True can cause magma to run longer when finding a Groebner basis.\n\n        === Examples for 4_1 ===\n\n        >>> M = Manifold(\"4_1\")\n\n        Get the varieties for all obstruction classes at once (use\n        help(varieties[0]) fo""r more information):\n\n        >>> varieties = M.ptolemy_variety(2, obstruction_class = \"all\")\n\n        Print the variety as an ideal (sage object) for the non-trivial class:\n\n        >>> varieties[1].ideal    #doctest: +SKIP\n        Ideal (-c_0011_0^2 + c_0011_0*c_0101_0 + c_0101_0^2, -c_0011_0^2 - c_0011_0*c_0101_0 + c_0101_0^2, c_0011_0 - 1) of Multivariate Polynomial Ring in c_0011_0, c_0101_0 over Rational Field\n\n        Print the equations of the variety for the non-trivial class:\n\n        >>> for eqn in varieties[1].equations:\n        ...     print(eqn)          #doctest: +NORMALIZE_WHITESPACE\n             - c_0011_0 * c_0101_0 + c_0011_0^2 + c_0101_0^2\n             c_0011_0 * c_0101_0 - c_0011_0^2 - c_0101_0^2\n             - 1 + c_0011_0\n\n        Generate a magma file to compute Primary Decomposition for N = 3:\n\n        >>> p = M.ptolemy_variety(3)\n        >>> s = p.to_magma()\n        >>> print(s.split(\"ring and ideal\")[1].strip())     #doctest: +ELLIPSIS\n        R<c_0012_0, c_0012_1, c_0102_0, c_0111_0, c_0201_0, c_1011_0, c_1011_1, c_1101_0> := PolynomialRing(RationalField(), 8, \"grevlex\");\n        MyIdeal := ideal<R |\n                  c_0012_0 * c_1101_0 + c_0102_0 * c_0111_0 - c_0102_0 * c_1011_0,\n            ...\n\n        === If you have a magma installation ===\n\n        Call p.compute_solutions() to automatically call magma on the above output\n        and produce exact solutions!!!\n\n        >>> try:\n        ...     sols = p.compute_solutions()\n        ... except:\n        ...     # magma failed, use precomputed_solutions\n        ...     sols = None\n\n        Check solutions against manifold\n        >>> if sols:\n        ...     dummy = sols.check_against_manifold()\n\n        === If you do not have a magma installation ===\n\n        Load a precomputed example from magma which is provided with the package:\n\n        >>> from snappy.ptolemy.processMagmaFile import _magma_output_for_4_1__sl3, solutions_from_magm""a\n        >>> print(_magma_output_for_4_1__sl3)      #doctest: +ELLIPSIS\n        <BLANKLINE>\n        ==TRIANGULATION=BEGINS==\n        % Triangulation\n        4_1\n        ...\n\n        Parse the file and produce solutions:\n\n        >>> sols = solutions_from_magma(_magma_output_for_4_1__sl3)\n\n        >>> dummy = sols.check_against_manifold()\n\n        === Continue here whether you have or do not have magma ===\n\n        Pick the first solution of the three different solutions (up to Galois\n        conjugates):\n\n        >>> len(sols)\n        3\n        >>> solution = sols[0]\n\n        Read the exact value for c_1020_0 (help(solution) for more information\n        on how to compute cross ratios, volumes and other invariants):\n\n        >>> solution['c_1020_0']\n        Mod(-1/2*x - 3/2, x^2 + 3*x + 4)\n\n        Example of simplified vs non-simplified variety for N = 4:\n\n        >>> simplified = M.ptolemy_variety(4, obstruction_class = 1)\n        >>> full = M.ptolemy_variety(4, obstruction_class = 1, simplify = False)\n        >>> len(simplified.variables), len(full.variables)\n        (21, 63)\n        >>> len(simplified.equations), len(full.equations)\n        (24, 72)\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_115ptolemy_variety = {"ptolemy_variety", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_115ptolemy_variety, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_114ptolemy_variety};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_115ptolemy_variety(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_N = 0;
  PyObject *__pyx_v_obstruction_class = 0;
  PyObject *__pyx_v_simplify = 0;
  PyObject *__pyx_v_eliminate_fixed_ptolemys = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ptolemy_variety (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_N,&__pyx_n_s_obstruction_class,&__pyx_n_s_simplify,&__pyx_n_s_eliminate_fixed_ptolemys,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "cython/core/triangulation.pyx":1891
 * 
 *     def ptolemy_variety(self, N, obstruction_class = None,
 *                         simplify = True, eliminate_fixed_ptolemys = False):             # <<<<<<<<<<<<<<
 * 
 *         """
 */
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        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_N)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1890, __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_obstruction_class);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1890, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_simplify);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1890, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_eliminate_fixed_ptolemys);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 1890, __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, "ptolemy_variety") < 0)) __PYX_ERR(3, 1890, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        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);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_N = values[0];
    __pyx_v_obstruction_class = values[1];
    __pyx_v_simplify = values[2];
    __pyx_v_eliminate_fixed_ptolemys = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ptolemy_variety", 0, 1, 4, __pyx_nargs); __PYX_ERR(3, 1890, __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("SnapPy.Triangulation.ptolemy_variety", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_114ptolemy_variety(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_N, __pyx_v_obstruction_class, __pyx_v_simplify, __pyx_v_eliminate_fixed_ptolemys);

  /* "cython/core/triangulation.pyx":1890
 *                 self, N))
 * 
 *     def ptolemy_variety(self, N, obstruction_class = None,             # <<<<<<<<<<<<<<
 *                         simplify = True, eliminate_fixed_ptolemys = False):
 * 
 */

  /* 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_6SnapPy_13Triangulation_114ptolemy_variety(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_N, PyObject *__pyx_v_obstruction_class, PyObject *__pyx_v_simplify, PyObject *__pyx_v_eliminate_fixed_ptolemys) {
  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("ptolemy_variety", 1);

  /* "cython/core/triangulation.pyx":2070
 *         """
 * 
 *         return ptolemyManifoldMethods.get_ptolemy_variety(             # <<<<<<<<<<<<<<
 *             self, N, obstruction_class,
 *             simplify = simplify,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ptolemyManifoldMethods); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get_ptolemy_variety); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":2071
 * 
 *         return ptolemyManifoldMethods.get_ptolemy_variety(
 *             self, N, obstruction_class,             # <<<<<<<<<<<<<<
 *             simplify = simplify,
 *             eliminate_fixed_ptolemys = eliminate_fixed_ptolemys)
 */
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(3, 2070, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_N);
  __Pyx_GIVEREF(__pyx_v_N);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_N)) __PYX_ERR(3, 2070, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_obstruction_class);
  __Pyx_GIVEREF(__pyx_v_obstruction_class);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_obstruction_class)) __PYX_ERR(3, 2070, __pyx_L1_error);

  /* "cython/core/triangulation.pyx":2072
 *         return ptolemyManifoldMethods.get_ptolemy_variety(
 *             self, N, obstruction_class,
 *             simplify = simplify,             # <<<<<<<<<<<<<<
 *             eliminate_fixed_ptolemys = eliminate_fixed_ptolemys)
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_simplify, __pyx_v_simplify) < 0) __PYX_ERR(3, 2072, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2073
 *             self, N, obstruction_class,
 *             simplify = simplify,
 *             eliminate_fixed_ptolemys = eliminate_fixed_ptolemys)             # <<<<<<<<<<<<<<
 * 
 *     def gluing_equations(self,form='log'):
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_eliminate_fixed_ptolemys, __pyx_v_eliminate_fixed_ptolemys) < 0) __PYX_ERR(3, 2072, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2070
 *         """
 * 
 *         return ptolemyManifoldMethods.get_ptolemy_variety(             # <<<<<<<<<<<<<<
 *             self, N, obstruction_class,
 *             simplify = simplify,
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":1890
 *                 self, N))
 * 
 *     def ptolemy_variety(self, N, obstruction_class = None,             # <<<<<<<<<<<<<<
 *                         simplify = True, eliminate_fixed_ptolemys = False):
 * 
 */

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

/* "cython/core/triangulation.pyx":2075
 *             eliminate_fixed_ptolemys = eliminate_fixed_ptolemys)
 * 
 *     def gluing_equations(self,form='log'):             # <<<<<<<<<<<<<<
 *         """
 *         In the default mode, this function returns a matrix with rows
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_117gluing_equations(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_6SnapPy_13Triangulation_116gluing_equations, "Triangulation.gluing_equations(self, form='log')\n\n        In the default mode, this function returns a matrix with rows\n        of the form\n\n                  a b c  d e f  ...\n\n        which means\n\n            a*log(z0) + b*log(1/(1-z0)) + c*log((z0-1)/z0) + d*log(z1) +... = 2 pi i\n\n        for an edge equation, and (same) = 0 for a cusp equation.\n        Here, the cusp equations come at the bottom of the matrix, and\n        are listed in the form: meridian of cusp 0, longitude of cusp\n        0, meridian of cusp 1, longitude of cusp 1,...\n\n        In terms of the tetrahedra, a is the invariant of the edge\n        (2,3), b the invariant of the edge (0,2) and c is the\n        invariant of the edge (1,2).  See kernel_code/edge_classes.c\n        for a detailed account of the convention used.\n\n        If the optional argument form='rect' is given, then this\n        function returns a list of tuples of the form:\n\n           ( [a0, a1,..,a_n], [b_0, b_1,...,b_n], c)\n\n        where this corresponds to the equation\n\n           z0^a0 (1 - z0)^b0 z1^a1(1 - z1)^b1 ...  = c\n\n        where c = 1 or -1.\n\n        >>> M = Triangulation('m004(2,3)')\n        >>> M.gluing_equations()\n        [ 2  1  0  1  0  2]\n        [ 0  1  2  1  2  0]\n        [ 2  0  0  0 -8  6]\n        >>> M.gluing_equations(form='rect')\n        [([2, -1], [-1, 2], 1), ([-2, 1], [1, -2], 1), ([2, -6], [0, 14], 1)]\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_117gluing_equations = {"gluing_equations", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_117gluing_equations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_116gluing_equations};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_117gluing_equations(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_form = 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("gluing_equations (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_form,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_s_log));
    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_form);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 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, "gluing_equations") < 0)) __PYX_ERR(3, 2075, __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_form = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("gluing_equations", 0, 0, 1, __pyx_nargs); __PYX_ERR(3, 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("SnapPy.Triangulation.gluing_equations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_116gluing_equations(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_form);

  /* 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_6SnapPy_13Triangulation_116gluing_equations(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_form) {
  int **__pyx_v_c_eqns;
  int __pyx_v_num_rows;
  int __pyx_v_num_cols;
  int *__pyx_v_eqn;
  PyObject *__pyx_v_eqns = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_cusp_info = NULL;
  PyObject *__pyx_v_to_do = NULL;
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_v_rect = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_a = NULL;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_j = NULL;
  PyObject *__pyx_v_r = NULL;
  int __pyx_9genexpr30__pyx_v_i;
  int __pyx_9genexpr31__pyx_v_j;
  int __pyx_9genexpr32__pyx_v_j;
  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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *(*__pyx_t_17)(PyObject *);
  int __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gluing_equations", 1);

  /* "cython/core/triangulation.pyx":2120
 *         cdef int* eqn
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         c_eqns = get_gluing_equations(self.c_triangulation,
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":2121
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         c_eqns = get_gluing_equations(self.c_triangulation,
 *                                       &num_rows, &num_cols)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2121, __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(3, 2121, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2120
 *         cdef int* eqn
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         c_eqns = get_gluing_equations(self.c_triangulation,
 */
  }

  /* "cython/core/triangulation.pyx":2122
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         c_eqns = get_gluing_equations(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                       &num_rows, &num_cols)
 *         eqns = [ [ c_eqns[i][j] for j in range(num_cols) ]
 */
  __pyx_v_c_eqns = get_gluing_equations(__pyx_v_self->c_triangulation, (&__pyx_v_num_rows), (&__pyx_v_num_cols));

  /* "cython/core/triangulation.pyx":2124
 *         c_eqns = get_gluing_equations(self.c_triangulation,
 *                                       &num_rows, &num_cols)
 *         eqns = [ [ c_eqns[i][j] for j in range(num_cols) ]             # <<<<<<<<<<<<<<
 *                  for i in range(num_rows) ]
 *         free_gluing_equations(c_eqns, num_rows)
 */
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cython/core/triangulation.pyx":2125
 *                                       &num_rows, &num_cols)
 *         eqns = [ [ c_eqns[i][j] for j in range(num_cols) ]
 *                  for i in range(num_rows) ]             # <<<<<<<<<<<<<<
 *         free_gluing_equations(c_eqns, num_rows)
 * 
 */
    __pyx_t_3 = __pyx_v_num_rows;
    __pyx_t_4 = __pyx_t_3;
    for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
      __pyx_9genexpr30__pyx_v_i = __pyx_t_5;
      { /* enter inner scope */

        /* "cython/core/triangulation.pyx":2124
 *         c_eqns = get_gluing_equations(self.c_triangulation,
 *                                       &num_rows, &num_cols)
 *         eqns = [ [ c_eqns[i][j] for j in range(num_cols) ]             # <<<<<<<<<<<<<<
 *                  for i in range(num_rows) ]
 *         free_gluing_equations(c_eqns, num_rows)
 */
        __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2124, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __pyx_v_num_cols;
        __pyx_t_8 = __pyx_t_7;
        for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
          __pyx_9genexpr31__pyx_v_j = __pyx_t_9;
          __pyx_t_10 = __Pyx_PyInt_From_int(((__pyx_v_c_eqns[__pyx_9genexpr30__pyx_v_i])[__pyx_9genexpr31__pyx_v_j])); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2124, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_10))) __PYX_ERR(3, 2124, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
      } /* exit inner scope */
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(3, 2124, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
  } /* exit inner scope */
  __pyx_v_eqns = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":2126
 *         eqns = [ [ c_eqns[i][j] for j in range(num_cols) ]
 *                  for i in range(num_rows) ]
 *         free_gluing_equations(c_eqns, num_rows)             # <<<<<<<<<<<<<<
 * 
 *         for i in range(self.num_cusps()):
 */
  free_gluing_equations(__pyx_v_c_eqns, __pyx_v_num_rows);

  /* "cython/core/triangulation.pyx":2128
 *         free_gluing_equations(c_eqns, num_rows)
 * 
 *         for i in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *             cusp_info = self.cusp_info(i)
 *             if cusp_info.is_complete:
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = NULL;
  __pyx_t_3 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_3 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_3, 0+__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
    __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_11 = 0;
    __pyx_t_12 = NULL;
  } else {
    __pyx_t_11 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 2128, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  for (;;) {
    if (likely(!__pyx_t_12)) {
      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(3, 2128, __pyx_L1_error)
          #endif
          if (__pyx_t_11 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_6); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(3, 2128, __pyx_L1_error)
        #else
        __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2128, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #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(3, 2128, __pyx_L1_error)
          #endif
          if (__pyx_t_11 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_6); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(3, 2128, __pyx_L1_error)
        #else
        __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2128, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      }
    } else {
      __pyx_t_6 = __pyx_t_12(__pyx_t_2);
      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(3, 2128, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_6);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "cython/core/triangulation.pyx":2129
 * 
 *         for i in range(self.num_cusps()):
 *             cusp_info = self.cusp_info(i)             # <<<<<<<<<<<<<<
 *             if cusp_info.is_complete:
 *                 to_do = [(1,0), (0,1)]
 */
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_13 = NULL;
    __pyx_t_3 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
        __pyx_t_3 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_v_i};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_3, 1+__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2129, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_cusp_info, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "cython/core/triangulation.pyx":2130
 *         for i in range(self.num_cusps()):
 *             cusp_info = self.cusp_info(i)
 *             if cusp_info.is_complete:             # <<<<<<<<<<<<<<
 *                 to_do = [(1,0), (0,1)]
 *             else:
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cusp_info, __pyx_n_s_is_complete); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2130, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2130, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_1) {

      /* "cython/core/triangulation.pyx":2131
 *             cusp_info = self.cusp_info(i)
 *             if cusp_info.is_complete:
 *                 to_do = [(1,0), (0,1)]             # <<<<<<<<<<<<<<
 *             else:
 *                 to_do = [cusp_info.filling]
 */
      __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2131, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_tuple__21);
      __Pyx_GIVEREF(__pyx_tuple__21);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_tuple__21)) __PYX_ERR(3, 2131, __pyx_L1_error);
      __Pyx_INCREF(__pyx_tuple__20);
      __Pyx_GIVEREF(__pyx_tuple__20);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_tuple__20)) __PYX_ERR(3, 2131, __pyx_L1_error);
      __Pyx_XDECREF_SET(__pyx_v_to_do, ((PyObject*)__pyx_t_6));
      __pyx_t_6 = 0;

      /* "cython/core/triangulation.pyx":2130
 *         for i in range(self.num_cusps()):
 *             cusp_info = self.cusp_info(i)
 *             if cusp_info.is_complete:             # <<<<<<<<<<<<<<
 *                 to_do = [(1,0), (0,1)]
 *             else:
 */
      goto __pyx_L10;
    }

    /* "cython/core/triangulation.pyx":2133
 *                 to_do = [(1,0), (0,1)]
 *             else:
 *                 to_do = [cusp_info.filling]             # <<<<<<<<<<<<<<
 *             for (m, l) in to_do:
 *                 eqn = get_cusp_equation(self.c_triangulation,
 */
    /*else*/ {
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cusp_info, __pyx_n_s_filling); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = PyList_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2133, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_6)) __PYX_ERR(3, 2133, __pyx_L1_error);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_to_do, ((PyObject*)__pyx_t_10));
      __pyx_t_10 = 0;
    }
    __pyx_L10:;

    /* "cython/core/triangulation.pyx":2134
 *             else:
 *                 to_do = [cusp_info.filling]
 *             for (m, l) in to_do:             # <<<<<<<<<<<<<<
 *                 eqn = get_cusp_equation(self.c_triangulation,
 *                                         i, int(m), int(l), &num_rows)
 */
    __pyx_t_10 = __pyx_v_to_do; __Pyx_INCREF(__pyx_t_10);
    __pyx_t_14 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 2134, __pyx_L1_error)
        #endif
        if (__pyx_t_14 >= __pyx_temp) break;
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_6 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_14); __Pyx_INCREF(__pyx_t_6); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(3, 2134, __pyx_L1_error)
      #else
      __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2134, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
        PyObject* sequence = __pyx_t_6;
        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(3, 2134, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_13 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_15 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_13 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_15 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_15);
        #else
        __pyx_t_13 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 2134, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_15 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 2134, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        #endif
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_16 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_16)) __PYX_ERR(3, 2134, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_17 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_16);
        index = 0; __pyx_t_13 = __pyx_t_17(__pyx_t_16); if (unlikely(!__pyx_t_13)) goto __pyx_L13_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_13);
        index = 1; __pyx_t_15 = __pyx_t_17(__pyx_t_16); if (unlikely(!__pyx_t_15)) goto __pyx_L13_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_15);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_16), 2) < 0) __PYX_ERR(3, 2134, __pyx_L1_error)
        __pyx_t_17 = NULL;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        goto __pyx_L14_unpacking_done;
        __pyx_L13_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __pyx_t_17 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(3, 2134, __pyx_L1_error)
        __pyx_L14_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_13);
      __pyx_t_13 = 0;
      __Pyx_XDECREF_SET(__pyx_v_l, __pyx_t_15);
      __pyx_t_15 = 0;

      /* "cython/core/triangulation.pyx":2136
 *             for (m, l) in to_do:
 *                 eqn = get_cusp_equation(self.c_triangulation,
 *                                         i, int(m), int(l), &num_rows)             # <<<<<<<<<<<<<<
 *                 eqns.append([eqn[j] for j in range(num_rows)])
 *                 free_cusp_equation(eqn)
 */
      __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2136, __pyx_L1_error)
      __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_v_m); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2136, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2136, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_v_l); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2136, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2136, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cython/core/triangulation.pyx":2135
 *                 to_do = [cusp_info.filling]
 *             for (m, l) in to_do:
 *                 eqn = get_cusp_equation(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                         i, int(m), int(l), &num_rows)
 *                 eqns.append([eqn[j] for j in range(num_rows)])
 */
      __pyx_v_eqn = get_cusp_equation(__pyx_v_self->c_triangulation, __pyx_t_3, __pyx_t_4, __pyx_t_5, (&__pyx_v_num_rows));

      /* "cython/core/triangulation.pyx":2137
 *                 eqn = get_cusp_equation(self.c_triangulation,
 *                                         i, int(m), int(l), &num_rows)
 *                 eqns.append([eqn[j] for j in range(num_rows)])             # <<<<<<<<<<<<<<
 *                 free_cusp_equation(eqn)
 * 
 */
      { /* enter inner scope */
        __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2137, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = __pyx_v_num_rows;
        __pyx_t_4 = __pyx_t_5;
        for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_4; __pyx_t_3+=1) {
          __pyx_9genexpr32__pyx_v_j = __pyx_t_3;
          __pyx_t_15 = __Pyx_PyInt_From_int((__pyx_v_eqn[__pyx_9genexpr32__pyx_v_j])); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 2137, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_15))) __PYX_ERR(3, 2137, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        }
      } /* exit inner scope */
      __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_eqns, __pyx_t_6); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(3, 2137, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cython/core/triangulation.pyx":2138
 *                                         i, int(m), int(l), &num_rows)
 *                 eqns.append([eqn[j] for j in range(num_rows)])
 *                 free_cusp_equation(eqn)             # <<<<<<<<<<<<<<
 * 
 *         if form == 'log':
 */
      free_cusp_equation(__pyx_v_eqn);

      /* "cython/core/triangulation.pyx":2134
 *             else:
 *                 to_do = [cusp_info.filling]
 *             for (m, l) in to_do:             # <<<<<<<<<<<<<<
 *                 eqn = get_cusp_equation(self.c_triangulation,
 *                                         i, int(m), int(l), &num_rows)
 */
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "cython/core/triangulation.pyx":2128
 *         free_gluing_equations(c_eqns, num_rows)
 * 
 *         for i in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *             cusp_info = self.cusp_info(i)
 *             if cusp_info.is_complete:
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":2140
 *                 free_cusp_equation(eqn)
 * 
 *         if form == 'log':             # <<<<<<<<<<<<<<
 *             return matrix(eqns)
 * 
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_form, __pyx_n_s_log, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2140, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":2141
 * 
 *         if form == 'log':
 *             return matrix(eqns)             # <<<<<<<<<<<<<<
 * 
 *         if form != 'rect':
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_matrix); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_6 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_eqns};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2141, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":2140
 *                 free_cusp_equation(eqn)
 * 
 *         if form == 'log':             # <<<<<<<<<<<<<<
 *             return matrix(eqns)
 * 
 */
  }

  /* "cython/core/triangulation.pyx":2143
 *             return matrix(eqns)
 * 
 *         if form != 'rect':             # <<<<<<<<<<<<<<
 *             raise ValueError("Equations are available in 'log' and "
 *                              "'rect' forms only.")
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_form, __pyx_n_s_rect, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2143, __pyx_L1_error)
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":2144
 * 
 *         if form != 'rect':
 *             raise ValueError("Equations are available in 'log' and "             # <<<<<<<<<<<<<<
 *                              "'rect' forms only.")
 *         rect = []
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2144, __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(3, 2144, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2143
 *             return matrix(eqns)
 * 
 *         if form != 'rect':             # <<<<<<<<<<<<<<
 *             raise ValueError("Equations are available in 'log' and "
 *                              "'rect' forms only.")
 */
  }

  /* "cython/core/triangulation.pyx":2146
 *             raise ValueError("Equations are available in 'log' and "
 *                              "'rect' forms only.")
 *         rect = []             # <<<<<<<<<<<<<<
 *         for row in eqns:
 *             n = self.num_tetrahedra()
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_rect = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":2147
 *                              "'rect' forms only.")
 *         rect = []
 *         for row in eqns:             # <<<<<<<<<<<<<<
 *             n = self.num_tetrahedra()
 *             a, b = [0,]*n, [0,]*n
 */
  __pyx_t_2 = __pyx_v_eqns; __Pyx_INCREF(__pyx_t_2);
  __pyx_t_11 = 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(3, 2147, __pyx_L1_error)
      #endif
      if (__pyx_t_11 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_10 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_10); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(3, 2147, __pyx_L1_error)
    #else
    __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_10);
    __pyx_t_10 = 0;

    /* "cython/core/triangulation.pyx":2148
 *         rect = []
 *         for row in eqns:
 *             n = self.num_tetrahedra()             # <<<<<<<<<<<<<<
 *             a, b = [0,]*n, [0,]*n
 *             c = 1
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_tetrahedra); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_15 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_15)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_15);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL};
      __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2148, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_10);
    __pyx_t_10 = 0;

    /* "cython/core/triangulation.pyx":2149
 *         for row in eqns:
 *             n = self.num_tetrahedra()
 *             a, b = [0,]*n, [0,]*n             # <<<<<<<<<<<<<<
 *             c = 1
 *             for j in range(n):
 */
    __pyx_t_10 = PyList_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_10, 0, __pyx_int_0)) __PYX_ERR(3, 2149, __pyx_L1_error);
    { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_10, __pyx_v_n); if (unlikely(!__pyx_temp)) __PYX_ERR(3, 2149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_temp);
      __Pyx_DECREF(__pyx_t_10);
      __pyx_t_10 = __pyx_temp;
    }
    __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_0)) __PYX_ERR(3, 2149, __pyx_L1_error);
    { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_6, __pyx_v_n); if (unlikely(!__pyx_temp)) __PYX_ERR(3, 2149, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_temp);
      __Pyx_DECREF(__pyx_t_6);
      __pyx_t_6 = __pyx_temp;
    }
    __Pyx_XDECREF_SET(__pyx_v_a, ((PyObject*)__pyx_t_10));
    __pyx_t_10 = 0;
    __Pyx_XDECREF_SET(__pyx_v_b, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "cython/core/triangulation.pyx":2150
 *             n = self.num_tetrahedra()
 *             a, b = [0,]*n, [0,]*n
 *             c = 1             # <<<<<<<<<<<<<<
 *             for j in range(n):
 *                 r = row[3*j + 2]
 */
    __Pyx_INCREF(__pyx_int_1);
    __Pyx_XDECREF_SET(__pyx_v_c, __pyx_int_1);

    /* "cython/core/triangulation.pyx":2151
 *             a, b = [0,]*n, [0,]*n
 *             c = 1
 *             for j in range(n):             # <<<<<<<<<<<<<<
 *                 r = row[3*j + 2]
 *                 a[j] = row[3*j] - r
 */
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_n); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2151, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_10 = __pyx_t_6; __Pyx_INCREF(__pyx_t_10);
      __pyx_t_14 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_14 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2151, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(3, 2151, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_10))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 2151, __pyx_L1_error)
            #endif
            if (__pyx_t_14 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_14); __Pyx_INCREF(__pyx_t_6); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(3, 2151, __pyx_L1_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2151, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_10);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 2151, __pyx_L1_error)
            #endif
            if (__pyx_t_14 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_14); __Pyx_INCREF(__pyx_t_6); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(3, 2151, __pyx_L1_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2151, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_12(__pyx_t_10);
        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(3, 2151, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "cython/core/triangulation.pyx":2152
 *             c = 1
 *             for j in range(n):
 *                 r = row[3*j + 2]             # <<<<<<<<<<<<<<
 *                 a[j] = row[3*j] - r
 *                 b[j] = -row[3*j + 1] + r
 */
      __pyx_t_6 = __Pyx_PyInt_MultiplyCObj(__pyx_int_3, __pyx_v_j, 3, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_15 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 2152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_row, __pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2152, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "cython/core/triangulation.pyx":2153
 *             for j in range(n):
 *                 r = row[3*j + 2]
 *                 a[j] = row[3*j] - r             # <<<<<<<<<<<<<<
 *                 b[j] = -row[3*j + 1] + r
 *                 c *= -1 if r % 2 else 1
 */
      __pyx_t_6 = __Pyx_PyInt_MultiplyCObj(__pyx_int_3, __pyx_v_j, 3, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_15 = __Pyx_PyObject_GetItem(__pyx_v_row, __pyx_t_6); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 2153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_Subtract(__pyx_t_15, __pyx_v_r); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      if (unlikely((PyObject_SetItem(__pyx_v_a, __pyx_v_j, __pyx_t_6) < 0))) __PYX_ERR(3, 2153, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cython/core/triangulation.pyx":2154
 *                 r = row[3*j + 2]
 *                 a[j] = row[3*j] - r
 *                 b[j] = -row[3*j + 1] + r             # <<<<<<<<<<<<<<
 *                 c *= -1 if r % 2 else 1
 *             rect.append( (a, b, c) )
 */
      __pyx_t_6 = __Pyx_PyInt_MultiplyCObj(__pyx_int_3, __pyx_v_j, 3, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_15 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 2154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_row, __pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __pyx_t_15 = PyNumber_Negative(__pyx_t_6); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 2154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_Add(__pyx_t_15, __pyx_v_r); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      if (unlikely((PyObject_SetItem(__pyx_v_b, __pyx_v_j, __pyx_t_6) < 0))) __PYX_ERR(3, 2154, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cython/core/triangulation.pyx":2155
 *                 a[j] = row[3*j] - r
 *                 b[j] = -row[3*j + 1] + r
 *                 c *= -1 if r % 2 else 1             # <<<<<<<<<<<<<<
 *             rect.append( (a, b, c) )
 *         return rect
 */
      __pyx_t_15 = __Pyx_PyInt_RemainderObjC(__pyx_v_r, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 2155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2155, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      if (__pyx_t_1) {
        __Pyx_INCREF(__pyx_int_neg_1);
        __pyx_t_6 = __pyx_int_neg_1;
      } else {
        __Pyx_INCREF(__pyx_int_1);
        __pyx_t_6 = __pyx_int_1;
      }
      __pyx_t_15 = PyNumber_InPlaceMultiply(__pyx_v_c, __pyx_t_6); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 2155, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF_SET(__pyx_v_c, __pyx_t_15);
      __pyx_t_15 = 0;

      /* "cython/core/triangulation.pyx":2151
 *             a, b = [0,]*n, [0,]*n
 *             c = 1
 *             for j in range(n):             # <<<<<<<<<<<<<<
 *                 r = row[3*j + 2]
 *                 a[j] = row[3*j] - r
 */
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "cython/core/triangulation.pyx":2156
 *                 b[j] = -row[3*j + 1] + r
 *                 c *= -1 if r % 2 else 1
 *             rect.append( (a, b, c) )             # <<<<<<<<<<<<<<
 *         return rect
 * 
 */
    __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2156, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_INCREF(__pyx_v_a);
    __Pyx_GIVEREF(__pyx_v_a);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_a)) __PYX_ERR(3, 2156, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_b);
    __Pyx_GIVEREF(__pyx_v_b);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_b)) __PYX_ERR(3, 2156, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_c);
    __Pyx_GIVEREF(__pyx_v_c);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_c)) __PYX_ERR(3, 2156, __pyx_L1_error);
    __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_rect, __pyx_t_10); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(3, 2156, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "cython/core/triangulation.pyx":2147
 *                              "'rect' forms only.")
 *         rect = []
 *         for row in eqns:             # <<<<<<<<<<<<<<
 *             n = self.num_tetrahedra()
 *             a, b = [0,]*n, [0,]*n
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":2157
 *                 c *= -1 if r % 2 else 1
 *             rect.append( (a, b, c) )
 *         return rect             # <<<<<<<<<<<<<<
 * 
 *     cdef big_homology(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_rect);
  __pyx_r = __pyx_v_rect;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":2075
 *             eliminate_fixed_ptolemys = eliminate_fixed_ptolemys)
 * 
 *     def gluing_equations(self,form='log'):             # <<<<<<<<<<<<<<
 *         """
 *         In the default mode, this function returns a matrix with rows
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("SnapPy.Triangulation.gluing_equations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_eqns);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_cusp_info);
  __Pyx_XDECREF(__pyx_v_to_do);
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XDECREF(__pyx_v_rect);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XDECREF(__pyx_v_r);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":2159
 *         return rect
 * 
 *     cdef big_homology(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns an AbelianGroup representing the first integral
 */

static PyObject *__pyx_f_6SnapPy_13Triangulation_big_homology(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  PyObject *__pyx_v_relation_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("big_homology", 1);

  /* "cython/core/triangulation.pyx":2171
 *         """
 * 
 *         relation_matrix = self.c_presentation_matrix()             # <<<<<<<<<<<<<<
 *         return AbelianGroup(relation_matrix.simplified_matrix())
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->c_presentation_matrix(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_relation_matrix = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":2172
 * 
 *         relation_matrix = self.c_presentation_matrix()
 *         return AbelianGroup(relation_matrix.simplified_matrix())             # <<<<<<<<<<<<<<
 * 
 *     cdef c_presentation_matrix(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_relation_matrix, __pyx_n_s_simplified_matrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2172, __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(3, 2172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6SnapPy_AbelianGroup), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2172, __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;

  /* "cython/core/triangulation.pyx":2159
 *         return rect
 * 
 *     cdef big_homology(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns an AbelianGroup representing the first integral
 */

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

/* "cython/core/triangulation.pyx":2174
 *         return AbelianGroup(relation_matrix.simplified_matrix())
 * 
 *     cdef c_presentation_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         See _presentation_matrix.
 */

static PyObject *__pyx_f_6SnapPy_13Triangulation_c_presentation_matrix(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  int __pyx_v_num_generators;
  EdgeClass *__pyx_v_edge;
  PositionedTet __pyx_v_ptet;
  PositionedTet __pyx_v_ptet0;
  GeneratorStatus __pyx_v_status;
  Tetrahedron *__pyx_v_tet;
  VertexIndex __pyx_v_vertex;
  FaceIndex __pyx_v_side;
  Orientation __pyx_v_orientation;
  int __pyx_v_row;
  int __pyx_v_column;
  int __pyx_v_num_edges;
  int __pyx_v_m;
  int __pyx_v_l;
  struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_relation_matrix = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  EdgeClass *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Tetrahedron *__pyx_t_9;
  VertexIndex __pyx_t_10;
  FaceIndex __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  Orientation __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("c_presentation_matrix", 1);

  /* "cython/core/triangulation.pyx":2179
 *         """
 * 
 *         if not all_Dehn_coefficients_are_integers(self.c_triangulation):             # <<<<<<<<<<<<<<
 *             raise ValueError('All Dehn filling coefficients must be integers')
 *         choose_generators(self.c_triangulation, 0, 0)
 */
  __pyx_t_1 = (!(all_Dehn_coefficients_are_integers(__pyx_v_self->c_triangulation) != 0));
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":2180
 * 
 *         if not all_Dehn_coefficients_are_integers(self.c_triangulation):
 *             raise ValueError('All Dehn filling coefficients must be integers')             # <<<<<<<<<<<<<<
 *         choose_generators(self.c_triangulation, 0, 0)
 *         num_generators = self.c_triangulation.num_generators
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2180, __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(3, 2180, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2179
 *         """
 * 
 *         if not all_Dehn_coefficients_are_integers(self.c_triangulation):             # <<<<<<<<<<<<<<
 *             raise ValueError('All Dehn filling coefficients must be integers')
 *         choose_generators(self.c_triangulation, 0, 0)
 */
  }

  /* "cython/core/triangulation.pyx":2181
 *         if not all_Dehn_coefficients_are_integers(self.c_triangulation):
 *             raise ValueError('All Dehn filling coefficients must be integers')
 *         choose_generators(self.c_triangulation, 0, 0)             # <<<<<<<<<<<<<<
 *         num_generators = self.c_triangulation.num_generators
 *         cdef EdgeClass* edge
 */
  choose_generators(__pyx_v_self->c_triangulation, 0, 0);

  /* "cython/core/triangulation.pyx":2182
 *             raise ValueError('All Dehn filling coefficients must be integers')
 *         choose_generators(self.c_triangulation, 0, 0)
 *         num_generators = self.c_triangulation.num_generators             # <<<<<<<<<<<<<<
 *         cdef EdgeClass* edge
 *         cdef PositionedTet ptet, ptet0
 */
  __pyx_t_3 = __pyx_v_self->c_triangulation->num_generators;
  __pyx_v_num_generators = __pyx_t_3;

  /* "cython/core/triangulation.pyx":2191
 *         cdef Orientation orientation
 *         cdef int row, column, num_edges, m, l
 *         relation_matrix = PresentationMatrix(0, num_generators)             # <<<<<<<<<<<<<<
 *         edge = self.c_triangulation.edge_list_begin.next
 *         # find the edge relations
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_num_generators); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_0)) __PYX_ERR(3, 2191, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(3, 2191, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6SnapPy_PresentationMatrix), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_relation_matrix = ((struct __pyx_obj_6SnapPy_PresentationMatrix *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":2192
 *         cdef int row, column, num_edges, m, l
 *         relation_matrix = PresentationMatrix(0, num_generators)
 *         edge = self.c_triangulation.edge_list_begin.next             # <<<<<<<<<<<<<<
 *         # find the edge relations
 *         while edge != &(self.c_triangulation.edge_list_end):
 */
  __pyx_t_5 = __pyx_v_self->c_triangulation->edge_list_begin.next;
  __pyx_v_edge = __pyx_t_5;

  /* "cython/core/triangulation.pyx":2194
 *         edge = self.c_triangulation.edge_list_begin.next
 *         # find the edge relations
 *         while edge != &(self.c_triangulation.edge_list_end):             # <<<<<<<<<<<<<<
 *             row = relation_matrix.rows
 *             relation_matrix.add_rows(1)
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_edge != (&__pyx_v_self->c_triangulation->edge_list_end));
    if (!__pyx_t_1) break;

    /* "cython/core/triangulation.pyx":2195
 *         # find the edge relations
 *         while edge != &(self.c_triangulation.edge_list_end):
 *             row = relation_matrix.rows             # <<<<<<<<<<<<<<
 *             relation_matrix.add_rows(1)
 *             set_left_edge(edge, &ptet0)
 */
    __pyx_t_3 = __pyx_v_relation_matrix->rows;
    __pyx_v_row = __pyx_t_3;

    /* "cython/core/triangulation.pyx":2196
 *         while edge != &(self.c_triangulation.edge_list_end):
 *             row = relation_matrix.rows
 *             relation_matrix.add_rows(1)             # <<<<<<<<<<<<<<
 *             set_left_edge(edge, &ptet0)
 *             ptet = ptet0
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_relation_matrix), __pyx_n_s_add_rows); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    __pyx_t_3 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_3 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_int_1};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_3, 1+__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2196, __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;

    /* "cython/core/triangulation.pyx":2197
 *             row = relation_matrix.rows
 *             relation_matrix.add_rows(1)
 *             set_left_edge(edge, &ptet0)             # <<<<<<<<<<<<<<
 *             ptet = ptet0
 *             while True:
 */
    set_left_edge(__pyx_v_edge, (&__pyx_v_ptet0));

    /* "cython/core/triangulation.pyx":2198
 *             relation_matrix.add_rows(1)
 *             set_left_edge(edge, &ptet0)
 *             ptet = ptet0             # <<<<<<<<<<<<<<
 *             while True:
 *                 column = ptet.tet.generator_index[ptet.near_face]
 */
    __pyx_v_ptet = __pyx_v_ptet0;

    /* "cython/core/triangulation.pyx":2199
 *             set_left_edge(edge, &ptet0)
 *             ptet = ptet0
 *             while True:             # <<<<<<<<<<<<<<
 *                 column = ptet.tet.generator_index[ptet.near_face]
 *                 status = ptet.tet.generator_status[ptet.near_face]
 */
    while (1) {

      /* "cython/core/triangulation.pyx":2200
 *             ptet = ptet0
 *             while True:
 *                 column = ptet.tet.generator_index[ptet.near_face]             # <<<<<<<<<<<<<<
 *                 status = ptet.tet.generator_status[ptet.near_face]
 *                 if status == outbound_generator:
 */
      __pyx_v_column = (__pyx_v_ptet.tet->generator_index[__pyx_v_ptet.near_face]);

      /* "cython/core/triangulation.pyx":2201
 *             while True:
 *                 column = ptet.tet.generator_index[ptet.near_face]
 *                 status = ptet.tet.generator_status[ptet.near_face]             # <<<<<<<<<<<<<<
 *                 if status == outbound_generator:
 *                     relation_matrix[row, column] += 1
 */
      __pyx_v_status = (__pyx_v_ptet.tet->generator_status[__pyx_v_ptet.near_face]);

      /* "cython/core/triangulation.pyx":2202
 *                 column = ptet.tet.generator_index[ptet.near_face]
 *                 status = ptet.tet.generator_status[ptet.near_face]
 *                 if status == outbound_generator:             # <<<<<<<<<<<<<<
 *                     relation_matrix[row, column] += 1
 *                 elif status == inbound_generator:
 */
      __pyx_t_1 = (__pyx_v_status == outbound_generator);
      if (__pyx_t_1) {

        /* "cython/core/triangulation.pyx":2203
 *                 status = ptet.tet.generator_status[ptet.near_face]
 *                 if status == outbound_generator:
 *                     relation_matrix[row, column] += 1             # <<<<<<<<<<<<<<
 *                 elif status == inbound_generator:
 *                     relation_matrix[row, column] -= 1
 */
        __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_row); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2203, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_column); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2203, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2203, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_2);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2)) __PYX_ERR(3, 2203, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_4);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4)) __PYX_ERR(3, 2203, __pyx_L1_error);
        __pyx_t_2 = 0;
        __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_relation_matrix), __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2203, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2203, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_relation_matrix), __pyx_t_6, __pyx_t_2) < 0))) __PYX_ERR(3, 2203, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "cython/core/triangulation.pyx":2202
 *                 column = ptet.tet.generator_index[ptet.near_face]
 *                 status = ptet.tet.generator_status[ptet.near_face]
 *                 if status == outbound_generator:             # <<<<<<<<<<<<<<
 *                     relation_matrix[row, column] += 1
 *                 elif status == inbound_generator:
 */
        goto __pyx_L8;
      }

      /* "cython/core/triangulation.pyx":2204
 *                 if status == outbound_generator:
 *                     relation_matrix[row, column] += 1
 *                 elif status == inbound_generator:             # <<<<<<<<<<<<<<
 *                     relation_matrix[row, column] -= 1
 *                 elif status != not_a_generator:
 */
      __pyx_t_1 = (__pyx_v_status == inbound_generator);
      if (__pyx_t_1) {

        /* "cython/core/triangulation.pyx":2205
 *                     relation_matrix[row, column] += 1
 *                 elif status == inbound_generator:
 *                     relation_matrix[row, column] -= 1             # <<<<<<<<<<<<<<
 *                 elif status != not_a_generator:
 *                     raise RuntimeError('Invalid generator status')
 */
        __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_row); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_column); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_6);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)) __PYX_ERR(3, 2205, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_2);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(3, 2205, __pyx_L1_error);
        __pyx_t_6 = 0;
        __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_relation_matrix), __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_t_2, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2205, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_relation_matrix), __pyx_t_4, __pyx_t_6) < 0))) __PYX_ERR(3, 2205, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "cython/core/triangulation.pyx":2204
 *                 if status == outbound_generator:
 *                     relation_matrix[row, column] += 1
 *                 elif status == inbound_generator:             # <<<<<<<<<<<<<<
 *                     relation_matrix[row, column] -= 1
 *                 elif status != not_a_generator:
 */
        goto __pyx_L8;
      }

      /* "cython/core/triangulation.pyx":2206
 *                 elif status == inbound_generator:
 *                     relation_matrix[row, column] -= 1
 *                 elif status != not_a_generator:             # <<<<<<<<<<<<<<
 *                     raise RuntimeError('Invalid generator status')
 *                 veer_left(&ptet)
 */
      __pyx_t_1 = (__pyx_v_status != not_a_generator);
      if (unlikely(__pyx_t_1)) {

        /* "cython/core/triangulation.pyx":2207
 *                     relation_matrix[row, column] -= 1
 *                 elif status != not_a_generator:
 *                     raise RuntimeError('Invalid generator status')             # <<<<<<<<<<<<<<
 *                 veer_left(&ptet)
 *                 if same_positioned_tet(&ptet, &ptet0):
 */
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2207, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_Raise(__pyx_t_4, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __PYX_ERR(3, 2207, __pyx_L1_error)

        /* "cython/core/triangulation.pyx":2206
 *                 elif status == inbound_generator:
 *                     relation_matrix[row, column] -= 1
 *                 elif status != not_a_generator:             # <<<<<<<<<<<<<<
 *                     raise RuntimeError('Invalid generator status')
 *                 veer_left(&ptet)
 */
      }
      __pyx_L8:;

      /* "cython/core/triangulation.pyx":2208
 *                 elif status != not_a_generator:
 *                     raise RuntimeError('Invalid generator status')
 *                 veer_left(&ptet)             # <<<<<<<<<<<<<<
 *                 if same_positioned_tet(&ptet, &ptet0):
 *                     break
 */
      veer_left((&__pyx_v_ptet));

      /* "cython/core/triangulation.pyx":2209
 *                     raise RuntimeError('Invalid generator status')
 *                 veer_left(&ptet)
 *                 if same_positioned_tet(&ptet, &ptet0):             # <<<<<<<<<<<<<<
 *                     break
 *             row += 1
 */
      __pyx_t_1 = (same_positioned_tet((&__pyx_v_ptet), (&__pyx_v_ptet0)) != 0);
      if (__pyx_t_1) {

        /* "cython/core/triangulation.pyx":2210
 *                 veer_left(&ptet)
 *                 if same_positioned_tet(&ptet, &ptet0):
 *                     break             # <<<<<<<<<<<<<<
 *             row += 1
 *             edge = edge.next
 */
        goto __pyx_L7_break;

        /* "cython/core/triangulation.pyx":2209
 *                     raise RuntimeError('Invalid generator status')
 *                 veer_left(&ptet)
 *                 if same_positioned_tet(&ptet, &ptet0):             # <<<<<<<<<<<<<<
 *                     break
 *             row += 1
 */
      }
    }
    __pyx_L7_break:;

    /* "cython/core/triangulation.pyx":2211
 *                 if same_positioned_tet(&ptet, &ptet0):
 *                     break
 *             row += 1             # <<<<<<<<<<<<<<
 *             edge = edge.next
 *         # find the cusp relations
 */
    __pyx_v_row = (__pyx_v_row + 1);

    /* "cython/core/triangulation.pyx":2212
 *                     break
 *             row += 1
 *             edge = edge.next             # <<<<<<<<<<<<<<
 *         # find the cusp relations
 *         num_edges = relation_matrix.rows
 */
    __pyx_t_5 = __pyx_v_edge->next;
    __pyx_v_edge = __pyx_t_5;
  }

  /* "cython/core/triangulation.pyx":2214
 *             edge = edge.next
 *         # find the cusp relations
 *         num_edges = relation_matrix.rows             # <<<<<<<<<<<<<<
 *         relation_matrix.add_rows(self.num_cusps())
 *         tet = self.c_triangulation.tet_list_begin.next
 */
  __pyx_t_3 = __pyx_v_relation_matrix->rows;
  __pyx_v_num_edges = __pyx_t_3;

  /* "cython/core/triangulation.pyx":2215
 *         # find the cusp relations
 *         num_edges = relation_matrix.rows
 *         relation_matrix.add_rows(self.num_cusps())             # <<<<<<<<<<<<<<
 *         tet = self.c_triangulation.tet_list_begin.next
 *         while tet != &(self.c_triangulation.tet_list_end):
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_relation_matrix), __pyx_n_s_add_rows); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_3 = 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_3 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_3, 0+__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_t_7 = NULL;
  __pyx_t_3 = 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_3 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_2};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_3, 1+__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":2216
 *         num_edges = relation_matrix.rows
 *         relation_matrix.add_rows(self.num_cusps())
 *         tet = self.c_triangulation.tet_list_begin.next             # <<<<<<<<<<<<<<
 *         while tet != &(self.c_triangulation.tet_list_end):
 *             for vertex in range(4):
 */
  __pyx_t_9 = __pyx_v_self->c_triangulation->tet_list_begin.next;
  __pyx_v_tet = __pyx_t_9;

  /* "cython/core/triangulation.pyx":2217
 *         relation_matrix.add_rows(self.num_cusps())
 *         tet = self.c_triangulation.tet_list_begin.next
 *         while tet != &(self.c_triangulation.tet_list_end):             # <<<<<<<<<<<<<<
 *             for vertex in range(4):
 *                 if tet.cusp[vertex].is_complete:
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_tet != (&__pyx_v_self->c_triangulation->tet_list_end));
    if (!__pyx_t_1) break;

    /* "cython/core/triangulation.pyx":2218
 *         tet = self.c_triangulation.tet_list_begin.next
 *         while tet != &(self.c_triangulation.tet_list_end):
 *             for vertex in range(4):             # <<<<<<<<<<<<<<
 *                 if tet.cusp[vertex].is_complete:
 *                     continue
 */
    for (__pyx_t_10 = 0; __pyx_t_10 < 4; __pyx_t_10+=1) {
      __pyx_v_vertex = __pyx_t_10;

      /* "cython/core/triangulation.pyx":2219
 *         while tet != &(self.c_triangulation.tet_list_end):
 *             for vertex in range(4):
 *                 if tet.cusp[vertex].is_complete:             # <<<<<<<<<<<<<<
 *                     continue
 *                 for side in range(4):
 */
      __pyx_t_1 = ((__pyx_v_tet->cusp[__pyx_v_vertex])->is_complete != 0);
      if (__pyx_t_1) {

        /* "cython/core/triangulation.pyx":2220
 *             for vertex in range(4):
 *                 if tet.cusp[vertex].is_complete:
 *                     continue             # <<<<<<<<<<<<<<
 *                 for side in range(4):
 *                     if side == vertex:
 */
        goto __pyx_L12_continue;

        /* "cython/core/triangulation.pyx":2219
 *         while tet != &(self.c_triangulation.tet_list_end):
 *             for vertex in range(4):
 *                 if tet.cusp[vertex].is_complete:             # <<<<<<<<<<<<<<
 *                     continue
 *                 for side in range(4):
 */
      }

      /* "cython/core/triangulation.pyx":2221
 *                 if tet.cusp[vertex].is_complete:
 *                     continue
 *                 for side in range(4):             # <<<<<<<<<<<<<<
 *                     if side == vertex:
 *                         continue
 */
      for (__pyx_t_11 = 0; __pyx_t_11 < 4; __pyx_t_11+=1) {
        __pyx_v_side = __pyx_t_11;

        /* "cython/core/triangulation.pyx":2222
 *                     continue
 *                 for side in range(4):
 *                     if side == vertex:             # <<<<<<<<<<<<<<
 *                         continue
 *                     if tet.generator_status[side] != inbound_generator:
 */
        __pyx_t_1 = (__pyx_v_side == __pyx_v_vertex);
        if (__pyx_t_1) {

          /* "cython/core/triangulation.pyx":2223
 *                 for side in range(4):
 *                     if side == vertex:
 *                         continue             # <<<<<<<<<<<<<<
 *                     if tet.generator_status[side] != inbound_generator:
 *                         continue
 */
          goto __pyx_L15_continue;

          /* "cython/core/triangulation.pyx":2222
 *                     continue
 *                 for side in range(4):
 *                     if side == vertex:             # <<<<<<<<<<<<<<
 *                         continue
 *                     if tet.generator_status[side] != inbound_generator:
 */
        }

        /* "cython/core/triangulation.pyx":2224
 *                     if side == vertex:
 *                         continue
 *                     if tet.generator_status[side] != inbound_generator:             # <<<<<<<<<<<<<<
 *                         continue
 *                     for orientation in (right_handed, left_handed):
 */
        __pyx_t_1 = ((__pyx_v_tet->generator_status[__pyx_v_side]) != inbound_generator);
        if (__pyx_t_1) {

          /* "cython/core/triangulation.pyx":2225
 *                         continue
 *                     if tet.generator_status[side] != inbound_generator:
 *                         continue             # <<<<<<<<<<<<<<
 *                     for orientation in (right_handed, left_handed):
 *                         row = num_edges + tet.cusp[vertex].index
 */
          goto __pyx_L15_continue;

          /* "cython/core/triangulation.pyx":2224
 *                     if side == vertex:
 *                         continue
 *                     if tet.generator_status[side] != inbound_generator:             # <<<<<<<<<<<<<<
 *                         continue
 *                     for orientation in (right_handed, left_handed):
 */
        }

        /* "cython/core/triangulation.pyx":2226
 *                     if tet.generator_status[side] != inbound_generator:
 *                         continue
 *                     for orientation in (right_handed, left_handed):             # <<<<<<<<<<<<<<
 *                         row = num_edges + tet.cusp[vertex].index
 *                         column = tet.generator_index[side]
 */
        __pyx_t_4 = __Pyx_PyInt_From_Orientation(right_handed); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2226, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_PyInt_From_Orientation(left_handed); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2226, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2226, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_4);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(3, 2226, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_6);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6)) __PYX_ERR(3, 2226, __pyx_L1_error);
        __pyx_t_4 = 0;
        __pyx_t_6 = 0;
        __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6);
        __pyx_t_12 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        for (;;) {
          if (__pyx_t_12 >= 2) break;
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(3, 2226, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2226, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
          __pyx_t_13 = __Pyx_PyInt_As_Orientation(__pyx_t_2); if (unlikely((__pyx_t_13 == ((Orientation)-1)) && PyErr_Occurred())) __PYX_ERR(3, 2226, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_v_orientation = __pyx_t_13;

          /* "cython/core/triangulation.pyx":2227
 *                         continue
 *                     for orientation in (right_handed, left_handed):
 *                         row = num_edges + tet.cusp[vertex].index             # <<<<<<<<<<<<<<
 *                         column = tet.generator_index[side]
 *                         m = <int>tet.cusp[vertex].m
 */
          __pyx_v_row = (__pyx_v_num_edges + (__pyx_v_tet->cusp[__pyx_v_vertex])->index);

          /* "cython/core/triangulation.pyx":2228
 *                     for orientation in (right_handed, left_handed):
 *                         row = num_edges + tet.cusp[vertex].index
 *                         column = tet.generator_index[side]             # <<<<<<<<<<<<<<
 *                         m = <int>tet.cusp[vertex].m
 *                         l = <int>tet.cusp[vertex].l
 */
          __pyx_v_column = (__pyx_v_tet->generator_index[__pyx_v_side]);

          /* "cython/core/triangulation.pyx":2229
 *                         row = num_edges + tet.cusp[vertex].index
 *                         column = tet.generator_index[side]
 *                         m = <int>tet.cusp[vertex].m             # <<<<<<<<<<<<<<
 *                         l = <int>tet.cusp[vertex].l
 *                         relation_matrix[row, column] += (
 */
          __pyx_v_m = ((int)(__pyx_v_tet->cusp[__pyx_v_vertex])->m);

          /* "cython/core/triangulation.pyx":2230
 *                         column = tet.generator_index[side]
 *                         m = <int>tet.cusp[vertex].m
 *                         l = <int>tet.cusp[vertex].l             # <<<<<<<<<<<<<<
 *                         relation_matrix[row, column] += (
 *                             m * tet.curve[0][orientation][vertex][side]
 */
          __pyx_v_l = ((int)(__pyx_v_tet->cusp[__pyx_v_vertex])->l);

          /* "cython/core/triangulation.pyx":2231
 *                         m = <int>tet.cusp[vertex].m
 *                         l = <int>tet.cusp[vertex].l
 *                         relation_matrix[row, column] += (             # <<<<<<<<<<<<<<
 *                             m * tet.curve[0][orientation][vertex][side]
 *                             + l * tet.curve[1][orientation][vertex][side])
 */
          __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_row); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2231, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_column); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2231, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2231, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_GIVEREF(__pyx_t_2);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2)) __PYX_ERR(3, 2231, __pyx_L1_error);
          __Pyx_GIVEREF(__pyx_t_4);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4)) __PYX_ERR(3, 2231, __pyx_L1_error);
          __pyx_t_2 = 0;
          __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_relation_matrix), __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2231, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);

          /* "cython/core/triangulation.pyx":2233
 *                         relation_matrix[row, column] += (
 *                             m * tet.curve[0][orientation][vertex][side]
 *                             + l * tet.curve[1][orientation][vertex][side])             # <<<<<<<<<<<<<<
 *             tet = tet.next
 * 
 */
          __pyx_t_2 = __Pyx_PyInt_From_int(((__pyx_v_m * ((((__pyx_v_tet->curve[0])[__pyx_v_orientation])[__pyx_v_vertex])[__pyx_v_side])) + (__pyx_v_l * ((((__pyx_v_tet->curve[1])[__pyx_v_orientation])[__pyx_v_vertex])[__pyx_v_side])))); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2233, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);

          /* "cython/core/triangulation.pyx":2231
 *                         m = <int>tet.cusp[vertex].m
 *                         l = <int>tet.cusp[vertex].l
 *                         relation_matrix[row, column] += (             # <<<<<<<<<<<<<<
 *                             m * tet.curve[0][orientation][vertex][side]
 *                             + l * tet.curve[1][orientation][vertex][side])
 */
          __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2231, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_relation_matrix), __pyx_t_7, __pyx_t_8) < 0))) __PYX_ERR(3, 2231, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "cython/core/triangulation.pyx":2226
 *                     if tet.generator_status[side] != inbound_generator:
 *                         continue
 *                     for orientation in (right_handed, left_handed):             # <<<<<<<<<<<<<<
 *                         row = num_edges + tet.cusp[vertex].index
 *                         column = tet.generator_index[side]
 */
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_L15_continue:;
      }
      __pyx_L12_continue:;
    }

    /* "cython/core/triangulation.pyx":2234
 *                             m * tet.curve[0][orientation][vertex][side]
 *                             + l * tet.curve[1][orientation][vertex][side])
 *             tet = tet.next             # <<<<<<<<<<<<<<
 * 
 *         return relation_matrix
 */
    __pyx_t_9 = __pyx_v_tet->next;
    __pyx_v_tet = __pyx_t_9;
  }

  /* "cython/core/triangulation.pyx":2236
 *             tet = tet.next
 * 
 *         return relation_matrix             # <<<<<<<<<<<<<<
 * 
 *     def _presentation_matrix(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_relation_matrix);
  __pyx_r = ((PyObject *)__pyx_v_relation_matrix);
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":2174
 *         return AbelianGroup(relation_matrix.simplified_matrix())
 * 
 *     cdef c_presentation_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         See _presentation_matrix.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("SnapPy.Triangulation.c_presentation_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_relation_matrix);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":2238
 *         return relation_matrix
 * 
 *     def _presentation_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the presentation matrix for the first integral
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_119_presentation_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_6SnapPy_13Triangulation_118_presentation_matrix, "Triangulation._presentation_matrix(self)\n\n        Computes the presentation matrix for the first integral\n        homology group of the underlying (Dehn filled) manifold.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_119_presentation_matrix = {"_presentation_matrix", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_119_presentation_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_118_presentation_matrix};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_119_presentation_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("_presentation_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("_presentation_matrix", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_presentation_matrix", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_118_presentation_matrix(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_118_presentation_matrix(struct __pyx_obj_6SnapPy_Triangulation *__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("_presentation_matrix", 1);

  /* "cython/core/triangulation.pyx":2243
 *         homology group of the underlying (Dehn filled) manifold.
 *         """
 *         return self.c_presentation_matrix()             # <<<<<<<<<<<<<<
 * 
 *     cdef csmall_homology(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->c_presentation_matrix(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":2238
 *         return relation_matrix
 * 
 *     def _presentation_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the presentation matrix for the first integral
 */

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

/* "cython/core/triangulation.pyx":2245
 *         return self.c_presentation_matrix()
 * 
 *     cdef csmall_homology(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns an AbelianGroup representing the first integral
 */

static PyObject *__pyx_f_6SnapPy_13Triangulation_csmall_homology(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  RelationMatrix __pyx_v_R;
  int __pyx_v_n;
  PyObject *__pyx_v_relations = NULL;
  long __pyx_v_m;
  PyObject *__pyx_v_row = NULL;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("csmall_homology", 1);

  /* "cython/core/triangulation.pyx":2259
 *         cdef int n
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return AbelianGroup()
 *         homology_presentation(self.c_triangulation, &R)
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":2260
 * 
 *         if self.c_triangulation is NULL:
 *             return AbelianGroup()             # <<<<<<<<<<<<<<
 *         homology_presentation(self.c_triangulation, &R)
 *         relations = []
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6SnapPy_AbelianGroup)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":2259
 *         cdef int n
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return AbelianGroup()
 *         homology_presentation(self.c_triangulation, &R)
 */
  }

  /* "cython/core/triangulation.pyx":2261
 *         if self.c_triangulation is NULL:
 *             return AbelianGroup()
 *         homology_presentation(self.c_triangulation, &R)             # <<<<<<<<<<<<<<
 *         relations = []
 *         if R.relations != NULL:
 */
  homology_presentation(__pyx_v_self->c_triangulation, (&__pyx_v_R)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2261, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2262
 *             return AbelianGroup()
 *         homology_presentation(self.c_triangulation, &R)
 *         relations = []             # <<<<<<<<<<<<<<
 *         if R.relations != NULL:
 *             if R.num_rows == 0:
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_relations = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":2263
 *         homology_presentation(self.c_triangulation, &R)
 *         relations = []
 *         if R.relations != NULL:             # <<<<<<<<<<<<<<
 *             if R.num_rows == 0:
 *                 relations = [0,] * R.num_columns
 */
  __pyx_t_1 = (__pyx_v_R.relations != NULL);
  if (likely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":2264
 *         relations = []
 *         if R.relations != NULL:
 *             if R.num_rows == 0:             # <<<<<<<<<<<<<<
 *                 relations = [0,] * R.num_columns
 *             else:
 */
    __pyx_t_1 = (__pyx_v_R.num_rows == 0);
    if (__pyx_t_1) {

      /* "cython/core/triangulation.pyx":2265
 *         if R.relations != NULL:
 *             if R.num_rows == 0:
 *                 relations = [0,] * R.num_columns             # <<<<<<<<<<<<<<
 *             else:
 *                 for m from 0 <= m < R.num_rows:
 */
      __pyx_t_2 = PyList_New(1 * ((__pyx_v_R.num_columns<0) ? 0:__pyx_v_R.num_columns)); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      { Py_ssize_t __pyx_temp;
        for (__pyx_temp=0; __pyx_temp < __pyx_v_R.num_columns; __pyx_temp++) {
          __Pyx_INCREF(__pyx_int_0);
          __Pyx_GIVEREF(__pyx_int_0);
          if (__Pyx_PyList_SET_ITEM(__pyx_t_2, __pyx_temp, __pyx_int_0)) __PYX_ERR(3, 2265, __pyx_L1_error);
        }
      }
      __Pyx_DECREF_SET(__pyx_v_relations, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "cython/core/triangulation.pyx":2264
 *         relations = []
 *         if R.relations != NULL:
 *             if R.num_rows == 0:             # <<<<<<<<<<<<<<
 *                 relations = [0,] * R.num_columns
 *             else:
 */
      goto __pyx_L5;
    }

    /* "cython/core/triangulation.pyx":2267
 *                 relations = [0,] * R.num_columns
 *             else:
 *                 for m from 0 <= m < R.num_rows:             # <<<<<<<<<<<<<<
 *                     row = []
 *                     for n from 0 <= n < R.num_columns:
 */
    /*else*/ {
      __pyx_t_3 = __pyx_v_R.num_rows;
      for (__pyx_v_m = 0; __pyx_v_m < __pyx_t_3; __pyx_v_m++) {

        /* "cython/core/triangulation.pyx":2268
 *             else:
 *                 for m from 0 <= m < R.num_rows:
 *                     row = []             # <<<<<<<<<<<<<<
 *                     for n from 0 <= n < R.num_columns:
 *                         row.append(R.relations[m][n])
 */
        __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2268, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_v_row, ((PyObject*)__pyx_t_2));
        __pyx_t_2 = 0;

        /* "cython/core/triangulation.pyx":2269
 *                 for m from 0 <= m < R.num_rows:
 *                     row = []
 *                     for n from 0 <= n < R.num_columns:             # <<<<<<<<<<<<<<
 *                         row.append(R.relations[m][n])
 *                     relations.append(row)
 */
        __pyx_t_4 = __pyx_v_R.num_columns;
        for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {

          /* "cython/core/triangulation.pyx":2270
 *                     row = []
 *                     for n from 0 <= n < R.num_columns:
 *                         row.append(R.relations[m][n])             # <<<<<<<<<<<<<<
 *                     relations.append(row)
 *                 free_relations(&R)
 */
          __pyx_t_2 = __Pyx_PyInt_From_MatrixEntry(((__pyx_v_R.relations[__pyx_v_m])[__pyx_v_n])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2270, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_row, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 2270, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }

        /* "cython/core/triangulation.pyx":2271
 *                     for n from 0 <= n < R.num_columns:
 *                         row.append(R.relations[m][n])
 *                     relations.append(row)             # <<<<<<<<<<<<<<
 *                 free_relations(&R)
 *         else:
 */
        __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_relations, __pyx_v_row); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(3, 2271, __pyx_L1_error)
      }

      /* "cython/core/triangulation.pyx":2272
 *                         row.append(R.relations[m][n])
 *                     relations.append(row)
 *                 free_relations(&R)             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError("The SnapPea kernel couldn't compute "
 */
      free_relations((&__pyx_v_R)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2272, __pyx_L1_error)
    }
    __pyx_L5:;

    /* "cython/core/triangulation.pyx":2263
 *         homology_presentation(self.c_triangulation, &R)
 *         relations = []
 *         if R.relations != NULL:             # <<<<<<<<<<<<<<
 *             if R.num_rows == 0:
 *                 relations = [0,] * R.num_columns
 */
    goto __pyx_L4;
  }

  /* "cython/core/triangulation.pyx":2274
 *                 free_relations(&R)
 *         else:
 *             raise RuntimeError("The SnapPea kernel couldn't compute "             # <<<<<<<<<<<<<<
 *                                "the homology presentation matrix")
 *         return AbelianGroup(relations)
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2274, __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(3, 2274, __pyx_L1_error)
  }
  __pyx_L4:;

  /* "cython/core/triangulation.pyx":2276
 *             raise RuntimeError("The SnapPea kernel couldn't compute "
 *                                "the homology presentation matrix")
 *         return AbelianGroup(relations)             # <<<<<<<<<<<<<<
 * 
 *     def homology(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6SnapPy_AbelianGroup), __pyx_v_relations); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":2245
 *         return self.c_presentation_matrix()
 * 
 *     cdef csmall_homology(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns an AbelianGroup representing the first integral
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.Triangulation.csmall_homology", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_relations);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":2278
 *         return AbelianGroup(relations)
 * 
 *     def homology(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns an AbelianGroup representing the first integral
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_121homology(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_6SnapPy_13Triangulation_120homology, "Triangulation.homology(self)\n\n        Returns an AbelianGroup representing the first integral\n        homology group of the underlying (Dehn filled) manifold.\n\n        >>> M = Triangulation('m003')\n        >>> M.homology()\n        Z/5 + Z\n\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_121homology = {"homology", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_121homology, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_120homology};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_121homology(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("homology (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("homology", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "homology", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_120homology(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_120homology(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self) {
  AbelianGroup *__pyx_v_H;
  int __pyx_v_n;
  PyObject *__pyx_v_coefficient_list = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  AbelianGroup *__pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("homology", 1);

  /* "cython/core/triangulation.pyx":2288
 * 
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('homology')
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "cython/core/triangulation.pyx":2289
 *         """
 *         try:
 *             return self._cache.lookup('homology')             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_cache, __pyx_n_s_lookup); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2289, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_n_s_homology};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2289, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "cython/core/triangulation.pyx":2288
 * 
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('homology')
 *         except KeyError:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "cython/core/triangulation.pyx":2290
 *         try:
 *             return self._cache.lookup('homology')
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cython/core/triangulation.pyx":2288
 * 
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('homology')
 *         except KeyError:
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
  }

  /* "cython/core/triangulation.pyx":2296
 *         cdef int n
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return AbelianGroup()
 *         H = homology(self.c_triangulation)
 */
  __pyx_t_8 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_8) {

    /* "cython/core/triangulation.pyx":2297
 * 
 *         if self.c_triangulation is NULL:
 *             return AbelianGroup()             # <<<<<<<<<<<<<<
 *         H = homology(self.c_triangulation)
 *         if H != NULL:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_6SnapPy_AbelianGroup)); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":2296
 *         cdef int n
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return AbelianGroup()
 *         H = homology(self.c_triangulation)
 */
  }

  /* "cython/core/triangulation.pyx":2298
 *         if self.c_triangulation is NULL:
 *             return AbelianGroup()
 *         H = homology(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         if H != NULL:
 *             coefficient_list = []
 */
  __pyx_t_9 = homology(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2298, __pyx_L1_error)
  __pyx_v_H = __pyx_t_9;

  /* "cython/core/triangulation.pyx":2299
 *             return AbelianGroup()
 *         H = homology(self.c_triangulation)
 *         if H != NULL:             # <<<<<<<<<<<<<<
 *             coefficient_list = []
 *             compress_abelian_group(H)
 */
  __pyx_t_8 = (__pyx_v_H != NULL);
  if (__pyx_t_8) {

    /* "cython/core/triangulation.pyx":2300
 *         H = homology(self.c_triangulation)
 *         if H != NULL:
 *             coefficient_list = []             # <<<<<<<<<<<<<<
 *             compress_abelian_group(H)
 *             for n from 0 <= n < H.num_torsion_coefficients:
 */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2300, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_coefficient_list = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":2301
 *         if H != NULL:
 *             coefficient_list = []
 *             compress_abelian_group(H)             # <<<<<<<<<<<<<<
 *             for n from 0 <= n < H.num_torsion_coefficients:
 *                 coefficient_list.append(H.torsion_coefficients[n])
 */
    compress_abelian_group(__pyx_v_H); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2301, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2302
 *             coefficient_list = []
 *             compress_abelian_group(H)
 *             for n from 0 <= n < H.num_torsion_coefficients:             # <<<<<<<<<<<<<<
 *                 coefficient_list.append(H.torsion_coefficients[n])
 *             free_abelian_group(H)
 */
    __pyx_t_7 = __pyx_v_H->num_torsion_coefficients;
    for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_7; __pyx_v_n++) {

      /* "cython/core/triangulation.pyx":2303
 *             compress_abelian_group(H)
 *             for n from 0 <= n < H.num_torsion_coefficients:
 *                 coefficient_list.append(H.torsion_coefficients[n])             # <<<<<<<<<<<<<<
 *             free_abelian_group(H)
 *             result = AbelianGroup(elementary_divisors=coefficient_list)
 */
      __pyx_t_4 = __Pyx_PyInt_From_long((__pyx_v_H->torsion_coefficients[__pyx_v_n])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2303, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_coefficient_list, __pyx_t_4); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(3, 2303, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }

    /* "cython/core/triangulation.pyx":2304
 *             for n from 0 <= n < H.num_torsion_coefficients:
 *                 coefficient_list.append(H.torsion_coefficients[n])
 *             free_abelian_group(H)             # <<<<<<<<<<<<<<
 *             result = AbelianGroup(elementary_divisors=coefficient_list)
 *         else:
 */
    free_abelian_group(__pyx_v_H); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2304, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2305
 *                 coefficient_list.append(H.torsion_coefficients[n])
 *             free_abelian_group(H)
 *             result = AbelianGroup(elementary_divisors=coefficient_list)             # <<<<<<<<<<<<<<
 *         else:
 *             try:
 */
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_elementary_divisors, __pyx_v_coefficient_list) < 0) __PYX_ERR(3, 2305, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6SnapPy_AbelianGroup), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_result = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cython/core/triangulation.pyx":2299
 *             return AbelianGroup()
 *         H = homology(self.c_triangulation)
 *         if H != NULL:             # <<<<<<<<<<<<<<
 *             coefficient_list = []
 *             compress_abelian_group(H)
 */
    goto __pyx_L10;
  }

  /* "cython/core/triangulation.pyx":2307
 *             result = AbelianGroup(elementary_divisors=coefficient_list)
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 result = self.csmall_homology()
 *             except RuntimeError:
 */
  /*else*/ {
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      /*try:*/ {

        /* "cython/core/triangulation.pyx":2308
 *         else:
 *             try:
 *                 result = self.csmall_homology()             # <<<<<<<<<<<<<<
 *             except RuntimeError:
 *                 result = self.big_homology()
 */
        __pyx_t_5 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->csmall_homology(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2308, __pyx_L13_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_v_result = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "cython/core/triangulation.pyx":2307
 *             result = AbelianGroup(elementary_divisors=coefficient_list)
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 result = self.csmall_homology()
 *             except RuntimeError:
 */
      }
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L18_try_end;
      __pyx_L13_error:;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cython/core/triangulation.pyx":2309
 *             try:
 *                 result = self.csmall_homology()
 *             except RuntimeError:             # <<<<<<<<<<<<<<
 *                 result = self.big_homology()
 *         return self._cache.save(result, 'homology')
 */
      __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_RuntimeError);
      if (__pyx_t_7) {
        __Pyx_AddTraceback("SnapPy.Triangulation.homology", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(3, 2309, __pyx_L15_except_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_4);
        __Pyx_XGOTREF(__pyx_t_6);

        /* "cython/core/triangulation.pyx":2310
 *                 result = self.csmall_homology()
 *             except RuntimeError:
 *                 result = self.big_homology()             # <<<<<<<<<<<<<<
 *         return self._cache.save(result, 'homology')
 * 
 */
        __pyx_t_11 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->big_homology(__pyx_v_self); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 2310, __pyx_L15_except_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_11);
        __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L14_exception_handled;
      }
      goto __pyx_L15_except_error;

      /* "cython/core/triangulation.pyx":2307
 *             result = AbelianGroup(elementary_divisors=coefficient_list)
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 result = self.csmall_homology()
 *             except RuntimeError:
 */
      __pyx_L15_except_error:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_1);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
      goto __pyx_L1_error;
      __pyx_L14_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_1);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
      __pyx_L18_try_end:;
    }
  }
  __pyx_L10:;

  /* "cython/core/triangulation.pyx":2311
 *             except RuntimeError:
 *                 result = self.big_homology()
 *         return self._cache.save(result, 'homology')             # <<<<<<<<<<<<<<
 * 
 *     def fundamental_group(self,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_cache, __pyx_n_s_save); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_7 = 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_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_result, __pyx_n_s_homology};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":2278
 *         return AbelianGroup(relations)
 * 
 *     def homology(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns an AbelianGroup representing the first integral
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("SnapPy.Triangulation.homology", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_coefficient_list);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":2313
 *         return self._cache.save(result, 'homology')
 * 
 *     def fundamental_group(self,             # <<<<<<<<<<<<<<
 *                           simplify_presentation = True,
 *                           fillings_may_affect_generators = True,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_123fundamental_group(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_6SnapPy_13Triangulation_122fundamental_group, "Triangulation.fundamental_group(self, simplify_presentation=True, fillings_may_affect_generators=True, minimize_number_of_generators=True, try_hard_to_shorten_relators=True)\n\n        Returns a FundamentalGroup object representing the fundamental\n        group of the manifold.  If integer Dehn surgery parameters\n        have been set, then the corresponding peripheral elements are\n        killed.\n\n        >>> M = Triangulation('m004')\n        >>> G = M.fundamental_group()\n        >>> G\n        Generators:\n           a,b\n        Relators:\n           aaabABBAb\n        >>> G.peripheral_curves()\n        [('ab', 'aBAbABab')]\n\n        There are four optional arguments all of which default to True:\n\n        - simplify_presentation\n        - fillings_may_affect_generators\n        - minimize_number_of_generators\n        - try_hard_to_shorten_relators\n\n        >>> M.fundamental_group(False, False, False)\n        Generators:\n           a,b,c\n        Relators:\n           CbAcB\n           BacA\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_123fundamental_group = {"fundamental_group", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_123fundamental_group, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_122fundamental_group};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_123fundamental_group(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_simplify_presentation = 0;
  PyObject *__pyx_v_fillings_may_affect_generators = 0;
  PyObject *__pyx_v_minimize_number_of_generators = 0;
  PyObject *__pyx_v_try_hard_to_shorten_relators = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fundamental_group (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_simplify_presentation,&__pyx_n_s_fillings_may_affect_generators,&__pyx_n_s_minimize_number_of_generators,&__pyx_n_s_try_hard_to_shorten_relators,0};

    /* "cython/core/triangulation.pyx":2314
 * 
 *     def fundamental_group(self,
 *                           simplify_presentation = True,             # <<<<<<<<<<<<<<
 *                           fillings_may_affect_generators = True,
 *                           minimize_number_of_generators = True,
 */
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));

    /* "cython/core/triangulation.pyx":2315
 *     def fundamental_group(self,
 *                           simplify_presentation = True,
 *                           fillings_may_affect_generators = True,             # <<<<<<<<<<<<<<
 *                           minimize_number_of_generators = True,
 *                           try_hard_to_shorten_relators = True):
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));

    /* "cython/core/triangulation.pyx":2316
 *                           simplify_presentation = True,
 *                           fillings_may_affect_generators = True,
 *                           minimize_number_of_generators = True,             # <<<<<<<<<<<<<<
 *                           try_hard_to_shorten_relators = True):
 *         """
 */
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));

    /* "cython/core/triangulation.pyx":2317
 *                           fillings_may_affect_generators = True,
 *                           minimize_number_of_generators = True,
 *                           try_hard_to_shorten_relators = True):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a FundamentalGroup object representing the fundamental
 */
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_simplify_presentation);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2313, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fillings_may_affect_generators);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2313, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_minimize_number_of_generators);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2313, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_try_hard_to_shorten_relators);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2313, __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, "fundamental_group") < 0)) __PYX_ERR(3, 2313, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        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;
      }
    }
    __pyx_v_simplify_presentation = values[0];
    __pyx_v_fillings_may_affect_generators = values[1];
    __pyx_v_minimize_number_of_generators = values[2];
    __pyx_v_try_hard_to_shorten_relators = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fundamental_group", 0, 0, 4, __pyx_nargs); __PYX_ERR(3, 2313, __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("SnapPy.Triangulation.fundamental_group", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_122fundamental_group(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_simplify_presentation, __pyx_v_fillings_may_affect_generators, __pyx_v_minimize_number_of_generators, __pyx_v_try_hard_to_shorten_relators);

  /* "cython/core/triangulation.pyx":2313
 *         return self._cache.save(result, 'homology')
 * 
 *     def fundamental_group(self,             # <<<<<<<<<<<<<<
 *                           simplify_presentation = True,
 *                           fillings_may_affect_generators = True,
 */

  /* 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_6SnapPy_13Triangulation_122fundamental_group(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_simplify_presentation, PyObject *__pyx_v_fillings_may_affect_generators, PyObject *__pyx_v_minimize_number_of_generators, PyObject *__pyx_v_try_hard_to_shorten_relators) {
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fundamental_group", 1);

  /* "cython/core/triangulation.pyx":2348
 *            BacA
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         args = (simplify_presentation, fillings_may_affect_generators,
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":2349
 *         """
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         args = (simplify_presentation, fillings_may_affect_generators,
 *                 minimize_number_of_generators, try_hard_to_shorten_relators)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2349, __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(3, 2349, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2348
 *            BacA
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         args = (simplify_presentation, fillings_may_affect_generators,
 */
  }

  /* "cython/core/triangulation.pyx":2350
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         args = (simplify_presentation, fillings_may_affect_generators,             # <<<<<<<<<<<<<<
 *                 minimize_number_of_generators, try_hard_to_shorten_relators)
 *         try:
 */
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_simplify_presentation);
  __Pyx_GIVEREF(__pyx_v_simplify_presentation);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_simplify_presentation)) __PYX_ERR(3, 2350, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_fillings_may_affect_generators);
  __Pyx_GIVEREF(__pyx_v_fillings_may_affect_generators);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_fillings_may_affect_generators)) __PYX_ERR(3, 2350, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_minimize_number_of_generators);
  __Pyx_GIVEREF(__pyx_v_minimize_number_of_generators);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_minimize_number_of_generators)) __PYX_ERR(3, 2350, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_try_hard_to_shorten_relators);
  __Pyx_GIVEREF(__pyx_v_try_hard_to_shorten_relators);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_try_hard_to_shorten_relators)) __PYX_ERR(3, 2350, __pyx_L1_error);
  __pyx_v_args = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":2352
 *         args = (simplify_presentation, fillings_may_affect_generators,
 *                 minimize_number_of_generators, try_hard_to_shorten_relators)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('fundamental_group', *args)
 *         except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "cython/core/triangulation.pyx":2353
 *                 minimize_number_of_generators, try_hard_to_shorten_relators)
 *         try:
 *             return self._cache.lookup('fundamental_group', *args)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_cache, __pyx_n_s_lookup); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2353, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PyNumber_Add(__pyx_tuple__63, __pyx_v_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2353, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2353, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L8_try_return;

      /* "cython/core/triangulation.pyx":2352
 *         args = (simplify_presentation, fillings_may_affect_generators,
 *                 minimize_number_of_generators, try_hard_to_shorten_relators)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('fundamental_group', *args)
 *         except KeyError:
 */
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cython/core/triangulation.pyx":2354
 *         try:
 *             return self._cache.lookup('fundamental_group', *args)
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_8) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;

    /* "cython/core/triangulation.pyx":2352
 *         args = (simplify_presentation, fillings_may_affect_generators,
 *                 minimize_number_of_generators, try_hard_to_shorten_relators)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('fundamental_group', *args)
 *         except KeyError:
 */
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L0;
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  }

  /* "cython/core/triangulation.pyx":2357
 *             pass
 * 
 *         return self._cache.save(FundamentalGroup(self, *args),             # <<<<<<<<<<<<<<
 *                                 'fundamental_group', *args)
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_cache, __pyx_n_s_save); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_FundamentalGroup); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(3, 2357, __pyx_L1_error);
  __pyx_t_9 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2357, __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(3, 2357, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_fundamental_group);
  __Pyx_GIVEREF(__pyx_n_s_fundamental_group);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_n_s_fundamental_group)) __PYX_ERR(3, 2357, __pyx_L1_error);
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":2358
 * 
 *         return self._cache.save(FundamentalGroup(self, *args),
 *                                 'fundamental_group', *args)             # <<<<<<<<<<<<<<
 * 
 *     def cover(self, permutation_rep):
 */
  __pyx_t_2 = PyNumber_Add(__pyx_t_9, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cython/core/triangulation.pyx":2357
 *             pass
 * 
 *         return self._cache.save(FundamentalGroup(self, *args),             # <<<<<<<<<<<<<<
 *                                 'fundamental_group', *args)
 * 
 */
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_9;
  __pyx_t_9 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":2313
 *         return self._cache.save(result, 'homology')
 * 
 *     def fundamental_group(self,             # <<<<<<<<<<<<<<
 *                           simplify_presentation = True,
 *                           fillings_may_affect_generators = True,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("SnapPy.Triangulation.fundamental_group", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":2360
 *                                 'fundamental_group', *args)
 * 
 *     def cover(self, permutation_rep):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Triangulation representing the finite cover
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_125cover(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_6SnapPy_13Triangulation_124cover, "Triangulation.cover(self, permutation_rep)\n\n        Returns a Triangulation representing the finite cover\n        specified by a transitive permutation representation.  The\n        representation is specified by a list of permutations, one for\n        each generator of the simplified presentation of the\n        fundamental group.  Each permutation is specified as a list P\n        such that set(P) == set(range(d)) where d is the degree of the\n        cover.\n\n        >>> M = Triangulation('m004')\n        >>> N0 = M.cover([[1, 3, 0, 4, 2], [0, 2, 1, 4, 3]])\n        >>> N0.homology()\n        Z + Z + Z\n        >>> N0.cover_info()['type']\n        'irregular'\n        >>> N0.cover_info()['base']\n        'm004'\n        >>> N0.cover_info()['degree']\n        5\n\n        Within Sage the permutations can also be of type\n        PermutationGroupElement, in which case they act on the set\n        range(1, d + 1).  Or, you can specify a GAP or Magma subgroup\n        of the fundamental group.  For examples, see the docstring for\n        Manifold.cover\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_125cover = {"cover", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_125cover, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_124cover};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_125cover(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_permutation_rep = 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("cover (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_permutation_rep,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_permutation_rep)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2360, __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, "cover") < 0)) __PYX_ERR(3, 2360, __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_permutation_rep = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cover", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 2360, __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("SnapPy.Triangulation.cover", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_124cover(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_permutation_rep);

  /* 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_gb_6SnapPy_13Triangulation_5cover_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cython/core/triangulation.pyx":2429
 * 
 *             # Not a useful GAP or MAGMA object, so let's try.
 *             elif all(is_PermutationGroupElement(p) for p in permutation_rep):             # <<<<<<<<<<<<<<
 *                 permutation_rep = [[x - 1 for x in perm.domain()]
 *                                    for perm in permutation_rep]
 */

static PyObject *__pyx_pf_6SnapPy_13Triangulation_5cover_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
  struct __pyx_obj_6SnapPy___pyx_scope_struct_3_genexpr *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("genexpr", 0);
  __pyx_cur_scope = (struct __pyx_obj_6SnapPy___pyx_scope_struct_3_genexpr *)__pyx_tp_new_6SnapPy___pyx_scope_struct_3_genexpr(__pyx_ptype_6SnapPy___pyx_scope_struct_3_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_3_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(3, 2429, __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_6SnapPy_13Triangulation_5cover_2generator2, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cover_locals_genexpr, __pyx_n_s_SnapPy); if (unlikely(!gen)) __PYX_ERR(3, 2429, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("SnapPy.Triangulation.cover.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_6SnapPy_13Triangulation_5cover_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6SnapPy___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_3_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_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(3, 2429, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(3, 2429, __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(3, 2429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2429, __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(3, 2429, __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(3, 2429, __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(3, 2429, __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(3, 2429, __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(3, 2429, __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(3, 2429, __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(3, 2429, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_p);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_p, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_is_PermutationGroupElement); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_p};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(3, 2429, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_9 = (!__pyx_t_8);
    if (__pyx_t_9) {
      __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __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;
}

/* "cython/core/triangulation.pyx":2360
 *                                 'fundamental_group', *args)
 * 
 *     def cover(self, permutation_rep):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Triangulation representing the finite cover
 */

static PyObject *__pyx_pf_6SnapPy_13Triangulation_124cover(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_permutation_rep) {
  RepresentationIntoSn *__pyx_v_c_representation;
  Triangulation *__pyx_v_c_triangulation;
  struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_cover = 0;
  PyObject *__pyx_v_GG = NULL;
  PyObject *__pyx_v_coset_action = NULL;
  PyObject *__pyx_v_gap_image_gens = NULL;
  PyObject *__pyx_v_Q = NULL;
  PyObject *__pyx_v_f = NULL;
  PyObject *__pyx_v_input_type = NULL;
  PyObject *__pyx_v_G = NULL;
  Py_ssize_t __pyx_v_degree;
  PyObject *__pyx_v_info = NULL;
  PyObject *__pyx_9genexpr33__pyx_v_g = NULL;
  PyObject *__pyx_gb_6SnapPy_13Triangulation_5cover_2generator2 = 0;
  PyObject *__pyx_9genexpr35__pyx_v_perm = NULL;
  PyObject *__pyx_9genexpr36__pyx_v_x = 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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  PyObject *(*__pyx_t_15)(PyObject *);
  RepresentationIntoSn *__pyx_t_16;
  GroupPresentation *__pyx_t_17;
  Triangulation *__pyx_t_18;
  int __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cover", 0);
  __Pyx_INCREF(__pyx_v_permutation_rep);

  /* "cython/core/triangulation.pyx":2391
 *         cdef Triangulation cover
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         # For Sage, we need to check if we have been given some
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":2392
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         # For Sage, we need to check if we have been given some
 *         # alternate inputs
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2392, __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(3, 2392, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2391
 *         cdef Triangulation cover
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         # For Sage, we need to check if we have been given some
 */
  }

  /* "cython/core/triangulation.pyx":2396
 *         # alternate inputs
 * 
 *         if _within_sage:             # <<<<<<<<<<<<<<
 *             if is_GapElement(permutation_rep):
 *                 if permutation_rep.IsSubgroupFpGroup():
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_within_sage); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2396, __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(3, 2396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":2397
 * 
 *         if _within_sage:
 *             if is_GapElement(permutation_rep):             # <<<<<<<<<<<<<<
 *                 if permutation_rep.IsSubgroupFpGroup():
 *                     GG = gap(self.fundamental_group())
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_is_GapElement); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2397, __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_v_permutation_rep};
      __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(3, 2397, __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(3, 2397, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "cython/core/triangulation.pyx":2398
 *         if _within_sage:
 *             if is_GapElement(permutation_rep):
 *                 if permutation_rep.IsSubgroupFpGroup():             # <<<<<<<<<<<<<<
 *                     GG = gap(self.fundamental_group())
 *                     coset_action = GG.FactorCosetAction(permutation_rep)
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_permutation_rep, __pyx_n_s_IsSubgroupFpGroup); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2398, __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(3, 2398, __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(3, 2398, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_1) {

        /* "cython/core/triangulation.pyx":2399
 *             if is_GapElement(permutation_rep):
 *                 if permutation_rep.IsSubgroupFpGroup():
 *                     GG = gap(self.fundamental_group())             # <<<<<<<<<<<<<<
 *                     coset_action = GG.FactorCosetAction(permutation_rep)
 *                     gap_image_gens = coset_action.Image().GeneratorsOfGroup()
 */
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_gap); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2399, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fundamental_group); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2399, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = NULL;
        __pyx_t_5 = 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_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2399, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __pyx_t_6 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2399, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_v_GG = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "cython/core/triangulation.pyx":2400
 *                 if permutation_rep.IsSubgroupFpGroup():
 *                     GG = gap(self.fundamental_group())
 *                     coset_action = GG.FactorCosetAction(permutation_rep)             # <<<<<<<<<<<<<<
 *                     gap_image_gens = coset_action.Image().GeneratorsOfGroup()
 *                     Q = PermutationGroup(gap_image_gens)
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_GG, __pyx_n_s_FactorCosetAction); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2400, __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_permutation_rep};
          __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(3, 2400, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_v_coset_action = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "cython/core/triangulation.pyx":2401
 *                     GG = gap(self.fundamental_group())
 *                     coset_action = GG.FactorCosetAction(permutation_rep)
 *                     gap_image_gens = coset_action.Image().GeneratorsOfGroup()             # <<<<<<<<<<<<<<
 *                     Q = PermutationGroup(gap_image_gens)
 *                     return self.cover([Q(g) for g in gap_image_gens ])
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_coset_action, __pyx_n_s_Image); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2401, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2401, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GeneratorsOfGroup); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2401, __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 (likely(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, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2401, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __pyx_v_gap_image_gens = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "cython/core/triangulation.pyx":2402
 *                     coset_action = GG.FactorCosetAction(permutation_rep)
 *                     gap_image_gens = coset_action.Image().GeneratorsOfGroup()
 *                     Q = PermutationGroup(gap_image_gens)             # <<<<<<<<<<<<<<
 *                     return self.cover([Q(g) for g in gap_image_gens ])
 *                 elif permutation_rep.IsToPermGroupHomomorphismByImages():
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_PermutationGroup); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2402, __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_v_gap_image_gens};
          __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(3, 2402, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __pyx_v_Q = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "cython/core/triangulation.pyx":2403
 *                     gap_image_gens = coset_action.Image().GeneratorsOfGroup()
 *                     Q = PermutationGroup(gap_image_gens)
 *                     return self.cover([Q(g) for g in gap_image_gens ])             # <<<<<<<<<<<<<<
 *                 elif permutation_rep.IsToPermGroupHomomorphismByImages():
 *                     f = permutation_rep
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cover); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2403, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        { /* enter inner scope */
          __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2403, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (likely(PyList_CheckExact(__pyx_v_gap_image_gens)) || PyTuple_CheckExact(__pyx_v_gap_image_gens)) {
            __pyx_t_6 = __pyx_v_gap_image_gens; __Pyx_INCREF(__pyx_t_6);
            __pyx_t_8 = 0;
            __pyx_t_9 = NULL;
          } else {
            __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_gap_image_gens); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2403, __pyx_L9_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2403, __pyx_L9_error)
          }
          for (;;) {
            if (likely(!__pyx_t_9)) {
              if (likely(PyList_CheckExact(__pyx_t_6))) {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
                  #if !CYTHON_ASSUME_SAFE_MACROS
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 2403, __pyx_L9_error)
                  #endif
                  if (__pyx_t_8 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 2403, __pyx_L9_error)
                #else
                __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2403, __pyx_L9_error)
                __Pyx_GOTREF(__pyx_t_7);
                #endif
              } else {
                {
                  Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
                  #if !CYTHON_ASSUME_SAFE_MACROS
                  if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 2403, __pyx_L9_error)
                  #endif
                  if (__pyx_t_8 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 2403, __pyx_L9_error)
                #else
                __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2403, __pyx_L9_error)
                __Pyx_GOTREF(__pyx_t_7);
                #endif
              }
            } else {
              __pyx_t_7 = __pyx_t_9(__pyx_t_6);
              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(3, 2403, __pyx_L9_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_7);
            }
            __Pyx_XDECREF_SET(__pyx_9genexpr33__pyx_v_g, __pyx_t_7);
            __pyx_t_7 = 0;
            __Pyx_INCREF(__pyx_v_Q);
            __pyx_t_10 = __pyx_v_Q; __pyx_t_11 = NULL;
            __pyx_t_5 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_10))) {
              __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
              if (likely(__pyx_t_11)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                __Pyx_INCREF(__pyx_t_11);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_10, function);
                __pyx_t_5 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_9genexpr33__pyx_v_g};
              __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2403, __pyx_L9_error)
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            }
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) __PYX_ERR(3, 2403, __pyx_L9_error)
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          }
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_9genexpr33__pyx_v_g); __pyx_9genexpr33__pyx_v_g = 0;
          goto __pyx_L13_exit_scope;
          __pyx_L9_error:;
          __Pyx_XDECREF(__pyx_9genexpr33__pyx_v_g); __pyx_9genexpr33__pyx_v_g = 0;
          goto __pyx_L1_error;
          __pyx_L13_exit_scope:;
        } /* exit inner scope */
        __pyx_t_6 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __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_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2403, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "cython/core/triangulation.pyx":2398
 *         if _within_sage:
 *             if is_GapElement(permutation_rep):
 *                 if permutation_rep.IsSubgroupFpGroup():             # <<<<<<<<<<<<<<
 *                     GG = gap(self.fundamental_group())
 *                     coset_action = GG.FactorCosetAction(permutation_rep)
 */
      }

      /* "cython/core/triangulation.pyx":2404
 *                     Q = PermutationGroup(gap_image_gens)
 *                     return self.cover([Q(g) for g in gap_image_gens ])
 *                 elif permutation_rep.IsToPermGroupHomomorphismByImages():             # <<<<<<<<<<<<<<
 *                     f = permutation_rep
 *                     return self.cover(f.PreImage(f.Image().Stabilizer(1)))
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_permutation_rep, __pyx_n_s_IsToPermGroupHomomorphismByImage); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2404, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(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, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2404, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2404, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_1) {

        /* "cython/core/triangulation.pyx":2405
 *                     return self.cover([Q(g) for g in gap_image_gens ])
 *                 elif permutation_rep.IsToPermGroupHomomorphismByImages():
 *                     f = permutation_rep             # <<<<<<<<<<<<<<
 *                     return self.cover(f.PreImage(f.Image().Stabilizer(1)))
 * 
 */
        __Pyx_INCREF(__pyx_v_permutation_rep);
        __pyx_v_f = __pyx_v_permutation_rep;

        /* "cython/core/triangulation.pyx":2406
 *                 elif permutation_rep.IsToPermGroupHomomorphismByImages():
 *                     f = permutation_rep
 *                     return self.cover(f.PreImage(f.Image().Stabilizer(1)))             # <<<<<<<<<<<<<<
 * 
 *             elif is_MagmaElement(permutation_rep):
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cover); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2406, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_PreImage); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2406, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_Image); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 2406, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
          __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2406, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_Stabilizer); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 2406, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_int_1};
          __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2406, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __pyx_t_11 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_7};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2406, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __pyx_t_6 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __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_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2406, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

        /* "cython/core/triangulation.pyx":2404
 *                     Q = PermutationGroup(gap_image_gens)
 *                     return self.cover([Q(g) for g in gap_image_gens ])
 *                 elif permutation_rep.IsToPermGroupHomomorphismByImages():             # <<<<<<<<<<<<<<
 *                     f = permutation_rep
 *                     return self.cover(f.PreImage(f.Image().Stabilizer(1)))
 */
      }

      /* "cython/core/triangulation.pyx":2397
 * 
 *         if _within_sage:
 *             if is_GapElement(permutation_rep):             # <<<<<<<<<<<<<<
 *                 if permutation_rep.IsSubgroupFpGroup():
 *                     GG = gap(self.fundamental_group())
 */
      goto __pyx_L5;
    }

    /* "cython/core/triangulation.pyx":2408
 *                     return self.cover(f.PreImage(f.Image().Stabilizer(1)))
 * 
 *             elif is_MagmaElement(permutation_rep):             # <<<<<<<<<<<<<<
 *                 input_type = repr(permutation_rep.Type())
 *                 if input_type == 'GrpFP':
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_is_MagmaElement); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2408, __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_v_permutation_rep};
      __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(3, 2408, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2408, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "cython/core/triangulation.pyx":2409
 * 
 *             elif is_MagmaElement(permutation_rep):
 *                 input_type = repr(permutation_rep.Type())             # <<<<<<<<<<<<<<
 *                 if input_type == 'GrpFP':
 *                     GG = magma(self.fundamental_group())
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_permutation_rep, __pyx_n_s_Type); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(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, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2409, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_t_4 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2409, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_input_type = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "cython/core/triangulation.pyx":2410
 *             elif is_MagmaElement(permutation_rep):
 *                 input_type = repr(permutation_rep.Type())
 *                 if input_type == 'GrpFP':             # <<<<<<<<<<<<<<
 *                     GG = magma(self.fundamental_group())
 *                     f = GG.CosetAction(permutation_rep)
 */
      __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_input_type, __pyx_n_s_GrpFP, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2410, __pyx_L1_error)
      if (__pyx_t_1) {

        /* "cython/core/triangulation.pyx":2411
 *                 input_type = repr(permutation_rep.Type())
 *                 if input_type == 'GrpFP':
 *                     GG = magma(self.fundamental_group())             # <<<<<<<<<<<<<<
 *                     f = GG.CosetAction(permutation_rep)
 *                 elif input_type == 'HomGrp':
 */
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_magma); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2411, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fundamental_group); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2411, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = NULL;
        __pyx_t_5 = 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_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2411, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __pyx_t_6 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2411, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __pyx_v_GG = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "cython/core/triangulation.pyx":2412
 *                 if input_type == 'GrpFP':
 *                     GG = magma(self.fundamental_group())
 *                     f = GG.CosetAction(permutation_rep)             # <<<<<<<<<<<<<<
 *                 elif input_type == 'HomGrp':
 *                     f = permutation_rep
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_GG, __pyx_n_s_CosetAction); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2412, __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[2] = {__pyx_t_3, __pyx_v_permutation_rep};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2412, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __pyx_v_f = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "cython/core/triangulation.pyx":2410
 *             elif is_MagmaElement(permutation_rep):
 *                 input_type = repr(permutation_rep.Type())
 *                 if input_type == 'GrpFP':             # <<<<<<<<<<<<<<
 *                     GG = magma(self.fundamental_group())
 *                     f = GG.CosetAction(permutation_rep)
 */
        goto __pyx_L14;
      }

      /* "cython/core/triangulation.pyx":2413
 *                     GG = magma(self.fundamental_group())
 *                     f = GG.CosetAction(permutation_rep)
 *                 elif input_type == 'HomGrp':             # <<<<<<<<<<<<<<
 *                     f = permutation_rep
 *                     if not repr(f.Image().Type()) == 'GrpPerm':
 */
      __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_input_type, __pyx_n_s_HomGrp, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2413, __pyx_L1_error)
      if (likely(__pyx_t_1)) {

        /* "cython/core/triangulation.pyx":2414
 *                     f = GG.CosetAction(permutation_rep)
 *                 elif input_type == 'HomGrp':
 *                     f = permutation_rep             # <<<<<<<<<<<<<<
 *                     if not repr(f.Image().Type()) == 'GrpPerm':
 *                         raise TypeError('The homomorphism image is not '
 */
        __Pyx_INCREF(__pyx_v_permutation_rep);
        __pyx_v_f = __pyx_v_permutation_rep;

        /* "cython/core/triangulation.pyx":2415
 *                 elif input_type == 'HomGrp':
 *                     f = permutation_rep
 *                     if not repr(f.Image().Type()) == 'GrpPerm':             # <<<<<<<<<<<<<<
 *                         raise TypeError('The homomorphism image is not '
 *                                         'a permutation group.')
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_Image); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2415, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = NULL;
        __pyx_t_5 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2415, __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_Type); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2415, __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, NULL};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2415, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_t_3 = PyObject_Repr(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2415, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_GrpPerm, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2415, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_13 = (!__pyx_t_1);
        if (unlikely(__pyx_t_13)) {

          /* "cython/core/triangulation.pyx":2416
 *                     f = permutation_rep
 *                     if not repr(f.Image().Type()) == 'GrpPerm':
 *                         raise TypeError('The homomorphism image is not '             # <<<<<<<<<<<<<<
 *                                         'a permutation group.')
 *                 else:
 */
          __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2416, __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(3, 2416, __pyx_L1_error)

          /* "cython/core/triangulation.pyx":2415
 *                 elif input_type == 'HomGrp':
 *                     f = permutation_rep
 *                     if not repr(f.Image().Type()) == 'GrpPerm':             # <<<<<<<<<<<<<<
 *                         raise TypeError('The homomorphism image is not '
 *                                         'a permutation group.')
 */
        }

        /* "cython/core/triangulation.pyx":2413
 *                     GG = magma(self.fundamental_group())
 *                     f = GG.CosetAction(permutation_rep)
 *                 elif input_type == 'HomGrp':             # <<<<<<<<<<<<<<
 *                     f = permutation_rep
 *                     if not repr(f.Image().Type()) == 'GrpPerm':
 */
        goto __pyx_L14;
      }

      /* "cython/core/triangulation.pyx":2419
 *                                         'a permutation group.')
 *                 else:
 *                     raise TypeError('That Magma type not recognized.')             # <<<<<<<<<<<<<<
 * 
 *                 magma.eval("""\
 */
      /*else*/ {
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2419, __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(3, 2419, __pyx_L1_error)
      }
      __pyx_L14:;

      /* "cython/core/triangulation.pyx":2421
 *                     raise TypeError('That Magma type not recognized.')
 * 
 *                 magma.eval("""\             # <<<<<<<<<<<<<<
 *                      FormatHomForSnapPea := function(f)
 *                          subone := function(L)   return [x - 1 : x in L]; end function;
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_magma); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2421, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_eval); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2421, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __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_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, __pyx_kp_s_FormatHomForSnapPea_function_f};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2421, __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;

      /* "cython/core/triangulation.pyx":2426
 *                          return [subone(Eltseq(f(g))) : g in Generators(Domain(f))];
 *                        end function;""")
 *                 permutation_rep = f.FormatHomForSnapPea().sage()             # <<<<<<<<<<<<<<
 * 
 *             # Not a useful GAP or MAGMA object, so let's try.
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_FormatHomForSnapPea); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2426, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2426, __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_sage); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2426, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __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_4))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_permutation_rep, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cython/core/triangulation.pyx":2408
 *                     return self.cover(f.PreImage(f.Image().Stabilizer(1)))
 * 
 *             elif is_MagmaElement(permutation_rep):             # <<<<<<<<<<<<<<
 *                 input_type = repr(permutation_rep.Type())
 *                 if input_type == 'GrpFP':
 */
      goto __pyx_L5;
    }

    /* "cython/core/triangulation.pyx":2429
 * 
 *             # Not a useful GAP or MAGMA object, so let's try.
 *             elif all(is_PermutationGroupElement(p) for p in permutation_rep):             # <<<<<<<<<<<<<<
 *                 permutation_rep = [[x - 1 for x in perm.domain()]
 *                                    for perm in permutation_rep]
 */
    __pyx_t_3 = __pyx_pf_6SnapPy_13Triangulation_5cover_genexpr(NULL, __pyx_v_permutation_rep); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2429, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(3, 2429, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_13) {

      /* "cython/core/triangulation.pyx":2430
 *             # Not a useful GAP or MAGMA object, so let's try.
 *             elif all(is_PermutationGroupElement(p) for p in permutation_rep):
 *                 permutation_rep = [[x - 1 for x in perm.domain()]             # <<<<<<<<<<<<<<
 *                                    for perm in permutation_rep]
 * 
 */
      { /* enter inner scope */
        __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2430, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_4);

        /* "cython/core/triangulation.pyx":2431
 *             elif all(is_PermutationGroupElement(p) for p in permutation_rep):
 *                 permutation_rep = [[x - 1 for x in perm.domain()]
 *                                    for perm in permutation_rep]             # <<<<<<<<<<<<<<
 * 
 *         G = self.fundamental_group()
 */
        if (likely(PyList_CheckExact(__pyx_v_permutation_rep)) || PyTuple_CheckExact(__pyx_v_permutation_rep)) {
          __pyx_t_3 = __pyx_v_permutation_rep; __Pyx_INCREF(__pyx_t_3);
          __pyx_t_8 = 0;
          __pyx_t_9 = NULL;
        } else {
          __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_permutation_rep); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2431, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2431, __pyx_L18_error)
        }
        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(3, 2431, __pyx_L18_error)
                #endif
                if (__pyx_t_8 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 2431, __pyx_L18_error)
              #else
              __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2431, __pyx_L18_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(3, 2431, __pyx_L18_error)
                #endif
                if (__pyx_t_8 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 2431, __pyx_L18_error)
              #else
              __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2431, __pyx_L18_error)
              __Pyx_GOTREF(__pyx_t_2);
              #endif
            }
          } else {
            __pyx_t_2 = __pyx_t_9(__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(3, 2431, __pyx_L18_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_XDECREF_SET(__pyx_9genexpr35__pyx_v_perm, __pyx_t_2);
          __pyx_t_2 = 0;
          { /* enter inner scope */

            /* "cython/core/triangulation.pyx":2430
 *             # Not a useful GAP or MAGMA object, so let's try.
 *             elif all(is_PermutationGroupElement(p) for p in permutation_rep):
 *                 permutation_rep = [[x - 1 for x in perm.domain()]             # <<<<<<<<<<<<<<
 *                                    for perm in permutation_rep]
 * 
 */
            __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2430, __pyx_L23_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr35__pyx_v_perm, __pyx_n_s_domain); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2430, __pyx_L23_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_11 = NULL;
            __pyx_t_5 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_7))) {
              __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_7);
              if (likely(__pyx_t_11)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
                __Pyx_INCREF(__pyx_t_11);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_7, function);
                __pyx_t_5 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
              __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2430, __pyx_L23_error)
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            }
            if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
              __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7);
              __pyx_t_14 = 0;
              __pyx_t_15 = NULL;
            } else {
              __pyx_t_14 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2430, __pyx_L23_error)
              __Pyx_GOTREF(__pyx_t_7);
              __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 2430, __pyx_L23_error)
            }
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            for (;;) {
              if (likely(!__pyx_t_15)) {
                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(3, 2430, __pyx_L23_error)
                    #endif
                    if (__pyx_t_14 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_14); __Pyx_INCREF(__pyx_t_6); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(3, 2430, __pyx_L23_error)
                  #else
                  __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2430, __pyx_L23_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  #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(3, 2430, __pyx_L23_error)
                    #endif
                    if (__pyx_t_14 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_14); __Pyx_INCREF(__pyx_t_6); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(3, 2430, __pyx_L23_error)
                  #else
                  __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2430, __pyx_L23_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  #endif
                }
              } else {
                __pyx_t_6 = __pyx_t_15(__pyx_t_7);
                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(3, 2430, __pyx_L23_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_6);
              }
              __Pyx_XDECREF_SET(__pyx_9genexpr36__pyx_v_x, __pyx_t_6);
              __pyx_t_6 = 0;
              __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_9genexpr36__pyx_v_x, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2430, __pyx_L23_error)
              __Pyx_GOTREF(__pyx_t_6);
              if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(3, 2430, __pyx_L23_error)
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            }
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_XDECREF(__pyx_9genexpr36__pyx_v_x); __pyx_9genexpr36__pyx_v_x = 0;
            goto __pyx_L27_exit_scope;
            __pyx_L23_error:;
            __Pyx_XDECREF(__pyx_9genexpr36__pyx_v_x); __pyx_9genexpr36__pyx_v_x = 0;
            goto __pyx_L18_error;
            __pyx_L27_exit_scope:;
          } /* exit inner scope */
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_2))) __PYX_ERR(3, 2430, __pyx_L18_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "cython/core/triangulation.pyx":2431
 *             elif all(is_PermutationGroupElement(p) for p in permutation_rep):
 *                 permutation_rep = [[x - 1 for x in perm.domain()]
 *                                    for perm in permutation_rep]             # <<<<<<<<<<<<<<
 * 
 *         G = self.fundamental_group()
 */
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_perm); __pyx_9genexpr35__pyx_v_perm = 0;
        goto __pyx_L29_exit_scope;
        __pyx_L18_error:;
        __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_perm); __pyx_9genexpr35__pyx_v_perm = 0;
        goto __pyx_L1_error;
        __pyx_L29_exit_scope:;
      } /* exit inner scope */
      __Pyx_DECREF_SET(__pyx_v_permutation_rep, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "cython/core/triangulation.pyx":2429
 * 
 *             # Not a useful GAP or MAGMA object, so let's try.
 *             elif all(is_PermutationGroupElement(p) for p in permutation_rep):             # <<<<<<<<<<<<<<
 *                 permutation_rep = [[x - 1 for x in perm.domain()]
 *                                    for perm in permutation_rep]
 */
    }
    __pyx_L5:;

    /* "cython/core/triangulation.pyx":2396
 *         # alternate inputs
 * 
 *         if _within_sage:             # <<<<<<<<<<<<<<
 *             if is_GapElement(permutation_rep):
 *                 if permutation_rep.IsSubgroupFpGroup():
 */
  }

  /* "cython/core/triangulation.pyx":2433
 *                                    for perm in permutation_rep]
 * 
 *         G = self.fundamental_group()             # <<<<<<<<<<<<<<
 *         c_representation = self.build_rep_into_Sn(permutation_rep)
 *         degree = len(permutation_rep[0]) if len(permutation_rep) > 0 else 1
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fundamental_group); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2433, __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[2] = {__pyx_t_2, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2433, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_G = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":2434
 * 
 *         G = self.fundamental_group()
 *         c_representation = self.build_rep_into_Sn(permutation_rep)             # <<<<<<<<<<<<<<
 *         degree = len(permutation_rep[0]) if len(permutation_rep) > 0 else 1
 * 
 */
  __pyx_t_16 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_self->__pyx_vtab)->build_rep_into_Sn(__pyx_v_self, __pyx_v_permutation_rep); if (unlikely(__pyx_t_16 == ((RepresentationIntoSn *)NULL) && PyErr_Occurred())) __PYX_ERR(3, 2434, __pyx_L1_error)
  __pyx_v_c_representation = __pyx_t_16;

  /* "cython/core/triangulation.pyx":2435
 *         G = self.fundamental_group()
 *         c_representation = self.build_rep_into_Sn(permutation_rep)
 *         degree = len(permutation_rep[0]) if len(permutation_rep) > 0 else 1             # <<<<<<<<<<<<<<
 * 
 *         # The next call has the effect of initializing aspects of
 */
  __pyx_t_14 = PyObject_Length(__pyx_v_permutation_rep); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2435, __pyx_L1_error)
  __pyx_t_13 = (__pyx_t_14 > 0);
  if (__pyx_t_13) {
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_permutation_rep, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2435, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_14 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2435, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __pyx_t_14;
  } else {
    __pyx_t_8 = 1;
  }
  __pyx_v_degree = __pyx_t_8;

  /* "cython/core/triangulation.pyx":2442
 *         # because the resulting FundamentalGroup object calls the kernel
 *         # function "fundamental_group" on a copy of self.c_triangulation.
 *         free_group_presentation(compute_unsimplified_presentation(self.c_triangulation))             # <<<<<<<<<<<<<<
 * 
 *         c_triangulation = construct_cover(self.c_triangulation,
 */
  __pyx_t_17 = compute_unsimplified_presentation(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2442, __pyx_L1_error)
  free_group_presentation(__pyx_t_17); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2442, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2444
 *         free_group_presentation(compute_unsimplified_presentation(self.c_triangulation))
 * 
 *         c_triangulation = construct_cover(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                           c_representation,
 *                                           <int>degree)
 */
  __pyx_t_18 = construct_cover(__pyx_v_self->c_triangulation, __pyx_v_c_representation, ((int)__pyx_v_degree)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2444, __pyx_L1_error)
  __pyx_v_c_triangulation = __pyx_t_18;

  /* "cython/core/triangulation.pyx":2447
 *                                           c_representation,
 *                                           <int>degree)
 *         cover = self.__class__('empty')             # <<<<<<<<<<<<<<
 *         cover.set_c_triangulation(c_triangulation)
 *         cover._cover_info = info = {
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2447, __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[2] = {__pyx_t_2, __pyx_n_s_empty};
    __pyx_t_4 = __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_4)) __PYX_ERR(3, 2447, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6SnapPy_Triangulation))))) __PYX_ERR(3, 2447, __pyx_L1_error)
  __pyx_v_cover = ((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":2448
 *                                           <int>degree)
 *         cover = self.__class__('empty')
 *         cover.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 *         cover._cover_info = info = {
 *             'base'   : self.name(),
 */
  __pyx_t_4 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_cover->__pyx_vtab)->set_c_triangulation(__pyx_v_cover, __pyx_v_c_triangulation); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":2450
 *         cover.set_c_triangulation(c_triangulation)
 *         cover._cover_info = info = {
 *             'base'   : self.name(),             # <<<<<<<<<<<<<<
 *             'type'   : cover_types[c_representation.covering_type],
 *             'degree' : degree
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = NULL;
  __pyx_t_5 = 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_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_base, __pyx_t_3) < 0) __PYX_ERR(3, 2450, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/triangulation.pyx":2451
 *         cover._cover_info = info = {
 *             'base'   : self.name(),
 *             'type'   : cover_types[c_representation.covering_type],             # <<<<<<<<<<<<<<
 *             'degree' : degree
 *             }
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_cover_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyInt_From_CoveringType(__pyx_v_c_representation->covering_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_t_7) < 0) __PYX_ERR(3, 2450, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cython/core/triangulation.pyx":2452
 *             'base'   : self.name(),
 *             'type'   : cover_types[c_representation.covering_type],
 *             'degree' : degree             # <<<<<<<<<<<<<<
 *             }
 *         cover.set_name(self.name() +'~' + info['type'][:3])
 */
  __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_degree); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2452, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_degree, __pyx_t_7) < 0) __PYX_ERR(3, 2450, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cython/core/triangulation.pyx":2449
 *         cover = self.__class__('empty')
 *         cover.set_c_triangulation(c_triangulation)
 *         cover._cover_info = info = {             # <<<<<<<<<<<<<<
 *             'base'   : self.name(),
 *             'type'   : cover_types[c_representation.covering_type],
 */
  __Pyx_INCREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  __Pyx_GOTREF(__pyx_v_cover->_cover_info);
  __Pyx_DECREF(__pyx_v_cover->_cover_info);
  __pyx_v_cover->_cover_info = __pyx_t_4;
  __Pyx_INCREF(__pyx_t_4);
  __pyx_v_info = __pyx_t_4;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":2454
 *             'degree' : degree
 *             }
 *         cover.set_name(self.name() +'~' + info['type'][:3])             # <<<<<<<<<<<<<<
 *         free_representation(c_representation,
 *                             G.num_original_generators(),
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_cover), __pyx_n_s_set_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_kp_s__38); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_info, __pyx_n_s_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_2, 0, 3, NULL, NULL, &__pyx_slice__3, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_2};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2454, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":2456
 *         cover.set_name(self.name() +'~' + info['type'][:3])
 *         free_representation(c_representation,
 *                             G.num_original_generators(),             # <<<<<<<<<<<<<<
 *                             self.num_cusps())
 *         return cover
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_G, __pyx_n_s_num_original_generators); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2456, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2456, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":2457
 *         free_representation(c_representation,
 *                             G.num_original_generators(),
 *                             self.num_cusps())             # <<<<<<<<<<<<<<
 *         return cover
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = NULL;
  __pyx_t_19 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_19 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_19, 0+__pyx_t_19);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2457, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_t_19 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_19 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2457, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":2455
 *             }
 *         cover.set_name(self.name() +'~' + info['type'][:3])
 *         free_representation(c_representation,             # <<<<<<<<<<<<<<
 *                             G.num_original_generators(),
 *                             self.num_cusps())
 */
  free_representation(__pyx_v_c_representation, __pyx_t_5, __pyx_t_19); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2455, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2458
 *                             G.num_original_generators(),
 *                             self.num_cusps())
 *         return cover             # <<<<<<<<<<<<<<
 * 
 *     def covers(self, degree, method=None, cover_type='all'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_cover);
  __pyx_r = ((PyObject *)__pyx_v_cover);
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":2360
 *                                 'fundamental_group', *args)
 * 
 *     def cover(self, permutation_rep):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Triangulation representing the finite cover
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("SnapPy.Triangulation.cover", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_cover);
  __Pyx_XDECREF(__pyx_v_GG);
  __Pyx_XDECREF(__pyx_v_coset_action);
  __Pyx_XDECREF(__pyx_v_gap_image_gens);
  __Pyx_XDECREF(__pyx_v_Q);
  __Pyx_XDECREF(__pyx_v_f);
  __Pyx_XDECREF(__pyx_v_input_type);
  __Pyx_XDECREF(__pyx_v_G);
  __Pyx_XDECREF(__pyx_v_info);
  __Pyx_XDECREF(__pyx_9genexpr33__pyx_v_g);
  __Pyx_XDECREF(__pyx_gb_6SnapPy_13Triangulation_5cover_2generator2);
  __Pyx_XDECREF(__pyx_9genexpr35__pyx_v_perm);
  __Pyx_XDECREF(__pyx_9genexpr36__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_permutation_rep);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":2460
 *         return cover
 * 
 *     def covers(self, degree, method=None, cover_type='all'):             # <<<<<<<<<<<<<<
 *         """
 *         M.covers(degree, method=None, cover_type='all')
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_127covers(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_6SnapPy_13Triangulation_126covers, "Triangulation.covers(self, degree, method=None, cover_type='all')\n\n        M.covers(degree, method=None, cover_type='all')\n\n        Returns a list of Triangulations corresponding to all of the\n        finite covers of the given degree.  The default method is\n        'low_index' for general covers and 'snappea' for cyclic\n        covers.  The former uses Sim's algorithm while the latter\n        uses the original Snappea algorithm.\n\n        WARNING: If the degree is large this might take a very, very,\n        very long time.\n\n        >>> M = Triangulation('m003')\n        >>> covers = M.covers(4)\n        >>> sorted(N.homology() for N in covers)\n        [Z/3 + Z/15 + Z, Z/5 + Z + Z]\n\n        It is faster to look just at cyclic covers.\n\n        >>> covers = M.covers(4, cover_type='cyclic')\n        >>> [(N, N.homology()) for N in covers]\n        [(m003~cyc~0(0,0), Z/3 + Z/15 + Z)]\n\n        Here we check that we get the same number of covers with the\n        'snappea' and 'low_index' methods.\n\n        >>> M = Triangulation('m125')\n        >>> len(M.covers(5))\n        19\n        >>> len(M.covers(5, method='snappea'))\n        19\n\n        If you are using Sage, you can use GAP to find the subgroups,\n        which is often much faster, by specifying the optional\n        argument method = 'gap' If you have Magma installed, you can\n        used it to do the heavy lifting by specifying method='magma'.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_127covers = {"covers", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_127covers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_126covers};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_127covers(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_degree = 0;
  PyObject *__pyx_v_method = 0;
  PyObject *__pyx_v_cover_type = 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("covers (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_degree,&__pyx_n_s_method,&__pyx_n_s_cover_type,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_s_all));
    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_degree)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2460, __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_method);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2460, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cover_type);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2460, __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, "covers") < 0)) __PYX_ERR(3, 2460, __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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_degree = values[0];
    __pyx_v_method = values[1];
    __pyx_v_cover_type = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("covers", 0, 1, 3, __pyx_nargs); __PYX_ERR(3, 2460, __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("SnapPy.Triangulation.covers", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_126covers(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_degree, __pyx_v_method, __pyx_v_cover_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_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6SnapPy_13Triangulation_126covers(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_degree, PyObject *__pyx_v_method, PyObject *__pyx_v_cover_type) {
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("covers", 0);
  __Pyx_INCREF(__pyx_v_method);

  /* "cython/core/triangulation.pyx":2498
 *         used it to do the heavy lifting by specifying method='magma'.
 *         """
 *         if degree < 1:             # <<<<<<<<<<<<<<
 *             raise ValueError('Cover degree should be at least 1')
 * 
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_degree, __pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2498, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 2498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "cython/core/triangulation.pyx":2499
 *         """
 *         if degree < 1:
 *             raise ValueError('Cover degree should be at least 1')             # <<<<<<<<<<<<<<
 * 
 *         if self.c_triangulation is NULL:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2499, __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(3, 2499, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2498
 *         used it to do the heavy lifting by specifying method='magma'.
 *         """
 *         if degree < 1:             # <<<<<<<<<<<<<<
 *             raise ValueError('Cover degree should be at least 1')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":2501
 *             raise ValueError('Cover degree should be at least 1')
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         if cover_type not in ('cyclic', 'all'):
 */
  __pyx_t_2 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_2)) {

    /* "cython/core/triangulation.pyx":2502
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         if cover_type not in ('cyclic', 'all'):
 *             raise ValueError("Supported cover_types are 'all' "
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2502, __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(3, 2502, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2501
 *             raise ValueError('Cover degree should be at least 1')
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         if cover_type not in ('cyclic', 'all'):
 */
  }

  /* "cython/core/triangulation.pyx":2503
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         if cover_type not in ('cyclic', 'all'):             # <<<<<<<<<<<<<<
 *             raise ValueError("Supported cover_types are 'all' "
 *                              "and 'cyclic'.")
 */
  __Pyx_INCREF(__pyx_v_cover_type);
  __pyx_t_1 = __pyx_v_cover_type;
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_cyclic, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 2503, __pyx_L1_error)
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_all, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 2503, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_3;
  __pyx_L6_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_t_2;
  if (unlikely(__pyx_t_3)) {

    /* "cython/core/triangulation.pyx":2504
 *             raise ValueError('The Triangulation is empty.')
 *         if cover_type not in ('cyclic', 'all'):
 *             raise ValueError("Supported cover_types are 'all' "             # <<<<<<<<<<<<<<
 *                              "and 'cyclic'.")
 *         if method is None:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2504, __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(3, 2504, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2503
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         if cover_type not in ('cyclic', 'all'):             # <<<<<<<<<<<<<<
 *             raise ValueError("Supported cover_types are 'all' "
 *                              "and 'cyclic'.")
 */
  }

  /* "cython/core/triangulation.pyx":2506
 *             raise ValueError("Supported cover_types are 'all' "
 *                              "and 'cyclic'.")
 *         if method is None:             # <<<<<<<<<<<<<<
 *             method = 'low_index'
 *         else:
 */
  __pyx_t_3 = (__pyx_v_method == Py_None);
  if (__pyx_t_3) {

    /* "cython/core/triangulation.pyx":2507
 *                              "and 'cyclic'.")
 *         if method is None:
 *             method = 'low_index'             # <<<<<<<<<<<<<<
 *         else:
 *             method = method.lower()
 */
    __Pyx_INCREF(__pyx_n_s_low_index);
    __Pyx_DECREF_SET(__pyx_v_method, __pyx_n_s_low_index);

    /* "cython/core/triangulation.pyx":2506
 *             raise ValueError("Supported cover_types are 'all' "
 *                              "and 'cyclic'.")
 *         if method is None:             # <<<<<<<<<<<<<<
 *             method = 'low_index'
 *         else:
 */
    goto __pyx_L8;
  }

  /* "cython/core/triangulation.pyx":2509
 *             method = 'low_index'
 *         else:
 *             method = method.lower()             # <<<<<<<<<<<<<<
 * 
 *         if cover_type == 'cyclic' or method == 'snappea':
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_method, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2509, __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_1 = __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_1)) __PYX_ERR(3, 2509, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_method, __pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L8:;

  /* "cython/core/triangulation.pyx":2511
 *             method = method.lower()
 * 
 *         if cover_type == 'cyclic' or method == 'snappea':             # <<<<<<<<<<<<<<
 *             return self._covers_snappea(degree, cover_type)
 * 
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_cover_type, __pyx_n_s_cyclic, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 2511, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __pyx_t_2;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_method, __pyx_n_s_snappea, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 2511, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_2;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_3) {

    /* "cython/core/triangulation.pyx":2512
 * 
 *         if cover_type == 'cyclic' or method == 'snappea':
 *             return self._covers_snappea(degree, cover_type)             # <<<<<<<<<<<<<<
 * 
 *         if method == 'low_index':
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_covers_snappea); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2512, __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[3] = {__pyx_t_5, __pyx_v_degree, __pyx_v_cover_type};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2512, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":2511
 *             method = method.lower()
 * 
 *         if cover_type == 'cyclic' or method == 'snappea':             # <<<<<<<<<<<<<<
 *             return self._covers_snappea(degree, cover_type)
 * 
 */
  }

  /* "cython/core/triangulation.pyx":2514
 *             return self._covers_snappea(degree, cover_type)
 * 
 *         if method == 'low_index':             # <<<<<<<<<<<<<<
 *             return self._covers_low_index(degree)
 *         if method == 'gap':
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_method, __pyx_n_s_low_index, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 2514, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "cython/core/triangulation.pyx":2515
 * 
 *         if method == 'low_index':
 *             return self._covers_low_index(degree)             # <<<<<<<<<<<<<<
 *         if method == 'gap':
 *             return self._covers_gap(degree)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_covers_low_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2515, __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, __pyx_v_degree};
      __pyx_t_1 = __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_1)) __PYX_ERR(3, 2515, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":2514
 *             return self._covers_snappea(degree, cover_type)
 * 
 *         if method == 'low_index':             # <<<<<<<<<<<<<<
 *             return self._covers_low_index(degree)
 *         if method == 'gap':
 */
  }

  /* "cython/core/triangulation.pyx":2516
 *         if method == 'low_index':
 *             return self._covers_low_index(degree)
 *         if method == 'gap':             # <<<<<<<<<<<<<<
 *             return self._covers_gap(degree)
 *         if method == 'magma':
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_method, __pyx_n_s_gap, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 2516, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "cython/core/triangulation.pyx":2517
 *             return self._covers_low_index(degree)
 *         if method == 'gap':
 *             return self._covers_gap(degree)             # <<<<<<<<<<<<<<
 *         if method == 'magma':
 *             return self._covers_magma(degree)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_covers_gap); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2517, __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, __pyx_v_degree};
      __pyx_t_1 = __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_1)) __PYX_ERR(3, 2517, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":2516
 *         if method == 'low_index':
 *             return self._covers_low_index(degree)
 *         if method == 'gap':             # <<<<<<<<<<<<<<
 *             return self._covers_gap(degree)
 *         if method == 'magma':
 */
  }

  /* "cython/core/triangulation.pyx":2518
 *         if method == 'gap':
 *             return self._covers_gap(degree)
 *         if method == 'magma':             # <<<<<<<<<<<<<<
 *             return self._covers_magma(degree)
 * 
 */
  __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_method, __pyx_n_s_magma, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 2518, __pyx_L1_error)
  if (__pyx_t_3) {

    /* "cython/core/triangulation.pyx":2519
 *             return self._covers_gap(degree)
 *         if method == 'magma':
 *             return self._covers_magma(degree)             # <<<<<<<<<<<<<<
 * 
 *         raise ValueError("Supported methods are 'low_index', 'gap', 'magma' "
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_covers_magma); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2519, __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, __pyx_v_degree};
      __pyx_t_1 = __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_1)) __PYX_ERR(3, 2519, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":2518
 *         if method == 'gap':
 *             return self._covers_gap(degree)
 *         if method == 'magma':             # <<<<<<<<<<<<<<
 *             return self._covers_magma(degree)
 * 
 */
  }

  /* "cython/core/triangulation.pyx":2521
 *             return self._covers_magma(degree)
 * 
 *         raise ValueError("Supported methods are 'low_index', 'gap', 'magma' "             # <<<<<<<<<<<<<<
 *                          "and 'snappea'")
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2521, __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(3, 2521, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2460
 *         return cover
 * 
 *     def covers(self, degree, method=None, cover_type='all'):             # <<<<<<<<<<<<<<
 *         """
 *         M.covers(degree, method=None, cover_type='all')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("SnapPy.Triangulation.covers", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_method);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":2524
 *                          "and 'snappea'")
 * 
 *     def _covers_low_index(self, degree, num_threads=0):             # <<<<<<<<<<<<<<
 *         """
 *         Compute all covers using low_index.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_129_covers_low_index(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_6SnapPy_13Triangulation_128_covers_low_index, "Triangulation._covers_low_index(self, degree, num_threads=0)\n\n        Compute all covers using low_index.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_129_covers_low_index = {"_covers_low_index", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_129_covers_low_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_128_covers_low_index};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_129_covers_low_index(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_degree = 0;
  PyObject *__pyx_v_num_threads = 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("_covers_low_index (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_degree,&__pyx_n_s_num_threads,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_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_degree)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2524, __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_num_threads);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2524, __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, "_covers_low_index") < 0)) __PYX_ERR(3, 2524, __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_degree = values[0];
    __pyx_v_num_threads = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_covers_low_index", 0, 1, 2, __pyx_nargs); __PYX_ERR(3, 2524, __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("SnapPy.Triangulation._covers_low_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_128_covers_low_index(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_degree, __pyx_v_num_threads);

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

/* "cython/core/triangulation.pyx":2551
 *                                           num_threads=num_threads)
 * 
 *         def index(subgroup):             # <<<<<<<<<<<<<<
 *             return 1 if len(subgroup) == 0 else len(subgroup[0])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_17_covers_low_index_1index(PyObject *__pyx_self, 
#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 PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_17_covers_low_index_1index = {"index", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_17_covers_low_index_1index, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_17_covers_low_index_1index(PyObject *__pyx_self, 
#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_subgroup = 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("index (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_subgroup,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_subgroup)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2551, __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, "index") < 0)) __PYX_ERR(3, 2551, __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_subgroup = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("index", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 2551, __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("SnapPy.Triangulation._covers_low_index.index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_17_covers_low_index_index(__pyx_self, __pyx_v_subgroup);

  /* 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_6SnapPy_13Triangulation_17_covers_low_index_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_subgroup) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("index", 1);

  /* "cython/core/triangulation.pyx":2552
 * 
 *         def index(subgroup):
 *             return 1 if len(subgroup) == 0 else len(subgroup[0])             # <<<<<<<<<<<<<<
 * 
 *         return [self.cover(H) for H in reps if index(H) == degree]
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyObject_Length(__pyx_v_subgroup); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2552, __pyx_L1_error)
  __pyx_t_3 = (__pyx_t_2 == 0);
  if (__pyx_t_3) {
    __Pyx_INCREF(__pyx_int_1);
    __pyx_t_1 = __pyx_int_1;
  } else {
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_subgroup, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2552, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":2551
 *                                           num_threads=num_threads)
 * 
 *         def index(subgroup):             # <<<<<<<<<<<<<<
 *             return 1 if len(subgroup) == 0 else len(subgroup[0])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("SnapPy.Triangulation._covers_low_index.index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":2524
 *                          "and 'snappea'")
 * 
 *     def _covers_low_index(self, degree, num_threads=0):             # <<<<<<<<<<<<<<
 *         """
 *         Compute all covers using low_index.
 */

static PyObject *__pyx_pf_6SnapPy_13Triangulation_128_covers_low_index(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_degree, PyObject *__pyx_v_num_threads) {
  PyObject *__pyx_v_G = NULL;
  PyObject *__pyx_v_relators = NULL;
  PyObject *__pyx_v_short_relators = NULL;
  PyObject *__pyx_v_long_relators = NULL;
  PyObject *__pyx_v_strategy = NULL;
  PyObject *__pyx_v_reps = NULL;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_9genexpr37__pyx_v_rel = NULL;
  PyObject *__pyx_9genexpr38__pyx_v_rel = NULL;
  PyObject *__pyx_9genexpr39__pyx_v_H = 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)(PyObject *);
  Py_ssize_t __pyx_t_8;
  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("_covers_low_index", 1);

  /* "cython/core/triangulation.pyx":2528
 *         Compute all covers using low_index.
 *         """
 *         G = self.fundamental_group()             # <<<<<<<<<<<<<<
 * 
 *         relators = sorted(G.relators(as_int_list=True), key=len)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fundamental_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2528, __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(3, 2528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_G = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":2530
 *         G = self.fundamental_group()
 * 
 *         relators = sorted(G.relators(as_int_list=True), key=len)             # <<<<<<<<<<<<<<
 * 
 *         short_relators, long_relators = [], relators
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_G, __pyx_n_s_relators); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_as_int_list, Py_True) < 0) __PYX_ERR(3, 2530, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2530, __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_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(3, 2530, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_GetBuiltinName(__pyx_n_s_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_key, __pyx_t_1) < 0) __PYX_ERR(3, 2530, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_relators = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":2532
 *         relators = sorted(G.relators(as_int_list=True), key=len)
 * 
 *         short_relators, long_relators = [], relators             # <<<<<<<<<<<<<<
 *         strategy = ''
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __pyx_v_relators;
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_short_relators = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_long_relators = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cython/core/triangulation.pyx":2533
 * 
 *         short_relators, long_relators = [], relators
 *         strategy = ''             # <<<<<<<<<<<<<<
 * 
 *         if relators:
 */
  __Pyx_INCREF(__pyx_kp_s__9);
  __pyx_v_strategy = __pyx_kp_s__9;

  /* "cython/core/triangulation.pyx":2535
 *         strategy = ''
 * 
 *         if relators:             # <<<<<<<<<<<<<<
 *             if len(relators[0]) <= 2*degree:
 *                 short_relators = [rel for rel in relators if len(rel) <= 2*degree]
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_relators); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 2535, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "cython/core/triangulation.pyx":2536
 * 
 *         if relators:
 *             if len(relators[0]) <= 2*degree:             # <<<<<<<<<<<<<<
 *                 short_relators = [rel for rel in relators if len(rel) <= 2*degree]
 *                 long_relators = relators[len(short_relators):]
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_relators, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2536, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyInt_MultiplyCObj(__pyx_int_2, __pyx_v_degree, 2, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2536, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2536, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 2536, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_5) {

      /* "cython/core/triangulation.pyx":2537
 *         if relators:
 *             if len(relators[0]) <= 2*degree:
 *                 short_relators = [rel for rel in relators if len(rel) <= 2*degree]             # <<<<<<<<<<<<<<
 *                 long_relators = relators[len(short_relators):]
 *                 strategy = 'spin_short'
 */
      { /* enter inner scope */
        __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2537, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (likely(PyList_CheckExact(__pyx_v_relators)) || PyTuple_CheckExact(__pyx_v_relators)) {
          __pyx_t_1 = __pyx_v_relators; __Pyx_INCREF(__pyx_t_1);
          __pyx_t_6 = 0;
          __pyx_t_7 = NULL;
        } else {
          __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_relators); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2537, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2537, __pyx_L7_error)
        }
        for (;;) {
          if (likely(!__pyx_t_7)) {
            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(3, 2537, __pyx_L7_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(3, 2537, __pyx_L7_error)
              #else
              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2537, __pyx_L7_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(3, 2537, __pyx_L7_error)
                #endif
                if (__pyx_t_6 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 2537, __pyx_L7_error)
              #else
              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2537, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_3);
              #endif
            }
          } else {
            __pyx_t_3 = __pyx_t_7(__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(3, 2537, __pyx_L7_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_XDECREF_SET(__pyx_9genexpr37__pyx_v_rel, __pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_8 = PyObject_Length(__pyx_9genexpr37__pyx_v_rel); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2537, __pyx_L7_error)
          __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2537, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_9 = __Pyx_PyInt_MultiplyCObj(__pyx_int_2, __pyx_v_degree, 2, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2537, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10 = PyObject_RichCompare(__pyx_t_3, __pyx_t_9, Py_LE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2537, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 2537, __pyx_L7_error)
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (__pyx_t_5) {
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr37__pyx_v_rel))) __PYX_ERR(3, 2537, __pyx_L7_error)
          }
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_9genexpr37__pyx_v_rel); __pyx_9genexpr37__pyx_v_rel = 0;
        goto __pyx_L12_exit_scope;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_9genexpr37__pyx_v_rel); __pyx_9genexpr37__pyx_v_rel = 0;
        goto __pyx_L1_error;
        __pyx_L12_exit_scope:;
      } /* exit inner scope */
      __Pyx_DECREF_SET(__pyx_v_short_relators, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;

      /* "cython/core/triangulation.pyx":2538
 *             if len(relators[0]) <= 2*degree:
 *                 short_relators = [rel for rel in relators if len(rel) <= 2*degree]
 *                 long_relators = relators[len(short_relators):]             # <<<<<<<<<<<<<<
 *                 strategy = 'spin_short'
 *             elif len(relators[0]) <= 3*degree:
 */
      __pyx_t_6 = __Pyx_PyList_GET_SIZE(__pyx_v_short_relators); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2538, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_relators, __pyx_t_6, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_long_relators, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "cython/core/triangulation.pyx":2539
 *                 short_relators = [rel for rel in relators if len(rel) <= 2*degree]
 *                 long_relators = relators[len(short_relators):]
 *                 strategy = 'spin_short'             # <<<<<<<<<<<<<<
 *             elif len(relators[0]) <= 3*degree:
 *                 short_relators = [rel for rel in relators if len(rel) <= 3*degree]
 */
      __Pyx_INCREF(__pyx_n_s_spin_short);
      __Pyx_DECREF_SET(__pyx_v_strategy, __pyx_n_s_spin_short);

      /* "cython/core/triangulation.pyx":2536
 * 
 *         if relators:
 *             if len(relators[0]) <= 2*degree:             # <<<<<<<<<<<<<<
 *                 short_relators = [rel for rel in relators if len(rel) <= 2*degree]
 *                 long_relators = relators[len(short_relators):]
 */
      goto __pyx_L4;
    }

    /* "cython/core/triangulation.pyx":2540
 *                 long_relators = relators[len(short_relators):]
 *                 strategy = 'spin_short'
 *             elif len(relators[0]) <= 3*degree:             # <<<<<<<<<<<<<<
 *                 short_relators = [rel for rel in relators if len(rel) <= 3*degree]
 *                 long_relators = relators[len(short_relators):]
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_relators, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2540, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyInt_MultiplyCObj(__pyx_int_3, __pyx_v_degree, 3, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_LE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2540, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 2540, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (__pyx_t_5) {

      /* "cython/core/triangulation.pyx":2541
 *                 strategy = 'spin_short'
 *             elif len(relators[0]) <= 3*degree:
 *                 short_relators = [rel for rel in relators if len(rel) <= 3*degree]             # <<<<<<<<<<<<<<
 *                 long_relators = relators[len(short_relators):]
 * 
 */
      { /* enter inner scope */
        __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2541, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (likely(PyList_CheckExact(__pyx_v_relators)) || PyTuple_CheckExact(__pyx_v_relators)) {
          __pyx_t_1 = __pyx_v_relators; __Pyx_INCREF(__pyx_t_1);
          __pyx_t_6 = 0;
          __pyx_t_7 = NULL;
        } else {
          __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_relators); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2541, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2541, __pyx_L15_error)
        }
        for (;;) {
          if (likely(!__pyx_t_7)) {
            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(3, 2541, __pyx_L15_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_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 2541, __pyx_L15_error)
              #else
              __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2541, __pyx_L15_error)
              __Pyx_GOTREF(__pyx_t_2);
              #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(3, 2541, __pyx_L15_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_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 2541, __pyx_L15_error)
              #else
              __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2541, __pyx_L15_error)
              __Pyx_GOTREF(__pyx_t_2);
              #endif
            }
          } else {
            __pyx_t_2 = __pyx_t_7(__pyx_t_1);
            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(3, 2541, __pyx_L15_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_XDECREF_SET(__pyx_9genexpr38__pyx_v_rel, __pyx_t_2);
          __pyx_t_2 = 0;
          __pyx_t_8 = PyObject_Length(__pyx_9genexpr38__pyx_v_rel); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2541, __pyx_L15_error)
          __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2541, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_9 = __Pyx_PyInt_MultiplyCObj(__pyx_int_3, __pyx_v_degree, 3, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2541, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_9, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2541, __pyx_L15_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 2541, __pyx_L15_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (__pyx_t_5) {
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_10, (PyObject*)__pyx_9genexpr38__pyx_v_rel))) __PYX_ERR(3, 2541, __pyx_L15_error)
          }
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_9genexpr38__pyx_v_rel); __pyx_9genexpr38__pyx_v_rel = 0;
        goto __pyx_L20_exit_scope;
        __pyx_L15_error:;
        __Pyx_XDECREF(__pyx_9genexpr38__pyx_v_rel); __pyx_9genexpr38__pyx_v_rel = 0;
        goto __pyx_L1_error;
        __pyx_L20_exit_scope:;
      } /* exit inner scope */
      __Pyx_DECREF_SET(__pyx_v_short_relators, ((PyObject*)__pyx_t_10));
      __pyx_t_10 = 0;

      /* "cython/core/triangulation.pyx":2542
 *             elif len(relators[0]) <= 3*degree:
 *                 short_relators = [rel for rel in relators if len(rel) <= 3*degree]
 *                 long_relators = relators[len(short_relators):]             # <<<<<<<<<<<<<<
 * 
 *         reps = low_index.permutation_reps(G.num_generators(),
 */
      __pyx_t_6 = __Pyx_PyList_GET_SIZE(__pyx_v_short_relators); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2542, __pyx_L1_error)
      __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_v_relators, __pyx_t_6, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2542, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF_SET(__pyx_v_long_relators, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "cython/core/triangulation.pyx":2540
 *                 long_relators = relators[len(short_relators):]
 *                 strategy = 'spin_short'
 *             elif len(relators[0]) <= 3*degree:             # <<<<<<<<<<<<<<
 *                 short_relators = [rel for rel in relators if len(rel) <= 3*degree]
 *                 long_relators = relators[len(short_relators):]
 */
    }
    __pyx_L4:;

    /* "cython/core/triangulation.pyx":2535
 *         strategy = ''
 * 
 *         if relators:             # <<<<<<<<<<<<<<
 *             if len(relators[0]) <= 2*degree:
 *                 short_relators = [rel for rel in relators if len(rel) <= 2*degree]
 */
  }

  /* "cython/core/triangulation.pyx":2544
 *                 long_relators = relators[len(short_relators):]
 * 
 *         reps = low_index.permutation_reps(G.num_generators(),             # <<<<<<<<<<<<<<
 *                                           short_relators,
 *                                           long_relators,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_low_index); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_permutation_reps); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_G, __pyx_n_s_num_generators); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }

  /* "cython/core/triangulation.pyx":2547
 *                                           short_relators,
 *                                           long_relators,
 *                                           degree,             # <<<<<<<<<<<<<<
 *                                           strategy=strategy,
 *                                           num_threads=num_threads)
 */
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_10);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10)) __PYX_ERR(3, 2544, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_short_relators);
  __Pyx_GIVEREF(__pyx_v_short_relators);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_short_relators)) __PYX_ERR(3, 2544, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_long_relators);
  __Pyx_GIVEREF(__pyx_v_long_relators);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_long_relators)) __PYX_ERR(3, 2544, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_degree);
  __Pyx_GIVEREF(__pyx_v_degree);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_degree)) __PYX_ERR(3, 2544, __pyx_L1_error);
  __pyx_t_10 = 0;

  /* "cython/core/triangulation.pyx":2548
 *                                           long_relators,
 *                                           degree,
 *                                           strategy=strategy,             # <<<<<<<<<<<<<<
 *                                           num_threads=num_threads)
 * 
 */
  __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_strategy, __pyx_v_strategy) < 0) __PYX_ERR(3, 2548, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2549
 *                                           degree,
 *                                           strategy=strategy,
 *                                           num_threads=num_threads)             # <<<<<<<<<<<<<<
 * 
 *         def index(subgroup):
 */
  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_num_threads, __pyx_v_num_threads) < 0) __PYX_ERR(3, 2548, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2544
 *                 long_relators = relators[len(short_relators):]
 * 
 *         reps = low_index.permutation_reps(G.num_generators(),             # <<<<<<<<<<<<<<
 *                                           short_relators,
 *                                           long_relators,
 */
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_v_reps = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "cython/core/triangulation.pyx":2551
 *                                           num_threads=num_threads)
 * 
 *         def index(subgroup):             # <<<<<<<<<<<<<<
 *             return 1 if len(subgroup) == 0 else len(subgroup[0])
 * 
 */
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_17_covers_low_index_1index, 0, __pyx_n_s_covers_low_index_locals_index, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_v_index = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "cython/core/triangulation.pyx":2554
 *             return 1 if len(subgroup) == 0 else len(subgroup[0])
 * 
 *         return [self.cover(H) for H in reps if index(H) == degree]             # <<<<<<<<<<<<<<
 * 
 *     def _covers_gap(self, degree):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2554, __pyx_L23_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (likely(PyList_CheckExact(__pyx_v_reps)) || PyTuple_CheckExact(__pyx_v_reps)) {
      __pyx_t_10 = __pyx_v_reps; __Pyx_INCREF(__pyx_t_10);
      __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_reps); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2554, __pyx_L23_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2554, __pyx_L23_error)
    }
    for (;;) {
      if (likely(!__pyx_t_7)) {
        if (likely(PyList_CheckExact(__pyx_t_10))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 2554, __pyx_L23_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_10, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 2554, __pyx_L23_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2554, __pyx_L23_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_10);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 2554, __pyx_L23_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 2554, __pyx_L23_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2554, __pyx_L23_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_7(__pyx_t_10);
        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(3, 2554, __pyx_L23_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr39__pyx_v_H, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = __pyx_pf_6SnapPy_13Triangulation_17_covers_low_index_index(__pyx_v_index, __pyx_9genexpr39__pyx_v_H); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2554, __pyx_L23_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_degree, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2554, __pyx_L23_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(3, 2554, __pyx_L23_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_5) {
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cover); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2554, __pyx_L23_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_9genexpr39__pyx_v_H};
          __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(3, 2554, __pyx_L23_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_1))) __PYX_ERR(3, 2554, __pyx_L23_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_9genexpr39__pyx_v_H); __pyx_9genexpr39__pyx_v_H = 0;
    goto __pyx_L28_exit_scope;
    __pyx_L23_error:;
    __Pyx_XDECREF(__pyx_9genexpr39__pyx_v_H); __pyx_9genexpr39__pyx_v_H = 0;
    goto __pyx_L1_error;
    __pyx_L28_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_9;
  __pyx_t_9 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":2524
 *                          "and 'snappea'")
 * 
 *     def _covers_low_index(self, degree, num_threads=0):             # <<<<<<<<<<<<<<
 *         """
 *         Compute all covers using low_index.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("SnapPy.Triangulation._covers_low_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_G);
  __Pyx_XDECREF(__pyx_v_relators);
  __Pyx_XDECREF(__pyx_v_short_relators);
  __Pyx_XDECREF(__pyx_v_long_relators);
  __Pyx_XDECREF(__pyx_v_strategy);
  __Pyx_XDECREF(__pyx_v_reps);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_9genexpr37__pyx_v_rel);
  __Pyx_XDECREF(__pyx_9genexpr38__pyx_v_rel);
  __Pyx_XDECREF(__pyx_9genexpr39__pyx_v_H);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":2556
 *         return [self.cover(H) for H in reps if index(H) == degree]
 * 
 *     def _covers_gap(self, degree):             # <<<<<<<<<<<<<<
 *         """
 *         Compute all covers using gap.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_131_covers_gap(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_6SnapPy_13Triangulation_130_covers_gap, "Triangulation._covers_gap(self, degree)\n\n        Compute all covers using gap.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_131_covers_gap = {"_covers_gap", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_131_covers_gap, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_130_covers_gap};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_131_covers_gap(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_degree = 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("_covers_gap (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_degree,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_degree)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2556, __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, "_covers_gap") < 0)) __PYX_ERR(3, 2556, __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_degree = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_covers_gap", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 2556, __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("SnapPy.Triangulation._covers_gap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_130_covers_gap(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_degree);

  /* 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_6SnapPy_13Triangulation_130_covers_gap(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_degree) {
  PyObject *__pyx_v_G = NULL;
  PyObject *__pyx_9genexpr40__pyx_v_H = NULL;
  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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_covers_gap", 1);

  /* "cython/core/triangulation.pyx":2560
 *         Compute all covers using gap.
 *         """
 *         if not _within_sage:             # <<<<<<<<<<<<<<
 *             raise SageNotAvailable('the "gap" method for covers requires Sage')
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_within_sage); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2560, __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(3, 2560, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (!__pyx_t_2);
  if (unlikely(__pyx_t_3)) {

    /* "cython/core/triangulation.pyx":2561
 *         """
 *         if not _within_sage:
 *             raise SageNotAvailable('the "gap" method for covers requires Sage')             # <<<<<<<<<<<<<<
 * 
 *         G = gap(self.fundamental_group())
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SageNotAvailable); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2561, __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_the_gap_method_for_covers_requir};
      __pyx_t_1 = __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_1)) __PYX_ERR(3, 2561, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(3, 2561, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2560
 *         Compute all covers using gap.
 *         """
 *         if not _within_sage:             # <<<<<<<<<<<<<<
 *             raise SageNotAvailable('the "gap" method for covers requires Sage')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":2563
 *             raise SageNotAvailable('the "gap" method for covers requires Sage')
 * 
 *         G = gap(self.fundamental_group())             # <<<<<<<<<<<<<<
 *         return [self.cover(H)
 *                 for H in G.LowIndexSubgroupsFpGroup(degree)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_gap); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fundamental_group); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_6 = 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_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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_5};
    __pyx_t_1 = __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_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2563, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_G = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":2564
 * 
 *         G = gap(self.fundamental_group())
 *         return [self.cover(H)             # <<<<<<<<<<<<<<
 *                 for H in G.LowIndexSubgroupsFpGroup(degree)
 *                 if G.Index(H) == degree]
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2564, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cython/core/triangulation.pyx":2565
 *         G = gap(self.fundamental_group())
 *         return [self.cover(H)
 *                 for H in G.LowIndexSubgroupsFpGroup(degree)             # <<<<<<<<<<<<<<
 *                 if G.Index(H) == degree]
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_G, __pyx_n_s_LowIndexSubgroupsFpGroup); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2565, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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_v_degree};
      __pyx_t_4 = __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;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2565, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_5 = __pyx_t_4; __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_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2565, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2565, __pyx_L6_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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(3, 2565, __pyx_L6_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 2565, __pyx_L6_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2565, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_4);
          #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(3, 2565, __pyx_L6_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 2565, __pyx_L6_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2565, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_10(__pyx_t_5);
        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(3, 2565, __pyx_L6_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr40__pyx_v_H, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "cython/core/triangulation.pyx":2566
 *         return [self.cover(H)
 *                 for H in G.LowIndexSubgroupsFpGroup(degree)
 *                 if G.Index(H) == degree]             # <<<<<<<<<<<<<<
 * 
 *     def _covers_magma(self, degree):
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_G, __pyx_n_s_Index); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2566, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      __pyx_t_6 = 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_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_9genexpr40__pyx_v_H};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2566, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_v_degree, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2566, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(3, 2566, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_3) {

        /* "cython/core/triangulation.pyx":2564
 * 
 *         G = gap(self.fundamental_group())
 *         return [self.cover(H)             # <<<<<<<<<<<<<<
 *                 for H in G.LowIndexSubgroupsFpGroup(degree)
 *                 if G.Index(H) == degree]
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cover); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2564, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = NULL;
        __pyx_t_6 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_6 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_9genexpr40__pyx_v_H};
          __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2564, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(3, 2564, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "cython/core/triangulation.pyx":2566
 *         return [self.cover(H)
 *                 for H in G.LowIndexSubgroupsFpGroup(degree)
 *                 if G.Index(H) == degree]             # <<<<<<<<<<<<<<
 * 
 *     def _covers_magma(self, degree):
 */
      }

      /* "cython/core/triangulation.pyx":2565
 *         G = gap(self.fundamental_group())
 *         return [self.cover(H)
 *                 for H in G.LowIndexSubgroupsFpGroup(degree)             # <<<<<<<<<<<<<<
 *                 if G.Index(H) == degree]
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_9genexpr40__pyx_v_H); __pyx_9genexpr40__pyx_v_H = 0;
    goto __pyx_L11_exit_scope;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_9genexpr40__pyx_v_H); __pyx_9genexpr40__pyx_v_H = 0;
    goto __pyx_L1_error;
    __pyx_L11_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":2556
 *         return [self.cover(H) for H in reps if index(H) == degree]
 * 
 *     def _covers_gap(self, degree):             # <<<<<<<<<<<<<<
 *         """
 *         Compute all covers using gap.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("SnapPy.Triangulation._covers_gap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_G);
  __Pyx_XDECREF(__pyx_9genexpr40__pyx_v_H);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":2568
 *                 if G.Index(H) == degree]
 * 
 *     def _covers_magma(self, degree):             # <<<<<<<<<<<<<<
 *         """
 *         Compute all covers using magma.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_133_covers_magma(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_6SnapPy_13Triangulation_132_covers_magma, "Triangulation._covers_magma(self, degree)\n\n        Compute all covers using magma.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_133_covers_magma = {"_covers_magma", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_133_covers_magma, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_132_covers_magma};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_133_covers_magma(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_degree = 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("_covers_magma (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_degree,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_degree)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2568, __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, "_covers_magma") < 0)) __PYX_ERR(3, 2568, __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_degree = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_covers_magma", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 2568, __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("SnapPy.Triangulation._covers_magma", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_132_covers_magma(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_degree);

  /* 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_6SnapPy_13Triangulation_132_covers_magma(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_degree) {
  PyObject *__pyx_v_G = NULL;
  PyObject *__pyx_9genexpr41__pyx_v_H = NULL;
  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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_covers_magma", 1);

  /* "cython/core/triangulation.pyx":2572
 *         Compute all covers using magma.
 *         """
 *         if not _within_sage:             # <<<<<<<<<<<<<<
 *             raise SageNotAvailable('the "magma" method for covers requires Sage')
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_within_sage); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2572, __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(3, 2572, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (!__pyx_t_2);
  if (unlikely(__pyx_t_3)) {

    /* "cython/core/triangulation.pyx":2573
 *         """
 *         if not _within_sage:
 *             raise SageNotAvailable('the "magma" method for covers requires Sage')             # <<<<<<<<<<<<<<
 * 
 *         G = magma(self.fundamental_group())
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_SageNotAvailable); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2573, __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_the_magma_method_for_covers_requ};
      __pyx_t_1 = __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_1)) __PYX_ERR(3, 2573, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(3, 2573, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2572
 *         Compute all covers using magma.
 *         """
 *         if not _within_sage:             # <<<<<<<<<<<<<<
 *             raise SageNotAvailable('the "magma" method for covers requires Sage')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":2575
 *             raise SageNotAvailable('the "magma" method for covers requires Sage')
 * 
 *         G = magma(self.fundamental_group())             # <<<<<<<<<<<<<<
 *         return [self.cover(H)
 *                 for H in G.LowIndexSubgroups('<%d, %d>' %
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_magma); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fundamental_group); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_6 = 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_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __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_5};
    __pyx_t_1 = __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_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2575, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_G = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/triangulation.pyx":2576
 * 
 *         G = magma(self.fundamental_group())
 *         return [self.cover(H)             # <<<<<<<<<<<<<<
 *                 for H in G.LowIndexSubgroups('<%d, %d>' %
 *                                              (degree, degree))]
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 2576, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cython/core/triangulation.pyx":2577
 *         G = magma(self.fundamental_group())
 *         return [self.cover(H)
 *                 for H in G.LowIndexSubgroups('<%d, %d>' %             # <<<<<<<<<<<<<<
 *                                              (degree, degree))]
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_G, __pyx_n_s_LowIndexSubgroups); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2577, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "cython/core/triangulation.pyx":2578
 *         return [self.cover(H)
 *                 for H in G.LowIndexSubgroups('<%d, %d>' %
 *                                              (degree, degree))]             # <<<<<<<<<<<<<<
 * 
 *     def _covers_snappea(self, degree, cover_type):
 */
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2578, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_INCREF(__pyx_v_degree);
    __Pyx_GIVEREF(__pyx_v_degree);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_degree)) __PYX_ERR(3, 2578, __pyx_L6_error);
    __Pyx_INCREF(__pyx_v_degree);
    __Pyx_GIVEREF(__pyx_v_degree);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_degree)) __PYX_ERR(3, 2578, __pyx_L6_error);

    /* "cython/core/triangulation.pyx":2577
 *         G = magma(self.fundamental_group())
 *         return [self.cover(H)
 *                 for H in G.LowIndexSubgroups('<%d, %d>' %             # <<<<<<<<<<<<<<
 *                                              (degree, degree))]
 * 
 */
    __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_d_d_2, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2577, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __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_8};
      __pyx_t_4 = __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_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2577, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_5 = __pyx_t_4; __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_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2577, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2577, __pyx_L6_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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(3, 2577, __pyx_L6_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 2577, __pyx_L6_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2577, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_4);
          #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(3, 2577, __pyx_L6_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 2577, __pyx_L6_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2577, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_10(__pyx_t_5);
        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(3, 2577, __pyx_L6_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr41__pyx_v_H, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "cython/core/triangulation.pyx":2576
 * 
 *         G = magma(self.fundamental_group())
 *         return [self.cover(H)             # <<<<<<<<<<<<<<
 *                 for H in G.LowIndexSubgroups('<%d, %d>' %
 *                                              (degree, degree))]
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cover); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2576, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_7 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_9genexpr41__pyx_v_H};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2576, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(3, 2576, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/triangulation.pyx":2577
 *         G = magma(self.fundamental_group())
 *         return [self.cover(H)
 *                 for H in G.LowIndexSubgroups('<%d, %d>' %             # <<<<<<<<<<<<<<
 *                                              (degree, degree))]
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_9genexpr41__pyx_v_H); __pyx_9genexpr41__pyx_v_H = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_9genexpr41__pyx_v_H); __pyx_9genexpr41__pyx_v_H = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":2568
 *                 if G.Index(H) == degree]
 * 
 *     def _covers_magma(self, degree):             # <<<<<<<<<<<<<<
 *         """
 *         Compute all covers using magma.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("SnapPy.Triangulation._covers_magma", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_G);
  __Pyx_XDECREF(__pyx_9genexpr41__pyx_v_H);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":2580
 *                                              (degree, degree))]
 * 
 *     def _covers_snappea(self, degree, cover_type):             # <<<<<<<<<<<<<<
 *         """
 *         Compute cyclic or all covers using SnapPea kernel.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_135_covers_snappea(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_6SnapPy_13Triangulation_134_covers_snappea, "Triangulation._covers_snappea(self, degree, cover_type)\n\n        Compute cyclic or all covers using SnapPea kernel.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_135_covers_snappea = {"_covers_snappea", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_135_covers_snappea, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_134_covers_snappea};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_135_covers_snappea(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_degree = 0;
  PyObject *__pyx_v_cover_type = 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("_covers_snappea (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_degree,&__pyx_n_s_cover_type,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_degree)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2580, __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_cover_type)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2580, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_covers_snappea", 1, 2, 2, 1); __PYX_ERR(3, 2580, __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, "_covers_snappea") < 0)) __PYX_ERR(3, 2580, __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_degree = values[0];
    __pyx_v_cover_type = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_covers_snappea", 1, 2, 2, __pyx_nargs); __PYX_ERR(3, 2580, __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("SnapPy.Triangulation._covers_snappea", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_134_covers_snappea(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_degree, __pyx_v_cover_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_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6SnapPy_13Triangulation_134_covers_snappea(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_degree, PyObject *__pyx_v_cover_type) {
  RepresentationList *__pyx_v_reps;
  RepresentationIntoSn *__pyx_v_rep;
  Triangulation *__pyx_v_cover;
  struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_T = 0;
  PermutationSubgroup __pyx_v_c_cover_type;
  PyObject *__pyx_v_covers = NULL;
  PyObject *__pyx_v_cover_count = NULL;
  PyObject *__pyx_v_info = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  RepresentationList *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  RepresentationIntoSn *__pyx_t_5;
  Triangulation *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_covers_snappea", 1);

  /* "cython/core/triangulation.pyx":2590
 *         cdef PermutationSubgroup c_cover_type
 * 
 *         if cover_type == 'cyclic':             # <<<<<<<<<<<<<<
 *             c_cover_type = permutation_subgroup_Zn
 *         else:
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_cover_type, __pyx_n_s_cyclic, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2590, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":2591
 * 
 *         if cover_type == 'cyclic':
 *             c_cover_type = permutation_subgroup_Zn             # <<<<<<<<<<<<<<
 *         else:
 *             c_cover_type = permutation_subgroup_Sn
 */
    __pyx_v_c_cover_type = permutation_subgroup_Zn;

    /* "cython/core/triangulation.pyx":2590
 *         cdef PermutationSubgroup c_cover_type
 * 
 *         if cover_type == 'cyclic':             # <<<<<<<<<<<<<<
 *             c_cover_type = permutation_subgroup_Zn
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cython/core/triangulation.pyx":2593
 *             c_cover_type = permutation_subgroup_Zn
 *         else:
 *             c_cover_type = permutation_subgroup_Sn             # <<<<<<<<<<<<<<
 * 
 *         reps = find_representations(
 */
  /*else*/ {
    __pyx_v_c_cover_type = permutation_subgroup_Sn;
  }
  __pyx_L3:;

  /* "cython/core/triangulation.pyx":2596
 * 
 *         reps = find_representations(
 *             self.c_triangulation, degree, c_cover_type)             # <<<<<<<<<<<<<<
 * 
 *         covers = []
 */
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_degree); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2596, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2595
 *             c_cover_type = permutation_subgroup_Sn
 * 
 *         reps = find_representations(             # <<<<<<<<<<<<<<
 *             self.c_triangulation, degree, c_cover_type)
 * 
 */
  __pyx_t_3 = find_representations(__pyx_v_self->c_triangulation, __pyx_t_2, __pyx_v_c_cover_type); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2595, __pyx_L1_error)
  __pyx_v_reps = __pyx_t_3;

  /* "cython/core/triangulation.pyx":2598
 *             self.c_triangulation, degree, c_cover_type)
 * 
 *         covers = []             # <<<<<<<<<<<<<<
 *         rep = reps.list
 *         cover_count = 0
 */
  __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_covers = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":2599
 * 
 *         covers = []
 *         rep = reps.list             # <<<<<<<<<<<<<<
 *         cover_count = 0
 *         while rep != NULL:
 */
  __pyx_t_5 = __pyx_v_reps->list;
  __pyx_v_rep = __pyx_t_5;

  /* "cython/core/triangulation.pyx":2600
 *         covers = []
 *         rep = reps.list
 *         cover_count = 0             # <<<<<<<<<<<<<<
 *         while rep != NULL:
 *             cover = construct_cover(self.c_triangulation,
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_cover_count = __pyx_int_0;

  /* "cython/core/triangulation.pyx":2601
 *         rep = reps.list
 *         cover_count = 0
 *         while rep != NULL:             # <<<<<<<<<<<<<<
 *             cover = construct_cover(self.c_triangulation,
 *                                     rep,
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_rep != NULL);
    if (!__pyx_t_1) break;

    /* "cython/core/triangulation.pyx":2602
 *         cover_count = 0
 *         while rep != NULL:
 *             cover = construct_cover(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                     rep,
 *                                     reps.num_sheets)
 */
    __pyx_t_6 = construct_cover(__pyx_v_self->c_triangulation, __pyx_v_rep, __pyx_v_reps->num_sheets); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2602, __pyx_L1_error)
    __pyx_v_cover = __pyx_t_6;

    /* "cython/core/triangulation.pyx":2605
 *                                     rep,
 *                                     reps.num_sheets)
 *             T = self.__class__('empty')             # <<<<<<<<<<<<<<
 *             T.set_c_triangulation(cover)
 *             T._cover_info = info = {
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2605, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    __pyx_t_2 = 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_2 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_n_s_empty};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_2, 1+__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2605, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_6SnapPy_Triangulation))))) __PYX_ERR(3, 2605, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_T, ((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":2606
 *                                     reps.num_sheets)
 *             T = self.__class__('empty')
 *             T.set_c_triangulation(cover)             # <<<<<<<<<<<<<<
 *             T._cover_info = info = {
 *                 'base'   : self.name(),
 */
    __pyx_t_4 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_T->__pyx_vtab)->set_c_triangulation(__pyx_v_T, __pyx_v_cover); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2606, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":2608
 *             T.set_c_triangulation(cover)
 *             T._cover_info = info = {
 *                 'base'   : self.name(),             # <<<<<<<<<<<<<<
 *                 'type'   : cover_types[rep.covering_type],
 *                 'degree' : degree
 */
    __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    __pyx_t_2 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_2 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
      __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_2, 0+__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2608, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_base, __pyx_t_7) < 0) __PYX_ERR(3, 2608, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cython/core/triangulation.pyx":2609
 *             T._cover_info = info = {
 *                 'base'   : self.name(),
 *                 'type'   : cover_types[rep.covering_type],             # <<<<<<<<<<<<<<
 *                 'degree' : degree
 *                 }
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_cover_types); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyInt_From_CoveringType(__pyx_v_rep->covering_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_type, __pyx_t_9) < 0) __PYX_ERR(3, 2608, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cython/core/triangulation.pyx":2610
 *                 'base'   : self.name(),
 *                 'type'   : cover_types[rep.covering_type],
 *                 'degree' : degree             # <<<<<<<<<<<<<<
 *                 }
 *             T.set_name(info['base'] + "~" + info['type'][:3] + '~%d' %
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_degree, __pyx_v_degree) < 0) __PYX_ERR(3, 2608, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2607
 *             T = self.__class__('empty')
 *             T.set_c_triangulation(cover)
 *             T._cover_info = info = {             # <<<<<<<<<<<<<<
 *                 'base'   : self.name(),
 *                 'type'   : cover_types[rep.covering_type],
 */
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __Pyx_GOTREF(__pyx_v_T->_cover_info);
    __Pyx_DECREF(__pyx_v_T->_cover_info);
    __pyx_v_T->_cover_info = __pyx_t_4;
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_info, __pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":2612
 *                 'degree' : degree
 *                 }
 *             T.set_name(info['base'] + "~" + info['type'][:3] + '~%d' %             # <<<<<<<<<<<<<<
 *                        cover_count)
 *             covers.append(T)
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_T), __pyx_n_s_set_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 2612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_info, __pyx_n_s_base); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__38); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_info, __pyx_n_s_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = __Pyx_PyObject_GetSlice(__pyx_t_8, 0, 3, NULL, NULL, &__pyx_slice__3, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 2612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "cython/core/triangulation.pyx":2613
 *                 }
 *             T.set_name(info['base'] + "~" + info['type'][:3] + '~%d' %
 *                        cover_count)             # <<<<<<<<<<<<<<
 *             covers.append(T)
 *             cover_count += 1
 */
    __pyx_t_10 = __Pyx_PyString_FormatSafe(__pyx_kp_s_d_2, __pyx_v_cover_count); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);

    /* "cython/core/triangulation.pyx":2612
 *                 'degree' : degree
 *                 }
 *             T.set_name(info['base'] + "~" + info['type'][:3] + '~%d' %             # <<<<<<<<<<<<<<
 *                        cover_count)
 *             covers.append(T)
 */
    __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 2612, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = NULL;
    __pyx_t_2 = 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_2 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_7};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_2, 1+__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":2614
 *             T.set_name(info['base'] + "~" + info['type'][:3] + '~%d' %
 *                        cover_count)
 *             covers.append(T)             # <<<<<<<<<<<<<<
 *             cover_count += 1
 *             rep = rep.next
 */
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_covers, ((PyObject *)__pyx_v_T)); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(3, 2614, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2615
 *                        cover_count)
 *             covers.append(T)
 *             cover_count += 1             # <<<<<<<<<<<<<<
 *             rep = rep.next
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_cover_count, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_cover_count, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":2616
 *             covers.append(T)
 *             cover_count += 1
 *             rep = rep.next             # <<<<<<<<<<<<<<
 * 
 *         free_representation_list(reps)
 */
    __pyx_t_5 = __pyx_v_rep->next;
    __pyx_v_rep = __pyx_t_5;
  }

  /* "cython/core/triangulation.pyx":2618
 *             rep = rep.next
 * 
 *         free_representation_list(reps)             # <<<<<<<<<<<<<<
 *         return covers
 * 
 */
  free_representation_list(__pyx_v_reps); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2618, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2619
 * 
 *         free_representation_list(reps)
 *         return covers             # <<<<<<<<<<<<<<
 * 
 *     cdef RepresentationIntoSn *build_rep_into_Sn(self, perm_list) except ? NULL:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_covers);
  __pyx_r = __pyx_v_covers;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":2580
 *                                              (degree, degree))]
 * 
 *     def _covers_snappea(self, degree, cover_type):             # <<<<<<<<<<<<<<
 *         """
 *         Compute cyclic or all covers using SnapPea kernel.
 */

  /* function exit code */
  __pyx_L1_error:;
  __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_AddTraceback("SnapPy.Triangulation._covers_snappea", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_T);
  __Pyx_XDECREF(__pyx_v_covers);
  __Pyx_XDECREF(__pyx_v_cover_count);
  __Pyx_XDECREF(__pyx_v_info);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":2621
 *         return covers
 * 
 *     cdef RepresentationIntoSn *build_rep_into_Sn(self, perm_list) except ? NULL:             # <<<<<<<<<<<<<<
 *         """
 *         Build a SnapPea RepresentationIntoSn from a list of
 */

static RepresentationIntoSn *__pyx_f_6SnapPy_13Triangulation_build_rep_into_Sn(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_perm_list) {
  Triangulation *__pyx_v_c_triangulation;
  RepresentationIntoSn *__pyx_v_c_representation;
  RepresentationIntoSn *__pyx_v_c_repn_in_original_gens;
  int __pyx_v_i;
  int __pyx_v_j;
  int **__pyx_v_c_original_generators;
  int **__pyx_v_c_relators;
  int **__pyx_v_c_meridians;
  int **__pyx_v_c_longitudes;
  Py_ssize_t __pyx_v_degree;
  PyObject *__pyx_v_S = NULL;
  PyObject *__pyx_v_permutation = NULL;
  PyObject *__pyx_v_num_cusps = NULL;
  PyObject *__pyx_v_G = NULL;
  PyObject *__pyx_v_num_generators = NULL;
  PyObject *__pyx_v_relators = NULL;
  PyObject *__pyx_v_num_relators = NULL;
  PyObject *__pyx_v_orig_gens = NULL;
  PyObject *__pyx_v_num_orig_gens = NULL;
  PyObject *__pyx_v_peripheral_curves = NULL;
  PyObject *__pyx_v_meridian = NULL;
  PyObject *__pyx_v_longitude = NULL;
  int __pyx_v_failed;
  PyObject *__pyx_v_message = NULL;
  RepresentationIntoSn *__pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Triangulation *__pyx_t_8;
  int __pyx_t_9;
  RepresentationIntoSn *__pyx_t_10;
  size_t __pyx_t_11;
  int *__pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *(*__pyx_t_14)(PyObject *);
  Boolean __pyx_t_15;
  int __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("build_rep_into_Sn", 1);

  /* "cython/core/triangulation.pyx":2633
 *         cdef c_Triangulation* c_triangulation
 *         cdef RepresentationIntoSn* c_representation
 *         cdef RepresentationIntoSn* c_repn_in_original_gens = NULL             # <<<<<<<<<<<<<<
 *         cdef int i, j
 *         cdef int** c_original_generators
 */
  __pyx_v_c_repn_in_original_gens = NULL;

  /* "cython/core/triangulation.pyx":2640
 *         cdef int** c_longitudes
 * 
 *         if len(perm_list) == 0:  # implies trivial presentation             # <<<<<<<<<<<<<<
 *             degree = 1
 *         else:
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_perm_list); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2640, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 == 0);
  if (__pyx_t_2) {

    /* "cython/core/triangulation.pyx":2641
 * 
 *         if len(perm_list) == 0:  # implies trivial presentation
 *             degree = 1             # <<<<<<<<<<<<<<
 *         else:
 *             degree = len(perm_list[0])
 */
    __pyx_v_degree = 1;

    /* "cython/core/triangulation.pyx":2640
 *         cdef int** c_longitudes
 * 
 *         if len(perm_list) == 0:  # implies trivial presentation             # <<<<<<<<<<<<<<
 *             degree = 1
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cython/core/triangulation.pyx":2643
 *             degree = 1
 *         else:
 *             degree = len(perm_list[0])             # <<<<<<<<<<<<<<
 * 
 *         # Sanity check
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_perm_list, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2643, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_degree = __pyx_t_1;
  }
  __pyx_L3:;

  /* "cython/core/triangulation.pyx":2646
 * 
 *         # Sanity check
 *         S = set(range(degree))             # <<<<<<<<<<<<<<
 *         for permutation in perm_list:
 *             if set(permutation) != S:
 */
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_degree); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PySet_New(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_S = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cython/core/triangulation.pyx":2647
 *         # Sanity check
 *         S = set(range(degree))
 *         for permutation in perm_list:             # <<<<<<<<<<<<<<
 *             if set(permutation) != S:
 *                 raise ValueError('The permutation list is invalid.')
 */
  if (likely(PyList_CheckExact(__pyx_v_perm_list)) || PyTuple_CheckExact(__pyx_v_perm_list)) {
    __pyx_t_3 = __pyx_v_perm_list; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_perm_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2647, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2647, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_5)) {
      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(3, 2647, __pyx_L1_error)
          #endif
          if (__pyx_t_1 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(3, 2647, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2647, __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(3, 2647, __pyx_L1_error)
          #endif
          if (__pyx_t_1 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_4); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(3, 2647, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2647, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_5(__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(3, 2647, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_permutation, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":2648
 *         S = set(range(degree))
 *         for permutation in perm_list:
 *             if set(permutation) != S:             # <<<<<<<<<<<<<<
 *                 raise ValueError('The permutation list is invalid.')
 * 
 */
    __pyx_t_4 = PySet_New(__pyx_v_permutation); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_S, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2648, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 2648, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_t_2)) {

      /* "cython/core/triangulation.pyx":2649
 *         for permutation in perm_list:
 *             if set(permutation) != S:
 *                 raise ValueError('The permutation list is invalid.')             # <<<<<<<<<<<<<<
 * 
 *         # Initialize
 */
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_Raise(__pyx_t_6, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __PYX_ERR(3, 2649, __pyx_L1_error)

      /* "cython/core/triangulation.pyx":2648
 *         S = set(range(degree))
 *         for permutation in perm_list:
 *             if set(permutation) != S:             # <<<<<<<<<<<<<<
 *                 raise ValueError('The permutation list is invalid.')
 * 
 */
    }

    /* "cython/core/triangulation.pyx":2647
 *         # Sanity check
 *         S = set(range(degree))
 *         for permutation in perm_list:             # <<<<<<<<<<<<<<
 *             if set(permutation) != S:
 *                 raise ValueError('The permutation list is invalid.')
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/triangulation.pyx":2652
 * 
 *         # Initialize
 *         num_cusps = self.num_cusps()             # <<<<<<<<<<<<<<
 *         c_triangulation = self.c_triangulation
 *         G = self.fundamental_group()
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 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_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_num_cusps = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cython/core/triangulation.pyx":2653
 *         # Initialize
 *         num_cusps = self.num_cusps()
 *         c_triangulation = self.c_triangulation             # <<<<<<<<<<<<<<
 *         G = self.fundamental_group()
 *         num_generators = G.num_generators()
 */
  __pyx_t_8 = __pyx_v_self->c_triangulation;
  __pyx_v_c_triangulation = __pyx_t_8;

  /* "cython/core/triangulation.pyx":2654
 *         num_cusps = self.num_cusps()
 *         c_triangulation = self.c_triangulation
 *         G = self.fundamental_group()             # <<<<<<<<<<<<<<
 *         num_generators = G.num_generators()
 *         if len(perm_list) != num_generators:
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fundamental_group); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 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_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_G = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cython/core/triangulation.pyx":2655
 *         c_triangulation = self.c_triangulation
 *         G = self.fundamental_group()
 *         num_generators = G.num_generators()             # <<<<<<<<<<<<<<
 *         if len(perm_list) != num_generators:
 *             raise ValueError('Number of permutations is not the same '
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_G, __pyx_n_s_num_generators); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = NULL;
  __pyx_t_7 = 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_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_num_generators = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cython/core/triangulation.pyx":2656
 *         G = self.fundamental_group()
 *         num_generators = G.num_generators()
 *         if len(perm_list) != num_generators:             # <<<<<<<<<<<<<<
 *             raise ValueError('Number of permutations is not the same '
 *                              'as the number of generators')
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_perm_list); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2656, __pyx_L1_error)
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2656, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_v_num_generators, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2656, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(3, 2656, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "cython/core/triangulation.pyx":2657
 *         num_generators = G.num_generators()
 *         if len(perm_list) != num_generators:
 *             raise ValueError('Number of permutations is not the same '             # <<<<<<<<<<<<<<
 *                              'as the number of generators')
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(3, 2657, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2656
 *         G = self.fundamental_group()
 *         num_generators = G.num_generators()
 *         if len(perm_list) != num_generators:             # <<<<<<<<<<<<<<
 *             raise ValueError('Number of permutations is not the same '
 *                              'as the number of generators')
 */
  }

  /* "cython/core/triangulation.pyx":2660
 *                              'as the number of generators')
 * 
 *         relators = G.relators(as_int_list=True)             # <<<<<<<<<<<<<<
 *         num_relators = len(relators)
 *         orig_gens = G.original_generators(as_int_list=True)
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_G, __pyx_n_s_relators); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_as_int_list, Py_True) < 0) __PYX_ERR(3, 2660, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_relators = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":2661
 * 
 *         relators = G.relators(as_int_list=True)
 *         num_relators = len(relators)             # <<<<<<<<<<<<<<
 *         orig_gens = G.original_generators(as_int_list=True)
 *         num_orig_gens = len(orig_gens)
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_relators); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2661, __pyx_L1_error)
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_num_relators = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":2662
 *         relators = G.relators(as_int_list=True)
 *         num_relators = len(relators)
 *         orig_gens = G.original_generators(as_int_list=True)             # <<<<<<<<<<<<<<
 *         num_orig_gens = len(orig_gens)
 *         peripheral_curves = G.peripheral_curves(as_int_list=True)
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_G, __pyx_n_s_original_generators); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_as_int_list, Py_True) < 0) __PYX_ERR(3, 2662, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_orig_gens = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "cython/core/triangulation.pyx":2663
 *         num_relators = len(relators)
 *         orig_gens = G.original_generators(as_int_list=True)
 *         num_orig_gens = len(orig_gens)             # <<<<<<<<<<<<<<
 *         peripheral_curves = G.peripheral_curves(as_int_list=True)
 * 
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_orig_gens); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2663, __pyx_L1_error)
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_num_orig_gens = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "cython/core/triangulation.pyx":2664
 *         orig_gens = G.original_generators(as_int_list=True)
 *         num_orig_gens = len(orig_gens)
 *         peripheral_curves = G.peripheral_curves(as_int_list=True)             # <<<<<<<<<<<<<<
 * 
 *         # Allocate a whole bunch of memory, SnapPea and malloc.
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_G, __pyx_n_s_peripheral_curves); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_as_int_list, Py_True) < 0) __PYX_ERR(3, 2664, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_peripheral_curves = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":2668
 *         # Allocate a whole bunch of memory, SnapPea and malloc.
 *         c_representation = initialize_new_representation(
 *             num_orig_gens,             # <<<<<<<<<<<<<<
 *             <int>degree,
 *             num_cusps)
 */
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_num_orig_gens); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2668, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2670
 *             num_orig_gens,
 *             <int>degree,
 *             num_cusps)             # <<<<<<<<<<<<<<
 *         for i from 0 <= i < num_generators:
 *             for j from 0 <= j < degree:
 */
  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_num_cusps); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2670, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2667
 * 
 *         # Allocate a whole bunch of memory, SnapPea and malloc.
 *         c_representation = initialize_new_representation(             # <<<<<<<<<<<<<<
 *             num_orig_gens,
 *             <int>degree,
 */
  __pyx_t_10 = initialize_new_representation(__pyx_t_7, ((int)__pyx_v_degree), __pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2667, __pyx_L1_error)
  __pyx_v_c_representation = __pyx_t_10;

  /* "cython/core/triangulation.pyx":2671
 *             <int>degree,
 *             num_cusps)
 *         for i from 0 <= i < num_generators:             # <<<<<<<<<<<<<<
 *             for j from 0 <= j < degree:
 *                 c_representation.image[i][j] = perm_list[i][j]
 */
  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_num_generators); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2671, __pyx_L1_error)
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) {

    /* "cython/core/triangulation.pyx":2672
 *             num_cusps)
 *         for i from 0 <= i < num_generators:
 *             for j from 0 <= j < degree:             # <<<<<<<<<<<<<<
 *                 c_representation.image[i][j] = perm_list[i][j]
 *         c_original_generators = <int**>malloc(num_orig_gens*sizeof(int*))
 */
    __pyx_t_1 = __pyx_v_degree;
    for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_1; __pyx_v_j++) {

      /* "cython/core/triangulation.pyx":2673
 *         for i from 0 <= i < num_generators:
 *             for j from 0 <= j < degree:
 *                 c_representation.image[i][j] = perm_list[i][j]             # <<<<<<<<<<<<<<
 *         c_original_generators = <int**>malloc(num_orig_gens*sizeof(int*))
 *         for i from  0 <= i < num_orig_gens:
 */
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_perm_list, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2673, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_j, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2673, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2673, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      ((__pyx_v_c_representation->image[__pyx_v_i])[__pyx_v_j]) = __pyx_t_7;
    }
  }

  /* "cython/core/triangulation.pyx":2674
 *             for j from 0 <= j < degree:
 *                 c_representation.image[i][j] = perm_list[i][j]
 *         c_original_generators = <int**>malloc(num_orig_gens*sizeof(int*))             # <<<<<<<<<<<<<<
 *         for i from  0 <= i < num_orig_gens:
 *             c_original_generators[i] = c_word_from_list(orig_gens[i])
 */
  __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(int *))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyNumber_Multiply(__pyx_v_num_orig_gens, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_11 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_11 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_c_original_generators = ((int **)malloc(__pyx_t_11));

  /* "cython/core/triangulation.pyx":2675
 *                 c_representation.image[i][j] = perm_list[i][j]
 *         c_original_generators = <int**>malloc(num_orig_gens*sizeof(int*))
 *         for i from  0 <= i < num_orig_gens:             # <<<<<<<<<<<<<<
 *             c_original_generators[i] = c_word_from_list(orig_gens[i])
 *         c_relators = <int**>malloc(num_relators*sizeof(int*))
 */
  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_num_orig_gens); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2675, __pyx_L1_error)
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) {

    /* "cython/core/triangulation.pyx":2676
 *         c_original_generators = <int**>malloc(num_orig_gens*sizeof(int*))
 *         for i from  0 <= i < num_orig_gens:
 *             c_original_generators[i] = c_word_from_list(orig_gens[i])             # <<<<<<<<<<<<<<
 *         c_relators = <int**>malloc(num_relators*sizeof(int*))
 *         for i from  0 <= i < num_relators:
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_orig_gens, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_12 = __pyx_f_6SnapPy_c_word_from_list(__pyx_t_4); if (unlikely(__pyx_t_12 == ((int *)NULL) && PyErr_Occurred())) __PYX_ERR(3, 2676, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    (__pyx_v_c_original_generators[__pyx_v_i]) = __pyx_t_12;
  }

  /* "cython/core/triangulation.pyx":2677
 *         for i from  0 <= i < num_orig_gens:
 *             c_original_generators[i] = c_word_from_list(orig_gens[i])
 *         c_relators = <int**>malloc(num_relators*sizeof(int*))             # <<<<<<<<<<<<<<
 *         for i from  0 <= i < num_relators:
 *             c_relators[i] = c_word_from_list(relators[i])
 */
  __pyx_t_4 = __Pyx_PyInt_FromSize_t((sizeof(int *))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyNumber_Multiply(__pyx_v_num_relators, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_11 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_c_relators = ((int **)malloc(__pyx_t_11));

  /* "cython/core/triangulation.pyx":2678
 *             c_original_generators[i] = c_word_from_list(orig_gens[i])
 *         c_relators = <int**>malloc(num_relators*sizeof(int*))
 *         for i from  0 <= i < num_relators:             # <<<<<<<<<<<<<<
 *             c_relators[i] = c_word_from_list(relators[i])
 *         c_meridians = <int**>malloc(num_cusps*sizeof(int*))
 */
  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_num_relators); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2678, __pyx_L1_error)
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) {

    /* "cython/core/triangulation.pyx":2679
 *         c_relators = <int**>malloc(num_relators*sizeof(int*))
 *         for i from  0 <= i < num_relators:
 *             c_relators[i] = c_word_from_list(relators[i])             # <<<<<<<<<<<<<<
 *         c_meridians = <int**>malloc(num_cusps*sizeof(int*))
 *         c_longitudes = <int**>malloc(num_cusps*sizeof(int*))
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_relators, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_12 = __pyx_f_6SnapPy_c_word_from_list(__pyx_t_3); if (unlikely(__pyx_t_12 == ((int *)NULL) && PyErr_Occurred())) __PYX_ERR(3, 2679, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_c_relators[__pyx_v_i]) = __pyx_t_12;
  }

  /* "cython/core/triangulation.pyx":2680
 *         for i from  0 <= i < num_relators:
 *             c_relators[i] = c_word_from_list(relators[i])
 *         c_meridians = <int**>malloc(num_cusps*sizeof(int*))             # <<<<<<<<<<<<<<
 *         c_longitudes = <int**>malloc(num_cusps*sizeof(int*))
 *         for i from 0 <= i < num_cusps:
 */
  __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(int *))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyNumber_Multiply(__pyx_v_num_cusps, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_11 = __Pyx_PyInt_As_size_t(__pyx_t_4); if (unlikely((__pyx_t_11 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2680, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_c_meridians = ((int **)malloc(__pyx_t_11));

  /* "cython/core/triangulation.pyx":2681
 *             c_relators[i] = c_word_from_list(relators[i])
 *         c_meridians = <int**>malloc(num_cusps*sizeof(int*))
 *         c_longitudes = <int**>malloc(num_cusps*sizeof(int*))             # <<<<<<<<<<<<<<
 *         for i from 0 <= i < num_cusps:
 *             meridian, longitude = peripheral_curves[i]
 */
  __pyx_t_4 = __Pyx_PyInt_FromSize_t((sizeof(int *))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyNumber_Multiply(__pyx_v_num_cusps, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_11 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_11 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2681, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_c_longitudes = ((int **)malloc(__pyx_t_11));

  /* "cython/core/triangulation.pyx":2682
 *         c_meridians = <int**>malloc(num_cusps*sizeof(int*))
 *         c_longitudes = <int**>malloc(num_cusps*sizeof(int*))
 *         for i from 0 <= i < num_cusps:             # <<<<<<<<<<<<<<
 *             meridian, longitude = peripheral_curves[i]
 *             c_meridians[i] = c_word_from_list(meridian)
 */
  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_num_cusps); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2682, __pyx_L1_error)
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) {

    /* "cython/core/triangulation.pyx":2683
 *         c_longitudes = <int**>malloc(num_cusps*sizeof(int*))
 *         for i from 0 <= i < num_cusps:
 *             meridian, longitude = peripheral_curves[i]             # <<<<<<<<<<<<<<
 *             c_meridians[i] = c_word_from_list(meridian)
 *             c_longitudes[i] = c_word_from_list(longitude)
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_peripheral_curves, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    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(3, 2683, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_13 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(3, 2683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_13);
      index = 0; __pyx_t_4 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_4)) goto __pyx_L19_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_6 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_6)) goto __pyx_L19_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) __PYX_ERR(3, 2683, __pyx_L1_error)
      __pyx_t_14 = NULL;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L20_unpacking_done;
      __pyx_L19_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_14 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(3, 2683, __pyx_L1_error)
      __pyx_L20_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_meridian, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_longitude, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "cython/core/triangulation.pyx":2684
 *         for i from 0 <= i < num_cusps:
 *             meridian, longitude = peripheral_curves[i]
 *             c_meridians[i] = c_word_from_list(meridian)             # <<<<<<<<<<<<<<
 *             c_longitudes[i] = c_word_from_list(longitude)
 *         # Whew!
 */
    __pyx_t_12 = __pyx_f_6SnapPy_c_word_from_list(__pyx_v_meridian); if (unlikely(__pyx_t_12 == ((int *)NULL) && PyErr_Occurred())) __PYX_ERR(3, 2684, __pyx_L1_error)
    (__pyx_v_c_meridians[__pyx_v_i]) = __pyx_t_12;

    /* "cython/core/triangulation.pyx":2685
 *             meridian, longitude = peripheral_curves[i]
 *             c_meridians[i] = c_word_from_list(meridian)
 *             c_longitudes[i] = c_word_from_list(longitude)             # <<<<<<<<<<<<<<
 *         # Whew!
 * 
 */
    __pyx_t_12 = __pyx_f_6SnapPy_c_word_from_list(__pyx_v_longitude); if (unlikely(__pyx_t_12 == ((int *)NULL) && PyErr_Occurred())) __PYX_ERR(3, 2685, __pyx_L1_error)
    (__pyx_v_c_longitudes[__pyx_v_i]) = __pyx_t_12;
  }

  /* "cython/core/triangulation.pyx":2688
 *         # Whew!
 * 
 *         failed = False             # <<<<<<<<<<<<<<
 *         if (candidateSn_is_valid(c_representation.image,
 *                                  <int>degree, c_relators, num_relators) and
 */
  __pyx_v_failed = 0;

  /* "cython/core/triangulation.pyx":2690
 *         failed = False
 *         if (candidateSn_is_valid(c_representation.image,
 *                                  <int>degree, c_relators, num_relators) and             # <<<<<<<<<<<<<<
 *             candidateSn_is_transitive(c_representation.image,
 *                                       num_generators, <int>degree) ):
 */
  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_num_relators); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2690, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2689
 * 
 *         failed = False
 *         if (candidateSn_is_valid(c_representation.image,             # <<<<<<<<<<<<<<
 *                                  <int>degree, c_relators, num_relators) and
 *             candidateSn_is_transitive(c_representation.image,
 */
  __pyx_t_15 = candidateSn_is_valid(__pyx_v_c_representation->image, ((int)__pyx_v_degree), __pyx_v_c_relators, __pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2689, __pyx_L1_error)
  __pyx_t_16 = (__pyx_t_15 != 0);
  if (__pyx_t_16) {
  } else {
    __pyx_t_2 = __pyx_t_16;
    goto __pyx_L22_bool_binop_done;
  }

  /* "cython/core/triangulation.pyx":2692
 *                                  <int>degree, c_relators, num_relators) and
 *             candidateSn_is_transitive(c_representation.image,
 *                                       num_generators, <int>degree) ):             # <<<<<<<<<<<<<<
 *             c_repn_in_original_gens = convert_candidateSn_to_original_generators(
 *                 c_representation.image,
 */
  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_num_generators); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2692, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2691
 *         if (candidateSn_is_valid(c_representation.image,
 *                                  <int>degree, c_relators, num_relators) and
 *             candidateSn_is_transitive(c_representation.image,             # <<<<<<<<<<<<<<
 *                                       num_generators, <int>degree) ):
 *             c_repn_in_original_gens = convert_candidateSn_to_original_generators(
 */
  __pyx_t_15 = candidateSn_is_transitive(__pyx_v_c_representation->image, __pyx_t_9, ((int)__pyx_v_degree)); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2691, __pyx_L1_error)
  __pyx_t_16 = (__pyx_t_15 != 0);
  __pyx_t_2 = __pyx_t_16;
  __pyx_L22_bool_binop_done:;

  /* "cython/core/triangulation.pyx":2689
 * 
 *         failed = False
 *         if (candidateSn_is_valid(c_representation.image,             # <<<<<<<<<<<<<<
 *                                  <int>degree, c_relators, num_relators) and
 *             candidateSn_is_transitive(c_representation.image,
 */
  if (__pyx_t_2) {

    /* "cython/core/triangulation.pyx":2696
 *                 c_representation.image,
 *                 <int>degree,
 *                 num_orig_gens,             # <<<<<<<<<<<<<<
 *                 c_original_generators,
 *                 c_triangulation,
 */
    __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_num_orig_gens); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2696, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2693
 *             candidateSn_is_transitive(c_representation.image,
 *                                       num_generators, <int>degree) ):
 *             c_repn_in_original_gens = convert_candidateSn_to_original_generators(             # <<<<<<<<<<<<<<
 *                 c_representation.image,
 *                 <int>degree,
 */
    __pyx_t_10 = convert_candidateSn_to_original_generators(__pyx_v_c_representation->image, ((int)__pyx_v_degree), __pyx_t_9, __pyx_v_c_original_generators, __pyx_v_c_triangulation, __pyx_v_c_meridians, __pyx_v_c_longitudes); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2693, __pyx_L1_error)
    __pyx_v_c_repn_in_original_gens = __pyx_t_10;

    /* "cython/core/triangulation.pyx":2689
 * 
 *         failed = False
 *         if (candidateSn_is_valid(c_representation.image,             # <<<<<<<<<<<<<<
 *                                  <int>degree, c_relators, num_relators) and
 *             candidateSn_is_transitive(c_representation.image,
 */
    goto __pyx_L21;
  }

  /* "cython/core/triangulation.pyx":2702
 *                 c_longitudes)
 *         else:
 *             message = 'Invalid permutation data.'             # <<<<<<<<<<<<<<
 *             failed = True
 *         if c_repn_in_original_gens == NULL:
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_kp_s_Invalid_permutation_data);
    __pyx_v_message = __pyx_kp_s_Invalid_permutation_data;

    /* "cython/core/triangulation.pyx":2703
 *         else:
 *             message = 'Invalid permutation data.'
 *             failed = True             # <<<<<<<<<<<<<<
 *         if c_repn_in_original_gens == NULL:
 *             message = 'Failed to construct permutation representation.'
 */
    __pyx_v_failed = 1;
  }
  __pyx_L21:;

  /* "cython/core/triangulation.pyx":2704
 *             message = 'Invalid permutation data.'
 *             failed = True
 *         if c_repn_in_original_gens == NULL:             # <<<<<<<<<<<<<<
 *             message = 'Failed to construct permutation representation.'
 *             failed = True
 */
  __pyx_t_2 = (__pyx_v_c_repn_in_original_gens == NULL);
  if (__pyx_t_2) {

    /* "cython/core/triangulation.pyx":2705
 *             failed = True
 *         if c_repn_in_original_gens == NULL:
 *             message = 'Failed to construct permutation representation.'             # <<<<<<<<<<<<<<
 *             failed = True
 * 
 */
    __Pyx_INCREF(__pyx_kp_s_Failed_to_construct_permutation);
    __Pyx_XDECREF_SET(__pyx_v_message, __pyx_kp_s_Failed_to_construct_permutation);

    /* "cython/core/triangulation.pyx":2706
 *         if c_repn_in_original_gens == NULL:
 *             message = 'Failed to construct permutation representation.'
 *             failed = True             # <<<<<<<<<<<<<<
 * 
 *         # Now free all that memory
 */
    __pyx_v_failed = 1;

    /* "cython/core/triangulation.pyx":2704
 *             message = 'Invalid permutation data.'
 *             failed = True
 *         if c_repn_in_original_gens == NULL:             # <<<<<<<<<<<<<<
 *             message = 'Failed to construct permutation representation.'
 *             failed = True
 */
  }

  /* "cython/core/triangulation.pyx":2709
 * 
 *         # Now free all that memory
 *         for i from 0 <= i < num_cusps:             # <<<<<<<<<<<<<<
 *             free(c_meridians[i])
 *             free(c_longitudes[i])
 */
  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_num_cusps); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2709, __pyx_L1_error)
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) {

    /* "cython/core/triangulation.pyx":2710
 *         # Now free all that memory
 *         for i from 0 <= i < num_cusps:
 *             free(c_meridians[i])             # <<<<<<<<<<<<<<
 *             free(c_longitudes[i])
 *         free(c_meridians)
 */
    free((__pyx_v_c_meridians[__pyx_v_i]));

    /* "cython/core/triangulation.pyx":2711
 *         for i from 0 <= i < num_cusps:
 *             free(c_meridians[i])
 *             free(c_longitudes[i])             # <<<<<<<<<<<<<<
 *         free(c_meridians)
 *         free(c_longitudes)
 */
    free((__pyx_v_c_longitudes[__pyx_v_i]));
  }

  /* "cython/core/triangulation.pyx":2712
 *             free(c_meridians[i])
 *             free(c_longitudes[i])
 *         free(c_meridians)             # <<<<<<<<<<<<<<
 *         free(c_longitudes)
 *         for i from 0 <= i < num_relators:
 */
  free(__pyx_v_c_meridians);

  /* "cython/core/triangulation.pyx":2713
 *             free(c_longitudes[i])
 *         free(c_meridians)
 *         free(c_longitudes)             # <<<<<<<<<<<<<<
 *         for i from 0 <= i < num_relators:
 *             free(c_relators[i])
 */
  free(__pyx_v_c_longitudes);

  /* "cython/core/triangulation.pyx":2714
 *         free(c_meridians)
 *         free(c_longitudes)
 *         for i from 0 <= i < num_relators:             # <<<<<<<<<<<<<<
 *             free(c_relators[i])
 *         free(c_relators)
 */
  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_num_relators); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2714, __pyx_L1_error)
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) {

    /* "cython/core/triangulation.pyx":2715
 *         free(c_longitudes)
 *         for i from 0 <= i < num_relators:
 *             free(c_relators[i])             # <<<<<<<<<<<<<<
 *         free(c_relators)
 *         for i from 0 <= i < num_orig_gens:
 */
    free((__pyx_v_c_relators[__pyx_v_i]));
  }

  /* "cython/core/triangulation.pyx":2716
 *         for i from 0 <= i < num_relators:
 *             free(c_relators[i])
 *         free(c_relators)             # <<<<<<<<<<<<<<
 *         for i from 0 <= i < num_orig_gens:
 *             free(c_original_generators[i])
 */
  free(__pyx_v_c_relators);

  /* "cython/core/triangulation.pyx":2717
 *             free(c_relators[i])
 *         free(c_relators)
 *         for i from 0 <= i < num_orig_gens:             # <<<<<<<<<<<<<<
 *             free(c_original_generators[i])
 *         free(c_original_generators)
 */
  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_num_orig_gens); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2717, __pyx_L1_error)
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_9; __pyx_v_i++) {

    /* "cython/core/triangulation.pyx":2718
 *         free(c_relators)
 *         for i from 0 <= i < num_orig_gens:
 *             free(c_original_generators[i])             # <<<<<<<<<<<<<<
 *         free(c_original_generators)
 *         free_representation(c_representation, num_generators, num_cusps)
 */
    free((__pyx_v_c_original_generators[__pyx_v_i]));
  }

  /* "cython/core/triangulation.pyx":2719
 *         for i from 0 <= i < num_orig_gens:
 *             free(c_original_generators[i])
 *         free(c_original_generators)             # <<<<<<<<<<<<<<
 *         free_representation(c_representation, num_generators, num_cusps)
 *         # Free at last!
 */
  free(__pyx_v_c_original_generators);

  /* "cython/core/triangulation.pyx":2720
 *             free(c_original_generators[i])
 *         free(c_original_generators)
 *         free_representation(c_representation, num_generators, num_cusps)             # <<<<<<<<<<<<<<
 *         # Free at last!
 * 
 */
  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_num_generators); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2720, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_num_cusps); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2720, __pyx_L1_error)
  free_representation(__pyx_v_c_representation, __pyx_t_9, __pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2720, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2723
 *         # Free at last!
 * 
 *         if failed:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(message)
 *         return c_repn_in_original_gens
 */
  if (unlikely(__pyx_v_failed)) {

    /* "cython/core/triangulation.pyx":2724
 * 
 *         if failed:
 *             raise RuntimeError(message)             # <<<<<<<<<<<<<<
 *         return c_repn_in_original_gens
 * 
 */
    if (unlikely(!__pyx_v_message)) { __Pyx_RaiseUnboundLocalError("message"); __PYX_ERR(3, 2724, __pyx_L1_error) }
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_RuntimeError, __pyx_v_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2724, __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(3, 2724, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2723
 *         # Free at last!
 * 
 *         if failed:             # <<<<<<<<<<<<<<
 *             raise RuntimeError(message)
 *         return c_repn_in_original_gens
 */
  }

  /* "cython/core/triangulation.pyx":2725
 *         if failed:
 *             raise RuntimeError(message)
 *         return c_repn_in_original_gens             # <<<<<<<<<<<<<<
 * 
 *     def set_peripheral_curves(self, peripheral_data,
 */
  __pyx_r = __pyx_v_c_repn_in_original_gens;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":2621
 *         return covers
 * 
 *     cdef RepresentationIntoSn *build_rep_into_Sn(self, perm_list) except ? NULL:             # <<<<<<<<<<<<<<
 *         """
 *         Build a SnapPea RepresentationIntoSn from a list of
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("SnapPy.Triangulation.build_rep_into_Sn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_S);
  __Pyx_XDECREF(__pyx_v_permutation);
  __Pyx_XDECREF(__pyx_v_num_cusps);
  __Pyx_XDECREF(__pyx_v_G);
  __Pyx_XDECREF(__pyx_v_num_generators);
  __Pyx_XDECREF(__pyx_v_relators);
  __Pyx_XDECREF(__pyx_v_num_relators);
  __Pyx_XDECREF(__pyx_v_orig_gens);
  __Pyx_XDECREF(__pyx_v_num_orig_gens);
  __Pyx_XDECREF(__pyx_v_peripheral_curves);
  __Pyx_XDECREF(__pyx_v_meridian);
  __Pyx_XDECREF(__pyx_v_longitude);
  __Pyx_XDECREF(__pyx_v_message);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":2727
 *         return c_repn_in_original_gens
 * 
 *     def set_peripheral_curves(self, peripheral_data,             # <<<<<<<<<<<<<<
 *                               which_cusp=None, return_matrices=False):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_137set_peripheral_curves(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_6SnapPy_13Triangulation_136set_peripheral_curves, "Triangulation.set_peripheral_curves(self, peripheral_data, which_cusp=None, return_matrices=False)\n\n        Each cusp has a preferred marking. In the case of a torus\n        cusp, this is pair of essential simple curves meeting in one\n        point; equivalently, a basis of the first homology of the\n        boundary torus. These curves are called the meridian and the\n        longitude.\n\n        This method changes these markings in various ways.  In many\n        cases, if the flag return_matrices is True then it returns\n        a list of change-of-basis matrices is returned, one per\n        cusp, which will restore the original markings if passed\n        as peripheral_data.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_137set_peripheral_curves = {"set_peripheral_curves", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_137set_peripheral_curves, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_136set_peripheral_curves};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_137set_peripheral_curves(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_peripheral_data = 0;
  PyObject *__pyx_v_which_cusp = 0;
  PyObject *__pyx_v_return_matrices = 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("set_peripheral_curves (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_peripheral_data,&__pyx_n_s_which_cusp,&__pyx_n_s_return_matrices,0};

    /* "cython/core/triangulation.pyx":2728
 * 
 *     def set_peripheral_curves(self, peripheral_data,
 *                               which_cusp=None, return_matrices=False):             # <<<<<<<<<<<<<<
 *         """
 *         Each cusp has a preferred marking. In the case of a torus
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    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_peripheral_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2727, __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_which_cusp);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2727, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_return_matrices);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2727, __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, "set_peripheral_curves") < 0)) __PYX_ERR(3, 2727, __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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_peripheral_data = values[0];
    __pyx_v_which_cusp = values[1];
    __pyx_v_return_matrices = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_peripheral_curves", 0, 1, 3, __pyx_nargs); __PYX_ERR(3, 2727, __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("SnapPy.Triangulation.set_peripheral_curves", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_136set_peripheral_curves(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_peripheral_data, __pyx_v_which_cusp, __pyx_v_return_matrices);

  /* "cython/core/triangulation.pyx":2727
 *         return c_repn_in_original_gens
 * 
 *     def set_peripheral_curves(self, peripheral_data,             # <<<<<<<<<<<<<<
 *                               which_cusp=None, return_matrices=False):
 *         """
 */

  /* 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_6SnapPy_13Triangulation_136set_peripheral_curves(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_peripheral_data, PyObject *__pyx_v_which_cusp, PyObject *__pyx_v_return_matrices) {
  int __pyx_v_a;
  int __pyx_v_b;
  int __pyx_v_c;
  int __pyx_v_d;
  MatrixInt22 *__pyx_v_matrices;
  FuncResult __pyx_v_result;
  PyObject *__pyx_v_cobs = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_meridian = NULL;
  PyObject *__pyx_v_longitude = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_j = NULL;
  PyObject *__pyx_v_basis = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  size_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  int __pyx_t_14;
  int __pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  FuncResult __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_peripheral_curves", 0);
  __Pyx_INCREF(__pyx_v_which_cusp);

  /* "cython/core/triangulation.pyx":2746
 *         cdef c_FuncResult result
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":2747
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty')             # <<<<<<<<<<<<<<
 * 
 *         if which_cusp is not None:
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2747, __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(3, 2747, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2746
 *         cdef c_FuncResult result
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":2749
 *             raise ValueError('The Triangulation is empty')
 * 
 *         if which_cusp is not None:             # <<<<<<<<<<<<<<
 *             which_cusp = valid_index(
 *                 which_cusp, self.num_cusps(),
 */
  __pyx_t_1 = (__pyx_v_which_cusp != Py_None);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":2750
 * 
 *         if which_cusp is not None:
 *             which_cusp = valid_index(             # <<<<<<<<<<<<<<
 *                 which_cusp, self.num_cusps(),
 *                 'The specified cusp (%s) does not exist.')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_valid_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "cython/core/triangulation.pyx":2751
 *         if which_cusp is not None:
 *             which_cusp = valid_index(
 *                 which_cusp, self.num_cusps(),             # <<<<<<<<<<<<<<
 *                 'The specified cusp (%s) does not exist.')
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2751, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_which_cusp, __pyx_t_4, __pyx_kp_s_The_specified_cusp_s_does_not_ex};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2750, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_which_cusp, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/triangulation.pyx":2749
 *             raise ValueError('The Triangulation is empty')
 * 
 *         if which_cusp is not None:             # <<<<<<<<<<<<<<
 *             which_cusp = valid_index(
 *                 which_cusp, self.num_cusps(),
 */
  }

  /* "cython/core/triangulation.pyx":2754
 *                 'The specified cusp (%s) does not exist.')
 * 
 *         self._cache.clear(message='set_peripheral_curves')             # <<<<<<<<<<<<<<
 *         if peripheral_data == 'fillings':
 *             if which_cusp is not None:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_cache, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_message, __pyx_n_s_set_peripheral_curves) < 0) __PYX_ERR(3, 2754, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":2755
 * 
 *         self._cache.clear(message='set_peripheral_curves')
 *         if peripheral_data == 'fillings':             # <<<<<<<<<<<<<<
 *             if which_cusp is not None:
 *                 raise ValueError("You must apply 'fillings' to all "
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_peripheral_data, __pyx_n_s_fillings, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2755, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":2756
 *         self._cache.clear(message='set_peripheral_curves')
 *         if peripheral_data == 'fillings':
 *             if which_cusp is not None:             # <<<<<<<<<<<<<<
 *                 raise ValueError("You must apply 'fillings' to all "
 *                                  "of the cusps.")
 */
    __pyx_t_1 = (__pyx_v_which_cusp != Py_None);
    if (unlikely(__pyx_t_1)) {

      /* "cython/core/triangulation.pyx":2757
 *         if peripheral_data == 'fillings':
 *             if which_cusp is not None:
 *                 raise ValueError("You must apply 'fillings' to all "             # <<<<<<<<<<<<<<
 *                                  "of the cusps.")
 *             install_current_curve_bases(self.c_triangulation)
 */
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2757, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(3, 2757, __pyx_L1_error)

      /* "cython/core/triangulation.pyx":2756
 *         self._cache.clear(message='set_peripheral_curves')
 *         if peripheral_data == 'fillings':
 *             if which_cusp is not None:             # <<<<<<<<<<<<<<
 *                 raise ValueError("You must apply 'fillings' to all "
 *                                  "of the cusps.")
 */
    }

    /* "cython/core/triangulation.pyx":2759
 *                 raise ValueError("You must apply 'fillings' to all "
 *                                  "of the cusps.")
 *             install_current_curve_bases(self.c_triangulation)             # <<<<<<<<<<<<<<
 *             return
 *         elif peripheral_data == 'combinatorial':
 */
    install_current_curve_bases(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2759, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":2760
 *                                  "of the cusps.")
 *             install_current_curve_bases(self.c_triangulation)
 *             return             # <<<<<<<<<<<<<<
 *         elif peripheral_data == 'combinatorial':
 *             if return_matrices:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":2755
 * 
 *         self._cache.clear(message='set_peripheral_curves')
 *         if peripheral_data == 'fillings':             # <<<<<<<<<<<<<<
 *             if which_cusp is not None:
 *                 raise ValueError("You must apply 'fillings' to all "
 */
  }

  /* "cython/core/triangulation.pyx":2761
 *             install_current_curve_bases(self.c_triangulation)
 *             return
 *         elif peripheral_data == 'combinatorial':             # <<<<<<<<<<<<<<
 *             if return_matrices:
 *                 matrices = <MatrixInt22 *>malloc(self.num_cusps() *
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_peripheral_data, __pyx_n_s_combinatorial, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2761, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":2762
 *             return
 *         elif peripheral_data == 'combinatorial':
 *             if return_matrices:             # <<<<<<<<<<<<<<
 *                 matrices = <MatrixInt22 *>malloc(self.num_cusps() *
 *                                                  sizeof(MatrixInt22))
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_return_matrices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2762, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "cython/core/triangulation.pyx":2763
 *         elif peripheral_data == 'combinatorial':
 *             if return_matrices:
 *                 matrices = <MatrixInt22 *>malloc(self.num_cusps() *             # <<<<<<<<<<<<<<
 *                                                  sizeof(MatrixInt22))
 *                 install_combinatorial_bases(self.c_triangulation, matrices)
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = NULL;
      __pyx_t_7 = 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_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2763, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }

      /* "cython/core/triangulation.pyx":2764
 *             if return_matrices:
 *                 matrices = <MatrixInt22 *>malloc(self.num_cusps() *
 *                                                  sizeof(MatrixInt22))             # <<<<<<<<<<<<<<
 *                 install_combinatorial_bases(self.c_triangulation, matrices)
 *                 cobs = []
 */
      __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(MatrixInt22))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

      /* "cython/core/triangulation.pyx":2763
 *         elif peripheral_data == 'combinatorial':
 *             if return_matrices:
 *                 matrices = <MatrixInt22 *>malloc(self.num_cusps() *             # <<<<<<<<<<<<<<
 *                                                  sizeof(MatrixInt22))
 *                 install_combinatorial_bases(self.c_triangulation, matrices)
 */
      __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2763, __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_8 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2763, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_matrices = ((MatrixInt22 *)malloc(__pyx_t_8));

      /* "cython/core/triangulation.pyx":2765
 *                 matrices = <MatrixInt22 *>malloc(self.num_cusps() *
 *                                                  sizeof(MatrixInt22))
 *                 install_combinatorial_bases(self.c_triangulation, matrices)             # <<<<<<<<<<<<<<
 *                 cobs = []
 *                 for n in range(self.num_cusps()):
 */
      install_combinatorial_bases(__pyx_v_self->c_triangulation, __pyx_v_matrices);

      /* "cython/core/triangulation.pyx":2766
 *                                                  sizeof(MatrixInt22))
 *                 install_combinatorial_bases(self.c_triangulation, matrices)
 *                 cobs = []             # <<<<<<<<<<<<<<
 *                 for n in range(self.num_cusps()):
 *                     cobs.append([ [ matrices[n][0][0], matrices[n][0][1] ],
 */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_cobs = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cython/core/triangulation.pyx":2767
 *                 install_combinatorial_bases(self.c_triangulation, matrices)
 *                 cobs = []
 *                 for n in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *                     cobs.append([ [ matrices[n][0][0], matrices[n][0][1] ],
 *                                   [ matrices[n][1][0], matrices[n][1][1] ] ])
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_7 = 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_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2767, __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_range, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
        __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
        __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2767, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2767, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      for (;;) {
        if (likely(!__pyx_t_10)) {
          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(3, 2767, __pyx_L1_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 2767, __pyx_L1_error)
            #else
            __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2767, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            #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(3, 2767, __pyx_L1_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 2767, __pyx_L1_error)
            #else
            __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2767, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            #endif
          }
        } else {
          __pyx_t_3 = __pyx_t_10(__pyx_t_2);
          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(3, 2767, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "cython/core/triangulation.pyx":2768
 *                 cobs = []
 *                 for n in range(self.num_cusps()):
 *                     cobs.append([ [ matrices[n][0][0], matrices[n][0][1] ],             # <<<<<<<<<<<<<<
 *                                   [ matrices[n][1][0], matrices[n][1][1] ] ])
 *                 free(matrices)
 */
        __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2768, __pyx_L1_error)
        __pyx_t_3 = __Pyx_PyInt_From_int((((__pyx_v_matrices[__pyx_t_11])[0])[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2768, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2768, __pyx_L1_error)
        __pyx_t_4 = __Pyx_PyInt_From_int((((__pyx_v_matrices[__pyx_t_11])[0])[1])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2768, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2768, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_3);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(3, 2768, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_4);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(3, 2768, __pyx_L1_error);
        __pyx_t_3 = 0;
        __pyx_t_4 = 0;

        /* "cython/core/triangulation.pyx":2769
 *                 for n in range(self.num_cusps()):
 *                     cobs.append([ [ matrices[n][0][0], matrices[n][0][1] ],
 *                                   [ matrices[n][1][0], matrices[n][1][1] ] ])             # <<<<<<<<<<<<<<
 *                 free(matrices)
 *                 return cobs
 */
        __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2769, __pyx_L1_error)
        __pyx_t_4 = __Pyx_PyInt_From_int((((__pyx_v_matrices[__pyx_t_11])[1])[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2769, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2769, __pyx_L1_error)
        __pyx_t_3 = __Pyx_PyInt_From_int((((__pyx_v_matrices[__pyx_t_11])[1])[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2769, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2769, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_4);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)) __PYX_ERR(3, 2769, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_3);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_3)) __PYX_ERR(3, 2769, __pyx_L1_error);
        __pyx_t_4 = 0;
        __pyx_t_3 = 0;

        /* "cython/core/triangulation.pyx":2768
 *                 cobs = []
 *                 for n in range(self.num_cusps()):
 *                     cobs.append([ [ matrices[n][0][0], matrices[n][0][1] ],             # <<<<<<<<<<<<<<
 *                                   [ matrices[n][1][0], matrices[n][1][1] ] ])
 *                 free(matrices)
 */
        __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2768, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_5);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(3, 2768, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_6);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_6)) __PYX_ERR(3, 2768, __pyx_L1_error);
        __pyx_t_5 = 0;
        __pyx_t_6 = 0;
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_cobs, __pyx_t_3); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(3, 2768, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "cython/core/triangulation.pyx":2767
 *                 install_combinatorial_bases(self.c_triangulation, matrices)
 *                 cobs = []
 *                 for n in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *                     cobs.append([ [ matrices[n][0][0], matrices[n][0][1] ],
 *                                   [ matrices[n][1][0], matrices[n][1][1] ] ])
 */
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/triangulation.pyx":2770
 *                     cobs.append([ [ matrices[n][0][0], matrices[n][0][1] ],
 *                                   [ matrices[n][1][0], matrices[n][1][1] ] ])
 *                 free(matrices)             # <<<<<<<<<<<<<<
 *                 return cobs
 *             else:
 */
      free(__pyx_v_matrices);

      /* "cython/core/triangulation.pyx":2771
 *                                   [ matrices[n][1][0], matrices[n][1][1] ] ])
 *                 free(matrices)
 *                 return cobs             # <<<<<<<<<<<<<<
 *             else:
 *                 peripheral_curves(self.c_triangulation)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_cobs);
      __pyx_r = __pyx_v_cobs;
      goto __pyx_L0;

      /* "cython/core/triangulation.pyx":2762
 *             return
 *         elif peripheral_data == 'combinatorial':
 *             if return_matrices:             # <<<<<<<<<<<<<<
 *                 matrices = <MatrixInt22 *>malloc(self.num_cusps() *
 *                                                  sizeof(MatrixInt22))
 */
    }

    /* "cython/core/triangulation.pyx":2773
 *                 return cobs
 *             else:
 *                 peripheral_curves(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         elif which_cusp is not None:
 *             meridian, longitude = peripheral_data
 */
    /*else*/ {
      peripheral_curves(__pyx_v_self->c_triangulation);
    }

    /* "cython/core/triangulation.pyx":2761
 *             install_current_curve_bases(self.c_triangulation)
 *             return
 *         elif peripheral_data == 'combinatorial':             # <<<<<<<<<<<<<<
 *             if return_matrices:
 *                 matrices = <MatrixInt22 *>malloc(self.num_cusps() *
 */
    goto __pyx_L5;
  }

  /* "cython/core/triangulation.pyx":2774
 *             else:
 *                 peripheral_curves(self.c_triangulation)
 *         elif which_cusp is not None:             # <<<<<<<<<<<<<<
 *             meridian, longitude = peripheral_data
 *             a, b = meridian
 */
  __pyx_t_1 = (__pyx_v_which_cusp != Py_None);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":2775
 *                 peripheral_curves(self.c_triangulation)
 *         elif which_cusp is not None:
 *             meridian, longitude = peripheral_data             # <<<<<<<<<<<<<<
 *             a, b = meridian
 *             c, d = longitude
 */
    if ((likely(PyTuple_CheckExact(__pyx_v_peripheral_data))) || (PyList_CheckExact(__pyx_v_peripheral_data))) {
      PyObject* sequence = __pyx_v_peripheral_data;
      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(3, 2775, __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(3, 2775, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2775, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_v_peripheral_data); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2775, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_2 = __pyx_t_13(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L11_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_3 = __pyx_t_13(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L11_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_6), 2) < 0) __PYX_ERR(3, 2775, __pyx_L1_error)
      __pyx_t_13 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L12_unpacking_done;
      __pyx_L11_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_13 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(3, 2775, __pyx_L1_error)
      __pyx_L12_unpacking_done:;
    }
    __pyx_v_meridian = __pyx_t_2;
    __pyx_t_2 = 0;
    __pyx_v_longitude = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":2776
 *         elif which_cusp is not None:
 *             meridian, longitude = peripheral_data
 *             a, b = meridian             # <<<<<<<<<<<<<<
 *             c, d = longitude
 *             if a*d - b*c != 1 and (self.is_orientable() or a*d - b*c != -1):
 */
    if ((likely(PyTuple_CheckExact(__pyx_v_meridian))) || (PyList_CheckExact(__pyx_v_meridian))) {
      PyObject* sequence = __pyx_v_meridian;
      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(3, 2776, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2776, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2776, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_v_meridian); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2776, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_3 = __pyx_t_13(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L13_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_2 = __pyx_t_13(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L13_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_6), 2) < 0) __PYX_ERR(3, 2776, __pyx_L1_error)
      __pyx_t_13 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L14_unpacking_done;
      __pyx_L13_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_13 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(3, 2776, __pyx_L1_error)
      __pyx_L14_unpacking_done:;
    }
    __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2776, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2776, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_a = __pyx_t_7;
    __pyx_v_b = __pyx_t_14;

    /* "cython/core/triangulation.pyx":2777
 *             meridian, longitude = peripheral_data
 *             a, b = meridian
 *             c, d = longitude             # <<<<<<<<<<<<<<
 *             if a*d - b*c != 1 and (self.is_orientable() or a*d - b*c != -1):
 *                 if self.is_orientable():
 */
    if ((likely(PyTuple_CheckExact(__pyx_v_longitude))) || (PyList_CheckExact(__pyx_v_longitude))) {
      PyObject* sequence = __pyx_v_longitude;
      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(3, 2777, __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(3, 2777, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2777, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_v_longitude); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2777, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_2 = __pyx_t_13(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L15_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_3 = __pyx_t_13(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L15_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_6), 2) < 0) __PYX_ERR(3, 2777, __pyx_L1_error)
      __pyx_t_13 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L16_unpacking_done;
      __pyx_L15_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_13 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(3, 2777, __pyx_L1_error)
      __pyx_L16_unpacking_done:;
    }
    __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2777, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2777, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_c = __pyx_t_14;
    __pyx_v_d = __pyx_t_7;

    /* "cython/core/triangulation.pyx":2778
 *             a, b = meridian
 *             c, d = longitude
 *             if a*d - b*c != 1 and (self.is_orientable() or a*d - b*c != -1):             # <<<<<<<<<<<<<<
 *                 if self.is_orientable():
 *                     raise ValueError('The data provided does not give a '
 */
    __pyx_t_15 = (((__pyx_v_a * __pyx_v_d) - (__pyx_v_b * __pyx_v_c)) != 1);
    if (__pyx_t_15) {
    } else {
      __pyx_t_1 = __pyx_t_15;
      goto __pyx_L18_bool_binop_done;
    }
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_orientable); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2778, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(3, 2778, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_15) {
    } else {
      __pyx_t_1 = __pyx_t_15;
      goto __pyx_L18_bool_binop_done;
    }
    __pyx_t_15 = (((__pyx_v_a * __pyx_v_d) - (__pyx_v_b * __pyx_v_c)) != -1L);
    __pyx_t_1 = __pyx_t_15;
    __pyx_L18_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cython/core/triangulation.pyx":2779
 *             c, d = longitude
 *             if a*d - b*c != 1 and (self.is_orientable() or a*d - b*c != -1):
 *                 if self.is_orientable():             # <<<<<<<<<<<<<<
 *                     raise ValueError('The data provided does not give a '
 *                                      '(positively oriented) basis.')
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_orientable); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2779, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2779, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2779, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(__pyx_t_1)) {

        /* "cython/core/triangulation.pyx":2780
 *             if a*d - b*c != 1 and (self.is_orientable() or a*d - b*c != -1):
 *                 if self.is_orientable():
 *                     raise ValueError('The data provided does not give a '             # <<<<<<<<<<<<<<
 *                                      '(positively oriented) basis.')
 *                 else:
 */
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2780, __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(3, 2780, __pyx_L1_error)

        /* "cython/core/triangulation.pyx":2779
 *             c, d = longitude
 *             if a*d - b*c != 1 and (self.is_orientable() or a*d - b*c != -1):
 *                 if self.is_orientable():             # <<<<<<<<<<<<<<
 *                     raise ValueError('The data provided does not give a '
 *                                      '(positively oriented) basis.')
 */
      }

      /* "cython/core/triangulation.pyx":2783
 *                                      '(positively oriented) basis.')
 *                 else:
 *                     raise ValueError('The data provided does not give a basis.')             # <<<<<<<<<<<<<<
 * 
 *             if 'Klein' in self.cusp_info(which_cusp)['topology']:
 */
      /*else*/ {
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2783, __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(3, 2783, __pyx_L1_error)
      }

      /* "cython/core/triangulation.pyx":2778
 *             a, b = meridian
 *             c, d = longitude
 *             if a*d - b*c != 1 and (self.is_orientable() or a*d - b*c != -1):             # <<<<<<<<<<<<<<
 *                 if self.is_orientable():
 *                     raise ValueError('The data provided does not give a '
 */
    }

    /* "cython/core/triangulation.pyx":2785
 *                     raise ValueError('The data provided does not give a basis.')
 * 
 *             if 'Klein' in self.cusp_info(which_cusp)['topology']:             # <<<<<<<<<<<<<<
 *                 if b != 0 or c != 0:
 *                     raise ValueError('The data provided are invalid for Klein '
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_which_cusp};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2785, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_topology); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_Klein, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2785, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "cython/core/triangulation.pyx":2786
 * 
 *             if 'Klein' in self.cusp_info(which_cusp)['topology']:
 *                 if b != 0 or c != 0:             # <<<<<<<<<<<<<<
 *                     raise ValueError('The data provided are invalid for Klein '
 *                                      'bottle cusps.')
 */
      __pyx_t_15 = (__pyx_v_b != 0);
      if (!__pyx_t_15) {
      } else {
        __pyx_t_1 = __pyx_t_15;
        goto __pyx_L24_bool_binop_done;
      }
      __pyx_t_15 = (__pyx_v_c != 0);
      __pyx_t_1 = __pyx_t_15;
      __pyx_L24_bool_binop_done:;
      if (unlikely(__pyx_t_1)) {

        /* "cython/core/triangulation.pyx":2787
 *             if 'Klein' in self.cusp_info(which_cusp)['topology']:
 *                 if b != 0 or c != 0:
 *                     raise ValueError('The data provided are invalid for Klein '             # <<<<<<<<<<<<<<
 *                                      'bottle cusps.')
 * 
 */
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2787, __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(3, 2787, __pyx_L1_error)

        /* "cython/core/triangulation.pyx":2786
 * 
 *             if 'Klein' in self.cusp_info(which_cusp)['topology']:
 *                 if b != 0 or c != 0:             # <<<<<<<<<<<<<<
 *                     raise ValueError('The data provided are invalid for Klein '
 *                                      'bottle cusps.')
 */
      }

      /* "cython/core/triangulation.pyx":2785
 *                     raise ValueError('The data provided does not give a basis.')
 * 
 *             if 'Klein' in self.cusp_info(which_cusp)['topology']:             # <<<<<<<<<<<<<<
 *                 if b != 0 or c != 0:
 *                     raise ValueError('The data provided are invalid for Klein '
 */
    }

    /* "cython/core/triangulation.pyx":2790
 *                                      'bottle cusps.')
 * 
 *             matrices = <MatrixInt22 *>malloc(self.num_cusps() *             # <<<<<<<<<<<<<<
 *                                              sizeof(MatrixInt22))
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2790, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }

    /* "cython/core/triangulation.pyx":2791
 * 
 *             matrices = <MatrixInt22 *>malloc(self.num_cusps() *
 *                                              sizeof(MatrixInt22))             # <<<<<<<<<<<<<<
 * 
 *             for n in range(self.num_cusps()):
 */
    __pyx_t_3 = __Pyx_PyInt_FromSize_t((sizeof(MatrixInt22))); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2791, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "cython/core/triangulation.pyx":2790
 *                                      'bottle cusps.')
 * 
 *             matrices = <MatrixInt22 *>malloc(self.num_cusps() *             # <<<<<<<<<<<<<<
 *                                              sizeof(MatrixInt22))
 * 
 */
    __pyx_t_6 = PyNumber_Multiply(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_6); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2790, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_matrices = ((MatrixInt22 *)malloc(__pyx_t_8));

    /* "cython/core/triangulation.pyx":2793
 *                                              sizeof(MatrixInt22))
 * 
 *             for n in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *                 for i,j in [(0,0),(0,1),(1,0),(1,1)]:
 *                     matrices[n][i][j] = 1 if i == j else 0
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    __pyx_t_7 = 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_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6);
      __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2793, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 2793, __pyx_L1_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 2793, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2793, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 2793, __pyx_L1_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 2793, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2793, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_10(__pyx_t_6);
        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(3, 2793, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cython/core/triangulation.pyx":2794
 * 
 *             for n in range(self.num_cusps()):
 *                 for i,j in [(0,0),(0,1),(1,0),(1,1)]:             # <<<<<<<<<<<<<<
 *                     matrices[n][i][j] = 1 if i == j else 0
 * 
 */
      __pyx_t_3 = __pyx_tuple__78; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_11 = 0;
      for (;;) {
        if (__pyx_t_11 >= 4) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(3, 2794, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2794, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
        if (likely(__pyx_t_2 != Py_None)) {
          PyObject* sequence = __pyx_t_2;
          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(3, 2794, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          #else
          __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2794, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2794, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(3, 2794, __pyx_L1_error)
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "cython/core/triangulation.pyx":2795
 *             for n in range(self.num_cusps()):
 *                 for i,j in [(0,0),(0,1),(1,0),(1,1)]:
 *                     matrices[n][i][j] = 1 if i == j else 0             # <<<<<<<<<<<<<<
 * 
 *             matrices[which_cusp][0][0] = a
 */
        __pyx_t_2 = PyObject_RichCompare(__pyx_v_i, __pyx_v_j, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2795, __pyx_L1_error)
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2795, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_1) {
          __pyx_t_7 = 1;
        } else {
          __pyx_t_7 = 0;
        }
        __pyx_t_16 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_16 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2795, __pyx_L1_error)
        __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2795, __pyx_L1_error)
        __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_v_j); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2795, __pyx_L1_error)
        (((__pyx_v_matrices[__pyx_t_16])[__pyx_t_17])[__pyx_t_18]) = __pyx_t_7;

        /* "cython/core/triangulation.pyx":2794
 * 
 *             for n in range(self.num_cusps()):
 *                 for i,j in [(0,0),(0,1),(1,0),(1,1)]:             # <<<<<<<<<<<<<<
 *                     matrices[n][i][j] = 1 if i == j else 0
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cython/core/triangulation.pyx":2793
 *                                              sizeof(MatrixInt22))
 * 
 *             for n in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *                 for i,j in [(0,0),(0,1),(1,0),(1,1)]:
 *                     matrices[n][i][j] = 1 if i == j else 0
 */
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "cython/core/triangulation.pyx":2797
 *                     matrices[n][i][j] = 1 if i == j else 0
 * 
 *             matrices[which_cusp][0][0] = a             # <<<<<<<<<<<<<<
 *             matrices[which_cusp][0][1] = b
 *             matrices[which_cusp][1][0] = c
 */
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_which_cusp); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2797, __pyx_L1_error)
    (((__pyx_v_matrices[__pyx_t_9])[0])[0]) = __pyx_v_a;

    /* "cython/core/triangulation.pyx":2798
 * 
 *             matrices[which_cusp][0][0] = a
 *             matrices[which_cusp][0][1] = b             # <<<<<<<<<<<<<<
 *             matrices[which_cusp][1][0] = c
 *             matrices[which_cusp][1][1] = d
 */
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_which_cusp); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2798, __pyx_L1_error)
    (((__pyx_v_matrices[__pyx_t_9])[0])[1]) = __pyx_v_b;

    /* "cython/core/triangulation.pyx":2799
 *             matrices[which_cusp][0][0] = a
 *             matrices[which_cusp][0][1] = b
 *             matrices[which_cusp][1][0] = c             # <<<<<<<<<<<<<<
 *             matrices[which_cusp][1][1] = d
 *             if self.is_orientable():
 */
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_which_cusp); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2799, __pyx_L1_error)
    (((__pyx_v_matrices[__pyx_t_9])[1])[0]) = __pyx_v_c;

    /* "cython/core/triangulation.pyx":2800
 *             matrices[which_cusp][0][1] = b
 *             matrices[which_cusp][1][0] = c
 *             matrices[which_cusp][1][1] = d             # <<<<<<<<<<<<<<
 *             if self.is_orientable():
 *                 result = change_peripheral_curves(self.c_triangulation, matrices)
 */
    __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_which_cusp); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2800, __pyx_L1_error)
    (((__pyx_v_matrices[__pyx_t_9])[1])[1]) = __pyx_v_d;

    /* "cython/core/triangulation.pyx":2801
 *             matrices[which_cusp][1][0] = c
 *             matrices[which_cusp][1][1] = d
 *             if self.is_orientable():             # <<<<<<<<<<<<<<
 *                 result = change_peripheral_curves(self.c_triangulation, matrices)
 *             else:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_orientable); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2801, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    __pyx_t_7 = 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_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2801, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2801, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_1) {

      /* "cython/core/triangulation.pyx":2802
 *             matrices[which_cusp][1][1] = d
 *             if self.is_orientable():
 *                 result = change_peripheral_curves(self.c_triangulation, matrices)             # <<<<<<<<<<<<<<
 *             else:
 *                 result = change_peripheral_curves_nonorientable(
 */
      __pyx_t_19 = change_peripheral_curves(__pyx_v_self->c_triangulation, __pyx_v_matrices); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2802, __pyx_L1_error)
      __pyx_v_result = __pyx_t_19;

      /* "cython/core/triangulation.pyx":2801
 *             matrices[which_cusp][1][0] = c
 *             matrices[which_cusp][1][1] = d
 *             if self.is_orientable():             # <<<<<<<<<<<<<<
 *                 result = change_peripheral_curves(self.c_triangulation, matrices)
 *             else:
 */
      goto __pyx_L32;
    }

    /* "cython/core/triangulation.pyx":2804
 *                 result = change_peripheral_curves(self.c_triangulation, matrices)
 *             else:
 *                 result = change_peripheral_curves_nonorientable(             # <<<<<<<<<<<<<<
 *                     self.c_triangulation, matrices)
 *             free(matrices)
 */
    /*else*/ {

      /* "cython/core/triangulation.pyx":2805
 *             else:
 *                 result = change_peripheral_curves_nonorientable(
 *                     self.c_triangulation, matrices)             # <<<<<<<<<<<<<<
 *             free(matrices)
 *             if result == func_bad_input:
 */
      __pyx_v_result = change_peripheral_curves_nonorientable(__pyx_v_self->c_triangulation, __pyx_v_matrices);
    }
    __pyx_L32:;

    /* "cython/core/triangulation.pyx":2806
 *                 result = change_peripheral_curves_nonorientable(
 *                     self.c_triangulation, matrices)
 *             free(matrices)             # <<<<<<<<<<<<<<
 *             if result == func_bad_input:
 *                 raise ValueError('The peripheral data ((%d, %d), (%d,%d)) '
 */
    free(__pyx_v_matrices);

    /* "cython/core/triangulation.pyx":2807
 *                     self.c_triangulation, matrices)
 *             free(matrices)
 *             if result == func_bad_input:             # <<<<<<<<<<<<<<
 *                 raise ValueError('The peripheral data ((%d, %d), (%d,%d)) '
 *                                  'is not acceptable.' % (a,b,c,d))
 */
    __pyx_t_1 = (__pyx_v_result == func_bad_input);
    if (unlikely(__pyx_t_1)) {

      /* "cython/core/triangulation.pyx":2809
 *             if result == func_bad_input:
 *                 raise ValueError('The peripheral data ((%d, %d), (%d,%d)) '
 *                                  'is not acceptable.' % (a,b,c,d))             # <<<<<<<<<<<<<<
 * 
 *         else:
 */
      __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_a); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2809, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_b); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2809, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_c); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2809, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2809, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2809, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6)) __PYX_ERR(3, 2809, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3)) __PYX_ERR(3, 2809, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_2)) __PYX_ERR(3, 2809, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4)) __PYX_ERR(3, 2809, __pyx_L1_error);
      __pyx_t_6 = 0;
      __pyx_t_3 = 0;
      __pyx_t_2 = 0;
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_The_peripheral_data_d_d_d_d_is_n, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2809, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cython/core/triangulation.pyx":2808
 *             free(matrices)
 *             if result == func_bad_input:
 *                 raise ValueError('The peripheral data ((%d, %d), (%d,%d)) '             # <<<<<<<<<<<<<<
 *                                  'is not acceptable.' % (a,b,c,d))
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2808, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __PYX_ERR(3, 2808, __pyx_L1_error)

      /* "cython/core/triangulation.pyx":2807
 *                     self.c_triangulation, matrices)
 *             free(matrices)
 *             if result == func_bad_input:             # <<<<<<<<<<<<<<
 *                 raise ValueError('The peripheral data ((%d, %d), (%d,%d)) '
 *                                  'is not acceptable.' % (a,b,c,d))
 */
    }

    /* "cython/core/triangulation.pyx":2774
 *             else:
 *                 peripheral_curves(self.c_triangulation)
 *         elif which_cusp is not None:             # <<<<<<<<<<<<<<
 *             meridian, longitude = peripheral_data
 *             a, b = meridian
 */
    goto __pyx_L5;
  }

  /* "cython/core/triangulation.pyx":2812
 * 
 *         else:
 *             if self.num_cusps() == 1 and len(peripheral_data) == 2:             # <<<<<<<<<<<<<<
 *                 self.set_peripheral_curves(peripheral_data, 0)
 *                 return
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2812, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_t_15 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_5, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(3, 2812, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_15) {
    } else {
      __pyx_t_1 = __pyx_t_15;
      goto __pyx_L35_bool_binop_done;
    }
    __pyx_t_9 = PyObject_Length(__pyx_v_peripheral_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2812, __pyx_L1_error)
    __pyx_t_15 = (__pyx_t_9 == 2);
    __pyx_t_1 = __pyx_t_15;
    __pyx_L35_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cython/core/triangulation.pyx":2813
 *         else:
 *             if self.num_cusps() == 1 and len(peripheral_data) == 2:
 *                 self.set_peripheral_curves(peripheral_data, 0)             # <<<<<<<<<<<<<<
 *                 return
 *             if len(peripheral_data) > self.num_cusps():
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_peripheral_curves); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2813, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_peripheral_data, __pyx_int_0};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2813, __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;

      /* "cython/core/triangulation.pyx":2814
 *             if self.num_cusps() == 1 and len(peripheral_data) == 2:
 *                 self.set_peripheral_curves(peripheral_data, 0)
 *                 return             # <<<<<<<<<<<<<<
 *             if len(peripheral_data) > self.num_cusps():
 *                 raise IndexError('You provided more peripheral data '
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "cython/core/triangulation.pyx":2812
 * 
 *         else:
 *             if self.num_cusps() == 1 and len(peripheral_data) == 2:             # <<<<<<<<<<<<<<
 *                 self.set_peripheral_curves(peripheral_data, 0)
 *                 return
 */
    }

    /* "cython/core/triangulation.pyx":2815
 *                 self.set_peripheral_curves(peripheral_data, 0)
 *                 return
 *             if len(peripheral_data) > self.num_cusps():             # <<<<<<<<<<<<<<
 *                 raise IndexError('You provided more peripheral data '
 *                                  'than there are cusps.')
 */
    __pyx_t_9 = PyObject_Length(__pyx_v_peripheral_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(3, 2815, __pyx_L1_error)
    __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_7 = 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_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2815, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2815, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2815, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(__pyx_t_1)) {

      /* "cython/core/triangulation.pyx":2816
 *                 return
 *             if len(peripheral_data) > self.num_cusps():
 *                 raise IndexError('You provided more peripheral data '             # <<<<<<<<<<<<<<
 *                                  'than there are cusps.')
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2816, __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(3, 2816, __pyx_L1_error)

      /* "cython/core/triangulation.pyx":2815
 *                 self.set_peripheral_curves(peripheral_data, 0)
 *                 return
 *             if len(peripheral_data) > self.num_cusps():             # <<<<<<<<<<<<<<
 *                 raise IndexError('You provided more peripheral data '
 *                                  'than there are cusps.')
 */
    }

    /* "cython/core/triangulation.pyx":2819
 *                                  'than there are cusps.')
 * 
 *             matrices = <MatrixInt22 *>malloc(self.num_cusps() *             # <<<<<<<<<<<<<<
 *                                              sizeof(MatrixInt22))
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    __pyx_t_7 = 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_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }

    /* "cython/core/triangulation.pyx":2820
 * 
 *             matrices = <MatrixInt22 *>malloc(self.num_cusps() *
 *                                              sizeof(MatrixInt22))             # <<<<<<<<<<<<<<
 * 
 *             for n in range(self.num_cusps()):
 */
    __pyx_t_4 = __Pyx_PyInt_FromSize_t((sizeof(MatrixInt22))); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2820, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);

    /* "cython/core/triangulation.pyx":2819
 *                                  'than there are cusps.')
 * 
 *             matrices = <MatrixInt22 *>malloc(self.num_cusps() *             # <<<<<<<<<<<<<<
 *                                              sizeof(MatrixInt22))
 * 
 */
    __pyx_t_5 = PyNumber_Multiply(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2819, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_matrices = ((MatrixInt22 *)malloc(__pyx_t_8));

    /* "cython/core/triangulation.pyx":2822
 *                                              sizeof(MatrixInt22))
 * 
 *             for n in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *                 for i, j in [(0, 0), (0, 1), (1, 0), (1, 1)]:
 *                     matrices[n][i][j] = 1 if i == j else 0
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2822, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_5 = __pyx_t_4; __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_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2822, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2822, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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(3, 2822, __pyx_L1_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 2822, __pyx_L1_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2822, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #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(3, 2822, __pyx_L1_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 2822, __pyx_L1_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2822, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_10(__pyx_t_5);
        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(3, 2822, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "cython/core/triangulation.pyx":2823
 * 
 *             for n in range(self.num_cusps()):
 *                 for i, j in [(0, 0), (0, 1), (1, 0), (1, 1)]:             # <<<<<<<<<<<<<<
 *                     matrices[n][i][j] = 1 if i == j else 0
 * 
 */
      __pyx_t_4 = __pyx_tuple__78; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_11 = 0;
      for (;;) {
        if (__pyx_t_11 >= 4) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(3, 2823, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2823, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
        if (likely(__pyx_t_2 != Py_None)) {
          PyObject* sequence = __pyx_t_2;
          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(3, 2823, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_6);
          #else
          __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2823, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2823, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        } else {
          __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(3, 2823, __pyx_L1_error)
        }
        __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "cython/core/triangulation.pyx":2824
 *             for n in range(self.num_cusps()):
 *                 for i, j in [(0, 0), (0, 1), (1, 0), (1, 1)]:
 *                     matrices[n][i][j] = 1 if i == j else 0             # <<<<<<<<<<<<<<
 * 
 *             for i, basis in enumerate(peripheral_data):
 */
        __pyx_t_2 = PyObject_RichCompare(__pyx_v_i, __pyx_v_j, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2824, __pyx_L1_error)
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2824, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_1) {
          __pyx_t_7 = 1;
        } else {
          __pyx_t_7 = 0;
        }
        __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2824, __pyx_L1_error)
        __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2824, __pyx_L1_error)
        __pyx_t_16 = __Pyx_PyIndex_AsSsize_t(__pyx_v_j); if (unlikely((__pyx_t_16 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2824, __pyx_L1_error)
        (((__pyx_v_matrices[__pyx_t_18])[__pyx_t_17])[__pyx_t_16]) = __pyx_t_7;

        /* "cython/core/triangulation.pyx":2823
 * 
 *             for n in range(self.num_cusps()):
 *                 for i, j in [(0, 0), (0, 1), (1, 0), (1, 1)]:             # <<<<<<<<<<<<<<
 *                     matrices[n][i][j] = 1 if i == j else 0
 * 
 */
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/triangulation.pyx":2822
 *                                              sizeof(MatrixInt22))
 * 
 *             for n in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *                 for i, j in [(0, 0), (0, 1), (1, 0), (1, 1)]:
 *                     matrices[n][i][j] = 1 if i == j else 0
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/triangulation.pyx":2826
 *                     matrices[n][i][j] = 1 if i == j else 0
 * 
 *             for i, basis in enumerate(peripheral_data):             # <<<<<<<<<<<<<<
 * 
 *                 meridian, longitude = basis
 */
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_5 = __pyx_int_0;
    if (likely(PyList_CheckExact(__pyx_v_peripheral_data)) || PyTuple_CheckExact(__pyx_v_peripheral_data)) {
      __pyx_t_4 = __pyx_v_peripheral_data; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_peripheral_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2826, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 2826, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_10)) {
        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(3, 2826, __pyx_L1_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_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 2826, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2826, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #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(3, 2826, __pyx_L1_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_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(3, 2826, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2826, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_10(__pyx_t_4);
        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(3, 2826, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_basis, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
      __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2826, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5);
      __pyx_t_5 = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "cython/core/triangulation.pyx":2828
 *             for i, basis in enumerate(peripheral_data):
 * 
 *                 meridian, longitude = basis             # <<<<<<<<<<<<<<
 *                 a, b = meridian
 *                 c, d = longitude
 */
      if ((likely(PyTuple_CheckExact(__pyx_v_basis))) || (PyList_CheckExact(__pyx_v_basis))) {
        PyObject* sequence = __pyx_v_basis;
        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(3, 2828, __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_6 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2828, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2828, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        Py_ssize_t index = -1;
        __pyx_t_3 = PyObject_GetIter(__pyx_v_basis); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2828, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
        index = 0; __pyx_t_2 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L46_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_6 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L46_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_3), 2) < 0) __PYX_ERR(3, 2828, __pyx_L1_error)
        __pyx_t_13 = NULL;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L47_unpacking_done;
        __pyx_L46_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_13 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(3, 2828, __pyx_L1_error)
        __pyx_L47_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_meridian, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_longitude, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "cython/core/triangulation.pyx":2829
 * 
 *                 meridian, longitude = basis
 *                 a, b = meridian             # <<<<<<<<<<<<<<
 *                 c, d = longitude
 *                 if a*d - b*c != 1 and (self.is_orientable() or a*d - b*c != -1):
 */
      if ((likely(PyTuple_CheckExact(__pyx_v_meridian))) || (PyList_CheckExact(__pyx_v_meridian))) {
        PyObject* sequence = __pyx_v_meridian;
        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(3, 2829, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_2);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2829, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2829, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        Py_ssize_t index = -1;
        __pyx_t_3 = PyObject_GetIter(__pyx_v_meridian); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2829, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
        index = 0; __pyx_t_6 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L48_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_2 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L48_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_3), 2) < 0) __PYX_ERR(3, 2829, __pyx_L1_error)
        __pyx_t_13 = NULL;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L49_unpacking_done;
        __pyx_L48_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_13 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(3, 2829, __pyx_L1_error)
        __pyx_L49_unpacking_done:;
      }
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2829, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2829, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_a = __pyx_t_7;
      __pyx_v_b = __pyx_t_14;

      /* "cython/core/triangulation.pyx":2830
 *                 meridian, longitude = basis
 *                 a, b = meridian
 *                 c, d = longitude             # <<<<<<<<<<<<<<
 *                 if a*d - b*c != 1 and (self.is_orientable() or a*d - b*c != -1):
 *                     if self.is_orientable():
 */
      if ((likely(PyTuple_CheckExact(__pyx_v_longitude))) || (PyList_CheckExact(__pyx_v_longitude))) {
        PyObject* sequence = __pyx_v_longitude;
        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(3, 2830, __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_6 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2830, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2830, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
      } else {
        Py_ssize_t index = -1;
        __pyx_t_3 = PyObject_GetIter(__pyx_v_longitude); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2830, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
        index = 0; __pyx_t_2 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L50_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_6 = __pyx_t_13(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L50_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_3), 2) < 0) __PYX_ERR(3, 2830, __pyx_L1_error)
        __pyx_t_13 = NULL;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L51_unpacking_done;
        __pyx_L50_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_13 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(3, 2830, __pyx_L1_error)
        __pyx_L51_unpacking_done:;
      }
      __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2830, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 2830, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_v_c = __pyx_t_14;
      __pyx_v_d = __pyx_t_7;

      /* "cython/core/triangulation.pyx":2831
 *                 a, b = meridian
 *                 c, d = longitude
 *                 if a*d - b*c != 1 and (self.is_orientable() or a*d - b*c != -1):             # <<<<<<<<<<<<<<
 *                     if self.is_orientable():
 *                         free(matrices)
 */
      __pyx_t_15 = (((__pyx_v_a * __pyx_v_d) - (__pyx_v_b * __pyx_v_c)) != 1);
      if (__pyx_t_15) {
      } else {
        __pyx_t_1 = __pyx_t_15;
        goto __pyx_L53_bool_binop_done;
      }
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_orientable); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2831, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_7 = 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_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2831, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(3, 2831, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (!__pyx_t_15) {
      } else {
        __pyx_t_1 = __pyx_t_15;
        goto __pyx_L53_bool_binop_done;
      }
      __pyx_t_15 = (((__pyx_v_a * __pyx_v_d) - (__pyx_v_b * __pyx_v_c)) != -1L);
      __pyx_t_1 = __pyx_t_15;
      __pyx_L53_bool_binop_done:;
      if (__pyx_t_1) {

        /* "cython/core/triangulation.pyx":2832
 *                 c, d = longitude
 *                 if a*d - b*c != 1 and (self.is_orientable() or a*d - b*c != -1):
 *                     if self.is_orientable():             # <<<<<<<<<<<<<<
 *                         free(matrices)
 *                         raise ValueError('The data provided does not give a '
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_orientable); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2832, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = NULL;
        __pyx_t_7 = 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_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2832, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2832, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(__pyx_t_1)) {

          /* "cython/core/triangulation.pyx":2833
 *                 if a*d - b*c != 1 and (self.is_orientable() or a*d - b*c != -1):
 *                     if self.is_orientable():
 *                         free(matrices)             # <<<<<<<<<<<<<<
 *                         raise ValueError('The data provided does not give a '
 *                                          '(positively oriented) basis.')
 */
          free(__pyx_v_matrices);

          /* "cython/core/triangulation.pyx":2834
 *                     if self.is_orientable():
 *                         free(matrices)
 *                         raise ValueError('The data provided does not give a '             # <<<<<<<<<<<<<<
 *                                          '(positively oriented) basis.')
 *                     else:
 */
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2834, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_Raise(__pyx_t_6, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __PYX_ERR(3, 2834, __pyx_L1_error)

          /* "cython/core/triangulation.pyx":2832
 *                 c, d = longitude
 *                 if a*d - b*c != 1 and (self.is_orientable() or a*d - b*c != -1):
 *                     if self.is_orientable():             # <<<<<<<<<<<<<<
 *                         free(matrices)
 *                         raise ValueError('The data provided does not give a '
 */
        }

        /* "cython/core/triangulation.pyx":2837
 *                                          '(positively oriented) basis.')
 *                     else:
 *                         free(matrices)             # <<<<<<<<<<<<<<
 *                         raise ValueError('The data provided does not give a '
 *                                          'basis.')
 */
        /*else*/ {
          free(__pyx_v_matrices);

          /* "cython/core/triangulation.pyx":2838
 *                     else:
 *                         free(matrices)
 *                         raise ValueError('The data provided does not give a '             # <<<<<<<<<<<<<<
 *                                          'basis.')
 * 
 */
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2838, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_Raise(__pyx_t_6, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __PYX_ERR(3, 2838, __pyx_L1_error)
        }

        /* "cython/core/triangulation.pyx":2831
 *                 a, b = meridian
 *                 c, d = longitude
 *                 if a*d - b*c != 1 and (self.is_orientable() or a*d - b*c != -1):             # <<<<<<<<<<<<<<
 *                     if self.is_orientable():
 *                         free(matrices)
 */
      }

      /* "cython/core/triangulation.pyx":2841
 *                                          'basis.')
 * 
 *                 if 'Klein' in self.cusp_info(i)['topology']:             # <<<<<<<<<<<<<<
 *                     if b != 0 or c != 0:
 *                         free(matrices)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2841, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_7 = 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_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_i};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 2841, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_s_topology); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2841, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_Klein, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 2841, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_1) {

        /* "cython/core/triangulation.pyx":2842
 * 
 *                 if 'Klein' in self.cusp_info(i)['topology']:
 *                     if b != 0 or c != 0:             # <<<<<<<<<<<<<<
 *                         free(matrices)
 *                         raise ValueError('The data provided are invalid for '
 */
        __pyx_t_15 = (__pyx_v_b != 0);
        if (!__pyx_t_15) {
        } else {
          __pyx_t_1 = __pyx_t_15;
          goto __pyx_L59_bool_binop_done;
        }
        __pyx_t_15 = (__pyx_v_c != 0);
        __pyx_t_1 = __pyx_t_15;
        __pyx_L59_bool_binop_done:;
        if (unlikely(__pyx_t_1)) {

          /* "cython/core/triangulation.pyx":2843
 *                 if 'Klein' in self.cusp_info(i)['topology']:
 *                     if b != 0 or c != 0:
 *                         free(matrices)             # <<<<<<<<<<<<<<
 *                         raise ValueError('The data provided are invalid for '
 *                                          'Klein bottle cusps.')
 */
          free(__pyx_v_matrices);

          /* "cython/core/triangulation.pyx":2844
 *                     if b != 0 or c != 0:
 *                         free(matrices)
 *                         raise ValueError('The data provided are invalid for '             # <<<<<<<<<<<<<<
 *                                          'Klein bottle cusps.')
 * 
 */
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 2844, __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(3, 2844, __pyx_L1_error)

          /* "cython/core/triangulation.pyx":2842
 * 
 *                 if 'Klein' in self.cusp_info(i)['topology']:
 *                     if b != 0 or c != 0:             # <<<<<<<<<<<<<<
 *                         free(matrices)
 *                         raise ValueError('The data provided are invalid for '
 */
        }

        /* "cython/core/triangulation.pyx":2841
 *                                          'basis.')
 * 
 *                 if 'Klein' in self.cusp_info(i)['topology']:             # <<<<<<<<<<<<<<
 *                     if b != 0 or c != 0:
 *                         free(matrices)
 */
      }

      /* "cython/core/triangulation.pyx":2847
 *                                          'Klein bottle cusps.')
 * 
 *                 matrices[i][0][0] = a             # <<<<<<<<<<<<<<
 *                 matrices[i][0][1] = b
 *                 matrices[i][1][0] = c
 */
      __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2847, __pyx_L1_error)
      (((__pyx_v_matrices[__pyx_t_11])[0])[0]) = __pyx_v_a;

      /* "cython/core/triangulation.pyx":2848
 * 
 *                 matrices[i][0][0] = a
 *                 matrices[i][0][1] = b             # <<<<<<<<<<<<<<
 *                 matrices[i][1][0] = c
 *                 matrices[i][1][1] = d
 */
      __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2848, __pyx_L1_error)
      (((__pyx_v_matrices[__pyx_t_11])[0])[1]) = __pyx_v_b;

      /* "cython/core/triangulation.pyx":2849
 *                 matrices[i][0][0] = a
 *                 matrices[i][0][1] = b
 *                 matrices[i][1][0] = c             # <<<<<<<<<<<<<<
 *                 matrices[i][1][1] = d
 * 
 */
      __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2849, __pyx_L1_error)
      (((__pyx_v_matrices[__pyx_t_11])[1])[0]) = __pyx_v_c;

      /* "cython/core/triangulation.pyx":2850
 *                 matrices[i][0][1] = b
 *                 matrices[i][1][0] = c
 *                 matrices[i][1][1] = d             # <<<<<<<<<<<<<<
 * 
 *             if self.is_orientable():
 */
      __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 2850, __pyx_L1_error)
      (((__pyx_v_matrices[__pyx_t_11])[1])[1]) = __pyx_v_d;

      /* "cython/core/triangulation.pyx":2826
 *                     matrices[n][i][j] = 1 if i == j else 0
 * 
 *             for i, basis in enumerate(peripheral_data):             # <<<<<<<<<<<<<<
 * 
 *                 meridian, longitude = basis
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/triangulation.pyx":2852
 *                 matrices[i][1][1] = d
 * 
 *             if self.is_orientable():             # <<<<<<<<<<<<<<
 *                 result = change_peripheral_curves(self.c_triangulation, matrices)
 *             else:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_orientable); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2852, __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(3, 2852, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_1) {

      /* "cython/core/triangulation.pyx":2853
 * 
 *             if self.is_orientable():
 *                 result = change_peripheral_curves(self.c_triangulation, matrices)             # <<<<<<<<<<<<<<
 *             else:
 *                 result = change_peripheral_curves_nonorientable(
 */
      __pyx_t_19 = change_peripheral_curves(__pyx_v_self->c_triangulation, __pyx_v_matrices); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2853, __pyx_L1_error)
      __pyx_v_result = __pyx_t_19;

      /* "cython/core/triangulation.pyx":2852
 *                 matrices[i][1][1] = d
 * 
 *             if self.is_orientable():             # <<<<<<<<<<<<<<
 *                 result = change_peripheral_curves(self.c_triangulation, matrices)
 *             else:
 */
      goto __pyx_L62;
    }

    /* "cython/core/triangulation.pyx":2855
 *                 result = change_peripheral_curves(self.c_triangulation, matrices)
 *             else:
 *                 result = change_peripheral_curves_nonorientable(             # <<<<<<<<<<<<<<
 *                     self.c_triangulation, matrices)
 *             free(matrices)
 */
    /*else*/ {

      /* "cython/core/triangulation.pyx":2856
 *             else:
 *                 result = change_peripheral_curves_nonorientable(
 *                     self.c_triangulation, matrices)             # <<<<<<<<<<<<<<
 *             free(matrices)
 *             if result == func_bad_input:
 */
      __pyx_v_result = change_peripheral_curves_nonorientable(__pyx_v_self->c_triangulation, __pyx_v_matrices);
    }
    __pyx_L62:;

    /* "cython/core/triangulation.pyx":2857
 *                 result = change_peripheral_curves_nonorientable(
 *                     self.c_triangulation, matrices)
 *             free(matrices)             # <<<<<<<<<<<<<<
 *             if result == func_bad_input:
 *                 raise ValueError('The peripheral data %s is not acceptable.' %
 */
    free(__pyx_v_matrices);

    /* "cython/core/triangulation.pyx":2858
 *                     self.c_triangulation, matrices)
 *             free(matrices)
 *             if result == func_bad_input:             # <<<<<<<<<<<<<<
 *                 raise ValueError('The peripheral data %s is not acceptable.' %
 *                                  peripheral_data)
 */
    __pyx_t_1 = (__pyx_v_result == func_bad_input);
    if (unlikely(__pyx_t_1)) {

      /* "cython/core/triangulation.pyx":2859
 *             free(matrices)
 *             if result == func_bad_input:
 *                 raise ValueError('The peripheral data %s is not acceptable.' %             # <<<<<<<<<<<<<<
 *                                  peripheral_data)
 * 
 */
      __pyx_t_5 = __Pyx_PyString_FormatSafe(__pyx_kp_s_The_peripheral_data_s_is_not_acc, __pyx_v_peripheral_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 2859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 2859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(3, 2859, __pyx_L1_error)

      /* "cython/core/triangulation.pyx":2858
 *                     self.c_triangulation, matrices)
 *             free(matrices)
 *             if result == func_bad_input:             # <<<<<<<<<<<<<<
 *                 raise ValueError('The peripheral data %s is not acceptable.' %
 *                                  peripheral_data)
 */
    }
  }
  __pyx_L5:;

  /* "cython/core/triangulation.pyx":2727
 *         return c_repn_in_original_gens
 * 
 *     def set_peripheral_curves(self, peripheral_data,             # <<<<<<<<<<<<<<
 *                               which_cusp=None, return_matrices=False):
 *         """
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.Triangulation.set_peripheral_curves", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cobs);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_meridian);
  __Pyx_XDECREF(__pyx_v_longitude);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XDECREF(__pyx_v_basis);
  __Pyx_XDECREF(__pyx_v_which_cusp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":2862
 *                                  peripheral_data)
 * 
 *     def has_finite_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns True if and only if the triangulation has finite (non-ideal)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_139has_finite_vertices(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_6SnapPy_13Triangulation_138has_finite_vertices, "Triangulation.has_finite_vertices(self)\n\n        Returns True if and only if the triangulation has finite (non-ideal)\n        vertices.\n\n        >>> T = Triangulation(\"m004\")\n        >>> T.has_finite_vertices()\n        False\n        >>> T.dehn_fill((12,13))\n        >>> S = T.filled_triangulation()\n        >>> S.has_finite_vertices()\n        True\n\n        When trying to find a hyperbolic structure, SnapPea will eliminate\n        finite vertices:\n\n        >>> M = S.with_hyperbolic_structure()\n        >>> M.has_finite_vertices()\n        False\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_139has_finite_vertices = {"has_finite_vertices", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_139has_finite_vertices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_138has_finite_vertices};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_139has_finite_vertices(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("has_finite_vertices (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("has_finite_vertices", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "has_finite_vertices", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_138has_finite_vertices(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13Triangulation_138has_finite_vertices(struct __pyx_obj_6SnapPy_Triangulation *__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("has_finite_vertices", 1);

  /* "cython/core/triangulation.pyx":2883
 *         """
 *         # Bail if empty
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":2884
 *         # Bail if empty
 *         if self.c_triangulation is NULL:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         count_cusps(self.c_triangulation)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "cython/core/triangulation.pyx":2883
 *         """
 *         # Bail if empty
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  }

  /* "cython/core/triangulation.pyx":2886
 *             return False
 * 
 *         count_cusps(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         return get_num_fake_cusps(self.c_triangulation) > 0
 * 
 */
  count_cusps(__pyx_v_self->c_triangulation);

  /* "cython/core/triangulation.pyx":2887
 * 
 *         count_cusps(self.c_triangulation)
 *         return get_num_fake_cusps(self.c_triangulation) > 0             # <<<<<<<<<<<<<<
 * 
 *     def triangulation_isosig(self,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = get_num_fake_cusps(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2887, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyBool_FromLong((__pyx_t_2 > 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":2862
 *                                  peripheral_data)
 * 
 *     def has_finite_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns True if and only if the triangulation has finite (non-ideal)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.Triangulation.has_finite_vertices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":2889
 *         return get_num_fake_cusps(self.c_triangulation) > 0
 * 
 *     def triangulation_isosig(self,             # <<<<<<<<<<<<<<
 *                              decorated=True,
 *                              ignore_cusp_ordering = False,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_141triangulation_isosig(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_6SnapPy_13Triangulation_140triangulation_isosig, "Triangulation.triangulation_isosig(self, decorated=True, ignore_cusp_ordering=False, ignore_curve_orientations=False, ignore_orientation=True)\n\n        Returns a compact text representation of the triangulation, called a\n        \"decorated isomorphism signature\"\n\n        >>> T = Triangulation('m004')\n        >>> T.triangulation_isosig()\n        'cPcbbbiht_BaCB'\n\n        You can use this string to recreate an isomorphic triangulation later\n\n        >>> A = Triangulation('y233')\n        >>> A.triangulation_isosig()\n        'hLMzMkbcdefggghhhqxqhx_BaaB'\n        >>> B = Triangulation('hLMzMkbcdefggghhhqxqhx_BaaB')\n        >>> A == B\n        True\n\n        By default, the returned string encodes the peripheral curves (and\n        slopes of Dehn-fillings if any are present), but you can request\n        only the \"isomorphism signature\" which can be given to\n        `Regina <https://regina-normal.github.io/>`_.\n\n          >>> E = Triangulation('K3_1')   # the (-2, 3, 7) exterior\n          >>> isosig = E.triangulation_isosig(decorated = False); isosig\n          'dLQacccjsnk'\n          >>> F = Triangulation(isosig)\n          >>> E.isomorphisms_to(F)[1]\n          0 -> 0\n          [1 18]\n          [0  1]\n          Extends to link\n          >>> E.triangulation_isosig()\n          'dLQacccjsnk_BaRsB'\n          >>> F.triangulation_isosig()\n          'dLQacccjsnk_BaaB'\n          >>> G = Triangulation('dLQacccjsnk_BaRsB')\n          >>> E.isomorphisms_to(G)[0]\n          0 -> 0\n          [1 0]\n          [0 1]\n          Extends to link\n\n        If you do not care about the indexing of the cusps when using a\n        decorated signature, use ignore_cusp_ordering\n\n          >>> M = Manifold(\"L14n64110(1,2)(2,3)(-2,1)(3,4)(0,0)\")\n          >>> isosig = M.triangulation_isosig(decorated = True, ignore_cusp_ordering = True)\n          >>> isosig\n          'xLLvLvMLPMPLAMQQcceflnjmmmospsrttvvvtswwwiieiifdeauinasltltahmbjn_bacBbaaBBaBbBbbaabba""(2,3)(-2,1)(1,2)(3,4)(0,0)'\n          >>> N = Manifold(isosig).filled_triangulation()\n          >>> N.is_isometric_to(M.filled_triangulation())\n          True\n\n        If you do not care about the orientations of the peripheral curves,\n        use ignore_curve_orientations\n\n          >>> M = Manifold(\"L6a1\")\n          >>> M.triangulation_isosig()\n          'gLLAQcdeefffdopuado_BabbBaab'\n          >>> isosig = M.triangulation_isosig(decorated = True, ignore_curve_orientations = True)\n          >>> isosig\n          'gLLAQcdeefffdopuado_babbbaab'\n          >>> N = Manifold(isosig)\n          >>> M.isomorphisms_to(N)\n          [0 -> 0  1 -> 1\n          [-1 0]  [-1 0]\n          [ 0 1]  [ 0 1]\n          Extends to link, 0 -> 0  1 -> 1\n          [1  0]  [1  0]\n          [0 -1]  [0 -1]\n          Extends to link]\n\n        By default, the isomorphism signature does not capture the orientation\n        of an orientable triangulation. If you specify\n        `ignore_orientation = False`, the isomorphism signature for an oriented\n        triangulation and its mirror image will be different if the\n        triangulation is cheiral.\n\n          >>> M = Manifold(\"m006\")\n          >>> M.triangulation_isosig(decorated = False, ignore_orientation = False)\n          'dLQacccjnjs'\n          >>> M.reverse_orientation()\n          >>> M.triangulation_isosig(decorated = False, ignore_orientation = False)\n          'dLQacccnsnk'\n\n        Note that a decorated triangulation isosig with the default values\n        `ignore_orientation = True` but `ignore_curve_orientations = False`\n        still captures the orientations of the triangulation through the\n        peripheral curves.\n\n          >>> M = Manifold(\"m006\")\n          >>> M.triangulation_isosig()\n          'dLQacccjnjs_aBbB'\n          >>> M.reverse_orientation()\n          >>> M.triangulation_isosig()\n          'dLQacccjnjs_aBBb'\n\n        The code has been copied from `Regina <https://regin""a-normal.github.io/>`_ where\n        the corresponding method is called \"isoSig\".\n\n        Unlike dehydrations for 3-manifold triangulations, an\n        isomorphism signature uniquely determines a triangulation up\n        to combinatorial isomorphism.  That is, two triangulations of\n        3-dimensional manifolds are combinatorially isomorphic if and\n        only if their isomorphism signatures are the same string.  For\n        full details, see `Simplification paths in the Pachner graphs\n        of closed orientable 3-manifold triangulations, Burton, 2011\n        <http://arxiv.org/abs/1110.6080>`_.\n\n        For details about how the peripheral decorations work, see\n        the SnapPy source code.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_141triangulation_isosig = {"triangulation_isosig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_141triangulation_isosig, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_140triangulation_isosig};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_141triangulation_isosig(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_decorated = 0;
  PyObject *__pyx_v_ignore_cusp_ordering = 0;
  PyObject *__pyx_v_ignore_curve_orientations = 0;
  PyObject *__pyx_v_ignore_orientation = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("triangulation_isosig (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_decorated,&__pyx_n_s_ignore_cusp_ordering,&__pyx_n_s_ignore_curve_orientations,&__pyx_n_s_ignore_orientation,0};

    /* "cython/core/triangulation.pyx":2890
 * 
 *     def triangulation_isosig(self,
 *                              decorated=True,             # <<<<<<<<<<<<<<
 *                              ignore_cusp_ordering = False,
 *                              ignore_curve_orientations = False,
 */
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));

    /* "cython/core/triangulation.pyx":2891
 *     def triangulation_isosig(self,
 *                              decorated=True,
 *                              ignore_cusp_ordering = False,             # <<<<<<<<<<<<<<
 *                              ignore_curve_orientations = False,
 *                              ignore_orientation = True):
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));

    /* "cython/core/triangulation.pyx":2892
 *                              decorated=True,
 *                              ignore_cusp_ordering = False,
 *                              ignore_curve_orientations = False,             # <<<<<<<<<<<<<<
 *                              ignore_orientation = True):
 *         """
 */
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));

    /* "cython/core/triangulation.pyx":2893
 *                              ignore_cusp_ordering = False,
 *                              ignore_curve_orientations = False,
 *                              ignore_orientation = True):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a compact text representation of the triangulation, called a
 */
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_decorated);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2889, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ignore_cusp_ordering);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2889, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ignore_curve_orientations);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2889, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_ignore_orientation);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 2889, __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, "triangulation_isosig") < 0)) __PYX_ERR(3, 2889, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        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;
      }
    }
    __pyx_v_decorated = values[0];
    __pyx_v_ignore_cusp_ordering = values[1];
    __pyx_v_ignore_curve_orientations = values[2];
    __pyx_v_ignore_orientation = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("triangulation_isosig", 0, 0, 4, __pyx_nargs); __PYX_ERR(3, 2889, __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("SnapPy.Triangulation.triangulation_isosig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_140triangulation_isosig(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_decorated, __pyx_v_ignore_cusp_ordering, __pyx_v_ignore_curve_orientations, __pyx_v_ignore_orientation);

  /* "cython/core/triangulation.pyx":2889
 *         return get_num_fake_cusps(self.c_triangulation) > 0
 * 
 *     def triangulation_isosig(self,             # <<<<<<<<<<<<<<
 *                              decorated=True,
 *                              ignore_cusp_ordering = False,
 */

  /* 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_6SnapPy_13Triangulation_140triangulation_isosig(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_decorated, PyObject *__pyx_v_ignore_cusp_ordering, PyObject *__pyx_v_ignore_curve_orientations, PyObject *__pyx_v_ignore_orientation) {
  char *__pyx_v_c_string;
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  Boolean __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  char const *__pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("triangulation_isosig", 1);

  /* "cython/core/triangulation.pyx":3008
 * 
 *         cdef char *c_string
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         args = (decorated,
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":3009
 *         cdef char *c_string
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         args = (decorated,
 *                 ignore_cusp_ordering,
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3009, __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(3, 3009, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":3008
 * 
 *         cdef char *c_string
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         args = (decorated,
 */
  }

  /* "cython/core/triangulation.pyx":3010
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         args = (decorated,             # <<<<<<<<<<<<<<
 *                 ignore_cusp_ordering,
 *                 ignore_curve_orientations,
 */
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_decorated);
  __Pyx_GIVEREF(__pyx_v_decorated);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_decorated)) __PYX_ERR(3, 3010, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_ignore_cusp_ordering);
  __Pyx_GIVEREF(__pyx_v_ignore_cusp_ordering);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_ignore_cusp_ordering)) __PYX_ERR(3, 3010, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_ignore_curve_orientations);
  __Pyx_GIVEREF(__pyx_v_ignore_curve_orientations);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_ignore_curve_orientations)) __PYX_ERR(3, 3010, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_ignore_orientation);
  __Pyx_GIVEREF(__pyx_v_ignore_orientation);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_ignore_orientation)) __PYX_ERR(3, 3010, __pyx_L1_error);
  __pyx_v_args = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":3014
 *                 ignore_curve_orientations,
 *                 ignore_orientation)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('triangulation_isosig', *args)
 *         except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "cython/core/triangulation.pyx":3015
 *                 ignore_orientation)
 *         try:
 *             return self._cache.lookup('triangulation_isosig', *args)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_cache, __pyx_n_s_lookup); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3015, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PyNumber_Add(__pyx_tuple__80, __pyx_v_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3015, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3015, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L8_try_return;

      /* "cython/core/triangulation.pyx":3014
 *                 ignore_curve_orientations,
 *                 ignore_orientation)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('triangulation_isosig', *args)
 *         except KeyError:
 */
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cython/core/triangulation.pyx":3016
 *         try:
 *             return self._cache.lookup('triangulation_isosig', *args)
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_8) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;

    /* "cython/core/triangulation.pyx":3014
 *                 ignore_curve_orientations,
 *                 ignore_orientation)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('triangulation_isosig', *args)
 *         except KeyError:
 */
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L0;
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  }

  /* "cython/core/triangulation.pyx":3019
 *             pass
 * 
 *         if not decorated:             # <<<<<<<<<<<<<<
 *             try:
 *                 c_string = get_isomorphism_signature(
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_decorated); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 3019, __pyx_L1_error)
  __pyx_t_9 = (!__pyx_t_1);
  if (__pyx_t_9) {

    /* "cython/core/triangulation.pyx":3020
 * 
 *         if not decorated:
 *             try:             # <<<<<<<<<<<<<<
 *                 c_string = get_isomorphism_signature(
 *                     self.c_triangulation, ignore_orientation)
 */
    /*try:*/ {

      /* "cython/core/triangulation.pyx":3022
 *             try:
 *                 c_string = get_isomorphism_signature(
 *                     self.c_triangulation, ignore_orientation)             # <<<<<<<<<<<<<<
 *                 result = to_str(c_string)
 *             finally:
 */
      __pyx_t_10 = __Pyx_PyInt_As_Boolean(__pyx_v_ignore_orientation); if (unlikely((__pyx_t_10 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(3, 3022, __pyx_L12_error)

      /* "cython/core/triangulation.pyx":3021
 *         if not decorated:
 *             try:
 *                 c_string = get_isomorphism_signature(             # <<<<<<<<<<<<<<
 *                     self.c_triangulation, ignore_orientation)
 *                 result = to_str(c_string)
 */
      __pyx_v_c_string = get_isomorphism_signature(__pyx_v_self->c_triangulation, __pyx_t_10);

      /* "cython/core/triangulation.pyx":3023
 *                 c_string = get_isomorphism_signature(
 *                     self.c_triangulation, ignore_orientation)
 *                 result = to_str(c_string)             # <<<<<<<<<<<<<<
 *             finally:
 *                 free(c_string)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_to_str); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3023, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_c_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3023, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_2};
        __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3023, __pyx_L12_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_v_result = __pyx_t_7;
      __pyx_t_7 = 0;
    }

    /* "cython/core/triangulation.pyx":3025
 *                 result = to_str(c_string)
 *             finally:
 *                 free(c_string)             # <<<<<<<<<<<<<<
 *         else:
 *             result = decorated_isosig.decorated_isosig(
 */
    /*finally:*/ {
      /*normal exit:*/{
        free(__pyx_v_c_string);
        goto __pyx_L13;
      }
      __pyx_L12_error:;
      /*exception exit:*/{
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
        if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_4);
        __Pyx_XGOTREF(__pyx_t_3);
        __Pyx_XGOTREF(__pyx_t_14);
        __Pyx_XGOTREF(__pyx_t_15);
        __Pyx_XGOTREF(__pyx_t_16);
        __pyx_t_8 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
        {
          free(__pyx_v_c_string);
        }
        if (PY_MAJOR_VERSION >= 3) {
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
        }
        __Pyx_XGIVEREF(__pyx_t_5);
        __Pyx_XGIVEREF(__pyx_t_4);
        __Pyx_XGIVEREF(__pyx_t_3);
        __Pyx_ErrRestore(__pyx_t_5, __pyx_t_4, __pyx_t_3);
        __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0;
        __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
        goto __pyx_L1_error;
      }
      __pyx_L13:;
    }

    /* "cython/core/triangulation.pyx":3019
 *             pass
 * 
 *         if not decorated:             # <<<<<<<<<<<<<<
 *             try:
 *                 c_string = get_isomorphism_signature(
 */
    goto __pyx_L10;
  }

  /* "cython/core/triangulation.pyx":3027
 *                 free(c_string)
 *         else:
 *             result = decorated_isosig.decorated_isosig(             # <<<<<<<<<<<<<<
 *                 self, _triangulation_class,
 *                 ignore_cusp_ordering = ignore_cusp_ordering,
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_decorated_isosig); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_decorated_isosig); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cython/core/triangulation.pyx":3028
 *         else:
 *             result = decorated_isosig.decorated_isosig(
 *                 self, _triangulation_class,             # <<<<<<<<<<<<<<
 *                 ignore_cusp_ordering = ignore_cusp_ordering,
 *                 ignore_curve_orientations = ignore_curve_orientations,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_triangulation_class); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3028, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "cython/core/triangulation.pyx":3027
 *                 free(c_string)
 *         else:
 *             result = decorated_isosig.decorated_isosig(             # <<<<<<<<<<<<<<
 *                 self, _triangulation_class,
 *                 ignore_cusp_ordering = ignore_cusp_ordering,
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(3, 3027, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7)) __PYX_ERR(3, 3027, __pyx_L1_error);
    __pyx_t_7 = 0;

    /* "cython/core/triangulation.pyx":3029
 *             result = decorated_isosig.decorated_isosig(
 *                 self, _triangulation_class,
 *                 ignore_cusp_ordering = ignore_cusp_ordering,             # <<<<<<<<<<<<<<
 *                 ignore_curve_orientations = ignore_curve_orientations,
 *                 ignore_orientation = ignore_orientation)
 */
    __pyx_t_7 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_ignore_cusp_ordering, __pyx_v_ignore_cusp_ordering) < 0) __PYX_ERR(3, 3029, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":3030
 *                 self, _triangulation_class,
 *                 ignore_cusp_ordering = ignore_cusp_ordering,
 *                 ignore_curve_orientations = ignore_curve_orientations,             # <<<<<<<<<<<<<<
 *                 ignore_orientation = ignore_orientation)
 *         return self._cache.save(result, 'triangulation_isosig', *args)
 */
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_ignore_curve_orientations, __pyx_v_ignore_curve_orientations) < 0) __PYX_ERR(3, 3029, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":3031
 *                 ignore_cusp_ordering = ignore_cusp_ordering,
 *                 ignore_curve_orientations = ignore_curve_orientations,
 *                 ignore_orientation = ignore_orientation)             # <<<<<<<<<<<<<<
 *         return self._cache.save(result, 'triangulation_isosig', *args)
 * 
 */
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_ignore_orientation, __pyx_v_ignore_orientation) < 0) __PYX_ERR(3, 3029, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":3027
 *                 free(c_string)
 *         else:
 *             result = decorated_isosig.decorated_isosig(             # <<<<<<<<<<<<<<
 *                 self, _triangulation_class,
 *                 ignore_cusp_ordering = ignore_cusp_ordering,
 */
    __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_v_result = __pyx_t_11;
    __pyx_t_11 = 0;
  }
  __pyx_L10:;

  /* "cython/core/triangulation.pyx":3032
 *                 ignore_curve_orientations = ignore_curve_orientations,
 *                 ignore_orientation = ignore_orientation)
 *         return self._cache.save(result, 'triangulation_isosig', *args)             # <<<<<<<<<<<<<<
 * 
 *     def _symplectic_form(self, u, v):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_cache, __pyx_n_s_save); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(__pyx_v_result);
  __Pyx_GIVEREF(__pyx_v_result);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_result)) __PYX_ERR(3, 3032, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_triangulation_isosig);
  __Pyx_GIVEREF(__pyx_n_s_triangulation_isosig);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_triangulation_isosig)) __PYX_ERR(3, 3032, __pyx_L1_error);
  __pyx_t_2 = PyNumber_Add(__pyx_t_7, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_7;
  __pyx_t_7 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":2889
 *         return get_num_fake_cusps(self.c_triangulation) > 0
 * 
 *     def triangulation_isosig(self,             # <<<<<<<<<<<<<<
 *                              decorated=True,
 *                              ignore_cusp_ordering = False,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("SnapPy.Triangulation.triangulation_isosig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":3034
 *         return self._cache.save(result, 'triangulation_isosig', *args)
 * 
 *     def _symplectic_form(self, u, v):             # <<<<<<<<<<<<<<
 *         return sum([u[2 * i] * v[2 * i + 1] - u[2 * i + 1] * v[2 * i] for i in range(len(u) // 2)])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_143_symplectic_form(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_6SnapPy_13Triangulation_142_symplectic_form, "Triangulation._symplectic_form(self, u, v)");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_143_symplectic_form = {"_symplectic_form", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_143_symplectic_form, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_142_symplectic_form};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_143_symplectic_form(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_u = 0;
  PyObject *__pyx_v_v = 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("_symplectic_form (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_u,&__pyx_n_s_v,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_u)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 3034, __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_v)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 3034, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_symplectic_form", 1, 2, 2, 1); __PYX_ERR(3, 3034, __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, "_symplectic_form") < 0)) __PYX_ERR(3, 3034, __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_u = values[0];
    __pyx_v_v = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_symplectic_form", 1, 2, 2, __pyx_nargs); __PYX_ERR(3, 3034, __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("SnapPy.Triangulation._symplectic_form", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_142_symplectic_form(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_u, __pyx_v_v);

  /* 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_6SnapPy_13Triangulation_142_symplectic_form(CYTHON_UNUSED struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_u, PyObject *__pyx_v_v) {
  PyObject *__pyx_9genexpr42__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  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("_symplectic_form", 1);

  /* "cython/core/triangulation.pyx":3035
 * 
 *     def _symplectic_form(self, u, v):
 *         return sum([u[2 * i] * v[2 * i + 1] - u[2 * i + 1] * v[2 * i] for i in range(len(u) // 2)])             # <<<<<<<<<<<<<<
 * 
 *     def _is_symplectic(self, M):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3035, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_Length(__pyx_v_u); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3035, __pyx_L5_error)
    __pyx_t_3 = PyInt_FromSsize_t(__Pyx_div_Py_ssize_t(__pyx_t_2, 2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3035, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3035, __pyx_L5_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_2 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3035, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3035, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        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(3, 3035, __pyx_L5_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_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(3, 3035, __pyx_L5_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3035, __pyx_L5_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(3, 3035, __pyx_L5_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_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(3, 3035, __pyx_L5_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3035, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_5(__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(3, 3035, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr42__pyx_v_i, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyInt_MultiplyCObj(__pyx_int_2, __pyx_9genexpr42__pyx_v_i, 2, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3035, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_u, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3035, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyInt_MultiplyCObj(__pyx_int_2, __pyx_9genexpr42__pyx_v_i, 2, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3035, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3035, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_v, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3035, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyNumber_Multiply(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3035, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyInt_MultiplyCObj(__pyx_int_2, __pyx_9genexpr42__pyx_v_i, 2, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3035, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3035, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_u, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3035, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyInt_MultiplyCObj(__pyx_int_2, __pyx_9genexpr42__pyx_v_i, 2, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3035, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_v, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3035, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyNumber_Multiply(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3035, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyNumber_Subtract(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3035, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(3, 3035, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr42__pyx_v_i); __pyx_9genexpr42__pyx_v_i = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr42__pyx_v_i); __pyx_9genexpr42__pyx_v_i = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":3034
 *         return self._cache.save(result, 'triangulation_isosig', *args)
 * 
 *     def _symplectic_form(self, u, v):             # <<<<<<<<<<<<<<
 *         return sum([u[2 * i] * v[2 * i + 1] - u[2 * i + 1] * v[2 * i] for i in range(len(u) // 2)])
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("SnapPy.Triangulation._symplectic_form", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_9genexpr42__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":3037
 *         return sum([u[2 * i] * v[2 * i + 1] - u[2 * i + 1] * v[2 * i] for i in range(len(u) // 2)])
 * 
 *     def _is_symplectic(self, M):             # <<<<<<<<<<<<<<
 *         """
 *         Test if the matrix M is symplectic
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_145_is_symplectic(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_6SnapPy_13Triangulation_144_is_symplectic, "Triangulation._is_symplectic(self, M)\n\n        Test if the matrix M is symplectic\n        :param M: square matrix\n        :return: true or false\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_145_is_symplectic = {"_is_symplectic", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_145_is_symplectic, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_144_is_symplectic};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_145_is_symplectic(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_M = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_is_symplectic (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_M,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_M)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 3037, __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, "_is_symplectic") < 0)) __PYX_ERR(3, 3037, __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_M = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_is_symplectic", 1, 1, 1, __pyx_nargs); __PYX_ERR(3, 3037, __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("SnapPy.Triangulation._is_symplectic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_144_is_symplectic(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_M);

  /* 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_6SnapPy_13Triangulation_144_is_symplectic(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_M) {
  Py_ssize_t __pyx_v_n;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_j = NULL;
  PyObject *__pyx_v_omega = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_is_symplectic", 1);

  /* "cython/core/triangulation.pyx":3043
 *         :return: true or false
 *         """
 *         n = len(M)             # <<<<<<<<<<<<<<
 * 
 *         for i in range(n):
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_M); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3043, __pyx_L1_error)
  __pyx_v_n = __pyx_t_1;

  /* "cython/core/triangulation.pyx":3045
 *         n = len(M)
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             for j in range(i, n):
 *                 omega = abs(self._symplectic_form(M[i], M[j]))
 */
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_1 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3045, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      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(3, 3045, __pyx_L1_error)
          #endif
          if (__pyx_t_1 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(3, 3045, __pyx_L1_error)
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3045, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #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(3, 3045, __pyx_L1_error)
          #endif
          if (__pyx_t_1 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(3, 3045, __pyx_L1_error)
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3045, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_4(__pyx_t_2);
      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(3, 3045, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":3046
 * 
 *         for i in range(n):
 *             for j in range(i, n):             # <<<<<<<<<<<<<<
 *                 omega = abs(self._symplectic_form(M[i], M[j]))
 * 
 */
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_i);
    __Pyx_GIVEREF(__pyx_v_i);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_i)) __PYX_ERR(3, 3046, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3)) __PYX_ERR(3, 3046, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5);
      __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 3046, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3046, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        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(3, 3046, __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_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 3046, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3046, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #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(3, 3046, __pyx_L1_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(3, 3046, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3046, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_7(__pyx_t_5);
        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(3, 3046, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cython/core/triangulation.pyx":3047
 *         for i in range(n):
 *             for j in range(i, n):
 *                 omega = abs(self._symplectic_form(M[i], M[j]))             # <<<<<<<<<<<<<<
 * 
 *                 if i % 2 == 0 and j % 2 == 1 and j == i + 1:
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_symplectic_form); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_M, __pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_M, __pyx_v_j); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 3047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = NULL;
      __pyx_t_12 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_12 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_t_9, __pyx_t_10};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12);
        __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_3)) __PYX_ERR(3, 3047, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_t_8 = __Pyx_PyNumber_Absolute(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3047, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_omega, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "cython/core/triangulation.pyx":3049
 *                 omega = abs(self._symplectic_form(M[i], M[j]))
 * 
 *                 if i % 2 == 0 and j % 2 == 1 and j == i + 1:             # <<<<<<<<<<<<<<
 *                     if omega != 2:
 *                         return False
 */
      __pyx_t_8 = __Pyx_PyInt_RemainderObjC(__pyx_v_i, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3049, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_14 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_8, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(3, 3049, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_14) {
      } else {
        __pyx_t_13 = __pyx_t_14;
        goto __pyx_L8_bool_binop_done;
      }
      __pyx_t_8 = __Pyx_PyInt_RemainderObjC(__pyx_v_j, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3049, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_14 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_8, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(3, 3049, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_14) {
      } else {
        __pyx_t_13 = __pyx_t_14;
        goto __pyx_L8_bool_binop_done;
      }
      __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 3049, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_j, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3049, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_14 < 0))) __PYX_ERR(3, 3049, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_13 = __pyx_t_14;
      __pyx_L8_bool_binop_done:;
      if (__pyx_t_13) {

        /* "cython/core/triangulation.pyx":3050
 * 
 *                 if i % 2 == 0 and j % 2 == 1 and j == i + 1:
 *                     if omega != 2:             # <<<<<<<<<<<<<<
 *                         return False
 *                 elif omega:
 */
        __pyx_t_13 = (__Pyx_PyInt_BoolNeObjC(__pyx_v_omega, __pyx_int_2, 2, 0)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(3, 3050, __pyx_L1_error)
        if (__pyx_t_13) {

          /* "cython/core/triangulation.pyx":3051
 *                 if i % 2 == 0 and j % 2 == 1 and j == i + 1:
 *                     if omega != 2:
 *                         return False             # <<<<<<<<<<<<<<
 *                 elif omega:
 *                     return False
 */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(Py_False);
          __pyx_r = Py_False;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          goto __pyx_L0;

          /* "cython/core/triangulation.pyx":3050
 * 
 *                 if i % 2 == 0 and j % 2 == 1 and j == i + 1:
 *                     if omega != 2:             # <<<<<<<<<<<<<<
 *                         return False
 *                 elif omega:
 */
        }

        /* "cython/core/triangulation.pyx":3049
 *                 omega = abs(self._symplectic_form(M[i], M[j]))
 * 
 *                 if i % 2 == 0 and j % 2 == 1 and j == i + 1:             # <<<<<<<<<<<<<<
 *                     if omega != 2:
 *                         return False
 */
        goto __pyx_L7;
      }

      /* "cython/core/triangulation.pyx":3052
 *                     if omega != 2:
 *                         return False
 *                 elif omega:             # <<<<<<<<<<<<<<
 *                     return False
 * 
 */
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_omega); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(3, 3052, __pyx_L1_error)
      if (__pyx_t_13) {

        /* "cython/core/triangulation.pyx":3053
 *                         return False
 *                 elif omega:
 *                     return False             # <<<<<<<<<<<<<<
 * 
 *         return True
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L0;

        /* "cython/core/triangulation.pyx":3052
 *                     if omega != 2:
 *                         return False
 *                 elif omega:             # <<<<<<<<<<<<<<
 *                     return False
 * 
 */
      }
      __pyx_L7:;

      /* "cython/core/triangulation.pyx":3046
 * 
 *         for i in range(n):
 *             for j in range(i, n):             # <<<<<<<<<<<<<<
 *                 omega = abs(self._symplectic_form(M[i], M[j]))
 * 
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/triangulation.pyx":3045
 *         n = len(M)
 * 
 *         for i in range(n):             # <<<<<<<<<<<<<<
 *             for j in range(i, n):
 *                 omega = abs(self._symplectic_form(M[i], M[j]))
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":3055
 *                     return False
 * 
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def symplectic_basis(self, verify=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":3037
 *         return sum([u[2 * i] * v[2 * i + 1] - u[2 * i + 1] * v[2 * i] for i in range(len(u) // 2)])
 * 
 *     def _is_symplectic(self, M):             # <<<<<<<<<<<<<<
 *         """
 *         Test if the matrix M is symplectic
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("SnapPy.Triangulation._is_symplectic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XDECREF(__pyx_v_omega);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":3057
 *         return True
 * 
 *     def symplectic_basis(self, verify=False):             # <<<<<<<<<<<<<<
 *         """
 *         Extend the Neumann-Zagier Matrix to one which is symplectic
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_147symplectic_basis(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_6SnapPy_13Triangulation_146symplectic_basis, "Triangulation.symplectic_basis(self, verify=False)\n\n        Extend the Neumann-Zagier Matrix to one which is symplectic\n\n        (up to factors of 2) using oscillating curves. Verify parameter\n        explicitly tests if the resulting matrix is symplectic.  Only\n        accepts triangulations with 1 cusp.\n\n        >>> M = Manifold(\"4_1\")\n        >>> M.symplectic_basis()\n        [-1  0 -1 -1]\n        [ 2  0 -2  0]\n        [-2 -1 -2 -1]\n        [ 0 -1 -2 -1]\n\n        <https://arxiv.org/abs/2208.06969>\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13Triangulation_147symplectic_basis = {"symplectic_basis", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_147symplectic_basis, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_146symplectic_basis};
static PyObject *__pyx_pw_6SnapPy_13Triangulation_147symplectic_basis(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_verify = 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("symplectic_basis (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_verify,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_verify);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 3057, __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, "symplectic_basis") < 0)) __PYX_ERR(3, 3057, __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_verify = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("symplectic_basis", 0, 0, 1, __pyx_nargs); __PYX_ERR(3, 3057, __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("SnapPy.Triangulation.symplectic_basis", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13Triangulation_146symplectic_basis(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self), __pyx_v_verify);

  /* 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_6SnapPy_13Triangulation_146symplectic_basis(struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_self, PyObject *__pyx_v_verify) {
  int **__pyx_v_g_eqns;
  int __pyx_v_num_rows;
  int __pyx_v_num_cols;
  int __pyx_v_dual_rows;
  int *__pyx_v_eqn;
  PyObject *__pyx_v_eqns = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_cusp_info = NULL;
  PyObject *__pyx_v_to_do = NULL;
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_v_l = NULL;
  Py_ssize_t __pyx_v_rows;
  PyObject *__pyx_v_retval = NULL;
  int __pyx_9genexpr43__pyx_v_j;
  int __pyx_9genexpr44__pyx_v_j;
  Py_ssize_t __pyx_9genexpr45__pyx_v_i;
  Py_ssize_t __pyx_9genexpr46__pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  Py_ssize_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_t_15;
  int **__pyx_t_16;
  Py_ssize_t __pyx_t_17;
  Py_ssize_t __pyx_t_18;
  Py_ssize_t __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_ssize_t __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("symplectic_basis", 1);

  /* "cython/core/triangulation.pyx":3080
 *         cdef int* eqn;
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":3081
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 * 
 *         # current get_symplectic_eqns() implementation requires 1 cusp
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3081, __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(3, 3081, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":3080
 *         cdef int* eqn;
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  }

  /* "cython/core/triangulation.pyx":3084
 * 
 *         # current get_symplectic_eqns() implementation requires 1 cusp
 *         if self.num_cusps() > 1:             # <<<<<<<<<<<<<<
 *             raise ValueError('Triangulation contains {} cusps, only accepts triangulations with 1 cusp'.format(self.num_cusps()))
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3084, __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(3, 3084, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3084, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 3084, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/triangulation.pyx":3085
 *         # current get_symplectic_eqns() implementation requires 1 cusp
 *         if self.num_cusps() > 1:
 *             raise ValueError('Triangulation contains {} cusps, only accepts triangulations with 1 cusp'.format(self.num_cusps()))             # <<<<<<<<<<<<<<
 * 
 *         eqns = []
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Triangulation_contains_cusps_onl, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3085, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3085, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_5 = 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_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3085, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_t_6 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3085, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3085, __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(3, 3085, __pyx_L1_error)

    /* "cython/core/triangulation.pyx":3084
 * 
 *         # current get_symplectic_eqns() implementation requires 1 cusp
 *         if self.num_cusps() > 1:             # <<<<<<<<<<<<<<
 *             raise ValueError('Triangulation contains {} cusps, only accepts triangulations with 1 cusp'.format(self.num_cusps()))
 * 
 */
  }

  /* "cython/core/triangulation.pyx":3087
 *             raise ValueError('Triangulation contains {} cusps, only accepts triangulations with 1 cusp'.format(self.num_cusps()))
 * 
 *         eqns = []             # <<<<<<<<<<<<<<
 * 
 *         peripheral_curves(self.c_triangulation)
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3087, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_eqns = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":3089
 *         eqns = []
 * 
 *         peripheral_curves(self.c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *         # Cusp Equations
 */
  peripheral_curves(__pyx_v_self->c_triangulation);

  /* "cython/core/triangulation.pyx":3092
 * 
 *         # Cusp Equations
 *         for i in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *             cusp_info = self.cusp_info(i)
 *             if cusp_info.is_complete:
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3092, __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(3, 3092, __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_range, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3092, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3092, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_9)) {
      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(3, 3092, __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_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 3092, __pyx_L1_error)
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3092, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #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(3, 3092, __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_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 3092, __pyx_L1_error)
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3092, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_9(__pyx_t_2);
      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(3, 3092, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":3093
 *         # Cusp Equations
 *         for i in range(self.num_cusps()):
 *             cusp_info = self.cusp_info(i)             # <<<<<<<<<<<<<<
 *             if cusp_info.is_complete:
 *                 to_do = [(1,0), (0,1)]
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3093, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_i};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3093, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_cusp_info, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cython/core/triangulation.pyx":3094
 *         for i in range(self.num_cusps()):
 *             cusp_info = self.cusp_info(i)
 *             if cusp_info.is_complete:             # <<<<<<<<<<<<<<
 *                 to_do = [(1,0), (0,1)]
 *             else:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cusp_info, __pyx_n_s_is_complete); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3094, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 3094, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_1) {

      /* "cython/core/triangulation.pyx":3095
 *             cusp_info = self.cusp_info(i)
 *             if cusp_info.is_complete:
 *                 to_do = [(1,0), (0,1)]             # <<<<<<<<<<<<<<
 *             else:
 *                 to_do = [cusp_info.filling]
 */
      __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3095, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_tuple__21);
      __Pyx_GIVEREF(__pyx_tuple__21);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_tuple__21)) __PYX_ERR(3, 3095, __pyx_L1_error);
      __Pyx_INCREF(__pyx_tuple__20);
      __Pyx_GIVEREF(__pyx_tuple__20);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_tuple__20)) __PYX_ERR(3, 3095, __pyx_L1_error);
      __Pyx_XDECREF_SET(__pyx_v_to_do, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "cython/core/triangulation.pyx":3094
 *         for i in range(self.num_cusps()):
 *             cusp_info = self.cusp_info(i)
 *             if cusp_info.is_complete:             # <<<<<<<<<<<<<<
 *                 to_do = [(1,0), (0,1)]
 *             else:
 */
      goto __pyx_L7;
    }

    /* "cython/core/triangulation.pyx":3097
 *                 to_do = [(1,0), (0,1)]
 *             else:
 *                 to_do = [cusp_info.filling]             # <<<<<<<<<<<<<<
 *             for (m, l) in to_do:
 *                 eqn = get_cusp_equation(self.c_triangulation,
 */
    /*else*/ {
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cusp_info, __pyx_n_s_filling); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3097, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3097, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(3, 3097, __pyx_L1_error);
      __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_to_do, ((PyObject*)__pyx_t_4));
      __pyx_t_4 = 0;
    }
    __pyx_L7:;

    /* "cython/core/triangulation.pyx":3098
 *             else:
 *                 to_do = [cusp_info.filling]
 *             for (m, l) in to_do:             # <<<<<<<<<<<<<<
 *                 eqn = get_cusp_equation(self.c_triangulation,
 *                                         i, int(m), int(l), &num_rows)
 */
    __pyx_t_4 = __pyx_v_to_do; __Pyx_INCREF(__pyx_t_4);
    __pyx_t_10 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(3, 3098, __pyx_L1_error)
        #endif
        if (__pyx_t_10 >= __pyx_temp) break;
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_3); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(3, 3098, __pyx_L1_error)
      #else
      __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3098, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      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(3, 3098, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3098, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3098, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_11 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 3098, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11);
        index = 0; __pyx_t_6 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_6)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_7 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_7)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(3, 3098, __pyx_L1_error)
        __pyx_t_12 = NULL;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L11_unpacking_done;
        __pyx_L10_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_12 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(3, 3098, __pyx_L1_error)
        __pyx_L11_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_l, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "cython/core/triangulation.pyx":3100
 *             for (m, l) in to_do:
 *                 eqn = get_cusp_equation(self.c_triangulation,
 *                                         i, int(m), int(l), &num_rows)             # <<<<<<<<<<<<<<
 *                 eqns.append([eqn[j] for j in range(num_rows)])
 *                 free_cusp_equation(eqn)
 */
      __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3100, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_m); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3100, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_l); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 3100, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cython/core/triangulation.pyx":3099
 *                 to_do = [cusp_info.filling]
 *             for (m, l) in to_do:
 *                 eqn = get_cusp_equation(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                         i, int(m), int(l), &num_rows)
 *                 eqns.append([eqn[j] for j in range(num_rows)])
 */
      __pyx_v_eqn = get_cusp_equation(__pyx_v_self->c_triangulation, __pyx_t_5, __pyx_t_13, __pyx_t_14, (&__pyx_v_num_rows));

      /* "cython/core/triangulation.pyx":3101
 *                 eqn = get_cusp_equation(self.c_triangulation,
 *                                         i, int(m), int(l), &num_rows)
 *                 eqns.append([eqn[j] for j in range(num_rows)])             # <<<<<<<<<<<<<<
 *                 free_cusp_equation(eqn)
 * 
 */
      { /* enter inner scope */
        __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3101, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_14 = __pyx_v_num_rows;
        __pyx_t_13 = __pyx_t_14;
        for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_13; __pyx_t_5+=1) {
          __pyx_9genexpr43__pyx_v_j = __pyx_t_5;
          __pyx_t_7 = __Pyx_PyInt_From_int((__pyx_v_eqn[__pyx_9genexpr43__pyx_v_j])); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3101, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) __PYX_ERR(3, 3101, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
      } /* exit inner scope */
      __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_eqns, __pyx_t_3); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(3, 3101, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cython/core/triangulation.pyx":3102
 *                                         i, int(m), int(l), &num_rows)
 *                 eqns.append([eqn[j] for j in range(num_rows)])
 *                 free_cusp_equation(eqn)             # <<<<<<<<<<<<<<
 * 
 *         # Dual Curve Equations
 */
      free_cusp_equation(__pyx_v_eqn);

      /* "cython/core/triangulation.pyx":3098
 *             else:
 *                 to_do = [cusp_info.filling]
 *             for (m, l) in to_do:             # <<<<<<<<<<<<<<
 *                 eqn = get_cusp_equation(self.c_triangulation,
 *                                         i, int(m), int(l), &num_rows)
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":3092
 * 
 *         # Cusp Equations
 *         for i in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *             cusp_info = self.cusp_info(i)
 *             if cusp_info.is_complete:
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":3105
 * 
 *         # Dual Curve Equations
 *         g_eqns = get_symplectic_basis(self.c_triangulation, &dual_rows, &num_cols, 0)             # <<<<<<<<<<<<<<
 * 
 *         for i in range(dual_rows):
 */
  __pyx_t_16 = get_symplectic_basis(__pyx_v_self->c_triangulation, (&__pyx_v_dual_rows), (&__pyx_v_num_cols), 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 3105, __pyx_L1_error)
  __pyx_v_g_eqns = __pyx_t_16;

  /* "cython/core/triangulation.pyx":3107
 *         g_eqns = get_symplectic_basis(self.c_triangulation, &dual_rows, &num_cols, 0)
 * 
 *         for i in range(dual_rows):             # <<<<<<<<<<<<<<
 *             eqns.append([g_eqns[i][j] for j in range(num_cols)])
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_dual_rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
    __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_8 = 0;
    __pyx_t_9 = NULL;
  } else {
    __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3107, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(3, 3107, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_9)) {
      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(3, 3107, __pyx_L1_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_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 3107, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3107, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #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(3, 3107, __pyx_L1_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_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(3, 3107, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3107, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_9(__pyx_t_2);
      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(3, 3107, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":3108
 * 
 *         for i in range(dual_rows):
 *             eqns.append([g_eqns[i][j] for j in range(num_cols)])             # <<<<<<<<<<<<<<
 * 
 *         free_symplectic_basis(g_eqns, dual_rows)
 */
    { /* enter inner scope */
      __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3108, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_14 = __pyx_v_num_cols;
      __pyx_t_13 = __pyx_t_14;
      for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_13; __pyx_t_5+=1) {
        __pyx_9genexpr44__pyx_v_j = __pyx_t_5;
        __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 3108, __pyx_L1_error)
        __pyx_t_3 = __Pyx_PyInt_From_int(((__pyx_v_g_eqns[__pyx_t_10])[__pyx_9genexpr44__pyx_v_j])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3108, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_3))) __PYX_ERR(3, 3108, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
    } /* exit inner scope */
    __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_eqns, __pyx_t_4); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(3, 3108, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/triangulation.pyx":3107
 *         g_eqns = get_symplectic_basis(self.c_triangulation, &dual_rows, &num_cols, 0)
 * 
 *         for i in range(dual_rows):             # <<<<<<<<<<<<<<
 *             eqns.append([g_eqns[i][j] for j in range(num_cols)])
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":3110
 *             eqns.append([g_eqns[i][j] for j in range(num_cols)])
 * 
 *         free_symplectic_basis(g_eqns, dual_rows)             # <<<<<<<<<<<<<<
 * 
 *         # Convert to Neumann Zagier Matrix
 */
  free_symplectic_basis(__pyx_v_g_eqns, __pyx_v_dual_rows); if (unlikely(PyErr_Occurred())) __PYX_ERR(3, 3110, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":3113
 * 
 *         # Convert to Neumann Zagier Matrix
 *         rows = len(eqns)             # <<<<<<<<<<<<<<
 *         retval = [[eqns[i][3 * (j // 2) + j % 2] - eqns[i][3 * (j // 2) + 2] for j in range(rows)] for i in range(rows)]
 * 
 */
  __pyx_t_8 = __Pyx_PyList_GET_SIZE(__pyx_v_eqns); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(3, 3113, __pyx_L1_error)
  __pyx_v_rows = __pyx_t_8;

  /* "cython/core/triangulation.pyx":3114
 *         # Convert to Neumann Zagier Matrix
 *         rows = len(eqns)
 *         retval = [[eqns[i][3 * (j // 2) + j % 2] - eqns[i][3 * (j // 2) + 2] for j in range(rows)] for i in range(rows)]             # <<<<<<<<<<<<<<
 * 
 *         if verify:
 */
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = __pyx_v_rows;
    __pyx_t_10 = __pyx_t_8;
    for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_10; __pyx_t_17+=1) {
      __pyx_9genexpr45__pyx_v_i = __pyx_t_17;
      { /* enter inner scope */
        __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3114, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_18 = __pyx_v_rows;
        __pyx_t_19 = __pyx_t_18;
        for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) {
          __pyx_9genexpr46__pyx_v_j = __pyx_t_20;
          __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_eqns, __pyx_9genexpr45__pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3114, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_21 = ((3 * __Pyx_div_Py_ssize_t(__pyx_9genexpr46__pyx_v_j, 2)) + __Pyx_mod_Py_ssize_t(__pyx_9genexpr46__pyx_v_j, 2));
          __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_3, __pyx_t_21, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 3114, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_eqns, __pyx_9genexpr45__pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3114, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_21 = ((3 * __Pyx_div_Py_ssize_t(__pyx_9genexpr46__pyx_v_j, 2)) + 2);
          __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_3, __pyx_t_21, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(3, 3114, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = PyNumber_Subtract(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3114, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_3))) __PYX_ERR(3, 3114, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
      } /* exit inner scope */
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(3, 3114, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  } /* exit inner scope */
  __pyx_v_retval = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/triangulation.pyx":3116
 *         retval = [[eqns[i][3 * (j // 2) + j % 2] - eqns[i][3 * (j // 2) + 2] for j in range(rows)] for i in range(rows)]
 * 
 *         if verify:             # <<<<<<<<<<<<<<
 *             if self._is_symplectic(retval):
 *                 print("Result is symplectic (up to factors of 2)")
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_verify); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 3116, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/triangulation.pyx":3117
 * 
 *         if verify:
 *             if self._is_symplectic(retval):             # <<<<<<<<<<<<<<
 *                 print("Result is symplectic (up to factors of 2)")
 *             else:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_symplectic); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = NULL;
    __pyx_t_14 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(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_14 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_retval};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_14, 1+__pyx_t_14);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3117, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(3, 3117, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "cython/core/triangulation.pyx":3118
 *         if verify:
 *             if self._is_symplectic(retval):
 *                 print("Result is symplectic (up to factors of 2)")             # <<<<<<<<<<<<<<
 *             else:
 *                 print("Warning: Result is not symplectic")
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3118, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/triangulation.pyx":3117
 * 
 *         if verify:
 *             if self._is_symplectic(retval):             # <<<<<<<<<<<<<<
 *                 print("Result is symplectic (up to factors of 2)")
 *             else:
 */
      goto __pyx_L26;
    }

    /* "cython/core/triangulation.pyx":3120
 *                 print("Result is symplectic (up to factors of 2)")
 *             else:
 *                 print("Warning: Result is not symplectic")             # <<<<<<<<<<<<<<
 * 
 *         return matrix(retval)
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L26:;

    /* "cython/core/triangulation.pyx":3116
 *         retval = [[eqns[i][3 * (j // 2) + j % 2] - eqns[i][3 * (j // 2) + 2] for j in range(rows)] for i in range(rows)]
 * 
 *         if verify:             # <<<<<<<<<<<<<<
 *             if self._is_symplectic(retval):
 *                 print("Result is symplectic (up to factors of 2)")
 */
  }

  /* "cython/core/triangulation.pyx":3122
 *                 print("Warning: Result is not symplectic")
 * 
 *         return matrix(retval)             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_matrix); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 3122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = NULL;
  __pyx_t_14 = 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_14 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_retval};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_14, 1+__pyx_t_14);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 3122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/triangulation.pyx":3057
 *         return True
 * 
 *     def symplectic_basis(self, verify=False):             # <<<<<<<<<<<<<<
 *         """
 *         Extend the Neumann-Zagier Matrix to one which is symplectic
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("SnapPy.Triangulation.symplectic_basis", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_eqns);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_cusp_info);
  __Pyx_XDECREF(__pyx_v_to_do);
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XDECREF(__pyx_v_retval);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/triangulation.pyx":75
 *     cdef _PDcode
 *     cdef _cover_info
 *     cdef readonly _cache             # <<<<<<<<<<<<<<
 *     cdef readonly LE
 *     cdef _link_file_full_path
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_6_cache_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6SnapPy_13Triangulation_6_cache_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_6SnapPy_13Triangulation_6_cache___get__(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

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

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

/* "cython/core/triangulation.pyx":76
 *     cdef _cover_info
 *     cdef readonly _cache
 *     cdef readonly LE             # <<<<<<<<<<<<<<
 *     cdef _link_file_full_path
 *     cdef hyperbolic_structure_initialized
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13Triangulation_2LE_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6SnapPy_13Triangulation_2LE_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_6SnapPy_13Triangulation_2LE___get__(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_self));

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

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

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

/* "cython/core/manifold.pyx":79
 *     """
 * 
 *     def __init__(self, spec=None):             # <<<<<<<<<<<<<<
 *         if self.c_triangulation != NULL:
 *             self.init_hyperbolic_structure()
 */

/* Python wrapper */
static int __pyx_pw_6SnapPy_8Manifold_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6SnapPy_8Manifold_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_spec = 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("__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_spec,0};
    values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_spec);
          if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 79, __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(1, 79, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_spec = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(1, 79, __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("SnapPy.Manifold.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold___init__(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_spec);

  /* 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_6SnapPy_8Manifold___init__(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_spec) {
  int __pyx_r;
  __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("__init__", 1);

  /* "cython/core/manifold.pyx":80
 * 
 *     def __init__(self, spec=None):
 *         if self.c_triangulation != NULL:             # <<<<<<<<<<<<<<
 *             self.init_hyperbolic_structure()
 *             do_Dehn_filling(self.c_triangulation)
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.c_triangulation != NULL);
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":81
 *     def __init__(self, spec=None):
 *         if self.c_triangulation != NULL:
 *             self.init_hyperbolic_structure()             # <<<<<<<<<<<<<<
 *             do_Dehn_filling(self.c_triangulation)
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_hyperbolic_structure); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 81, __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(1, 81, __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;

    /* "cython/core/manifold.pyx":82
 *         if self.c_triangulation != NULL:
 *             self.init_hyperbolic_structure()
 *             do_Dehn_filling(self.c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
    do_Dehn_filling(__pyx_v_self->__pyx_base.c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 82, __pyx_L1_error)

    /* "cython/core/manifold.pyx":80
 * 
 *     def __init__(self, spec=None):
 *         if self.c_triangulation != NULL:             # <<<<<<<<<<<<<<
 *             self.init_hyperbolic_structure()
 *             do_Dehn_filling(self.c_triangulation)
 */
  }

  /* "cython/core/manifold.pyx":79
 *     """
 * 
 *     def __init__(self, spec=None):             # <<<<<<<<<<<<<<
 *         if self.c_triangulation != NULL:
 *             self.init_hyperbolic_structure()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("SnapPy.Manifold.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":84
 *             do_Dehn_filling(self.c_triangulation)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _number_(n):
 *         return number.number_to_native_number(n)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_3_number_(CYTHON_UNUSED PyObject *__pyx_self, 
#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_6SnapPy_8Manifold_2_number_, "Manifold._number_(n)");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_3_number_ = {"_number_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_3_number_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_2_number_};
static PyObject *__pyx_pw_6SnapPy_8Manifold_3_number_(CYTHON_UNUSED PyObject *__pyx_self, 
#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_n = 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("_number_ (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_n,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_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 84, __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, "_number_") < 0)) __PYX_ERR(1, 84, __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_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_number_", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 84, __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("SnapPy.Manifold._number_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_2_number_(__pyx_v_n);

  /* 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_6SnapPy_8Manifold_2_number_(PyObject *__pyx_v_n) {
  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("_number_", 1);

  /* "cython/core/manifold.pyx":86
 *     @staticmethod
 *     def _number_(n):
 *         return number.number_to_native_number(n)             # <<<<<<<<<<<<<<
 * 
 *     @classmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 86, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_number_to_native_number); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 86, __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_v_n};
    __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(1, 86, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":84
 *             do_Dehn_filling(self.c_triangulation)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _number_(n):
 *         return number.number_to_native_number(n)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.Manifold._number_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":88
 *         return number.number_to_native_number(n)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def use_field_conversion(cls, func):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_5use_field_conversion(PyObject *__pyx_v_cls, 
#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_6SnapPy_8Manifold_4use_field_conversion, "Manifold.use_field_conversion(cls, func)\n\n        A class method for specifying a numerical conversion function.\n        This method is deprecated: SnapPy will automatically use\n        SageMath number types or its own SnapPy number type depending on\n        whether SageMath is available or not.\n\n        SnapPy includes its own number type, snappy.Number, which can\n        represent floating point real or complex numbers of varying\n        precision.  (In fact, Number is a wrapper for a pari number of\n        type 't_INT', 't_FRAC', 't_REAL' or 't_COMPLEX', and the pari\n        gen can be extracted as an attribute: x.gen .)  Methods of\n        SnapPy objects which return numerical values will first compute\n        the value as a Number, and then optionally convert the Number\n        to a different numerical type which can be specified by calling\n        this class method.\n\n        By default SnapPy returns Numbers when loaded into python, and\n        elements of a Sage RealField or ComplexField when loaded into\n        Sage.  These will be 64 bit numbers for ordinary Manifolds and\n        212 bit numbers for high precision manifolds.\n\n        The func argument should be a function which accepts a number and\n        returns a numerical type of your choosing.  Alternatively, the\n        strings 'sage' or 'snappy' can be passed as arguments to select\n        either of the two default behaviors.\n\n        EXAMPLE::\n\n            sage: M = Manifold('m004')\n            sage: R = M.volume().parent()\n            sage: R.name().startswith('RealField')\n            True\n            sage: from snappy.number import SnapPyNumbers\n            sage: Manifold.use_field_conversion('snappy')\n            sage: M = Manifold('m004')\n            sage: R = M.volume().parent()\n            sage: isinstance(R, SnapPyNumbers)\n            True\n            sage: Manifold.use_field_conversion('sage')\n            sage: M = Manifold('m004')\n            sage: R"" = M.volume().parent()\n            sage: R.name().startswith('RealField')\n            True\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_5use_field_conversion = {"use_field_conversion", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_5use_field_conversion, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_4use_field_conversion};
static PyObject *__pyx_pw_6SnapPy_8Manifold_5use_field_conversion(PyObject *__pyx_v_cls, 
#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_func = 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("use_field_conversion (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_func,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_func)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 88, __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, "use_field_conversion") < 0)) __PYX_ERR(1, 88, __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_func = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("use_field_conversion", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 88, __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("SnapPy.Manifold.use_field_conversion", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_4use_field_conversion(((PyTypeObject*)__pyx_v_cls), __pyx_v_func);

  /* 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_6SnapPy_8Manifold_4use_field_conversion(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, PyObject *__pyx_v_func) {
  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("use_field_conversion", 1);

  /* "cython/core/manifold.pyx":134
 *             True
 *         """
 *         number.use_field_conversion(func)             # <<<<<<<<<<<<<<
 * 
 *     def init_hyperbolic_structure(self, force_recompute = False):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_use_field_conversion); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 134, __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_v_func};
    __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(1, 134, __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;

  /* "cython/core/manifold.pyx":88
 *         return number.number_to_native_number(n)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def use_field_conversion(cls, func):
 *         """
 */

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

/* "cython/core/manifold.pyx":136
 *         number.use_field_conversion(func)
 * 
 *     def init_hyperbolic_structure(self, force_recompute = False):             # <<<<<<<<<<<<<<
 *         if not self.c_triangulation:
 *             return
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_7init_hyperbolic_structure(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_6SnapPy_8Manifold_6init_hyperbolic_structure, "Manifold.init_hyperbolic_structure(self, force_recompute=False)");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_7init_hyperbolic_structure = {"init_hyperbolic_structure", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_7init_hyperbolic_structure, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_6init_hyperbolic_structure};
static PyObject *__pyx_pw_6SnapPy_8Manifold_7init_hyperbolic_structure(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_force_recompute = 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("init_hyperbolic_structure (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_force_recompute,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_force_recompute);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 136, __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_hyperbolic_structure") < 0)) __PYX_ERR(1, 136, __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_force_recompute = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("init_hyperbolic_structure", 0, 0, 1, __pyx_nargs); __PYX_ERR(1, 136, __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("SnapPy.Manifold.init_hyperbolic_structure", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_6init_hyperbolic_structure(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_force_recompute);

  /* 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_6SnapPy_8Manifold_6init_hyperbolic_structure(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_force_recompute) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init_hyperbolic_structure", 1);

  /* "cython/core/manifold.pyx":137
 * 
 *     def init_hyperbolic_structure(self, force_recompute = False):
 *         if not self.c_triangulation:             # <<<<<<<<<<<<<<
 *             return
 *         if self.hyperbolic_structure_initialized and not force_recompute:
 */
  __pyx_t_1 = (!(__pyx_v_self->__pyx_base.c_triangulation != 0));
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":138
 *     def init_hyperbolic_structure(self, force_recompute = False):
 *         if not self.c_triangulation:
 *             return             # <<<<<<<<<<<<<<
 *         if self.hyperbolic_structure_initialized and not force_recompute:
 *             return
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":137
 * 
 *     def init_hyperbolic_structure(self, force_recompute = False):
 *         if not self.c_triangulation:             # <<<<<<<<<<<<<<
 *             return
 *         if self.hyperbolic_structure_initialized and not force_recompute:
 */
  }

  /* "cython/core/manifold.pyx":139
 *         if not self.c_triangulation:
 *             return
 *         if self.hyperbolic_structure_initialized and not force_recompute:             # <<<<<<<<<<<<<<
 *             return
 *         find_complete_hyperbolic_structure(self.c_triangulation)
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->__pyx_base.hyperbolic_structure_initialized); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 139, __pyx_L1_error)
  if (__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_force_recompute); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 139, __pyx_L1_error)
  __pyx_t_3 = (!__pyx_t_2);
  __pyx_t_1 = __pyx_t_3;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":140
 *             return
 *         if self.hyperbolic_structure_initialized and not force_recompute:
 *             return             # <<<<<<<<<<<<<<
 *         find_complete_hyperbolic_structure(self.c_triangulation)
 *         do_Dehn_filling(self.c_triangulation)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":139
 *         if not self.c_triangulation:
 *             return
 *         if self.hyperbolic_structure_initialized and not force_recompute:             # <<<<<<<<<<<<<<
 *             return
 *         find_complete_hyperbolic_structure(self.c_triangulation)
 */
  }

  /* "cython/core/manifold.pyx":141
 *         if self.hyperbolic_structure_initialized and not force_recompute:
 *             return
 *         find_complete_hyperbolic_structure(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         do_Dehn_filling(self.c_triangulation)
 *         self.hyperbolic_structure_initialized = True
 */
  find_complete_hyperbolic_structure(__pyx_v_self->__pyx_base.c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 141, __pyx_L1_error)

  /* "cython/core/manifold.pyx":142
 *             return
 *         find_complete_hyperbolic_structure(self.c_triangulation)
 *         do_Dehn_filling(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         self.hyperbolic_structure_initialized = True
 * 
 */
  do_Dehn_filling(__pyx_v_self->__pyx_base.c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 142, __pyx_L1_error)

  /* "cython/core/manifold.pyx":143
 *         find_complete_hyperbolic_structure(self.c_triangulation)
 *         do_Dehn_filling(self.c_triangulation)
 *         self.hyperbolic_structure_initialized = True             # <<<<<<<<<<<<<<
 * 
 *     def canonize(self):
 */
  __Pyx_INCREF(Py_True);
  __Pyx_GIVEREF(Py_True);
  __Pyx_GOTREF(__pyx_v_self->__pyx_base.hyperbolic_structure_initialized);
  __Pyx_DECREF(__pyx_v_self->__pyx_base.hyperbolic_structure_initialized);
  __pyx_v_self->__pyx_base.hyperbolic_structure_initialized = Py_True;

  /* "cython/core/manifold.pyx":136
 *         number.use_field_conversion(func)
 * 
 *     def init_hyperbolic_structure(self, force_recompute = False):             # <<<<<<<<<<<<<<
 *         if not self.c_triangulation:
 *             return
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("SnapPy.Manifold.init_hyperbolic_structure", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":145
 *         self.hyperbolic_structure_initialized = True
 * 
 *     def canonize(self):             # <<<<<<<<<<<<<<
 *         """
 *         Change the triangulation to an arbitrary retriangulation of
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_9canonize(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_6SnapPy_8Manifold_8canonize, "Manifold.canonize(self)\n\n        Change the triangulation to an arbitrary retriangulation of\n        the canonical cell decomposition.\n\n        >>> M = Manifold('m007')\n        >>> M.num_tetrahedra()\n        3\n        >>> M.canonize()\n        >>> M.num_tetrahedra()\n        4\n\n        Note: due to rounding error, it is possible that this is not\n        actually the canonical triangulation.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_9canonize = {"canonize", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_9canonize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_8canonize};
static PyObject *__pyx_pw_6SnapPy_8Manifold_9canonize(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("canonize (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("canonize", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "canonize", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_8canonize(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_8Manifold_8canonize(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self) {
  FuncResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  FuncResult __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("canonize", 1);

  /* "cython/core/manifold.pyx":161
 *         """
 *         cdef c_FuncResult result
 *         result = proto_canonize(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         if FuncResult[result] != 'func_OK':
 *             raise RuntimeError('SnapPea failed to find the canonical '
 */
  __pyx_t_1 = proto_canonize(__pyx_v_self->__pyx_base.c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 161, __pyx_L1_error)
  __pyx_v_result = __pyx_t_1;

  /* "cython/core/manifold.pyx":162
 *         cdef c_FuncResult result
 *         result = proto_canonize(self.c_triangulation)
 *         if FuncResult[result] != 'func_OK':             # <<<<<<<<<<<<<<
 *             raise RuntimeError('SnapPea failed to find the canonical '
 *                                'triangulation.')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FuncResult); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_FuncResult(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 162, __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_PyString_Equals(__pyx_t_4, __pyx_n_s_func_OK, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(__pyx_t_5)) {

    /* "cython/core/manifold.pyx":163
 *         result = proto_canonize(self.c_triangulation)
 *         if FuncResult[result] != 'func_OK':
 *             raise RuntimeError('SnapPea failed to find the canonical '             # <<<<<<<<<<<<<<
 *                                'triangulation.')
 *         self._cache.clear(message='canonize')
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 163, __pyx_L1_error)

    /* "cython/core/manifold.pyx":162
 *         cdef c_FuncResult result
 *         result = proto_canonize(self.c_triangulation)
 *         if FuncResult[result] != 'func_OK':             # <<<<<<<<<<<<<<
 *             raise RuntimeError('SnapPea failed to find the canonical '
 *                                'triangulation.')
 */
  }

  /* "cython/core/manifold.pyx":165
 *             raise RuntimeError('SnapPea failed to find the canonical '
 *                                'triangulation.')
 *         self._cache.clear(message='canonize')             # <<<<<<<<<<<<<<
 * 
 *     def _canonical_retriangulation(self, opacities = None):
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._cache, __pyx_n_s_clear); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_message, __pyx_n_s_canonize) < 0) __PYX_ERR(1, 165, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":145
 *         self.hyperbolic_structure_initialized = True
 * 
 *     def canonize(self):             # <<<<<<<<<<<<<<
 *         """
 *         Change the triangulation to an arbitrary retriangulation of
 */

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

/* "cython/core/manifold.pyx":167
 *         self._cache.clear(message='canonize')
 * 
 *     def _canonical_retriangulation(self, opacities = None):             # <<<<<<<<<<<<<<
 *         """
 *         If this triangulation is a subdivision of the canonical cell
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_11_canonical_retriangulation(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_6SnapPy_8Manifold_10_canonical_retriangulation, "Manifold._canonical_retriangulation(self, opacities=None)\n\n        If this triangulation is a subdivision of the canonical cell\n        decomposition, return the canonical retriangulation as Triangulation.\n\n        Warning: Many operations on a SnapPy Triangulation will remove the\n        finite vertices or change the triangulation so it is no longer the\n        canonical retriangulation.\n        By default, the algorithm numerically checks that the tilts are close\n        to zero to determine which faces are opaque or transparent.\n        But it can also be passed an explicit list of 4 * num_tetrahedra bool's\n        (one per face of each tet) that mark the opaque faces.\n\n        For example, m412's canonical cell decomposition consists of a single\n        cube. The canonical retriangulation thus has 12 simplices.\n\n        >>> M = Manifold(\"m412\")\n\n        Some isometries of M are not visible in this triangulation (not\n        even after calling M.canonize())\n\n        >>> len(M.isomorphisms_to(M))\n        4\n        >>> T = M._canonical_retriangulation()\n        >>> T.num_tetrahedra()\n        12\n\n        But all isometries of M are visible in its canonical retriangulation.\n\n        >>> len(T.isomorphisms_to(T))\n        8\n\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_11_canonical_retriangulation = {"_canonical_retriangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_11_canonical_retriangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_10_canonical_retriangulation};
static PyObject *__pyx_pw_6SnapPy_8Manifold_11_canonical_retriangulation(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_opacities = 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("_canonical_retriangulation (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_opacities,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_opacities);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 167, __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, "_canonical_retriangulation") < 0)) __PYX_ERR(1, 167, __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_opacities = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_canonical_retriangulation", 0, 0, 1, __pyx_nargs); __PYX_ERR(1, 167, __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("SnapPy.Manifold._canonical_retriangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_10_canonical_retriangulation(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_opacities);

  /* 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_6SnapPy_8Manifold_10_canonical_retriangulation(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_opacities) {
  Boolean *__pyx_v_c_opacities;
  Triangulation *__pyx_v_c_retriangulated_triangulation;
  int __pyx_v_n;
  PyObject *__pyx_v_result = 0;
  struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_new_tri = 0;
  long __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  long __pyx_t_5;
  long __pyx_t_6;
  long __pyx_t_7;
  Boolean __pyx_t_8;
  FuncResult __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  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("_canonical_retriangulation", 1);

  /* "cython/core/manifold.pyx":203
 *         cdef Boolean *c_opacities
 *         cdef c_Triangulation *c_retriangulated_triangulation
 *         cdef int n = get_num_tetrahedra(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         cdef result
 *         cdef Triangulation new_tri
 */
  __pyx_t_1 = get_num_tetrahedra(__pyx_v_self->__pyx_base.c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 203, __pyx_L1_error)
  __pyx_v_n = __pyx_t_1;

  /* "cython/core/manifold.pyx":207
 *         cdef Triangulation new_tri
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return ""
 * 
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (__pyx_t_2) {

    /* "cython/core/manifold.pyx":208
 * 
 *         if self.c_triangulation is NULL:
 *             return ""             # <<<<<<<<<<<<<<
 * 
 *         copy_triangulation(self.c_triangulation,
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_s__9);
    __pyx_r = __pyx_kp_s__9;
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":207
 *         cdef Triangulation new_tri
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return ""
 * 
 */
  }

  /* "cython/core/manifold.pyx":210
 *             return ""
 * 
 *         copy_triangulation(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                            &c_retriangulated_triangulation)
 * 
 */
  copy_triangulation(__pyx_v_self->__pyx_base.c_triangulation, (&__pyx_v_c_retriangulated_triangulation)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 210, __pyx_L1_error)

  /* "cython/core/manifold.pyx":213
 *                            &c_retriangulated_triangulation)
 * 
 *         if opacities:             # <<<<<<<<<<<<<<
 *             if not len(opacities) == 4 * n:
 *                 raise Exception("Number of opacities does not match.")
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_opacities); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 213, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "cython/core/manifold.pyx":214
 * 
 *         if opacities:
 *             if not len(opacities) == 4 * n:             # <<<<<<<<<<<<<<
 *                 raise Exception("Number of opacities does not match.")
 *             c_opacities = <Boolean *>malloc(n * 4 * sizeof(Boolean))
 */
    __pyx_t_3 = PyObject_Length(__pyx_v_opacities); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 214, __pyx_L1_error)
    __pyx_t_2 = (!(__pyx_t_3 == (4 * __pyx_v_n)));
    if (unlikely(__pyx_t_2)) {

      /* "cython/core/manifold.pyx":215
 *         if opacities:
 *             if not len(opacities) == 4 * n:
 *                 raise Exception("Number of opacities does not match.")             # <<<<<<<<<<<<<<
 *             c_opacities = <Boolean *>malloc(n * 4 * sizeof(Boolean))
 *             for i in range(4 * n):
 */
      __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(1, 215, __pyx_L1_error)

      /* "cython/core/manifold.pyx":214
 * 
 *         if opacities:
 *             if not len(opacities) == 4 * n:             # <<<<<<<<<<<<<<
 *                 raise Exception("Number of opacities does not match.")
 *             c_opacities = <Boolean *>malloc(n * 4 * sizeof(Boolean))
 */
    }

    /* "cython/core/manifold.pyx":216
 *             if not len(opacities) == 4 * n:
 *                 raise Exception("Number of opacities does not match.")
 *             c_opacities = <Boolean *>malloc(n * 4 * sizeof(Boolean))             # <<<<<<<<<<<<<<
 *             for i in range(4 * n):
 *                 c_opacities[i] = 1 if opacities[i] else 0
 */
    __pyx_v_c_opacities = ((Boolean *)malloc(((__pyx_v_n * 4) * (sizeof(Boolean)))));

    /* "cython/core/manifold.pyx":217
 *                 raise Exception("Number of opacities does not match.")
 *             c_opacities = <Boolean *>malloc(n * 4 * sizeof(Boolean))
 *             for i in range(4 * n):             # <<<<<<<<<<<<<<
 *                 c_opacities[i] = 1 if opacities[i] else 0
 *         else:
 */
    __pyx_t_5 = (4 * __pyx_v_n);
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_i = __pyx_t_7;

      /* "cython/core/manifold.pyx":218
 *             c_opacities = <Boolean *>malloc(n * 4 * sizeof(Boolean))
 *             for i in range(4 * n):
 *                 c_opacities[i] = 1 if opacities[i] else 0             # <<<<<<<<<<<<<<
 *         else:
 *             c_opacities = NULL
 */
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_opacities, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 218, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (__pyx_t_2) {
        __pyx_t_8 = 1;
      } else {
        __pyx_t_8 = 0;
      }
      (__pyx_v_c_opacities[__pyx_v_i]) = __pyx_t_8;
    }

    /* "cython/core/manifold.pyx":213
 *                            &c_retriangulated_triangulation)
 * 
 *         if opacities:             # <<<<<<<<<<<<<<
 *             if not len(opacities) == 4 * n:
 *                 raise Exception("Number of opacities does not match.")
 */
    goto __pyx_L4;
  }

  /* "cython/core/manifold.pyx":220
 *                 c_opacities[i] = 1 if opacities[i] else 0
 *         else:
 *             c_opacities = NULL             # <<<<<<<<<<<<<<
 *             result = proto_canonize(c_retriangulated_triangulation)
 *             if FuncResult[result] != 'func_OK':
 */
  /*else*/ {
    __pyx_v_c_opacities = NULL;

    /* "cython/core/manifold.pyx":221
 *         else:
 *             c_opacities = NULL
 *             result = proto_canonize(c_retriangulated_triangulation)             # <<<<<<<<<<<<<<
 *             if FuncResult[result] != 'func_OK':
 *                 free_triangulation(c_retriangulated_triangulation)
 */
    __pyx_t_9 = proto_canonize(__pyx_v_c_retriangulated_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 221, __pyx_L1_error)
    __pyx_t_4 = __Pyx_PyInt_From_FuncResult(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_result = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cython/core/manifold.pyx":222
 *             c_opacities = NULL
 *             result = proto_canonize(c_retriangulated_triangulation)
 *             if FuncResult[result] != 'func_OK':             # <<<<<<<<<<<<<<
 *                 free_triangulation(c_retriangulated_triangulation)
 *                 raise RuntimeError('SnapPea failed to find the canonical '
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FuncResult); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_result); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_10, __pyx_n_s_func_OK, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 222, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(__pyx_t_2)) {

      /* "cython/core/manifold.pyx":223
 *             result = proto_canonize(c_retriangulated_triangulation)
 *             if FuncResult[result] != 'func_OK':
 *                 free_triangulation(c_retriangulated_triangulation)             # <<<<<<<<<<<<<<
 *                 raise RuntimeError('SnapPea failed to find the canonical '
 *                                    'triangulation.')
 */
      free_triangulation(__pyx_v_c_retriangulated_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 223, __pyx_L1_error)

      /* "cython/core/manifold.pyx":224
 *             if FuncResult[result] != 'func_OK':
 *                 free_triangulation(c_retriangulated_triangulation)
 *                 raise RuntimeError('SnapPea failed to find the canonical '             # <<<<<<<<<<<<<<
 *                                    'triangulation.')
 * 
 */
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 224, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_Raise(__pyx_t_10, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __PYX_ERR(1, 224, __pyx_L1_error)

      /* "cython/core/manifold.pyx":222
 *             c_opacities = NULL
 *             result = proto_canonize(c_retriangulated_triangulation)
 *             if FuncResult[result] != 'func_OK':             # <<<<<<<<<<<<<<
 *                 free_triangulation(c_retriangulated_triangulation)
 *                 raise RuntimeError('SnapPea failed to find the canonical '
 */
    }
  }
  __pyx_L4:;

  /* "cython/core/manifold.pyx":227
 *                                    'triangulation.')
 * 
 *         canonical_retriangulation_with_opacities(             # <<<<<<<<<<<<<<
 *                 c_retriangulated_triangulation, c_opacities)
 * 
 */
  canonical_retriangulation_with_opacities(__pyx_v_c_retriangulated_triangulation, __pyx_v_c_opacities); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 227, __pyx_L1_error)

  /* "cython/core/manifold.pyx":230
 *                 c_retriangulated_triangulation, c_opacities)
 * 
 *         free(c_opacities)             # <<<<<<<<<<<<<<
 * 
 *         new_tri = _triangulation_class('empty')
 */
  free(__pyx_v_c_opacities);

  /* "cython/core/manifold.pyx":232
 *         free(c_opacities)
 * 
 *         new_tri = _triangulation_class('empty')             # <<<<<<<<<<<<<<
 *         new_tri.set_c_triangulation(c_retriangulated_triangulation)
 *         new_tri.set_name(self.name() + '_canonical')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_triangulation_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = NULL;
  __pyx_t_1 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_1 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_n_s_empty};
    __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_1, 1+__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_6SnapPy_Triangulation))))) __PYX_ERR(1, 232, __pyx_L1_error)
  __pyx_v_new_tri = ((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_t_10);
  __pyx_t_10 = 0;

  /* "cython/core/manifold.pyx":233
 * 
 *         new_tri = _triangulation_class('empty')
 *         new_tri.set_c_triangulation(c_retriangulated_triangulation)             # <<<<<<<<<<<<<<
 *         new_tri.set_name(self.name() + '_canonical')
 * 
 */
  __pyx_t_10 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_new_tri->__pyx_vtab)->set_c_triangulation(__pyx_v_new_tri, __pyx_v_c_retriangulated_triangulation); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cython/core/manifold.pyx":234
 *         new_tri = _triangulation_class('empty')
 *         new_tri.set_c_triangulation(c_retriangulated_triangulation)
 *         new_tri.set_name(self.name() + '_canonical')             # <<<<<<<<<<<<<<
 * 
 *         return new_tri
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_new_tri), __pyx_n_s_set_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = NULL;
  __pyx_t_1 = 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_1 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_1, 0+__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_n_s_canonical); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = NULL;
  __pyx_t_1 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_1 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_12};
    __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_1, 1+__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "cython/core/manifold.pyx":236
 *         new_tri.set_name(self.name() + '_canonical')
 * 
 *         return new_tri             # <<<<<<<<<<<<<<
 * 
 *     def _canonical_cells_are_tetrahedra(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_new_tri);
  __pyx_r = ((PyObject *)__pyx_v_new_tri);
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":167
 *         self._cache.clear(message='canonize')
 * 
 *     def _canonical_retriangulation(self, opacities = None):             # <<<<<<<<<<<<<<
 *         """
 *         If this triangulation is a subdivision of the canonical cell
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("SnapPy.Manifold._canonical_retriangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF((PyObject *)__pyx_v_new_tri);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":238
 *         return new_tri
 * 
 *     def _canonical_cells_are_tetrahedra(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns True if and only if the canonical
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_13_canonical_cells_are_tetrahedra(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_6SnapPy_8Manifold_12_canonical_cells_are_tetrahedra, "Manifold._canonical_cells_are_tetrahedra(self)\n\n        Returns True if and only if the canonical\n        cell decomposition is a triangulation.\n\n        >>> Manifold('K4a1')._canonical_cells_are_tetrahedra()\n        True\n        >>> Manifold('L6a4')._canonical_cells_are_tetrahedra()\n        False\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_13_canonical_cells_are_tetrahedra = {"_canonical_cells_are_tetrahedra", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_13_canonical_cells_are_tetrahedra, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_12_canonical_cells_are_tetrahedra};
static PyObject *__pyx_pw_6SnapPy_8Manifold_13_canonical_cells_are_tetrahedra(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("_canonical_cells_are_tetrahedra (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("_canonical_cells_are_tetrahedra", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_canonical_cells_are_tetrahedra", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_12_canonical_cells_are_tetrahedra(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self));

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

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

  /* "cython/core/manifold.pyx":250
 * 
 *         cdef Manifold M
 *         M = self.copy()             # <<<<<<<<<<<<<<
 *         M.canonize()
 *         canonical_retriangulation(M.c_triangulation)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 250, __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(1, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6SnapPy_Manifold))))) __PYX_ERR(1, 250, __pyx_L1_error)
  __pyx_v_M = ((struct __pyx_obj_6SnapPy_Manifold *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/manifold.pyx":251
 *         cdef Manifold M
 *         M = self.copy()
 *         M.canonize()             # <<<<<<<<<<<<<<
 *         canonical_retriangulation(M.c_triangulation)
 *         count_cusps(M.c_triangulation)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_M), __pyx_n_s_canonize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 251, __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(1, 251, __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;

  /* "cython/core/manifold.pyx":252
 *         M = self.copy()
 *         M.canonize()
 *         canonical_retriangulation(M.c_triangulation)             # <<<<<<<<<<<<<<
 *         count_cusps(M.c_triangulation)
 *         return get_num_fake_cusps(M.c_triangulation) == 0
 */
  canonical_retriangulation(__pyx_v_M->__pyx_base.c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 252, __pyx_L1_error)

  /* "cython/core/manifold.pyx":253
 *         M.canonize()
 *         canonical_retriangulation(M.c_triangulation)
 *         count_cusps(M.c_triangulation)             # <<<<<<<<<<<<<<
 *         return get_num_fake_cusps(M.c_triangulation) == 0
 * 
 */
  count_cusps(__pyx_v_M->__pyx_base.c_triangulation);

  /* "cython/core/manifold.pyx":254
 *         canonical_retriangulation(M.c_triangulation)
 *         count_cusps(M.c_triangulation)
 *         return get_num_fake_cusps(M.c_triangulation) == 0             # <<<<<<<<<<<<<<
 * 
 *     def _from_string(self, string, initialize_structure=True):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = get_num_fake_cusps(__pyx_v_M->__pyx_base.c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 254, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_t_4 == 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":238
 *         return new_tri
 * 
 *     def _canonical_cells_are_tetrahedra(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns True if and only if the canonical
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.Manifold._canonical_cells_are_tetrahedra", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_M);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":256
 *         return get_num_fake_cusps(M.c_triangulation) == 0
 * 
 *     def _from_string(self, string, initialize_structure=True):             # <<<<<<<<<<<<<<
 *         """
 *         WARNING: Users should not use this function directly.  To create a
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_15_from_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_6SnapPy_8Manifold_14_from_string, "Manifold._from_string(self, string, initialize_structure=True)\n\n        WARNING: Users should not use this function directly.  To create a\n        Manifold or ManifoldHP from a string containing the contents\n        of a triangulation file, simply do:\n\n        >>> M = Manifold('7_4')\n        >>> seed = M._to_string()\n        >>> N = Manifold(seed)\n        >>> N.volume() # doctest: +NUMERIC6\n        5.13794120\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_15_from_string = {"_from_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_15_from_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_14_from_string};
static PyObject *__pyx_pw_6SnapPy_8Manifold_15_from_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
) {
  PyObject *__pyx_v_string = 0;
  PyObject *__pyx_v_initialize_structure = 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("_from_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);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_string,&__pyx_n_s_initialize_structure,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    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_string)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 256, __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_initialize_structure);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 256, __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, "_from_string") < 0)) __PYX_ERR(1, 256, __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_string = values[0];
    __pyx_v_initialize_structure = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_string", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 256, __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("SnapPy.Manifold._from_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_14_from_string(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_string, __pyx_v_initialize_structure);

  /* 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_6SnapPy_8Manifold_14_from_string(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_string, PyObject *__pyx_v_initialize_structure) {
  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("_from_string", 1);

  /* "cython/core/manifold.pyx":268
 *         5.13794120
 *         """
 *         Triangulation._from_string(self, string)             # <<<<<<<<<<<<<<
 *         if initialize_structure:
 *             self.init_hyperbolic_structure()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6SnapPy_Triangulation), __pyx_n_s_from_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 268, __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[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_string};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 268, __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;

  /* "cython/core/manifold.pyx":269
 *         """
 *         Triangulation._from_string(self, string)
 *         if initialize_structure:             # <<<<<<<<<<<<<<
 *             self.init_hyperbolic_structure()
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_initialize_structure); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 269, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "cython/core/manifold.pyx":270
 *         Triangulation._from_string(self, string)
 *         if initialize_structure:
 *             self.init_hyperbolic_structure()             # <<<<<<<<<<<<<<
 * 
 *     def _from_bytes(self, bytestring, initialize_structure=True):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_hyperbolic_structure); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 270, __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(1, 270, __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;

    /* "cython/core/manifold.pyx":269
 *         """
 *         Triangulation._from_string(self, string)
 *         if initialize_structure:             # <<<<<<<<<<<<<<
 *             self.init_hyperbolic_structure()
 * 
 */
  }

  /* "cython/core/manifold.pyx":256
 *         return get_num_fake_cusps(M.c_triangulation) == 0
 * 
 *     def _from_string(self, string, initialize_structure=True):             # <<<<<<<<<<<<<<
 *         """
 *         WARNING: Users should not use this function directly.  To create a
 */

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

/* "cython/core/manifold.pyx":272
 *             self.init_hyperbolic_structure()
 * 
 *     def _from_bytes(self, bytestring, initialize_structure=True):             # <<<<<<<<<<<<<<
 *         """
 *         Fill an empty manifold from a byte sequence generated by
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_17_from_bytes(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_6SnapPy_8Manifold_16_from_bytes, "Manifold._from_bytes(self, bytestring, initialize_structure=True)\n\n        Fill an empty manifold from a byte sequence generated by\n        _to_bytes.\n        >>> M = Manifold('m125')\n        >>> N = Manifold('empty')\n        >>> N._from_bytes(M._to_bytes())\n        >>> N.is_isometric_to(M)\n        True\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_17_from_bytes = {"_from_bytes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_17_from_bytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_16_from_bytes};
static PyObject *__pyx_pw_6SnapPy_8Manifold_17_from_bytes(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_bytestring = 0;
  PyObject *__pyx_v_initialize_structure = 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("_from_bytes (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_bytestring,&__pyx_n_s_initialize_structure,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    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_bytestring)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 272, __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_initialize_structure);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 272, __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, "_from_bytes") < 0)) __PYX_ERR(1, 272, __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_bytestring = values[0];
    __pyx_v_initialize_structure = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_bytes", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 272, __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("SnapPy.Manifold._from_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_16_from_bytes(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_bytestring, __pyx_v_initialize_structure);

  /* 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_6SnapPy_8Manifold_16_from_bytes(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_bytestring, PyObject *__pyx_v_initialize_structure) {
  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("_from_bytes", 1);

  /* "cython/core/manifold.pyx":282
 *         True
 *         """
 *         Triangulation._from_bytes(self, bytestring)             # <<<<<<<<<<<<<<
 *         if initialize_structure:
 *             self.init_hyperbolic_structure()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6SnapPy_Triangulation), __pyx_n_s_from_bytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 282, __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[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_bytestring};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 282, __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;

  /* "cython/core/manifold.pyx":283
 *         """
 *         Triangulation._from_bytes(self, bytestring)
 *         if initialize_structure:             # <<<<<<<<<<<<<<
 *             self.init_hyperbolic_structure()
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_initialize_structure); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 283, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "cython/core/manifold.pyx":284
 *         Triangulation._from_bytes(self, bytestring)
 *         if initialize_structure:
 *             self.init_hyperbolic_structure()             # <<<<<<<<<<<<<<
 * 
 *     def _from_isosig(self, isosig, initialize_structure=True):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_hyperbolic_structure); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 284, __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(1, 284, __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;

    /* "cython/core/manifold.pyx":283
 *         """
 *         Triangulation._from_bytes(self, bytestring)
 *         if initialize_structure:             # <<<<<<<<<<<<<<
 *             self.init_hyperbolic_structure()
 * 
 */
  }

  /* "cython/core/manifold.pyx":272
 *             self.init_hyperbolic_structure()
 * 
 *     def _from_bytes(self, bytestring, initialize_structure=True):             # <<<<<<<<<<<<<<
 *         """
 *         Fill an empty manifold from a byte sequence generated by
 */

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

/* "cython/core/manifold.pyx":286
 *             self.init_hyperbolic_structure()
 * 
 *     def _from_isosig(self, isosig, initialize_structure=True):             # <<<<<<<<<<<<<<
 *         """
 *         Fill an empty manifold from an isosig generated by
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_19_from_isosig(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_6SnapPy_8Manifold_18_from_isosig, "Manifold._from_isosig(self, isosig, initialize_structure=True)\n\n        Fill an empty manifold from an isosig generated by\n        triangulation_isosig.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_19_from_isosig = {"_from_isosig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_19_from_isosig, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_18_from_isosig};
static PyObject *__pyx_pw_6SnapPy_8Manifold_19_from_isosig(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_isosig = 0;
  PyObject *__pyx_v_initialize_structure = 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("_from_isosig (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_isosig,&__pyx_n_s_initialize_structure,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    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_isosig)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 286, __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_initialize_structure);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 286, __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, "_from_isosig") < 0)) __PYX_ERR(1, 286, __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_isosig = values[0];
    __pyx_v_initialize_structure = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_from_isosig", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 286, __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("SnapPy.Manifold._from_isosig", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_18_from_isosig(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_isosig, __pyx_v_initialize_structure);

  /* 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_6SnapPy_8Manifold_18_from_isosig(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_isosig, PyObject *__pyx_v_initialize_structure) {
  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("_from_isosig", 1);

  /* "cython/core/manifold.pyx":291
 *         triangulation_isosig.
 *         """
 *         Triangulation._from_isosig(self, isosig)             # <<<<<<<<<<<<<<
 *         if self.c_triangulation == NULL:
 *             return
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6SnapPy_Triangulation), __pyx_n_s_from_isosig); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 291, __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[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_isosig};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 291, __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;

  /* "cython/core/manifold.pyx":292
 *         """
 *         Triangulation._from_isosig(self, isosig)
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             return
 *         if initialize_structure:
 */
  __pyx_t_5 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (__pyx_t_5) {

    /* "cython/core/manifold.pyx":293
 *         Triangulation._from_isosig(self, isosig)
 *         if self.c_triangulation == NULL:
 *             return             # <<<<<<<<<<<<<<
 *         if initialize_structure:
 *             self.init_hyperbolic_structure()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":292
 *         """
 *         Triangulation._from_isosig(self, isosig)
 *         if self.c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             return
 *         if initialize_structure:
 */
  }

  /* "cython/core/manifold.pyx":294
 *         if self.c_triangulation == NULL:
 *             return
 *         if initialize_structure:             # <<<<<<<<<<<<<<
 *             self.init_hyperbolic_structure()
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_initialize_structure); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 294, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "cython/core/manifold.pyx":295
 *             return
 *         if initialize_structure:
 *             self.init_hyperbolic_structure()             # <<<<<<<<<<<<<<
 * 
 *     def copy(self):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_init_hyperbolic_structure); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 295, __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(1, 295, __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;

    /* "cython/core/manifold.pyx":294
 *         if self.c_triangulation == NULL:
 *             return
 *         if initialize_structure:             # <<<<<<<<<<<<<<
 *             self.init_hyperbolic_structure()
 * 
 */
  }

  /* "cython/core/manifold.pyx":286
 *             self.init_hyperbolic_structure()
 * 
 *     def _from_isosig(self, isosig, initialize_structure=True):             # <<<<<<<<<<<<<<
 *         """
 *         Fill an empty manifold from an isosig generated by
 */

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

/* "cython/core/manifold.pyx":297
 *             self.init_hyperbolic_structure()
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a copy of the manifold
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_21copy(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_6SnapPy_8Manifold_20copy, "Manifold.copy(self)\n\n        Returns a copy of the manifold\n\n        >>> M = Manifold('m015')\n        >>> N = M.copy()\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_21copy = {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_21copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_20copy};
static PyObject *__pyx_pw_6SnapPy_8Manifold_21copy(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("copy (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("copy", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_20copy(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_8Manifold_20copy(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self) {
  PyObject *__pyx_v_empty = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy", 1);

  /* "cython/core/manifold.pyx":304
 *         >>> N = M.copy()
 *         """
 *         empty = self.__class__('empty')             # <<<<<<<<<<<<<<
 *         if self.c_triangulation is NULL:
 *             return empty
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 304, __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, __pyx_n_s_empty};
    __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(1, 304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_empty = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/manifold.pyx":305
 *         """
 *         empty = self.__class__('empty')
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return empty
 *         return Manifold_from_Triangulation(self, manifold_class=self.__class__)
 */
  __pyx_t_5 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (__pyx_t_5) {

    /* "cython/core/manifold.pyx":306
 *         empty = self.__class__('empty')
 *         if self.c_triangulation is NULL:
 *             return empty             # <<<<<<<<<<<<<<
 *         return Manifold_from_Triangulation(self, manifold_class=self.__class__)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_empty);
    __pyx_r = __pyx_v_empty;
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":305
 *         """
 *         empty = self.__class__('empty')
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return empty
 *         return Manifold_from_Triangulation(self, manifold_class=self.__class__)
 */
  }

  /* "cython/core/manifold.pyx":307
 *         if self.c_triangulation is NULL:
 *             return empty
 *         return Manifold_from_Triangulation(self, manifold_class=self.__class__)             # <<<<<<<<<<<<<<
 * 
 *     def cusp_neighborhood(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Manifold_from_Triangulation); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(1, 307, __pyx_L1_error);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_manifold_class_2, __pyx_t_6) < 0) __PYX_ERR(1, 307, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":297
 *             self.init_hyperbolic_structure()
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a copy of the manifold
 */

  /* 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_6);
  __Pyx_AddTraceback("SnapPy.Manifold.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_empty);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":309
 *         return Manifold_from_Triangulation(self, manifold_class=self.__class__)
 * 
 *     def cusp_neighborhood(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns information about the cusp neighborhoods of the
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_23cusp_neighborhood(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_6SnapPy_8Manifold_22cusp_neighborhood, "Manifold.cusp_neighborhood(self)\n\n        Returns information about the cusp neighborhoods of the\n        manifold, in the form of data about the corresponding horoball\n        diagrams in hyperbolic 3-space.\n\n        >>> M = Manifold('s000')\n        >>> CN = M.cusp_neighborhood()\n        >>> CN.volume() # doctest: +NUMERIC6\n        0.32475953\n        >>> len(CN.horoballs(0.01))\n        178\n        >>> CN.view()  # Opens picture of the horoballs  #doctest: +CYOPENGL\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_23cusp_neighborhood = {"cusp_neighborhood", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_23cusp_neighborhood, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_22cusp_neighborhood};
static PyObject *__pyx_pw_6SnapPy_8Manifold_23cusp_neighborhood(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("cusp_neighborhood (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("cusp_neighborhood", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "cusp_neighborhood", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_22cusp_neighborhood(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_8Manifold_22cusp_neighborhood(struct __pyx_obj_6SnapPy_Manifold *__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("cusp_neighborhood", 1);

  /* "cython/core/manifold.pyx":323
 *         >>> CN.view()  # Opens picture of the horoballs  #doctest: +CYOPENGL
 *         """
 *         return CuspNeighborhood(self)             # <<<<<<<<<<<<<<
 * 
 *     def dirichlet_domain(self,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CuspNeighborhood); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 323, __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, ((PyObject *)__pyx_v_self)};
    __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(1, 323, __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;

  /* "cython/core/manifold.pyx":309
 *         return Manifold_from_Triangulation(self, manifold_class=self.__class__)
 * 
 *     def cusp_neighborhood(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns information about the cusp neighborhoods of the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.Manifold.cusp_neighborhood", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":325
 *         return CuspNeighborhood(self)
 * 
 *     def dirichlet_domain(self,             # <<<<<<<<<<<<<<
 *                          vertex_epsilon=default_vertex_epsilon,
 *                          displacement = (0.0, 0.0, 0.0),
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_25dirichlet_domain(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_6SnapPy_8Manifold_24dirichlet_domain, "Manifold.dirichlet_domain(self, vertex_epsilon=default_vertex_epsilon, displacement=(0.0, 0.0, 0.0), centroid_at_origin=True, maximize_injectivity_radius=True, include_words=False)\n\n        Returns a DirichletDomain object representing a Dirichlet\n        domain of the hyperbolic manifold, typically centered at a\n        point which is a local maximum of injectivity radius.  It will\n        have ideal vertices if the manifold is not closed.\n\n        >>> M = Manifold('m015')\n        >>> D = M.dirichlet_domain()\n        >>> D\n        32 finite vertices, 2 ideal vertices; 54 edges; 22 faces\n        >>> D.view()   #Shows 3d-graphical view.  #doctest: +CYOPENGL\n\n        The group elements for the face-pairings of the Dirichlet domain\n        can be given as words in the original generators of the\n        (unsimplified) fundamental group by setting include_words = True:\n\n        >>> sorted(M.dirichlet_domain(include_words = True).pairing_words()) #doctest: +ELLIPSIS\n        ['A', ...]\n\n        Other options can be provided to customize the computation;\n        the default choices are shown below:\n\n        >>> M.dirichlet_domain(vertex_epsilon=10.0**-8,\n        ...    displacement = [0.0, 0.0, 0.0],\n        ...    centroid_at_origin=True, maximize_injectivity_radius=True)\n        32 finite vertices, 2 ideal vertices; 54 edges; 22 faces\n\n        Here's one with different combinatorics:\n\n        >>> E = M.dirichlet_domain(displacement=[0.5, 0.3, -0.2],\n        ...                        maximize_injectivity_radius=False)\n        >>> E\n        44 finite vertices, 1 ideal vertices; 69 edges; 26 faces\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_25dirichlet_domain = {"dirichlet_domain", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_25dirichlet_domain, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_24dirichlet_domain};
static PyObject *__pyx_pw_6SnapPy_8Manifold_25dirichlet_domain(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_vertex_epsilon = 0;
  PyObject *__pyx_v_displacement = 0;
  PyObject *__pyx_v_centroid_at_origin = 0;
  PyObject *__pyx_v_maximize_injectivity_radius = 0;
  PyObject *__pyx_v_include_words = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dirichlet_domain (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_vertex_epsilon,&__pyx_n_s_displacement,&__pyx_n_s_centroid_at_origin,&__pyx_n_s_maximize_injectivity_radius,&__pyx_n_s_include_words,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(__pyx_k__85);

    /* "cython/core/manifold.pyx":327
 *     def dirichlet_domain(self,
 *                          vertex_epsilon=default_vertex_epsilon,
 *                          displacement = (0.0, 0.0, 0.0),             # <<<<<<<<<<<<<<
 *                          centroid_at_origin=True,
 *                          maximize_injectivity_radius=True,
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_tuple__86));

    /* "cython/core/manifold.pyx":328
 *                          vertex_epsilon=default_vertex_epsilon,
 *                          displacement = (0.0, 0.0, 0.0),
 *                          centroid_at_origin=True,             # <<<<<<<<<<<<<<
 *                          maximize_injectivity_radius=True,
 *                          include_words=False):
 */
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));

    /* "cython/core/manifold.pyx":329
 *                          displacement = (0.0, 0.0, 0.0),
 *                          centroid_at_origin=True,
 *                          maximize_injectivity_radius=True,             # <<<<<<<<<<<<<<
 *                          include_words=False):
 *         """
 */
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));

    /* "cython/core/manifold.pyx":330
 *                          centroid_at_origin=True,
 *                          maximize_injectivity_radius=True,
 *                          include_words=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a DirichletDomain object representing a Dirichlet
 */
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_vertex_epsilon);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 325, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_displacement);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 325, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_centroid_at_origin);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 325, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_maximize_injectivity_radius);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 325, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_include_words);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 325, __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, "dirichlet_domain") < 0)) __PYX_ERR(1, 325, __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);
        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;
      }
    }
    __pyx_v_vertex_epsilon = values[0];
    __pyx_v_displacement = values[1];
    __pyx_v_centroid_at_origin = values[2];
    __pyx_v_maximize_injectivity_radius = values[3];
    __pyx_v_include_words = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dirichlet_domain", 0, 0, 5, __pyx_nargs); __PYX_ERR(1, 325, __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("SnapPy.Manifold.dirichlet_domain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_24dirichlet_domain(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_vertex_epsilon, __pyx_v_displacement, __pyx_v_centroid_at_origin, __pyx_v_maximize_injectivity_radius, __pyx_v_include_words);

  /* "cython/core/manifold.pyx":325
 *         return CuspNeighborhood(self)
 * 
 *     def dirichlet_domain(self,             # <<<<<<<<<<<<<<
 *                          vertex_epsilon=default_vertex_epsilon,
 *                          displacement = (0.0, 0.0, 0.0),
 */

  /* 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_6SnapPy_8Manifold_24dirichlet_domain(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_vertex_epsilon, PyObject *__pyx_v_displacement, PyObject *__pyx_v_centroid_at_origin, PyObject *__pyx_v_maximize_injectivity_radius, PyObject *__pyx_v_include_words) {
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dirichlet_domain", 1);

  /* "cython/core/manifold.pyx":365
 *         44 finite vertices, 1 ideal vertices; 69 edges; 26 faces
 *         """
 *         args = (vertex_epsilon, tuple(displacement), centroid_at_origin,             # <<<<<<<<<<<<<<
 *                 maximize_injectivity_radius, include_words)
 *         try:
 */
  __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_displacement); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "cython/core/manifold.pyx":366
 *         """
 *         args = (vertex_epsilon, tuple(displacement), centroid_at_origin,
 *                 maximize_injectivity_radius, include_words)             # <<<<<<<<<<<<<<
 *         try:
 *             return self._cache.lookup('dirichlet_domain', *args)
 */
  __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_vertex_epsilon);
  __Pyx_GIVEREF(__pyx_v_vertex_epsilon);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_vertex_epsilon)) __PYX_ERR(1, 365, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(1, 365, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_centroid_at_origin);
  __Pyx_GIVEREF(__pyx_v_centroid_at_origin);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_centroid_at_origin)) __PYX_ERR(1, 365, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_maximize_injectivity_radius);
  __Pyx_GIVEREF(__pyx_v_maximize_injectivity_radius);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_maximize_injectivity_radius)) __PYX_ERR(1, 365, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_include_words);
  __Pyx_GIVEREF(__pyx_v_include_words);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_include_words)) __PYX_ERR(1, 365, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_v_args = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":367
 *         args = (vertex_epsilon, tuple(displacement), centroid_at_origin,
 *                 maximize_injectivity_radius, include_words)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('dirichlet_domain', *args)
 *         except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "cython/core/manifold.pyx":368
 *                 maximize_injectivity_radius, include_words)
 *         try:
 *             return self._cache.lookup('dirichlet_domain', *args)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._cache, __pyx_n_s_lookup); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 368, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyNumber_Add(__pyx_tuple__87, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 368, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 368, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L7_try_return;

      /* "cython/core/manifold.pyx":367
 *         args = (vertex_epsilon, tuple(displacement), centroid_at_origin,
 *                 maximize_injectivity_radius, include_words)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('dirichlet_domain', *args)
 *         except KeyError:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "cython/core/manifold.pyx":369
 *         try:
 *             return self._cache.lookup('dirichlet_domain', *args)
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cython/core/manifold.pyx":367
 *         args = (vertex_epsilon, tuple(displacement), centroid_at_origin,
 *                 maximize_injectivity_radius, include_words)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('dirichlet_domain', *args)
 *         except KeyError:
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  }

  /* "cython/core/manifold.pyx":372
 *             pass
 * 
 *         return self._cache.save(DirichletDomain(self, *args),             # <<<<<<<<<<<<<<
 *                                 'dirichlet_domain', *args)
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._cache, __pyx_n_s_save); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DirichletDomain); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(1, 372, __pyx_L1_error);
  __pyx_t_8 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2)) __PYX_ERR(1, 372, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_dirichlet_domain);
  __Pyx_GIVEREF(__pyx_n_s_dirichlet_domain);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_dirichlet_domain)) __PYX_ERR(1, 372, __pyx_L1_error);
  __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":373
 * 
 *         return self._cache.save(DirichletDomain(self, *args),
 *                                 'dirichlet_domain', *args)             # <<<<<<<<<<<<<<
 * 
 *     def browse(self):
 */
  __pyx_t_2 = PyNumber_Add(__pyx_t_8, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cython/core/manifold.pyx":372
 *             pass
 * 
 *         return self._cache.save(DirichletDomain(self, *args),             # <<<<<<<<<<<<<<
 *                                 'dirichlet_domain', *args)
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_8;
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":325
 *         return CuspNeighborhood(self)
 * 
 *     def dirichlet_domain(self,             # <<<<<<<<<<<<<<
 *                          vertex_epsilon=default_vertex_epsilon,
 *                          displacement = (0.0, 0.0, 0.0),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("SnapPy.Manifold.dirichlet_domain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":375
 *                                 'dirichlet_domain', *args)
 * 
 *     def browse(self):             # <<<<<<<<<<<<<<
 *         """
 *         Opens browser window with a graphical interface, which allows to
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_27browse(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_6SnapPy_8Manifold_26browse, "Manifold.browse(self)\n\n        Opens browser window with a graphical interface, which allows to\n        explore the manifold and interact with it.\n        This includes: invariants, Dirichlet domain, cusp neighborhoods,\n        inside view, symmetry, Dehn filling, drilling, etc.\n\n        >>> M = Manifold('m125')\n        >>> M.browse()  #doctest: +CYOPENGL\n\n        This does not work when using SnapPy in a Docker container.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_27browse = {"browse", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_27browse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_26browse};
static PyObject *__pyx_pw_6SnapPy_8Manifold_27browse(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("browse (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("browse", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "browse", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_26browse(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_8Manifold_26browse(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self) {
  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("browse", 1);

  /* "cython/core/manifold.pyx":387
 *         This does not work when using SnapPy in a Docker container.
 *         """
 *         if Browser is None:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Browser not imported; Tk, CyOpenGL or pypng is probably missing.")
 *         return Browser(self)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Browser); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 == Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "cython/core/manifold.pyx":388
 *         """
 *         if Browser is None:
 *             raise RuntimeError("Browser not imported; Tk, CyOpenGL or pypng is probably missing.")             # <<<<<<<<<<<<<<
 *         return Browser(self)
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 388, __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(1, 388, __pyx_L1_error)

    /* "cython/core/manifold.pyx":387
 *         This does not work when using SnapPy in a Docker container.
 *         """
 *         if Browser is None:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Browser not imported; Tk, CyOpenGL or pypng is probably missing.")
 *         return Browser(self)
 */
  }

  /* "cython/core/manifold.pyx":389
 *         if Browser is None:
 *             raise RuntimeError("Browser not imported; Tk, CyOpenGL or pypng is probably missing.")
 *         return Browser(self)             # <<<<<<<<<<<<<<
 * 
 *     def filled_triangulation(self, cusps_to_fill='all'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Browser); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 389, __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, ((PyObject *)__pyx_v_self)};
    __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, 389, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":375
 *                                 'dirichlet_domain', *args)
 * 
 *     def browse(self):             # <<<<<<<<<<<<<<
 *         """
 *         Opens browser window with a graphical interface, which allows to
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("SnapPy.Manifold.browse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":391
 *         return Browser(self)
 * 
 *     def filled_triangulation(self, cusps_to_fill='all'):             # <<<<<<<<<<<<<<
 *         """
 *         Return a new Manifold where the specified cusps have been
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_29filled_triangulation(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_6SnapPy_8Manifold_28filled_triangulation, "Manifold.filled_triangulation(self, cusps_to_fill='all')\n\n        Return a new Manifold where the specified cusps have been\n        permanently filled in.\n\n        Filling all the cusps results in a Triangulation rather\n        than a Manifold, since SnapPea can't deal with hyperbolic\n        structures when there are no cusps.\n\n        Examples:\n\n        >>> M = Manifold('m125(1,2)(3,4)')\n        >>> N = M.filled_triangulation()\n        >>> N.num_cusps()\n        0\n\n        Filling cusps 0 and 2 :\n\n        >>> M = Manifold('v3227(1,2)(3,4)(5,6)')\n        >>> M.filled_triangulation([0,2])\n        v3227_filled(3,4)\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_29filled_triangulation = {"filled_triangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_29filled_triangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_28filled_triangulation};
static PyObject *__pyx_pw_6SnapPy_8Manifold_29filled_triangulation(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_cusps_to_fill = 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("filled_triangulation (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_cusps_to_fill,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_s_all));
    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_cusps_to_fill);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 391, __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, "filled_triangulation") < 0)) __PYX_ERR(1, 391, __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_cusps_to_fill = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("filled_triangulation", 0, 0, 1, __pyx_nargs); __PYX_ERR(1, 391, __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("SnapPy.Manifold.filled_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_28filled_triangulation(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_cusps_to_fill);

  /* 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_6SnapPy_8Manifold_28filled_triangulation(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_cusps_to_fill) {
  PyObject *__pyx_v_filled = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("filled_triangulation", 1);

  /* "cython/core/manifold.pyx":413
 *         v3227_filled(3,4)
 *         """
 *         filled = _triangulation_class.filled_triangulation(self, cusps_to_fill)             # <<<<<<<<<<<<<<
 *         if filled.num_cusps() == 0:
 *             return Triangulation_from_Manifold(filled)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_triangulation_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_filled_triangulation); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 413, __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[3] = {__pyx_t_2, ((PyObject *)__pyx_v_self), __pyx_v_cusps_to_fill};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_filled = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/manifold.pyx":414
 *         """
 *         filled = _triangulation_class.filled_triangulation(self, cusps_to_fill)
 *         if filled.num_cusps() == 0:             # <<<<<<<<<<<<<<
 *             return Triangulation_from_Manifold(filled)
 *         return filled
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_filled, __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 414, __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(1, 414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_5 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 414, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "cython/core/manifold.pyx":415
 *         filled = _triangulation_class.filled_triangulation(self, cusps_to_fill)
 *         if filled.num_cusps() == 0:
 *             return Triangulation_from_Manifold(filled)             # <<<<<<<<<<<<<<
 *         return filled
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Triangulation_from_Manifold); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 415, __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_v_filled};
      __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(1, 415, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":414
 *         """
 *         filled = _triangulation_class.filled_triangulation(self, cusps_to_fill)
 *         if filled.num_cusps() == 0:             # <<<<<<<<<<<<<<
 *             return Triangulation_from_Manifold(filled)
 *         return filled
 */
  }

  /* "cython/core/manifold.pyx":416
 *         if filled.num_cusps() == 0:
 *             return Triangulation_from_Manifold(filled)
 *         return filled             # <<<<<<<<<<<<<<
 * 
 *     def fundamental_group(self,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_filled);
  __pyx_r = __pyx_v_filled;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":391
 *         return Browser(self)
 * 
 *     def filled_triangulation(self, cusps_to_fill='all'):             # <<<<<<<<<<<<<<
 *         """
 *         Return a new Manifold where the specified cusps have been
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.Manifold.filled_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_filled);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":418
 *         return filled
 * 
 *     def fundamental_group(self,             # <<<<<<<<<<<<<<
 *                           simplify_presentation = True,
 *                           fillings_may_affect_generators = True,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_31fundamental_group(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_6SnapPy_8Manifold_30fundamental_group, "Manifold.fundamental_group(self, simplify_presentation=True, fillings_may_affect_generators=True, minimize_number_of_generators=True, try_hard_to_shorten_relators=True)\n\n        Return a HolonomyGroup representing the fundamental group of\n        the manifold, together with its holonomy representation.  If\n        integer Dehn surgery parameters have been set, then the\n        corresponding peripheral elements are killed.\n\n        >>> M = Manifold('m004')\n        >>> G = M.fundamental_group()\n        >>> G\n        Generators:\n           a,b\n        Relators:\n           aaabABBAb\n        >>> G.peripheral_curves()\n        [('ab', 'aBAbABab')]\n        >>> G.SL2C('baaBA') # doctest: +NUMERIC6\n        [ 2.50000000 - 2.59807621*I -6.06217783 - 0.50000000*I]\n        [ 0.86602540 - 2.50000000*I -4.00000000 + 1.73205081*I]\n\n        There are three optional arguments all of which default to True:\n\n        - simplify_presentation\n        - fillings_may_affect_generators\n        - minimize_number_of_generators\n\n        >>> M.fundamental_group(False, False, False)\n        Generators:\n           a,b,c\n        Relators:\n           CbAcB\n           BacA\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_31fundamental_group = {"fundamental_group", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_31fundamental_group, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_30fundamental_group};
static PyObject *__pyx_pw_6SnapPy_8Manifold_31fundamental_group(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_simplify_presentation = 0;
  PyObject *__pyx_v_fillings_may_affect_generators = 0;
  PyObject *__pyx_v_minimize_number_of_generators = 0;
  PyObject *__pyx_v_try_hard_to_shorten_relators = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fundamental_group (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_simplify_presentation,&__pyx_n_s_fillings_may_affect_generators,&__pyx_n_s_minimize_number_of_generators,&__pyx_n_s_try_hard_to_shorten_relators,0};

    /* "cython/core/manifold.pyx":419
 * 
 *     def fundamental_group(self,
 *                           simplify_presentation = True,             # <<<<<<<<<<<<<<
 *                           fillings_may_affect_generators = True,
 *                           minimize_number_of_generators = True,
 */
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));

    /* "cython/core/manifold.pyx":420
 *     def fundamental_group(self,
 *                           simplify_presentation = True,
 *                           fillings_may_affect_generators = True,             # <<<<<<<<<<<<<<
 *                           minimize_number_of_generators = True,
 *                           try_hard_to_shorten_relators = True):
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));

    /* "cython/core/manifold.pyx":421
 *                           simplify_presentation = True,
 *                           fillings_may_affect_generators = True,
 *                           minimize_number_of_generators = True,             # <<<<<<<<<<<<<<
 *                           try_hard_to_shorten_relators = True):
 *         """
 */
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));

    /* "cython/core/manifold.pyx":422
 *                           fillings_may_affect_generators = True,
 *                           minimize_number_of_generators = True,
 *                           try_hard_to_shorten_relators = True):             # <<<<<<<<<<<<<<
 *         """
 *         Return a HolonomyGroup representing the fundamental group of
 */
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_simplify_presentation);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 418, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fillings_may_affect_generators);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 418, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_minimize_number_of_generators);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 418, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_try_hard_to_shorten_relators);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 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, "fundamental_group") < 0)) __PYX_ERR(1, 418, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        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;
      }
    }
    __pyx_v_simplify_presentation = values[0];
    __pyx_v_fillings_may_affect_generators = values[1];
    __pyx_v_minimize_number_of_generators = values[2];
    __pyx_v_try_hard_to_shorten_relators = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fundamental_group", 0, 0, 4, __pyx_nargs); __PYX_ERR(1, 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_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("SnapPy.Manifold.fundamental_group", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_30fundamental_group(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_simplify_presentation, __pyx_v_fillings_may_affect_generators, __pyx_v_minimize_number_of_generators, __pyx_v_try_hard_to_shorten_relators);

  /* "cython/core/manifold.pyx":418
 *         return filled
 * 
 *     def fundamental_group(self,             # <<<<<<<<<<<<<<
 *                           simplify_presentation = True,
 *                           fillings_may_affect_generators = True,
 */

  /* 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_6SnapPy_8Manifold_30fundamental_group(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_simplify_presentation, PyObject *__pyx_v_fillings_may_affect_generators, PyObject *__pyx_v_minimize_number_of_generators, PyObject *__pyx_v_try_hard_to_shorten_relators) {
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  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("fundamental_group", 1);

  /* "cython/core/manifold.pyx":455
 *            BacA
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":456
 *         """
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 * 
 *         args = (simplify_presentation, fillings_may_affect_generators,
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 456, __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(1, 456, __pyx_L1_error)

    /* "cython/core/manifold.pyx":455
 *            BacA
 *         """
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  }

  /* "cython/core/manifold.pyx":458
 *             raise ValueError('The Triangulation is empty.')
 * 
 *         args = (simplify_presentation, fillings_may_affect_generators,             # <<<<<<<<<<<<<<
 *                 minimize_number_of_generators, try_hard_to_shorten_relators)
 *         try:
 */
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_simplify_presentation);
  __Pyx_GIVEREF(__pyx_v_simplify_presentation);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_simplify_presentation)) __PYX_ERR(1, 458, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_fillings_may_affect_generators);
  __Pyx_GIVEREF(__pyx_v_fillings_may_affect_generators);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_fillings_may_affect_generators)) __PYX_ERR(1, 458, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_minimize_number_of_generators);
  __Pyx_GIVEREF(__pyx_v_minimize_number_of_generators);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_minimize_number_of_generators)) __PYX_ERR(1, 458, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_try_hard_to_shorten_relators);
  __Pyx_GIVEREF(__pyx_v_try_hard_to_shorten_relators);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_try_hard_to_shorten_relators)) __PYX_ERR(1, 458, __pyx_L1_error);
  __pyx_v_args = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":460
 *         args = (simplify_presentation, fillings_may_affect_generators,
 *                 minimize_number_of_generators, try_hard_to_shorten_relators)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('fundamental_group', *args)
 *         except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "cython/core/manifold.pyx":461
 *                 minimize_number_of_generators, try_hard_to_shorten_relators)
 *         try:
 *             return self._cache.lookup('fundamental_group', *args)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._cache, __pyx_n_s_lookup); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 461, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PyNumber_Add(__pyx_tuple__63, __pyx_v_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 461, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 461, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L8_try_return;

      /* "cython/core/manifold.pyx":460
 *         args = (simplify_presentation, fillings_may_affect_generators,
 *                 minimize_number_of_generators, try_hard_to_shorten_relators)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('fundamental_group', *args)
 *         except KeyError:
 */
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cython/core/manifold.pyx":462
 *         try:
 *             return self._cache.lookup('fundamental_group', *args)
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_8) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;

    /* "cython/core/manifold.pyx":460
 *         args = (simplify_presentation, fillings_may_affect_generators,
 *                 minimize_number_of_generators, try_hard_to_shorten_relators)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('fundamental_group', *args)
 *         except KeyError:
 */
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L0;
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  }

  /* "cython/core/manifold.pyx":465
 *             pass
 * 
 *         result = HolonomyGroup(self, *args)             # <<<<<<<<<<<<<<
 *         return self._cache.save(result, 'fundamental_group', *args)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_HolonomyGroup); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(1, 465, __pyx_L1_error);
  __pyx_t_2 = PyNumber_Add(__pyx_t_6, __pyx_v_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_result = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "cython/core/manifold.pyx":466
 * 
 *         result = HolonomyGroup(self, *args)
 *         return self._cache.save(result, 'fundamental_group', *args)             # <<<<<<<<<<<<<<
 * 
 *     def symmetry_group(self, of_link=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._cache, __pyx_n_s_save); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_result);
  __Pyx_GIVEREF(__pyx_v_result);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_result)) __PYX_ERR(1, 466, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_fundamental_group);
  __Pyx_GIVEREF(__pyx_n_s_fundamental_group);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_fundamental_group)) __PYX_ERR(1, 466, __pyx_L1_error);
  __pyx_t_7 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":418
 *         return filled
 * 
 *     def fundamental_group(self,             # <<<<<<<<<<<<<<
 *                           simplify_presentation = True,
 *                           fillings_may_affect_generators = True,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.Manifold.fundamental_group", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":468
 *         return self._cache.save(result, 'fundamental_group', *args)
 * 
 *     def symmetry_group(self, of_link=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the symmetry group of the Manifold.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_33symmetry_group(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_6SnapPy_8Manifold_32symmetry_group, "Manifold.symmetry_group(self, of_link=False)\n\n        Returns the symmetry group of the Manifold.\n        If the flag \"of_link\" is set, then it only returns symmetries\n        that preserves the meridians.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_33symmetry_group = {"symmetry_group", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_33symmetry_group, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_32symmetry_group};
static PyObject *__pyx_pw_6SnapPy_8Manifold_33symmetry_group(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_of_link = 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("symmetry_group (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_of_link,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_of_link);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 468, __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, "symmetry_group") < 0)) __PYX_ERR(1, 468, __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_of_link = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("symmetry_group", 0, 0, 1, __pyx_nargs); __PYX_ERR(1, 468, __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("SnapPy.Manifold.symmetry_group", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_32symmetry_group(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_of_link);

  /* 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_6SnapPy_8Manifold_32symmetry_group(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_of_link) {
  SymmetryGroup *__pyx_v_symmetries_of_manifold;
  SymmetryGroup *__pyx_v_symmetries_of_link;
  Triangulation *__pyx_v_c_symmetric_triangulation;
  struct __pyx_obj_6SnapPy_Manifold *__pyx_v_symmetric_triangulation = 0;
  Boolean __pyx_v_is_full_group;
  FuncResult __pyx_v_result;
  struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_symmetry_group = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  FuncResult __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("symmetry_group", 1);

  /* "cython/core/manifold.pyx":474
 *         that preserves the meridians.
 *         """
 *         cdef c_SymmetryGroup* symmetries_of_manifold = NULL             # <<<<<<<<<<<<<<
 *         cdef c_SymmetryGroup* symmetries_of_link = NULL
 *         cdef c_Triangulation* c_symmetric_triangulation = NULL
 */
  __pyx_v_symmetries_of_manifold = NULL;

  /* "cython/core/manifold.pyx":475
 *         """
 *         cdef c_SymmetryGroup* symmetries_of_manifold = NULL
 *         cdef c_SymmetryGroup* symmetries_of_link = NULL             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation* c_symmetric_triangulation = NULL
 *         cdef Manifold symmetric_triangulation
 */
  __pyx_v_symmetries_of_link = NULL;

  /* "cython/core/manifold.pyx":476
 *         cdef c_SymmetryGroup* symmetries_of_manifold = NULL
 *         cdef c_SymmetryGroup* symmetries_of_link = NULL
 *         cdef c_Triangulation* c_symmetric_triangulation = NULL             # <<<<<<<<<<<<<<
 *         cdef Manifold symmetric_triangulation
 *         cdef Boolean is_full_group
 */
  __pyx_v_c_symmetric_triangulation = NULL;

  /* "cython/core/manifold.pyx":482
 *         cdef SymmetryGroup symmetry_group
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":483
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 483, __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(1, 483, __pyx_L1_error)

    /* "cython/core/manifold.pyx":482
 *         cdef SymmetryGroup symmetry_group
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  }

  /* "cython/core/manifold.pyx":485
 *             raise ValueError('The Triangulation is empty.')
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('symmetry_group', of_link)
 *         except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "cython/core/manifold.pyx":486
 * 
 *         try:
 *             return self._cache.lookup('symmetry_group', of_link)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._cache, __pyx_n_s_lookup); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 486, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_6);
      __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[3] = {__pyx_t_7, __pyx_n_s_symmetry_group, __pyx_v_of_link};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 486, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L8_try_return;

      /* "cython/core/manifold.pyx":485
 *             raise ValueError('The Triangulation is empty.')
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('symmetry_group', of_link)
 *         except KeyError:
 */
    }
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cython/core/manifold.pyx":487
 *         try:
 *             return self._cache.lookup('symmetry_group', of_link)
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_8) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L5_exception_handled;
    }
    goto __pyx_L6_except_error;

    /* "cython/core/manifold.pyx":485
 *             raise ValueError('The Triangulation is empty.')
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('symmetry_group', of_link)
 *         except KeyError:
 */
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L0;
    __pyx_L5_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
  }

  /* "cython/core/manifold.pyx":490
 *             pass
 * 
 *         result = compute_symmetry_group(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                         &symmetries_of_manifold,
 *                                         &symmetries_of_link,
 */
  __pyx_t_9 = compute_symmetry_group(__pyx_v_self->__pyx_base.c_triangulation, (&__pyx_v_symmetries_of_manifold), (&__pyx_v_symmetries_of_link), (&__pyx_v_c_symmetric_triangulation), (&__pyx_v_is_full_group)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 490, __pyx_L1_error)
  __pyx_v_result = __pyx_t_9;

  /* "cython/core/manifold.pyx":496
 *                                         &is_full_group)
 * 
 *         if result != func_OK:             # <<<<<<<<<<<<<<
 *             raise ValueError('SnapPea failed to compute any part '
 *                              'of the symmetry group.')
 */
  __pyx_t_1 = (__pyx_v_result != func_OK);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":497
 * 
 *         if result != func_OK:
 *             raise ValueError('SnapPea failed to compute any part '             # <<<<<<<<<<<<<<
 *                              'of the symmetry group.')
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 497, __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(1, 497, __pyx_L1_error)

    /* "cython/core/manifold.pyx":496
 *                                         &is_full_group)
 * 
 *         if result != func_OK:             # <<<<<<<<<<<<<<
 *             raise ValueError('SnapPea failed to compute any part '
 *                              'of the symmetry group.')
 */
  }

  /* "cython/core/manifold.pyx":500
 *                              'of the symmetry group.')
 * 
 *         symmetric_triangulation = self.__class__('empty')             # <<<<<<<<<<<<<<
 *         symmetric_triangulation.set_c_triangulation(c_symmetric_triangulation)
 *         self._cache.save(symmetric_triangulation, 'symmetric_triangulation')
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __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_n_s_empty};
    __pyx_t_2 = __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;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6SnapPy_Manifold))))) __PYX_ERR(1, 500, __pyx_L1_error)
  __pyx_v_symmetric_triangulation = ((struct __pyx_obj_6SnapPy_Manifold *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":501
 * 
 *         symmetric_triangulation = self.__class__('empty')
 *         symmetric_triangulation.set_c_triangulation(c_symmetric_triangulation)             # <<<<<<<<<<<<<<
 *         self._cache.save(symmetric_triangulation, 'symmetric_triangulation')
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_Manifold *)__pyx_v_symmetric_triangulation->__pyx_base.__pyx_vtab)->__pyx_base.set_c_triangulation(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_symmetric_triangulation), __pyx_v_c_symmetric_triangulation); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":502
 *         symmetric_triangulation = self.__class__('empty')
 *         symmetric_triangulation.set_c_triangulation(c_symmetric_triangulation)
 *         self._cache.save(symmetric_triangulation, 'symmetric_triangulation')             # <<<<<<<<<<<<<<
 * 
 *         symmetry_group = SymmetryGroup(B2B(is_full_group), True)
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._cache, __pyx_n_s_save); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __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[3] = {__pyx_t_7, ((PyObject *)__pyx_v_symmetric_triangulation), __pyx_n_s_symmetric_triangulation};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":504
 *         self._cache.save(symmetric_triangulation, 'symmetric_triangulation')
 * 
 *         symmetry_group = SymmetryGroup(B2B(is_full_group), True)             # <<<<<<<<<<<<<<
 *         if of_link:
 *             free_symmetry_group(symmetries_of_manifold)
 */
  __pyx_t_2 = __pyx_f_6SnapPy_B2B(__pyx_v_is_full_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2)) __PYX_ERR(1, 504, __pyx_L1_error);
  __Pyx_INCREF(Py_True);
  __Pyx_GIVEREF(Py_True);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, Py_True)) __PYX_ERR(1, 504, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup), __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_symmetry_group = ((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":505
 * 
 *         symmetry_group = SymmetryGroup(B2B(is_full_group), True)
 *         if of_link:             # <<<<<<<<<<<<<<
 *             free_symmetry_group(symmetries_of_manifold)
 *             symmetry_group._set_c_symmetry_group(symmetries_of_link)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_of_link); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 505, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":506
 *         symmetry_group = SymmetryGroup(B2B(is_full_group), True)
 *         if of_link:
 *             free_symmetry_group(symmetries_of_manifold)             # <<<<<<<<<<<<<<
 *             symmetry_group._set_c_symmetry_group(symmetries_of_link)
 *         else:
 */
    free_symmetry_group(__pyx_v_symmetries_of_manifold); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 506, __pyx_L1_error)

    /* "cython/core/manifold.pyx":507
 *         if of_link:
 *             free_symmetry_group(symmetries_of_manifold)
 *             symmetry_group._set_c_symmetry_group(symmetries_of_link)             # <<<<<<<<<<<<<<
 *         else:
 *             free_symmetry_group(symmetries_of_link)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_SymmetryGroup *)__pyx_v_symmetry_group->__pyx_vtab)->_set_c_symmetry_group(__pyx_v_symmetry_group, __pyx_v_symmetries_of_link); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/manifold.pyx":505
 * 
 *         symmetry_group = SymmetryGroup(B2B(is_full_group), True)
 *         if of_link:             # <<<<<<<<<<<<<<
 *             free_symmetry_group(symmetries_of_manifold)
 *             symmetry_group._set_c_symmetry_group(symmetries_of_link)
 */
    goto __pyx_L11;
  }

  /* "cython/core/manifold.pyx":509
 *             symmetry_group._set_c_symmetry_group(symmetries_of_link)
 *         else:
 *             free_symmetry_group(symmetries_of_link)             # <<<<<<<<<<<<<<
 *             symmetry_group._set_c_symmetry_group(symmetries_of_manifold)
 * 
 */
  /*else*/ {
    free_symmetry_group(__pyx_v_symmetries_of_link); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 509, __pyx_L1_error)

    /* "cython/core/manifold.pyx":510
 *         else:
 *             free_symmetry_group(symmetries_of_link)
 *             symmetry_group._set_c_symmetry_group(symmetries_of_manifold)             # <<<<<<<<<<<<<<
 * 
 *         return self._cache.save(symmetry_group, 'symmetry_group', of_link)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_SymmetryGroup *)__pyx_v_symmetry_group->__pyx_vtab)->_set_c_symmetry_group(__pyx_v_symmetry_group, __pyx_v_symmetries_of_manifold); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L11:;

  /* "cython/core/manifold.pyx":512
 *             symmetry_group._set_c_symmetry_group(symmetries_of_manifold)
 * 
 *         return self._cache.save(symmetry_group, 'symmetry_group', of_link)             # <<<<<<<<<<<<<<
 * 
 *     def symmetric_triangulation(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._cache, __pyx_n_s_save); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __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[4] = {__pyx_t_7, ((PyObject *)__pyx_v_symmetry_group), __pyx_n_s_symmetry_group, __pyx_v_of_link};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 3+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 512, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":468
 *         return self._cache.save(result, 'fundamental_group', *args)
 * 
 *     def symmetry_group(self, of_link=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the symmetry group of the Manifold.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.Manifold.symmetry_group", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_symmetric_triangulation);
  __Pyx_XDECREF((PyObject *)__pyx_v_symmetry_group);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":514
 *         return self._cache.save(symmetry_group, 'symmetry_group', of_link)
 * 
 *     def symmetric_triangulation(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Dehn filling description of the manifold realizing
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_35symmetric_triangulation(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_6SnapPy_8Manifold_34symmetric_triangulation, "Manifold.symmetric_triangulation(self)\n\n        Returns a Dehn filling description of the manifold realizing\n        the symmetry group.\n\n        >>> M = Manifold('m003(-3,1)')\n        >>> M.symmetry_group()\n        D6\n        >>> N = M.symmetric_triangulation()\n        >>> N\n        m003(1,0)(1,0)(1,0)\n        >>> N.dehn_fill( [(0,0), (0,0), (0,0)] )\n        >>> N.symmetry_group(of_link=True)\n        D6\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_35symmetric_triangulation = {"symmetric_triangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_35symmetric_triangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_34symmetric_triangulation};
static PyObject *__pyx_pw_6SnapPy_8Manifold_35symmetric_triangulation(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("symmetric_triangulation (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("symmetric_triangulation", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "symmetric_triangulation", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_34symmetric_triangulation(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_8Manifold_34symmetric_triangulation(struct __pyx_obj_6SnapPy_Manifold *__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;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("symmetric_triangulation", 1);

  /* "cython/core/manifold.pyx":529
 *         D6
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('symmetric_triangulation')
 *         except KeyError:
 */
  {
    __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:*/ {

      /* "cython/core/manifold.pyx":530
 *         """
 *         try:
 *             return self._cache.lookup('symmetric_triangulation')             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             self.symmetry_group()
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._cache, __pyx_n_s_lookup); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 530, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_n_s_symmetric_triangulation};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 530, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_try_return;

      /* "cython/core/manifold.pyx":529
 *         D6
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('symmetric_triangulation')
 *         except KeyError:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "cython/core/manifold.pyx":531
 *         try:
 *             return self._cache.lookup('symmetric_triangulation')
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             self.symmetry_group()
 *             return self._cache.lookup('symmetric_triangulation')
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("SnapPy.Manifold.symmetric_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(1, 531, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);

      /* "cython/core/manifold.pyx":532
 *             return self._cache.lookup('symmetric_triangulation')
 *         except KeyError:
 *             self.symmetry_group()             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('symmetric_triangulation')
 * 
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_symmetry_group); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 532, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_7 = 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_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 532, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cython/core/manifold.pyx":533
 *         except KeyError:
 *             self.symmetry_group()
 *             return self._cache.lookup('symmetric_triangulation')             # <<<<<<<<<<<<<<
 * 
 *     def cover(self, permutation_rep):
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._cache, __pyx_n_s_lookup); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 533, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_10 = NULL;
      __pyx_t_7 = 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_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_n_s_symmetric_triangulation};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 533, __pyx_L5_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L6_except_return;
    }
    goto __pyx_L5_except_error;

    /* "cython/core/manifold.pyx":529
 *         D6
 *         """
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('symmetric_triangulation')
 *         except KeyError:
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_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;
  }

  /* "cython/core/manifold.pyx":514
 *         return self._cache.save(symmetry_group, 'symmetry_group', of_link)
 * 
 *     def symmetric_triangulation(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Dehn filling description of the manifold realizing
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("SnapPy.Manifold.symmetric_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":535
 *             return self._cache.lookup('symmetric_triangulation')
 * 
 *     def cover(self, permutation_rep):             # <<<<<<<<<<<<<<
 *         """
 *         M.cover(permutation_rep)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_37cover(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_6SnapPy_8Manifold_36cover, "Manifold.cover(self, permutation_rep)\n\n        M.cover(permutation_rep)\n\n        Returns a Manifold representing the finite cover\n        specified by a transitive permutation representation.  The\n        representation is specified by a list of permutations, one for\n        each generator of the simplified presentation of the\n        fundamental group.  Each permutation is specified as a list P\n        such that set(P) == set(range(d)) where d is the degree of the\n        cover.\n\n        >>> M = Manifold('m004')\n        >>> N0 = M.cover([[1, 3, 0, 4, 2], [0, 2, 1, 4, 3]])\n        >>> abs(N0.volume()/M.volume() - 5) < 0.0000000001\n        True\n\n\n        If within Sage, the permutations can also be of type\n        PermutationGroupElement, in which case they act on the set\n        range(1, d + 1).  Or, you can specify a GAP or Magma subgroup\n        of the fundamental group.     Some examples::\n\n          sage: M = Manifold('m004')\n\n        The basic method::\n\n          sage: N0 = M.cover([[1, 3, 0, 4, 2], [0, 2, 1, 4, 3]])\n\n        From a Gap subgroup::\n\n          sage: G = gap(M.fundamental_group())\n          sage: H = G.LowIndexSubgroupsFpGroup(5)[9]\n          sage: N1 = M.cover(H)\n          sage: N0 == N1\n          True\n\n        Or a homomorphism to a permutation group::\n\n          sage: f = G.GQuotients(PSL(2,7))[1]\n          sage: N2 = M.cover(f)\n          sage: N2.volume()/M.volume() # doctest: +NUMERIC9\n          8.00000000\n\n        Or maybe we want larger cover coming from the kernel of this::\n\n          sage: N3 = M.cover(f.Kernel())\n          sage: N3.volume()/M.volume() # doctest: +NUMERIC9\n          168.00000000\n\n        Check the homology against what Gap computes directly::\n\n          sage: N3.homology().betti_number()\n          32\n          sage: len([ x for x in f.Kernel().AbelianInvariants().sage() if x == 0])\n          32\n\n        We can do the same for Magma::\n\n          sage: G = magma(M.f""undamental_group())             #doctest: +SKIP\n          sage: Q, f = G.pQuotient(5, 1, nvals = 2)          #doctest: +SKIP\n          sage: M.cover(f.Kernel()).volume()                 #doctest: +SKIP\n          10.14941606\n          sage: h = G.SimpleQuotients(1, 11, 2, 10000)[1,1]  #doctest: +SKIP\n          sage: N4 = M.cover(h)                              #doctest: +SKIP\n          sage: N2 == N4                                     #doctest: +SKIP\n          True\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_37cover = {"cover", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_37cover, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_36cover};
static PyObject *__pyx_pw_6SnapPy_8Manifold_37cover(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_permutation_rep = 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("cover (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_permutation_rep,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_permutation_rep)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 535, __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, "cover") < 0)) __PYX_ERR(1, 535, __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_permutation_rep = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cover", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 535, __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("SnapPy.Manifold.cover", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_36cover(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_permutation_rep);

  /* 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_6SnapPy_8Manifold_36cover(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_permutation_rep) {
  PyObject *__pyx_v_cover = 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("cover", 1);

  /* "cython/core/manifold.pyx":603
 *           True
 *         """
 *         cover = Triangulation.cover(self, permutation_rep)             # <<<<<<<<<<<<<<
 *         return Manifold_from_Triangulation(cover, recompute=False,
 *                                            manifold_class=self.__class__)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6SnapPy_Triangulation), __pyx_n_s_cover); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 603, __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[3] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_permutation_rep};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 603, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_cover = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/manifold.pyx":604
 *         """
 *         cover = Triangulation.cover(self, permutation_rep)
 *         return Manifold_from_Triangulation(cover, recompute=False,             # <<<<<<<<<<<<<<
 *                                            manifold_class=self.__class__)
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Manifold_from_Triangulation); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_cover);
  __Pyx_GIVEREF(__pyx_v_cover);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_cover)) __PYX_ERR(1, 604, __pyx_L1_error);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_recompute, Py_False) < 0) __PYX_ERR(1, 604, __pyx_L1_error)

  /* "cython/core/manifold.pyx":605
 *         cover = Triangulation.cover(self, permutation_rep)
 *         return Manifold_from_Triangulation(cover, recompute=False,
 *                                            manifold_class=self.__class__)             # <<<<<<<<<<<<<<
 * 
 *     def covers(self, degree, method=None, cover_type='all'):
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_manifold_class_2, __pyx_t_5) < 0) __PYX_ERR(1, 604, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/manifold.pyx":604
 *         """
 *         cover = Triangulation.cover(self, permutation_rep)
 *         return Manifold_from_Triangulation(cover, recompute=False,             # <<<<<<<<<<<<<<
 *                                            manifold_class=self.__class__)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":535
 *             return self._cache.lookup('symmetric_triangulation')
 * 
 *     def cover(self, permutation_rep):             # <<<<<<<<<<<<<<
 *         """
 *         M.cover(permutation_rep)
 */

  /* 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("SnapPy.Manifold.cover", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cover);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":607
 *                                            manifold_class=self.__class__)
 * 
 *     def covers(self, degree, method=None, cover_type='all'):             # <<<<<<<<<<<<<<
 *         """
 *         M.covers(degree, method=None, cover_type='all')
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_39covers(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_6SnapPy_8Manifold_38covers, "Manifold.covers(self, degree, method=None, cover_type='all')\n\n        M.covers(degree, method=None, cover_type='all')\n\n        Returns a list of Manifolds corresponding to all of the\n        finite covers of the given degree.  The default method is\n        'low_index' for general covers and 'snappea' for cyclic\n        covers.  The former uses Sim's algorithm while the latter\n        uses the original Snappea algorithm.\n\n        WARNING: If the degree is large this might take a very, very,\n        very long time.\n\n        >>> M = Manifold('m003')\n        >>> covers = M.covers(4)\n        >>> sorted(N.homology() for N in covers)\n        [Z/3 + Z/15 + Z, Z/5 + Z + Z]\n\n        It is faster to look just at cyclic covers.\n\n        >>> covers = M.covers(4, cover_type='cyclic')\n        >>> [(N, N.homology()) for N in covers]\n        [(m003~cyc~0(0,0), Z/3 + Z/15 + Z)]\n\n        Here we check that we get the same number of covers with the\n        'snappea' and 'low_index' methods.\n\n        >>> M = Manifold('m125')\n        >>> len(M.covers(5))\n        19\n        >>> len(M.covers(5, method='snappea'))\n        19\n\n        If you are using Sage, you can use GAP to find the subgroups,\n        which is often much faster, by specifying the optional\n        argument method = 'gap' If you have Magma installed, you can\n        used it to do the heavy lifting by specifying method='magma'.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_39covers = {"covers", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_39covers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_38covers};
static PyObject *__pyx_pw_6SnapPy_8Manifold_39covers(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_degree = 0;
  PyObject *__pyx_v_method = 0;
  PyObject *__pyx_v_cover_type = 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("covers (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_degree,&__pyx_n_s_method,&__pyx_n_s_cover_type,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_s_all));
    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_degree)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 607, __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_method);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 607, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cover_type);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 607, __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, "covers") < 0)) __PYX_ERR(1, 607, __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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_degree = values[0];
    __pyx_v_method = values[1];
    __pyx_v_cover_type = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("covers", 0, 1, 3, __pyx_nargs); __PYX_ERR(1, 607, __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("SnapPy.Manifold.covers", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_38covers(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_degree, __pyx_v_method, __pyx_v_cover_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_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_6SnapPy_8Manifold_38covers(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_degree, PyObject *__pyx_v_method, PyObject *__pyx_v_cover_type) {
  PyObject *__pyx_v_covers = NULL;
  PyObject *__pyx_9genexpr47__pyx_v_cover = 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;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("covers", 1);

  /* "cython/core/manifold.pyx":645
 *         used it to do the heavy lifting by specifying method='magma'.
 *         """
 *         covers = Triangulation.covers(self, degree, method,cover_type)             # <<<<<<<<<<<<<<
 *         return [Manifold_from_Triangulation(cover,
 *                                             recompute=False,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6SnapPy_Triangulation), __pyx_n_s_covers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 645, __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[5] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_degree, __pyx_v_method, __pyx_v_cover_type};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_covers = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/manifold.pyx":646
 *         """
 *         covers = Triangulation.covers(self, degree, method,cover_type)
 *         return [Manifold_from_Triangulation(cover,             # <<<<<<<<<<<<<<
 *                                             recompute=False,
 *                                             manifold_class=self.__class__)
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 646, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cython/core/manifold.pyx":649
 *                                             recompute=False,
 *                                             manifold_class=self.__class__)
 *                 for cover in covers]             # <<<<<<<<<<<<<<
 * 
 *     cdef _real_volume(self):
 */
    if (likely(PyList_CheckExact(__pyx_v_covers)) || PyTuple_CheckExact(__pyx_v_covers)) {
      __pyx_t_2 = __pyx_v_covers; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_covers); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 649, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 649, __pyx_L5_error)
    }
    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(1, 649, __pyx_L5_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_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(1, 649, __pyx_L5_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 649, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_3);
          #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(1, 649, __pyx_L5_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_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(1, 649, __pyx_L5_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 649, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_6(__pyx_t_2);
        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(1, 649, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr47__pyx_v_cover, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cython/core/manifold.pyx":646
 *         """
 *         covers = Triangulation.covers(self, degree, method,cover_type)
 *         return [Manifold_from_Triangulation(cover,             # <<<<<<<<<<<<<<
 *                                             recompute=False,
 *                                             manifold_class=self.__class__)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Manifold_from_Triangulation); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 646, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 646, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_9genexpr47__pyx_v_cover);
      __Pyx_GIVEREF(__pyx_9genexpr47__pyx_v_cover);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_9genexpr47__pyx_v_cover)) __PYX_ERR(1, 646, __pyx_L5_error);

      /* "cython/core/manifold.pyx":647
 *         covers = Triangulation.covers(self, degree, method,cover_type)
 *         return [Manifold_from_Triangulation(cover,
 *                                             recompute=False,             # <<<<<<<<<<<<<<
 *                                             manifold_class=self.__class__)
 *                 for cover in covers]
 */
      __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 647, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_recompute, Py_False) < 0) __PYX_ERR(1, 647, __pyx_L5_error)

      /* "cython/core/manifold.pyx":648
 *         return [Manifold_from_Triangulation(cover,
 *                                             recompute=False,
 *                                             manifold_class=self.__class__)             # <<<<<<<<<<<<<<
 *                 for cover in covers]
 * 
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 648, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_manifold_class_2, __pyx_t_9) < 0) __PYX_ERR(1, 647, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "cython/core/manifold.pyx":646
 *         """
 *         covers = Triangulation.covers(self, degree, method,cover_type)
 *         return [Manifold_from_Triangulation(cover,             # <<<<<<<<<<<<<<
 *                                             recompute=False,
 *                                             manifold_class=self.__class__)
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 646, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(1, 646, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "cython/core/manifold.pyx":649
 *                                             recompute=False,
 *                                             manifold_class=self.__class__)
 *                 for cover in covers]             # <<<<<<<<<<<<<<
 * 
 *     cdef _real_volume(self):
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_9genexpr47__pyx_v_cover); __pyx_9genexpr47__pyx_v_cover = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr47__pyx_v_cover); __pyx_9genexpr47__pyx_v_cover = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":607
 *                                            manifold_class=self.__class__)
 * 
 *     def covers(self, degree, method=None, cover_type='all'):             # <<<<<<<<<<<<<<
 *         """
 *         M.covers(degree, method=None, cover_type='all')
 */

  /* 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_AddTraceback("SnapPy.Manifold.covers", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_covers);
  __Pyx_XDECREF(__pyx_9genexpr47__pyx_v_cover);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":651
 *                 for cover in covers]
 * 
 *     cdef _real_volume(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the (real) volume as a Number.
 */

static PyObject *__pyx_f_6SnapPy_8Manifold__real_volume(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self) {
  int __pyx_v_acc;
  PyObject *__pyx_v_solution_type = 0;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_9genexpr48__pyx_v_z = 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;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  PyObject *__pyx_t_10 = NULL;
  __pyx_t_6SnapPy_Real __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_real_volume", 1);

  /* "cython/core/manifold.pyx":657
 *         cdef int acc
 *         cdef solution_type
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return 0
 *         solution_type = self.solution_type()
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":658
 *         cdef solution_type
 *         if self.c_triangulation is NULL:
 *             return 0             # <<<<<<<<<<<<<<
 *         solution_type = self.solution_type()
 *         if solution_type in ('not attempted', 'no solution found'):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_r = __pyx_int_0;
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":657
 *         cdef int acc
 *         cdef solution_type
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return 0
 *         solution_type = self.solution_type()
 */
  }

  /* "cython/core/manifold.pyx":659
 *         if self.c_triangulation is NULL:
 *             return 0
 *         solution_type = self.solution_type()             # <<<<<<<<<<<<<<
 *         if solution_type in ('not attempted', 'no solution found'):
 *             raise ValueError('Solution type is: %s' % solution_type)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_solution_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 659, __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(1, 659, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_solution_type = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":660
 *             return 0
 *         solution_type = self.solution_type()
 *         if solution_type in ('not attempted', 'no solution found'):             # <<<<<<<<<<<<<<
 *             raise ValueError('Solution type is: %s' % solution_type)
 *         if Number._default_precision > 64:
 */
  __Pyx_INCREF(__pyx_v_solution_type);
  __pyx_t_2 = __pyx_v_solution_type;
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s_not_attempted, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 660, __pyx_L1_error)
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s_no_solution_found, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 660, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_6;
  __pyx_L5_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __pyx_t_1;
  if (unlikely(__pyx_t_6)) {

    /* "cython/core/manifold.pyx":661
 *         solution_type = self.solution_type()
 *         if solution_type in ('not attempted', 'no solution found'):
 *             raise ValueError('Solution type is: %s' % solution_type)             # <<<<<<<<<<<<<<
 *         if Number._default_precision > 64:
 *             # must provide a start value to get the correct precision
 */
    __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Solution_type_is_s, __pyx_v_solution_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 661, __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(1, 661, __pyx_L1_error)

    /* "cython/core/manifold.pyx":660
 *             return 0
 *         solution_type = self.solution_type()
 *         if solution_type in ('not attempted', 'no solution found'):             # <<<<<<<<<<<<<<
 *             raise ValueError('Solution type is: %s' % solution_type)
 *         if Number._default_precision > 64:
 */
  }

  /* "cython/core/manifold.pyx":662
 *         if solution_type in ('not attempted', 'no solution found'):
 *             raise ValueError('Solution type is: %s' % solution_type)
 *         if Number._default_precision > 64:             # <<<<<<<<<<<<<<
 *             # must provide a start value to get the correct precision
 *             result = sum(
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Number); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_default_precision); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_int_64, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 662, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 662, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "cython/core/manifold.pyx":664
 *         if Number._default_precision > 64:
 *             # must provide a start value to get the correct precision
 *             result = sum(             # <<<<<<<<<<<<<<
 *                 [z.volume() for z in self._get_tetrahedra_shapes('filled')],
 *                 Number(0))
 */
    { /* enter inner scope */

      /* "cython/core/manifold.pyx":665
 *             # must provide a start value to get the correct precision
 *             result = sum(
 *                 [z.volume() for z in self._get_tetrahedra_shapes('filled')],             # <<<<<<<<<<<<<<
 *                 Number(0))
 *         else:
 */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 665, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_tetrahedra_shapes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 665, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(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_n_s_filled_2};
        __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;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 665, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
        __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4);
        __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 665, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 665, __pyx_L10_error)
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      for (;;) {
        if (likely(!__pyx_t_9)) {
          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(1, 665, __pyx_L10_error)
              #endif
              if (__pyx_t_8 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(1, 665, __pyx_L10_error)
            #else
            __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 665, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_2);
            #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(1, 665, __pyx_L10_error)
              #endif
              if (__pyx_t_8 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(1, 665, __pyx_L10_error)
            #else
            __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 665, __pyx_L10_error)
            __Pyx_GOTREF(__pyx_t_2);
            #endif
          }
        } else {
          __pyx_t_2 = __pyx_t_9(__pyx_t_4);
          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(1, 665, __pyx_L10_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_2);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr48__pyx_v_z, __pyx_t_2);
        __pyx_t_2 = 0;
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr48__pyx_v_z, __pyx_n_s_volume); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 665, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_10 = NULL;
        __pyx_t_5 = 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_5 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 665, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 665, __pyx_L10_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr48__pyx_v_z); __pyx_9genexpr48__pyx_v_z = 0;
      goto __pyx_L14_exit_scope;
      __pyx_L10_error:;
      __Pyx_XDECREF(__pyx_9genexpr48__pyx_v_z); __pyx_9genexpr48__pyx_v_z = 0;
      goto __pyx_L1_error;
      __pyx_L14_exit_scope:;
    } /* exit inner scope */

    /* "cython/core/manifold.pyx":666
 *             result = sum(
 *                 [z.volume() for z in self._get_tetrahedra_shapes('filled')],
 *                 Number(0))             # <<<<<<<<<<<<<<
 *         else:
 *             result = Number(<double>volume(self.c_triangulation, &acc))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Number); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(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_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_int_0};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 666, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }

    /* "cython/core/manifold.pyx":664
 *         if Number._default_precision > 64:
 *             # must provide a start value to get the correct precision
 *             result = sum(             # <<<<<<<<<<<<<<
 *                 [z.volume() for z in self._get_tetrahedra_shapes('filled')],
 *                 Number(0))
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(1, 664, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4)) __PYX_ERR(1, 664, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 664, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_result = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cython/core/manifold.pyx":662
 *         if solution_type in ('not attempted', 'no solution found'):
 *             raise ValueError('Solution type is: %s' % solution_type)
 *         if Number._default_precision > 64:             # <<<<<<<<<<<<<<
 *             # must provide a start value to get the correct precision
 *             result = sum(
 */
    goto __pyx_L7;
  }

  /* "cython/core/manifold.pyx":668
 *                 Number(0))
 *         else:
 *             result = Number(<double>volume(self.c_triangulation, &acc))             # <<<<<<<<<<<<<<
 *             result.accuracy = acc
 *         return result
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Number); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 668, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_11 = volume(__pyx_v_self->__pyx_base.c_triangulation, (&__pyx_v_acc)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 668, __pyx_L1_error)
    __pyx_t_3 = PyFloat_FromDouble(((double)__pyx_t_11)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 668, __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_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_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __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_4)) __PYX_ERR(1, 668, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_result = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cython/core/manifold.pyx":669
 *         else:
 *             result = Number(<double>volume(self.c_triangulation, &acc))
 *             result.accuracy = acc             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_acc); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_accuracy, __pyx_t_4) < 0) __PYX_ERR(1, 669, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_L7:;

  /* "cython/core/manifold.pyx":670
 *             result = Number(<double>volume(self.c_triangulation, &acc))
 *             result.accuracy = acc
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     cdef _cusped_complex_volume(self, Complex *volume, int *accuracy):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":651
 *                 for cover in covers]
 * 
 *     cdef _real_volume(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the (real) volume as a Number.
 */

  /* 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_10);
  __Pyx_AddTraceback("SnapPy.Manifold._real_volume", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_solution_type);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_9genexpr48__pyx_v_z);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":672
 *         return result
 * 
 *     cdef _cusped_complex_volume(self, Complex *volume, int *accuracy):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the complex volume of the manifold, computed using
 */

static PyObject *__pyx_f_6SnapPy_8Manifold__cusped_complex_volume(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, Complex *__pyx_v_volume, int *__pyx_v_accuracy) {
  const char* __pyx_v_err_msg;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Complex __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_cusped_complex_volume", 1);

  /* "cython/core/manifold.pyx":689
 *         True
 *         """
 *         cdef const_char_ptr err_msg=NULL             # <<<<<<<<<<<<<<
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 */
  __pyx_v_err_msg = NULL;

  /* "cython/core/manifold.pyx":690
 *         """
 *         cdef const_char_ptr err_msg=NULL
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":691
 *         cdef const_char_ptr err_msg=NULL
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 * 
 *         volume[0] = complex_volume(self.c_triangulation,
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 691, __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(1, 691, __pyx_L1_error)

    /* "cython/core/manifold.pyx":690
 *         """
 *         cdef const_char_ptr err_msg=NULL
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  }

  /* "cython/core/manifold.pyx":693
 *             raise ValueError('The Triangulation is empty.')
 * 
 *         volume[0] = complex_volume(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                    &err_msg,
 *                                    accuracy)
 */
  __pyx_t_3 = complex_volume(__pyx_v_self->__pyx_base.c_triangulation, (&__pyx_v_err_msg), __pyx_v_accuracy); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 693, __pyx_L1_error)
  (__pyx_v_volume[0]) = __pyx_t_3;

  /* "cython/core/manifold.pyx":696
 *                                    &err_msg,
 *                                    accuracy)
 *         if err_msg is NULL:             # <<<<<<<<<<<<<<
 *             return
 *         raise ValueError(err_msg)
 */
  __pyx_t_1 = (__pyx_v_err_msg == NULL);
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":697
 *                                    accuracy)
 *         if err_msg is NULL:
 *             return             # <<<<<<<<<<<<<<
 *         raise ValueError(err_msg)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":696
 *                                    &err_msg,
 *                                    accuracy)
 *         if err_msg is NULL:             # <<<<<<<<<<<<<<
 *             return
 *         raise ValueError(err_msg)
 */
  }

  /* "cython/core/manifold.pyx":698
 *         if err_msg is NULL:
 *             return
 *         raise ValueError(err_msg)             # <<<<<<<<<<<<<<
 * 
 *     def _complex_volume(self):
 */
  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_err_msg); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 698, __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(1, 698, __pyx_L1_error)

  /* "cython/core/manifold.pyx":672
 *         return result
 * 
 *     cdef _cusped_complex_volume(self, Complex *volume, int *accuracy):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the complex volume of the manifold, computed using
 */

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

/* "cython/core/manifold.pyx":700
 *         raise ValueError(err_msg)
 * 
 *     def _complex_volume(self):             # <<<<<<<<<<<<<<
 *         cdef Complex volume
 *         cdef int accuracy
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_41_complex_volume(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_6SnapPy_8Manifold_40_complex_volume, "Manifold._complex_volume(self)");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_41_complex_volume = {"_complex_volume", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_41_complex_volume, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_40_complex_volume};
static PyObject *__pyx_pw_6SnapPy_8Manifold_41_complex_volume(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("_complex_volume (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("_complex_volume", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_complex_volume", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_40_complex_volume(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_8Manifold_40_complex_volume(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self) {
  Complex __pyx_v_volume;
  int __pyx_v_accuracy;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_complex_volume", 1);

  /* "cython/core/manifold.pyx":703
 *         cdef Complex volume
 *         cdef int accuracy
 *         if True in self.cusp_info('is_complete'):             # <<<<<<<<<<<<<<
 *             self._cusped_complex_volume(&volume, &accuracy)
 *             set_CS_value(self.c_triangulation, volume.imag / PI_SQUARED_BY_2)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 703, __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, __pyx_n_s_is_complete};
    __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(1, 703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(Py_True, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(1, 703, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "cython/core/manifold.pyx":704
 *         cdef int accuracy
 *         if True in self.cusp_info('is_complete'):
 *             self._cusped_complex_volume(&volume, &accuracy)             # <<<<<<<<<<<<<<
 *             set_CS_value(self.c_triangulation, volume.imag / PI_SQUARED_BY_2)
 *             result = Complex2Number(volume)
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_6SnapPy_Manifold *)__pyx_v_self->__pyx_base.__pyx_vtab)->_cusped_complex_volume(__pyx_v_self, (&__pyx_v_volume), (&__pyx_v_accuracy)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/manifold.pyx":705
 *         if True in self.cusp_info('is_complete'):
 *             self._cusped_complex_volume(&volume, &accuracy)
 *             set_CS_value(self.c_triangulation, volume.imag / PI_SQUARED_BY_2)             # <<<<<<<<<<<<<<
 *             result = Complex2Number(volume)
 *             result.accuracy = accuracy
 */
    if (unlikely(PI_SQUARED_BY_2 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(1, 705, __pyx_L1_error)
    }
    set_CS_value(__pyx_v_self->__pyx_base.c_triangulation, (__pyx_v_volume.imag / ((__pyx_t_6SnapPy_Real)PI_SQUARED_BY_2))); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 705, __pyx_L1_error)

    /* "cython/core/manifold.pyx":706
 *             self._cusped_complex_volume(&volume, &accuracy)
 *             set_CS_value(self.c_triangulation, volume.imag / PI_SQUARED_BY_2)
 *             result = Complex2Number(volume)             # <<<<<<<<<<<<<<
 *             result.accuracy = accuracy
 *         else:
 */
    __pyx_t_1 = __pyx_f_6SnapPy_Complex2Number(__pyx_v_volume); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 706, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_v_result = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cython/core/manifold.pyx":707
 *             set_CS_value(self.c_triangulation, volume.imag / PI_SQUARED_BY_2)
 *             result = Complex2Number(volume)
 *             result.accuracy = accuracy             # <<<<<<<<<<<<<<
 *         else:
 *             result = self._real_volume() + (
 */
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_accuracy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 707, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_accuracy, __pyx_t_1) < 0) __PYX_ERR(1, 707, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/manifold.pyx":703
 *         cdef Complex volume
 *         cdef int accuracy
 *         if True in self.cusp_info('is_complete'):             # <<<<<<<<<<<<<<
 *             self._cusped_complex_volume(&volume, &accuracy)
 *             set_CS_value(self.c_triangulation, volume.imag / PI_SQUARED_BY_2)
 */
    goto __pyx_L3;
  }

  /* "cython/core/manifold.pyx":709
 *             result.accuracy = accuracy
 *         else:
 *             result = self._real_volume() + (             # <<<<<<<<<<<<<<
 *                 self._chern_simons() *
 *                 Real2Number(PI_SQUARED_BY_2) * Number('I'))
 */
  /*else*/ {
    __pyx_t_1 = ((struct __pyx_vtabstruct_6SnapPy_Manifold *)__pyx_v_self->__pyx_base.__pyx_vtab)->_real_volume(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cython/core/manifold.pyx":710
 *         else:
 *             result = self._real_volume() + (
 *                 self._chern_simons() *             # <<<<<<<<<<<<<<
 *                 Real2Number(PI_SQUARED_BY_2) * Number('I'))
 *         return self._number_(result)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_Manifold *)__pyx_v_self->__pyx_base.__pyx_vtab)->_chern_simons(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cython/core/manifold.pyx":711
 *             result = self._real_volume() + (
 *                 self._chern_simons() *
 *                 Real2Number(PI_SQUARED_BY_2) * Number('I'))             # <<<<<<<<<<<<<<
 *         return self._number_(result)
 * 
 */
    __pyx_t_3 = __pyx_f_6SnapPy_Real2Number(PI_SQUARED_BY_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "cython/core/manifold.pyx":710
 *         else:
 *             result = self._real_volume() + (
 *                 self._chern_simons() *             # <<<<<<<<<<<<<<
 *                 Real2Number(PI_SQUARED_BY_2) * Number('I'))
 *         return self._number_(result)
 */
    __pyx_t_6 = PyNumber_Multiply(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 710, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/manifold.pyx":711
 *             result = self._real_volume() + (
 *                 self._chern_simons() *
 *                 Real2Number(PI_SQUARED_BY_2) * Number('I'))             # <<<<<<<<<<<<<<
 *         return self._number_(result)
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Number); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(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_n_s_I};
      __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(1, 711, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = PyNumber_Multiply(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 711, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/manifold.pyx":709
 *             result.accuracy = accuracy
 *         else:
 *             result = self._real_volume() + (             # <<<<<<<<<<<<<<
 *                 self._chern_simons() *
 *                 Real2Number(PI_SQUARED_BY_2) * Number('I'))
 */
    __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 709, __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_v_result = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_L3:;

  /* "cython/core/manifold.pyx":712
 *                 self._chern_simons() *
 *                 Real2Number(PI_SQUARED_BY_2) * Number('I'))
 *         return self._number_(result)             # <<<<<<<<<<<<<<
 * 
 *     def volume(self, accuracy=False, verified = False, bits_prec = None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 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_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_result};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 712, __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;

  /* "cython/core/manifold.pyx":700
 *         raise ValueError(err_msg)
 * 
 *     def _complex_volume(self):             # <<<<<<<<<<<<<<
 *         cdef Complex volume
 *         cdef int accuracy
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.Manifold._complex_volume", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":714
 *         return self._number_(result)
 * 
 *     def volume(self, accuracy=False, verified = False, bits_prec = None):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the volume of the current solution to the hyperbolic
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_43volume(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_6SnapPy_8Manifold_42volume, "Manifold.volume(self, accuracy=False, verified=False, bits_prec=None)\n\n        Returns the volume of the current solution to the hyperbolic\n        gluing equations; if the solution is sufficiently non-degenerate,\n        this is the sum of the volumes of the hyperbolic pieces in\n        the geometric decomposition of the manifold.\n\n        >>> M = Manifold('m004')\n        >>> M.volume() # doctest: +NUMERIC6\n        2.02988321\n        >>> M.solution_type()\n        'all tetrahedra positively oriented'\n\n        The return value has an extra attribute, accuracy, which is the\n        number of digits of accuracy as *estimated* by SnapPea.  When\n        printing the volume, the result is rounded to 1 more than this\n        number of digits.\n\n        >>> vol, accuracy = M.volume(accuracy = True)\n        >>> accuracy in (10, 63) # Low precision, High precision\n        True\n\n        Inside SageMath, verified computation of the volume of a\n        hyperbolic manifold is also possible (this will verify first\n        that the manifold is indeed hyperbolic)::\n\n            sage: M.volume(verified=True, bits_prec=100)   #doctest: +NUMERIC24\n            2.029883212819307250042405109?\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_43volume = {"volume", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_43volume, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_42volume};
static PyObject *__pyx_pw_6SnapPy_8Manifold_43volume(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_accuracy = 0;
  PyObject *__pyx_v_verified = 0;
  PyObject *__pyx_v_bits_prec = 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("volume (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_accuracy,&__pyx_n_s_verified,&__pyx_n_s_bits_prec,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_accuracy);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 714, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_verified);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 714, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_bits_prec);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 714, __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, "volume") < 0)) __PYX_ERR(1, 714, __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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_accuracy = values[0];
    __pyx_v_verified = values[1];
    __pyx_v_bits_prec = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("volume", 0, 0, 3, __pyx_nargs); __PYX_ERR(1, 714, __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("SnapPy.Manifold.volume", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_42volume(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_accuracy, __pyx_v_verified, __pyx_v_bits_prec);

  /* 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_6SnapPy_8Manifold_42volume(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_accuracy, PyObject *__pyx_v_verified, PyObject *__pyx_v_bits_prec) {
  PyObject *__pyx_v_vol = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("volume", 1);

  /* "cython/core/manifold.pyx":744
 *         """
 * 
 *         if verified or bits_prec:             # <<<<<<<<<<<<<<
 *             if accuracy:
 *                 raise ValueError(
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_verified); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 744, __pyx_L1_error)
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_bits_prec); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 744, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":745
 * 
 *         if verified or bits_prec:
 *             if accuracy:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     'SnapPea kernel style estimation of accuracy not available '
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_accuracy); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 745, __pyx_L1_error)
    if (unlikely(__pyx_t_1)) {

      /* "cython/core/manifold.pyx":746
 *         if verified or bits_prec:
 *             if accuracy:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     'SnapPea kernel style estimation of accuracy not available '
 *                     'for arbitrary precision/interval arithmetic.')
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__90, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 746, __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(1, 746, __pyx_L1_error)

      /* "cython/core/manifold.pyx":745
 * 
 *         if verified or bits_prec:
 *             if accuracy:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     'SnapPea kernel style estimation of accuracy not available '
 */
    }

    /* "cython/core/manifold.pyx":750
 *                     'for arbitrary precision/interval arithmetic.')
 * 
 *             return verify.compute_volume(             # <<<<<<<<<<<<<<
 *                 self, verified=verified, bits_prec=bits_prec)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_verify); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_compute_volume); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/manifold.pyx":751
 * 
 *             return verify.compute_volume(
 *                 self, verified=verified, bits_prec=bits_prec)             # <<<<<<<<<<<<<<
 * 
 *         vol = self._real_volume()
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(1, 750, __pyx_L1_error);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 751, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_verified, __pyx_v_verified) < 0) __PYX_ERR(1, 751, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_bits_prec, __pyx_v_bits_prec) < 0) __PYX_ERR(1, 751, __pyx_L1_error)

    /* "cython/core/manifold.pyx":750
 *                     'for arbitrary precision/interval arithmetic.')
 * 
 *             return verify.compute_volume(             # <<<<<<<<<<<<<<
 *                 self, verified=verified, bits_prec=bits_prec)
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":744
 *         """
 * 
 *         if verified or bits_prec:             # <<<<<<<<<<<<<<
 *             if accuracy:
 *                 raise ValueError(
 */
  }

  /* "cython/core/manifold.pyx":753
 *                 self, verified=verified, bits_prec=bits_prec)
 * 
 *         vol = self._real_volume()             # <<<<<<<<<<<<<<
 *         if accuracy:
 *             return (self._number_(vol), vol.accuracy)
 */
  __pyx_t_6 = ((struct __pyx_vtabstruct_6SnapPy_Manifold *)__pyx_v_self->__pyx_base.__pyx_vtab)->_real_volume(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_vol = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "cython/core/manifold.pyx":754
 * 
 *         vol = self._real_volume()
 *         if accuracy:             # <<<<<<<<<<<<<<
 *             return (self._number_(vol), vol.accuracy)
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_accuracy); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 754, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":755
 *         vol = self._real_volume()
 *         if accuracy:
 *             return (self._number_(vol), vol.accuracy)             # <<<<<<<<<<<<<<
 *         else:
 *             return self._number_(vol)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(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_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_vol};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 755, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_vol, __pyx_n_s_accuracy); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6)) __PYX_ERR(1, 755, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5)) __PYX_ERR(1, 755, __pyx_L1_error);
    __pyx_t_6 = 0;
    __pyx_t_5 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":754
 * 
 *         vol = self._real_volume()
 *         if accuracy:             # <<<<<<<<<<<<<<
 *             return (self._number_(vol), vol.accuracy)
 *         else:
 */
  }

  /* "cython/core/manifold.pyx":757
 *             return (self._number_(vol), vol.accuracy)
 *         else:
 *             return self._number_(vol)             # <<<<<<<<<<<<<<
 * 
 *     cdef _old_chern_simons(self):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 757, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_vol};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 757, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;
  }

  /* "cython/core/manifold.pyx":714
 *         return self._number_(result)
 * 
 *     def volume(self, accuracy=False, verified = False, bits_prec = None):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the volume of the current solution to the hyperbolic
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.Manifold.volume", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_vol);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":759
 *             return self._number_(vol)
 * 
 *     cdef _old_chern_simons(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the Chern-Simons invariant as a Number.  The value
 */

static PyObject *__pyx_f_6SnapPy_8Manifold__old_chern_simons(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self) {
  Boolean __pyx_v_is_known;
  Boolean __pyx_v_requires_initialization;
  __pyx_t_6SnapPy_Real __pyx_v_CS;
  int __pyx_v_accuracy;
  PyObject *__pyx_v_cs = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_old_chern_simons", 1);

  /* "cython/core/manifold.pyx":769
 *         cdef int accuracy
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return 0
 *         get_CS_value(self.c_triangulation,
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":770
 * 
 *         if self.c_triangulation is NULL:
 *             return 0             # <<<<<<<<<<<<<<
 *         get_CS_value(self.c_triangulation,
 *                      &is_known,
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_r = __pyx_int_0;
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":769
 *         cdef int accuracy
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return 0
 *         get_CS_value(self.c_triangulation,
 */
  }

  /* "cython/core/manifold.pyx":771
 *         if self.c_triangulation is NULL:
 *             return 0
 *         get_CS_value(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                      &is_known,
 *                      &CS,
 */
  get_CS_value(__pyx_v_self->__pyx_base.c_triangulation, (&__pyx_v_is_known), (&__pyx_v_CS), (&__pyx_v_accuracy), (&__pyx_v_requires_initialization)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 771, __pyx_L1_error)

  /* "cython/core/manifold.pyx":776
 *                      &accuracy,
 *                      &requires_initialization)
 *         if not is_known:             # <<<<<<<<<<<<<<
 *             raise ValueError("The Chern-Simons invariant isn't "
 *                              "currently known.")
 */
  __pyx_t_1 = (!(__pyx_v_is_known != 0));
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":777
 *                      &requires_initialization)
 *         if not is_known:
 *             raise ValueError("The Chern-Simons invariant isn't "             # <<<<<<<<<<<<<<
 *                              "currently known.")
 *         cs = Real2Number(CS)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 777, __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(1, 777, __pyx_L1_error)

    /* "cython/core/manifold.pyx":776
 *                      &accuracy,
 *                      &requires_initialization)
 *         if not is_known:             # <<<<<<<<<<<<<<
 *             raise ValueError("The Chern-Simons invariant isn't "
 *                              "currently known.")
 */
  }

  /* "cython/core/manifold.pyx":779
 *             raise ValueError("The Chern-Simons invariant isn't "
 *                              "currently known.")
 *         cs = Real2Number(CS)             # <<<<<<<<<<<<<<
 *         cs.accuracy = accuracy
 *         return cs
 */
  __pyx_t_2 = __pyx_f_6SnapPy_Real2Number(__pyx_v_CS); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_cs = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":780
 *                              "currently known.")
 *         cs = Real2Number(CS)
 *         cs.accuracy = accuracy             # <<<<<<<<<<<<<<
 *         return cs
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_accuracy); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_cs, __pyx_n_s_accuracy, __pyx_t_2) < 0) __PYX_ERR(1, 780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":781
 *         cs = Real2Number(CS)
 *         cs.accuracy = accuracy
 *         return cs             # <<<<<<<<<<<<<<
 * 
 *     cdef _chern_simons(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_cs);
  __pyx_r = __pyx_v_cs;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":759
 *             return self._number_(vol)
 * 
 *     cdef _old_chern_simons(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the Chern-Simons invariant as a Number.  The value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.Manifold._old_chern_simons", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":783
 *         return cs
 * 
 *     cdef _chern_simons(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the Chern-Simons invariant as a Number.  The value
 */

static PyObject *__pyx_f_6SnapPy_8Manifold__chern_simons(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self) {
  Complex __pyx_v_volume;
  __pyx_t_6SnapPy_Real __pyx_v_cs_value;
  int __pyx_v_accuracy;
  PyObject *__pyx_v_solution_type = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_chern_simons", 1);

  /* "cython/core/manifold.pyx":792
 *         cdef Real cs_value
 *         cdef int accuracy
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return 0
 *         solution_type = self.solution_type()
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":793
 *         cdef int accuracy
 *         if self.c_triangulation is NULL:
 *             return 0             # <<<<<<<<<<<<<<
 *         solution_type = self.solution_type()
 *         if solution_type in ('not attempted', 'no solution found'):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_r = __pyx_int_0;
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":792
 *         cdef Real cs_value
 *         cdef int accuracy
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return 0
 *         solution_type = self.solution_type()
 */
  }

  /* "cython/core/manifold.pyx":794
 *         if self.c_triangulation is NULL:
 *             return 0
 *         solution_type = self.solution_type()             # <<<<<<<<<<<<<<
 *         if solution_type in ('not attempted', 'no solution found'):
 *             raise ValueError('The solution type is: %s' % solution_type)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_solution_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 794, __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(1, 794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_solution_type = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":795
 *             return 0
 *         solution_type = self.solution_type()
 *         if solution_type in ('not attempted', 'no solution found'):             # <<<<<<<<<<<<<<
 *             raise ValueError('The solution type is: %s' % solution_type)
 *         if True not in self.cusp_info('is_complete'):
 */
  __Pyx_INCREF(__pyx_v_solution_type);
  __pyx_t_2 = __pyx_v_solution_type;
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s_not_attempted, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 795, __pyx_L1_error)
  if (!__pyx_t_6) {
  } else {
    __pyx_t_1 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s_no_solution_found, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 795, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_6;
  __pyx_L5_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __pyx_t_1;
  if (unlikely(__pyx_t_6)) {

    /* "cython/core/manifold.pyx":796
 *         solution_type = self.solution_type()
 *         if solution_type in ('not attempted', 'no solution found'):
 *             raise ValueError('The solution type is: %s' % solution_type)             # <<<<<<<<<<<<<<
 *         if True not in self.cusp_info('is_complete'):
 *             result = self._old_chern_simons()
 */
    __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_kp_s_The_solution_type_is_s, __pyx_v_solution_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 796, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 796, __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(1, 796, __pyx_L1_error)

    /* "cython/core/manifold.pyx":795
 *             return 0
 *         solution_type = self.solution_type()
 *         if solution_type in ('not attempted', 'no solution found'):             # <<<<<<<<<<<<<<
 *             raise ValueError('The solution type is: %s' % solution_type)
 *         if True not in self.cusp_info('is_complete'):
 */
  }

  /* "cython/core/manifold.pyx":797
 *         if solution_type in ('not attempted', 'no solution found'):
 *             raise ValueError('The solution type is: %s' % solution_type)
 *         if True not in self.cusp_info('is_complete'):             # <<<<<<<<<<<<<<
 *             result = self._old_chern_simons()
 *         else:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 797, __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, __pyx_n_s_is_complete};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 797, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(Py_True, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 797, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "cython/core/manifold.pyx":798
 *             raise ValueError('The solution type is: %s' % solution_type)
 *         if True not in self.cusp_info('is_complete'):
 *             result = self._old_chern_simons()             # <<<<<<<<<<<<<<
 *         else:
 *             self._cusped_complex_volume(&volume, &accuracy)
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_6SnapPy_Manifold *)__pyx_v_self->__pyx_base.__pyx_vtab)->_old_chern_simons(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_result = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cython/core/manifold.pyx":797
 *         if solution_type in ('not attempted', 'no solution found'):
 *             raise ValueError('The solution type is: %s' % solution_type)
 *         if True not in self.cusp_info('is_complete'):             # <<<<<<<<<<<<<<
 *             result = self._old_chern_simons()
 *         else:
 */
    goto __pyx_L7;
  }

  /* "cython/core/manifold.pyx":800
 *             result = self._old_chern_simons()
 *         else:
 *             self._cusped_complex_volume(&volume, &accuracy)             # <<<<<<<<<<<<<<
 *             cs_value = volume.imag / PI_SQUARED_BY_2
 *             result = Real2Number(cs_value)
 */
  /*else*/ {
    __pyx_t_3 = ((struct __pyx_vtabstruct_6SnapPy_Manifold *)__pyx_v_self->__pyx_base.__pyx_vtab)->_cusped_complex_volume(__pyx_v_self, (&__pyx_v_volume), (&__pyx_v_accuracy)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 800, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/manifold.pyx":801
 *         else:
 *             self._cusped_complex_volume(&volume, &accuracy)
 *             cs_value = volume.imag / PI_SQUARED_BY_2             # <<<<<<<<<<<<<<
 *             result = Real2Number(cs_value)
 *             result.accuracy = accuracy - 1 if accuracy else None
 */
    if (unlikely(PI_SQUARED_BY_2 == 0)) {
      PyErr_SetString(PyExc_ZeroDivisionError, "float division");
      __PYX_ERR(1, 801, __pyx_L1_error)
    }
    __pyx_v_cs_value = (__pyx_v_volume.imag / ((__pyx_t_6SnapPy_Real)PI_SQUARED_BY_2));

    /* "cython/core/manifold.pyx":802
 *             self._cusped_complex_volume(&volume, &accuracy)
 *             cs_value = volume.imag / PI_SQUARED_BY_2
 *             result = Real2Number(cs_value)             # <<<<<<<<<<<<<<
 *             result.accuracy = accuracy - 1 if accuracy else None
 *             set_CS_value(self.c_triangulation, cs_value)
 */
    __pyx_t_3 = __pyx_f_6SnapPy_Real2Number(__pyx_v_cs_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 802, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_v_result = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cython/core/manifold.pyx":803
 *             cs_value = volume.imag / PI_SQUARED_BY_2
 *             result = Real2Number(cs_value)
 *             result.accuracy = accuracy - 1 if accuracy else None             # <<<<<<<<<<<<<<
 *             set_CS_value(self.c_triangulation, cs_value)
 *         return result
 */
    __pyx_t_6 = (__pyx_v_accuracy != 0);
    if (__pyx_t_6) {
      __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_accuracy - 1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 803, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_t_2;
      __pyx_t_2 = 0;
    } else {
      __Pyx_INCREF(Py_None);
      __pyx_t_3 = Py_None;
    }
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_result, __pyx_n_s_accuracy, __pyx_t_3) < 0) __PYX_ERR(1, 803, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/manifold.pyx":804
 *             result = Real2Number(cs_value)
 *             result.accuracy = accuracy - 1 if accuracy else None
 *             set_CS_value(self.c_triangulation, cs_value)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    set_CS_value(__pyx_v_self->__pyx_base.c_triangulation, __pyx_v_cs_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 804, __pyx_L1_error)
  }
  __pyx_L7:;

  /* "cython/core/manifold.pyx":805
 *             result.accuracy = accuracy - 1 if accuracy else None
 *             set_CS_value(self.c_triangulation, cs_value)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def chern_simons(self, accuracy = False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":783
 *         return cs
 * 
 *     cdef _chern_simons(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the Chern-Simons invariant as a Number.  The value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("SnapPy.Manifold._chern_simons", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_solution_type);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":807
 *         return result
 * 
 *     def chern_simons(self, accuracy = False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the Chern-Simons invariant of the manifold, if it is known.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_45chern_simons(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_6SnapPy_8Manifold_44chern_simons, "Manifold.chern_simons(self, accuracy=False)\n\n        Returns the Chern-Simons invariant of the manifold, if it is known.\n\n        >>> M = Manifold('m015')\n        >>> M.chern_simons() # doctest: +NUMERIC6\n        -0.15320413\n\n        The return value has an extra attribute, accuracy, which\n        is the number of digits of accuracy as *estimated* by SnapPea.\n\n        >>> cs, accuracy = M.chern_simons(accuracy = True)\n        >>> accuracy in (8, 9, 56) # Low and High precision\n        True\n\n        By default, when the manifold has at least one cusp, Zickert's\n        algorithm is used; when the manifold is closed we use SnapPea's\n        original algorithm, which is based on Meyerhoff-Hodgson-Neumann.\n\n        Note: When computing the Chern-Simons invariant of a closed\n        manifold, one must sometimes compute it first for the unfilled\n        manifold so as to initialize SnapPea's internals.  For instance,\n\n        >>> M = Manifold('5_2')\n        >>> M.chern_simons() # doctest: +NUMERIC6\n        -0.15320413\n        >>> M.dehn_fill( (1,2) )\n        >>> M.chern_simons() # doctest: +NUMERIC6\n        0.07731787\n\n        works, but will fail with 'Chern-Simons invariant not\n        currently known' if the first call to chern_simons is not\n        made.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_45chern_simons = {"chern_simons", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_45chern_simons, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_44chern_simons};
static PyObject *__pyx_pw_6SnapPy_8Manifold_45chern_simons(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_accuracy = 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("chern_simons (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_accuracy,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_accuracy);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 807, __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, "chern_simons") < 0)) __PYX_ERR(1, 807, __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_accuracy = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("chern_simons", 0, 0, 1, __pyx_nargs); __PYX_ERR(1, 807, __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("SnapPy.Manifold.chern_simons", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_44chern_simons(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_accuracy);

  /* 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_6SnapPy_8Manifold_44chern_simons(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_accuracy) {
  PyObject *__pyx_v_cs = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("chern_simons", 1);

  /* "cython/core/manifold.pyx":842
 *         """
 * 
 *         cs = self._chern_simons()             # <<<<<<<<<<<<<<
 *         if accuracy:
 *             return (self._number_(cs), cs.accuracy)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6SnapPy_Manifold *)__pyx_v_self->__pyx_base.__pyx_vtab)->_chern_simons(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_cs = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/manifold.pyx":843
 * 
 *         cs = self._chern_simons()
 *         if accuracy:             # <<<<<<<<<<<<<<
 *             return (self._number_(cs), cs.accuracy)
 *         else:
 */
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_accuracy); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 843, __pyx_L1_error)
  if (__pyx_t_2) {

    /* "cython/core/manifold.pyx":844
 *         cs = self._chern_simons()
 *         if accuracy:
 *             return (self._number_(cs), cs.accuracy)             # <<<<<<<<<<<<<<
 *         else:
 *             return self._number_(cs)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __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_cs};
      __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, 844, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cs, __pyx_n_s_accuracy); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 844, __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(1, 844, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(1, 844, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":843
 * 
 *         cs = self._chern_simons()
 *         if accuracy:             # <<<<<<<<<<<<<<
 *             return (self._number_(cs), cs.accuracy)
 *         else:
 */
  }

  /* "cython/core/manifold.pyx":846
 *             return (self._number_(cs), cs.accuracy)
 *         else:
 *             return self._number_(cs)             # <<<<<<<<<<<<<<
 * 
 *     def without_hyperbolic_structure(self):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(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_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_cs};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 846, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "cython/core/manifold.pyx":807
 *         return result
 * 
 *     def chern_simons(self, accuracy = False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the Chern-Simons invariant of the manifold, if it is known.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("SnapPy.Manifold.chern_simons", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":848
 *             return self._number_(cs)
 * 
 *     def without_hyperbolic_structure(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns self as a Triangulation, forgetting the hyperbolic
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_47without_hyperbolic_structure(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_6SnapPy_8Manifold_46without_hyperbolic_structure, "Manifold.without_hyperbolic_structure(self)\n\n        Returns self as a Triangulation, forgetting the hyperbolic\n        structure in the process.\n\n        >>> M = Manifold('9_42')\n        >>> T = M.without_hyperbolic_structure()\n        >>> hasattr(T, 'volume')\n        False\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_47without_hyperbolic_structure = {"without_hyperbolic_structure", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_47without_hyperbolic_structure, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_46without_hyperbolic_structure};
static PyObject *__pyx_pw_6SnapPy_8Manifold_47without_hyperbolic_structure(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("without_hyperbolic_structure (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("without_hyperbolic_structure", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "without_hyperbolic_structure", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_46without_hyperbolic_structure(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_8Manifold_46without_hyperbolic_structure(struct __pyx_obj_6SnapPy_Manifold *__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("without_hyperbolic_structure", 1);

  /* "cython/core/manifold.pyx":858
 *         False
 *         """
 *         return Triangulation_from_Manifold(self)             # <<<<<<<<<<<<<<
 * 
 *     def _polish_hyperbolic_structures(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Triangulation_from_Manifold); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 858, __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, ((PyObject *)__pyx_v_self)};
    __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(1, 858, __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;

  /* "cython/core/manifold.pyx":848
 *             return self._number_(cs)
 * 
 *     def without_hyperbolic_structure(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns self as a Triangulation, forgetting the hyperbolic
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.Manifold.without_hyperbolic_structure", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":860
 *         return Triangulation_from_Manifold(self)
 * 
 *     def _polish_hyperbolic_structures(self):             # <<<<<<<<<<<<<<
 *         polish_hyperbolic_structures(self.c_triangulation)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_49_polish_hyperbolic_structures(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_6SnapPy_8Manifold_48_polish_hyperbolic_structures, "Manifold._polish_hyperbolic_structures(self)");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_49_polish_hyperbolic_structures = {"_polish_hyperbolic_structures", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_49_polish_hyperbolic_structures, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_48_polish_hyperbolic_structures};
static PyObject *__pyx_pw_6SnapPy_8Manifold_49_polish_hyperbolic_structures(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("_polish_hyperbolic_structures (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("_polish_hyperbolic_structures", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_polish_hyperbolic_structures", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_48_polish_hyperbolic_structures(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_8Manifold_48_polish_hyperbolic_structures(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_polish_hyperbolic_structures", 1);

  /* "cython/core/manifold.pyx":861
 * 
 *     def _polish_hyperbolic_structures(self):
 *         polish_hyperbolic_structures(self.c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *     def tetrahedra_shapes(self, part=None, fixed_alignment=True,
 */
  polish_hyperbolic_structures(__pyx_v_self->__pyx_base.c_triangulation);

  /* "cython/core/manifold.pyx":860
 *         return Triangulation_from_Manifold(self)
 * 
 *     def _polish_hyperbolic_structures(self):             # <<<<<<<<<<<<<<
 *         polish_hyperbolic_structures(self.c_triangulation)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":863
 *         polish_hyperbolic_structures(self.c_triangulation)
 * 
 *     def tetrahedra_shapes(self, part=None, fixed_alignment=True,             # <<<<<<<<<<<<<<
 *                           bits_prec=None, dec_prec=None,
 *                           intervals=False):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_51tetrahedra_shapes(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_6SnapPy_8Manifold_50tetrahedra_shapes, "Manifold.tetrahedra_shapes(self, part=None, fixed_alignment=True, bits_prec=None, dec_prec=None, intervals=False)\n\n        Gives the shapes of the tetrahedra in the current solution to\n        the gluing equations.  Returns a list containing one info object\n        for each tetrahedron.  The keys are:\n\n        - rect : the shape of the tetrahedron, as a point in the\n          complex plane.\n\n        - log : the log of the shape\n\n        - accuracies: a list of the approximate accuracies of the\n          shapes, in order (rect re, rect im, log re, log im)\n\n        If the optional variable 'part' is set to one of the above,\n        then the function returns only that component of the data.\n\n        If the flag 'fixed_alignment' is set to False, then the edges\n        used to report the shape parameters are chosen so as to\n        normalize the triangle.\n\n        >>> M = Manifold('m015')\n        >>> M.tetrahedra_shapes(part='rect') # doctest: +NUMERIC6\n        [0.66235898 + 0.56227951*I, 0.66235898 + 0.56227951*I, 0.66235898 + 0.56227951*I]\n        >>> M.tetrahedra_shapes() #doctest:+SKIP\n        [{'accuracies': (11, 11, 12, 11), 'log': -0.14059979 + 0.70385772*I, 'rect': 0.66235898 + 0.56227951*I},\n         {'accuracies': (11, 11, 11, 11), 'log': -0.14059979 + 0.70385772*I, 'rect': 0.66235898 + 0.56227951*I},\n         {'accuracies': (11, 11, 11, 11), 'log': -0.14059979 + 0.70385772*I, 'rect': 0.66235898 + 0.56227951*I}]\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_51tetrahedra_shapes = {"tetrahedra_shapes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_51tetrahedra_shapes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_50tetrahedra_shapes};
static PyObject *__pyx_pw_6SnapPy_8Manifold_51tetrahedra_shapes(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_part = 0;
  PyObject *__pyx_v_fixed_alignment = 0;
  PyObject *__pyx_v_bits_prec = 0;
  PyObject *__pyx_v_dec_prec = 0;
  PyObject *__pyx_v_intervals = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tetrahedra_shapes (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_part,&__pyx_n_s_fixed_alignment,&__pyx_n_s_bits_prec,&__pyx_n_s_dec_prec,&__pyx_n_s_intervals,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));

    /* "cython/core/manifold.pyx":864
 * 
 *     def tetrahedra_shapes(self, part=None, fixed_alignment=True,
 *                           bits_prec=None, dec_prec=None,             # <<<<<<<<<<<<<<
 *                           intervals=False):
 *         """
 */
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "cython/core/manifold.pyx":865
 *     def tetrahedra_shapes(self, part=None, fixed_alignment=True,
 *                           bits_prec=None, dec_prec=None,
 *                           intervals=False):             # <<<<<<<<<<<<<<
 *         """
 *         Gives the shapes of the tetrahedra in the current solution to
 */
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_part);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 863, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fixed_alignment);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 863, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_bits_prec);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 863, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dec_prec);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 863, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_intervals);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 863, __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, "tetrahedra_shapes") < 0)) __PYX_ERR(1, 863, __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);
        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;
      }
    }
    __pyx_v_part = values[0];
    __pyx_v_fixed_alignment = values[1];
    __pyx_v_bits_prec = values[2];
    __pyx_v_dec_prec = values[3];
    __pyx_v_intervals = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("tetrahedra_shapes", 0, 0, 5, __pyx_nargs); __PYX_ERR(1, 863, __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("SnapPy.Manifold.tetrahedra_shapes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_50tetrahedra_shapes(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_part, __pyx_v_fixed_alignment, __pyx_v_bits_prec, __pyx_v_dec_prec, __pyx_v_intervals);

  /* "cython/core/manifold.pyx":863
 *         polish_hyperbolic_structures(self.c_triangulation)
 * 
 *     def tetrahedra_shapes(self, part=None, fixed_alignment=True,             # <<<<<<<<<<<<<<
 *                           bits_prec=None, dec_prec=None,
 *                           intervals=False):
 */

  /* 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_6SnapPy_8Manifold_50tetrahedra_shapes(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_part, PyObject *__pyx_v_fixed_alignment, PyObject *__pyx_v_bits_prec, PyObject *__pyx_v_dec_prec, PyObject *__pyx_v_intervals) {
  __pyx_t_6SnapPy_Real __pyx_v_rect_re;
  __pyx_t_6SnapPy_Real __pyx_v_rect_im;
  __pyx_t_6SnapPy_Real __pyx_v_log_re;
  __pyx_t_6SnapPy_Real __pyx_v_log_im;
  int __pyx_v_acc_rec_re;
  int __pyx_v_acc_rec_im;
  int __pyx_v_acc_log_re;
  int __pyx_v_acc_log_im;
  Boolean __pyx_v_is_geometric;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_shapes = NULL;
  PyObject *__pyx_v_z = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_rect_shape = NULL;
  PyObject *__pyx_v_log_shape = NULL;
  PyObject *__pyx_v_engine = NULL;
  PyObject *__pyx_9genexpr49__pyx_v_a = NULL;
  PyObject *__pyx_9genexpr50__pyx_v_a = NULL;
  PyObject *__pyx_9genexpr51__pyx_v_z = NULL;
  PyObject *__pyx_9genexpr52__pyx_v_a = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  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;
  Boolean __pyx_t_14;
  int __pyx_t_15;
  int __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tetrahedra_shapes", 1);

  /* "cython/core/manifold.pyx":898
 *         cdef Boolean is_geometric
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return []
 * 
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":899
 * 
 *         if self.c_triangulation is NULL:
 *             return []             # <<<<<<<<<<<<<<
 * 
 *         # The SnapPea kernel itself supports non-orientable manifolds,
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":898
 *         cdef Boolean is_geometric
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return []
 * 
 */
  }

  /* "cython/core/manifold.pyx":904
 *         # but the extensions in snap and verify don't.
 *         # Thus work in double cover and use every other shape.
 *         if not self.is_orientable() and (bits_prec or dec_prec or intervals):             # <<<<<<<<<<<<<<
 *             result = self.orientation_cover().tetrahedra_shapes(
 *                                        part=part,
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_orientable); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 904, __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(1, 904, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 904, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = (!__pyx_t_6);
  if (__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_bits_prec); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(1, 904, __pyx_L1_error)
  if (!__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_dec_prec); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(1, 904, __pyx_L1_error)
  if (!__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_intervals); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(1, 904, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_7;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":905
 *         # Thus work in double cover and use every other shape.
 *         if not self.is_orientable() and (bits_prec or dec_prec or intervals):
 *             result = self.orientation_cover().tetrahedra_shapes(             # <<<<<<<<<<<<<<
 *                                        part=part,
 *                                        fixed_alignment=fixed_alignment,
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_orientation_cover); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 905, __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(1, 905, __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_tetrahedra_shapes); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 905, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/manifold.pyx":906
 *         if not self.is_orientable() and (bits_prec or dec_prec or intervals):
 *             result = self.orientation_cover().tetrahedra_shapes(
 *                                        part=part,             # <<<<<<<<<<<<<<
 *                                        fixed_alignment=fixed_alignment,
 *                                        bits_prec=bits_prec, dec_prec=dec_prec,
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 906, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_part, __pyx_v_part) < 0) __PYX_ERR(1, 906, __pyx_L1_error)

    /* "cython/core/manifold.pyx":907
 *             result = self.orientation_cover().tetrahedra_shapes(
 *                                        part=part,
 *                                        fixed_alignment=fixed_alignment,             # <<<<<<<<<<<<<<
 *                                        bits_prec=bits_prec, dec_prec=dec_prec,
 *                                        intervals=intervals)[::2]
 */
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fixed_alignment, __pyx_v_fixed_alignment) < 0) __PYX_ERR(1, 906, __pyx_L1_error)

    /* "cython/core/manifold.pyx":908
 *                                        part=part,
 *                                        fixed_alignment=fixed_alignment,
 *                                        bits_prec=bits_prec, dec_prec=dec_prec,             # <<<<<<<<<<<<<<
 *                                        intervals=intervals)[::2]
 *             if part is not None:
 */
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_bits_prec, __pyx_v_bits_prec) < 0) __PYX_ERR(1, 906, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dec_prec, __pyx_v_dec_prec) < 0) __PYX_ERR(1, 906, __pyx_L1_error)

    /* "cython/core/manifold.pyx":909
 *                                        fixed_alignment=fixed_alignment,
 *                                        bits_prec=bits_prec, dec_prec=dec_prec,
 *                                        intervals=intervals)[::2]             # <<<<<<<<<<<<<<
 *             if part is not None:
 *                 return result
 */
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_intervals, __pyx_v_intervals) < 0) __PYX_ERR(1, 906, __pyx_L1_error)

    /* "cython/core/manifold.pyx":905
 *         # Thus work in double cover and use every other shape.
 *         if not self.is_orientable() and (bits_prec or dec_prec or intervals):
 *             result = self.orientation_cover().tetrahedra_shapes(             # <<<<<<<<<<<<<<
 *                                        part=part,
 *                                        fixed_alignment=fixed_alignment,
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 905, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/manifold.pyx":909
 *                                        fixed_alignment=fixed_alignment,
 *                                        bits_prec=bits_prec, dec_prec=dec_prec,
 *                                        intervals=intervals)[::2]             # <<<<<<<<<<<<<<
 *             if part is not None:
 *                 return result
 */
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_slice__92); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_result = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/manifold.pyx":910
 *                                        bits_prec=bits_prec, dec_prec=dec_prec,
 *                                        intervals=intervals)[::2]
 *             if part is not None:             # <<<<<<<<<<<<<<
 *                 return result
 *             else:
 */
    __pyx_t_1 = (__pyx_v_part != Py_None);
    if (__pyx_t_1) {

      /* "cython/core/manifold.pyx":911
 *                                        intervals=intervals)[::2]
 *             if part is not None:
 *                 return result             # <<<<<<<<<<<<<<
 *             else:
 *                 return ListOnePerLine(result)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L0;

      /* "cython/core/manifold.pyx":910
 *                                        bits_prec=bits_prec, dec_prec=dec_prec,
 *                                        intervals=intervals)[::2]
 *             if part is not None:             # <<<<<<<<<<<<<<
 *                 return result
 *             else:
 */
    }

    /* "cython/core/manifold.pyx":913
 *                 return result
 *             else:
 *                 return ListOnePerLine(result)             # <<<<<<<<<<<<<<
 * 
 *         result = []
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ListOnePerLine); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 913, __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_v_result};
        __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(1, 913, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;
    }

    /* "cython/core/manifold.pyx":904
 *         # but the extensions in snap and verify don't.
 *         # Thus work in double cover and use every other shape.
 *         if not self.is_orientable() and (bits_prec or dec_prec or intervals):             # <<<<<<<<<<<<<<
 *             result = self.orientation_cover().tetrahedra_shapes(
 *                                        part=part,
 */
  }

  /* "cython/core/manifold.pyx":915
 *                 return ListOnePerLine(result)
 * 
 *         result = []             # <<<<<<<<<<<<<<
 *         if bits_prec or dec_prec:
 *             if fixed_alignment is False:
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":916
 * 
 *         result = []
 *         if bits_prec or dec_prec:             # <<<<<<<<<<<<<<
 *             if fixed_alignment is False:
 *                 raise ValueError(
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_bits_prec); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(1, 916, __pyx_L1_error)
  if (!__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L11_bool_binop_done;
  }
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_dec_prec); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(1, 916, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_7;
  __pyx_L11_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":917
 *         result = []
 *         if bits_prec or dec_prec:
 *             if fixed_alignment is False:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     'High precision shapes must be computed '
 */
    __pyx_t_1 = (__pyx_v_fixed_alignment == Py_False);
    if (unlikely(__pyx_t_1)) {

      /* "cython/core/manifold.pyx":918
 *         if bits_prec or dec_prec:
 *             if fixed_alignment is False:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     'High precision shapes must be computed '
 *                     'in the fixed alignment')
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 918, __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(1, 918, __pyx_L1_error)

      /* "cython/core/manifold.pyx":917
 *         result = []
 *         if bits_prec or dec_prec:
 *             if fixed_alignment is False:             # <<<<<<<<<<<<<<
 *                 raise ValueError(
 *                     'High precision shapes must be computed '
 */
    }

    /* "cython/core/manifold.pyx":921
 *                     'High precision shapes must be computed '
 *                     'in the fixed alignment')
 *             shapes = snap.polished_tetrahedra_shapes(             # <<<<<<<<<<<<<<
 *                 self, dec_prec=dec_prec, bits_prec=bits_prec,
 *                 ignore_solution_type=True)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_snap); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 921, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_polished_tetrahedra_shapes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 921, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/manifold.pyx":922
 *                     'in the fixed alignment')
 *             shapes = snap.polished_tetrahedra_shapes(
 *                 self, dec_prec=dec_prec, bits_prec=bits_prec,             # <<<<<<<<<<<<<<
 *                 ignore_solution_type=True)
 *             for z in shapes:
 */
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 921, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(1, 921, __pyx_L1_error);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 922, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dec_prec, __pyx_v_dec_prec) < 0) __PYX_ERR(1, 922, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_bits_prec, __pyx_v_bits_prec) < 0) __PYX_ERR(1, 922, __pyx_L1_error)

    /* "cython/core/manifold.pyx":923
 *             shapes = snap.polished_tetrahedra_shapes(
 *                 self, dec_prec=dec_prec, bits_prec=bits_prec,
 *                 ignore_solution_type=True)             # <<<<<<<<<<<<<<
 *             for z in shapes:
 *                 result.append(ShapeInfo(rect=z,
 */
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_ignore_solution_type, Py_True) < 0) __PYX_ERR(1, 922, __pyx_L1_error)

    /* "cython/core/manifold.pyx":921
 *                     'High precision shapes must be computed '
 *                     'in the fixed alignment')
 *             shapes = snap.polished_tetrahedra_shapes(             # <<<<<<<<<<<<<<
 *                 self, dec_prec=dec_prec, bits_prec=bits_prec,
 *                 ignore_solution_type=True)
 */
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 921, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_shapes = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "cython/core/manifold.pyx":924
 *                 self, dec_prec=dec_prec, bits_prec=bits_prec,
 *                 ignore_solution_type=True)
 *             for z in shapes:             # <<<<<<<<<<<<<<
 *                 result.append(ShapeInfo(rect=z,
 *                                         log=z.log(),
 */
    if (likely(PyList_CheckExact(__pyx_v_shapes)) || PyTuple_CheckExact(__pyx_v_shapes)) {
      __pyx_t_8 = __pyx_v_shapes; __Pyx_INCREF(__pyx_t_8);
      __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_shapes); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 924, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 924, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_8))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 924, __pyx_L1_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(1, 924, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 924, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 924, __pyx_L1_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(1, 924, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 924, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_10(__pyx_t_8);
        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(1, 924, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_z, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cython/core/manifold.pyx":925
 *                 ignore_solution_type=True)
 *             for z in shapes:
 *                 result.append(ShapeInfo(rect=z,             # <<<<<<<<<<<<<<
 *                                         log=z.log(),
 *                                         accuracies=(None, None, None, None)))
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ShapeInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 925, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 925, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_rect, __pyx_v_z) < 0) __PYX_ERR(1, 925, __pyx_L1_error)

      /* "cython/core/manifold.pyx":926
 *             for z in shapes:
 *                 result.append(ShapeInfo(rect=z,
 *                                         log=z.log(),             # <<<<<<<<<<<<<<
 *                                         accuracies=(None, None, None, None)))
 *         else:
 */
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_z, __pyx_n_s_log); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 926, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_12 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_11))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_11, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 926, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_log, __pyx_t_4) < 0) __PYX_ERR(1, 925, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/manifold.pyx":927
 *                 result.append(ShapeInfo(rect=z,
 *                                         log=z.log(),
 *                                         accuracies=(None, None, None, None)))             # <<<<<<<<<<<<<<
 *         else:
 *             for i in range(self.num_tetrahedra()):
 */
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_accuracies, __pyx_tuple__94) < 0) __PYX_ERR(1, 925, __pyx_L1_error)

      /* "cython/core/manifold.pyx":925
 *                 ignore_solution_type=True)
 *             for z in shapes:
 *                 result.append(ShapeInfo(rect=z,             # <<<<<<<<<<<<<<
 *                                         log=z.log(),
 *                                         accuracies=(None, None, None, None)))
 */
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 925, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_result, __pyx_t_4); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(1, 925, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/manifold.pyx":924
 *                 self, dec_prec=dec_prec, bits_prec=bits_prec,
 *                 ignore_solution_type=True)
 *             for z in shapes:             # <<<<<<<<<<<<<<
 *                 result.append(ShapeInfo(rect=z,
 *                                         log=z.log(),
 */
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cython/core/manifold.pyx":916
 * 
 *         result = []
 *         if bits_prec or dec_prec:             # <<<<<<<<<<<<<<
 *             if fixed_alignment is False:
 *                 raise ValueError(
 */
    goto __pyx_L10;
  }

  /* "cython/core/manifold.pyx":929
 *                                         accuracies=(None, None, None, None)))
 *         else:
 *             for i in range(self.num_tetrahedra()):             # <<<<<<<<<<<<<<
 *                 get_tet_shape(self.c_triangulation, i, filled, fixed_alignment,
 *                               &rect_re, &rect_im, &log_re, &log_im,
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_tetrahedra); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_8 = __pyx_t_4; __Pyx_INCREF(__pyx_t_8);
      __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 929, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 929, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_8))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 929, __pyx_L1_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(1, 929, __pyx_L1_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 929, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 929, __pyx_L1_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(1, 929, __pyx_L1_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 929, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_10(__pyx_t_8);
        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(1, 929, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "cython/core/manifold.pyx":930
 *         else:
 *             for i in range(self.num_tetrahedra()):
 *                 get_tet_shape(self.c_triangulation, i, filled, fixed_alignment,             # <<<<<<<<<<<<<<
 *                               &rect_re, &rect_im, &log_re, &log_im,
 *                               &acc_rec_re, &acc_rec_im,
 */
      __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 930, __pyx_L1_error)
      __pyx_t_14 = __Pyx_PyInt_As_Boolean(__pyx_v_fixed_alignment); if (unlikely((__pyx_t_14 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(1, 930, __pyx_L1_error)

      /* "cython/core/manifold.pyx":934
 *                               &acc_rec_re, &acc_rec_im,
 *                               &acc_log_re, &acc_log_im,
 *                               &is_geometric)             # <<<<<<<<<<<<<<
 * 
 *                 rect_shape=Number(RealImag2gen(rect_re, rect_im))
 */
      get_tet_shape(__pyx_v_self->__pyx_base.c_triangulation, __pyx_t_5, filled, __pyx_t_14, (&__pyx_v_rect_re), (&__pyx_v_rect_im), (&__pyx_v_log_re), (&__pyx_v_log_im), (&__pyx_v_acc_rec_re), (&__pyx_v_acc_rec_im), (&__pyx_v_acc_log_re), (&__pyx_v_acc_log_im), (&__pyx_v_is_geometric)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 930, __pyx_L1_error)

      /* "cython/core/manifold.pyx":936
 *                               &is_geometric)
 * 
 *                 rect_shape=Number(RealImag2gen(rect_re, rect_im))             # <<<<<<<<<<<<<<
 *                 rect_shape.accuracy=min(acc_rec_re, acc_rec_im)
 *                 log_shape=Number(RealImag2gen(log_re, log_im))
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Number); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 936, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_f_6SnapPy_RealImag2gen(__pyx_v_rect_re, __pyx_v_rect_im); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 936, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = NULL;
      __pyx_t_5 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_5 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_3};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 936, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_rect_shape, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "cython/core/manifold.pyx":937
 * 
 *                 rect_shape=Number(RealImag2gen(rect_re, rect_im))
 *                 rect_shape.accuracy=min(acc_rec_re, acc_rec_im)             # <<<<<<<<<<<<<<
 *                 log_shape=Number(RealImag2gen(log_re, log_im))
 *                 log_shape.accuracy=min(acc_log_re, acc_log_im)
 */
      __pyx_t_5 = __pyx_v_acc_rec_im;
      __pyx_t_15 = __pyx_v_acc_rec_re;
      __pyx_t_1 = (__pyx_t_5 < __pyx_t_15);
      if (__pyx_t_1) {
        __pyx_t_16 = __pyx_t_5;
      } else {
        __pyx_t_16 = __pyx_t_15;
      }
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 937, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_rect_shape, __pyx_n_s_accuracy, __pyx_t_4) < 0) __PYX_ERR(1, 937, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/manifold.pyx":938
 *                 rect_shape=Number(RealImag2gen(rect_re, rect_im))
 *                 rect_shape.accuracy=min(acc_rec_re, acc_rec_im)
 *                 log_shape=Number(RealImag2gen(log_re, log_im))             # <<<<<<<<<<<<<<
 *                 log_shape.accuracy=min(acc_log_re, acc_log_im)
 *                 if part in ['rect', 'log', 'accuracies']:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Number); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 938, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_f_6SnapPy_RealImag2gen(__pyx_v_log_re, __pyx_v_log_im); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 938, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = NULL;
      __pyx_t_16 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_16 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_3};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_16, 1+__pyx_t_16);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 938, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_log_shape, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "cython/core/manifold.pyx":939
 *                 rect_shape.accuracy=min(acc_rec_re, acc_rec_im)
 *                 log_shape=Number(RealImag2gen(log_re, log_im))
 *                 log_shape.accuracy=min(acc_log_re, acc_log_im)             # <<<<<<<<<<<<<<
 *                 if part in ['rect', 'log', 'accuracies']:
 *                     # Don't compute volumes as they will be thrown away.
 */
      __pyx_t_16 = __pyx_v_acc_log_im;
      __pyx_t_5 = __pyx_v_acc_log_re;
      __pyx_t_1 = (__pyx_t_16 < __pyx_t_5);
      if (__pyx_t_1) {
        __pyx_t_15 = __pyx_t_16;
      } else {
        __pyx_t_15 = __pyx_t_5;
      }
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_15); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 939, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_log_shape, __pyx_n_s_accuracy, __pyx_t_4) < 0) __PYX_ERR(1, 939, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/manifold.pyx":940
 *                 log_shape=Number(RealImag2gen(log_re, log_im))
 *                 log_shape.accuracy=min(acc_log_re, acc_log_im)
 *                 if part in ['rect', 'log', 'accuracies']:             # <<<<<<<<<<<<<<
 *                     # Don't compute volumes as they will be thrown away.
 *                     result.append(ShapeInfo(
 */
      __Pyx_INCREF(__pyx_v_part);
      __pyx_t_4 = __pyx_v_part;
      __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_rect, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(1, 940, __pyx_L1_error)
      if (!__pyx_t_7) {
      } else {
        __pyx_t_1 = __pyx_t_7;
        goto __pyx_L20_bool_binop_done;
      }
      __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_log, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(1, 940, __pyx_L1_error)
      if (!__pyx_t_7) {
      } else {
        __pyx_t_1 = __pyx_t_7;
        goto __pyx_L20_bool_binop_done;
      }
      __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_accuracies, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(1, 940, __pyx_L1_error)
      __pyx_t_1 = __pyx_t_7;
      __pyx_L20_bool_binop_done:;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_7 = __pyx_t_1;
      if (__pyx_t_7) {

        /* "cython/core/manifold.pyx":942
 *                 if part in ['rect', 'log', 'accuracies']:
 *                     # Don't compute volumes as they will be thrown away.
 *                     result.append(ShapeInfo(             # <<<<<<<<<<<<<<
 *                             rect=self._number_(rect_shape),
 *                             log=self._number_(log_shape),
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ShapeInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 942, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);

        /* "cython/core/manifold.pyx":943
 *                     # Don't compute volumes as they will be thrown away.
 *                     result.append(ShapeInfo(
 *                             rect=self._number_(rect_shape),             # <<<<<<<<<<<<<<
 *                             log=self._number_(log_shape),
 *                             accuracies=(acc_rec_re, acc_rec_im,
 */
        __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 943, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 943, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = NULL;
        __pyx_t_15 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
            __pyx_t_15 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_rect_shape};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 943, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_rect, __pyx_t_3) < 0) __PYX_ERR(1, 943, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "cython/core/manifold.pyx":944
 *                     result.append(ShapeInfo(
 *                             rect=self._number_(rect_shape),
 *                             log=self._number_(log_shape),             # <<<<<<<<<<<<<<
 *                             accuracies=(acc_rec_re, acc_rec_im,
 *                                         acc_log_re, acc_log_im)))
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 944, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = NULL;
        __pyx_t_15 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
            __pyx_t_15 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_log_shape};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 944, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_log, __pyx_t_3) < 0) __PYX_ERR(1, 943, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "cython/core/manifold.pyx":945
 *                             rect=self._number_(rect_shape),
 *                             log=self._number_(log_shape),
 *                             accuracies=(acc_rec_re, acc_rec_im,             # <<<<<<<<<<<<<<
 *                                         acc_log_re, acc_log_im)))
 *                 else:
 */
        __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_acc_rec_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 945, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_acc_rec_im); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 945, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);

        /* "cython/core/manifold.pyx":946
 *                             log=self._number_(log_shape),
 *                             accuracies=(acc_rec_re, acc_rec_im,
 *                                         acc_log_re, acc_log_im)))             # <<<<<<<<<<<<<<
 *                 else:
 *                     result.append(ShapeInfo(
 */
        __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_acc_log_re); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 946, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_acc_log_im); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 946, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);

        /* "cython/core/manifold.pyx":945
 *                             rect=self._number_(rect_shape),
 *                             log=self._number_(log_shape),
 *                             accuracies=(acc_rec_re, acc_rec_im,             # <<<<<<<<<<<<<<
 *                                         acc_log_re, acc_log_im)))
 *                 else:
 */
        __pyx_t_18 = PyTuple_New(4); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 945, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_3);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_3)) __PYX_ERR(1, 945, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_11);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_11)) __PYX_ERR(1, 945, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_12);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_12)) __PYX_ERR(1, 945, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_17);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_17)) __PYX_ERR(1, 945, __pyx_L1_error);
        __pyx_t_3 = 0;
        __pyx_t_11 = 0;
        __pyx_t_12 = 0;
        __pyx_t_17 = 0;
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_accuracies, __pyx_t_18) < 0) __PYX_ERR(1, 943, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

        /* "cython/core/manifold.pyx":942
 *                 if part in ['rect', 'log', 'accuracies']:
 *                     # Don't compute volumes as they will be thrown away.
 *                     result.append(ShapeInfo(             # <<<<<<<<<<<<<<
 *                             rect=self._number_(rect_shape),
 *                             log=self._number_(log_shape),
 */
        __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 942, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_result, __pyx_t_18); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(1, 942, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

        /* "cython/core/manifold.pyx":940
 *                 log_shape=Number(RealImag2gen(log_re, log_im))
 *                 log_shape.accuracy=min(acc_log_re, acc_log_im)
 *                 if part in ['rect', 'log', 'accuracies']:             # <<<<<<<<<<<<<<
 *                     # Don't compute volumes as they will be thrown away.
 *                     result.append(ShapeInfo(
 */
        goto __pyx_L19;
      }

      /* "cython/core/manifold.pyx":948
 *                                         acc_log_re, acc_log_im)))
 *                 else:
 *                     result.append(ShapeInfo(             # <<<<<<<<<<<<<<
 *                             rect=self._number_(rect_shape),
 *                             log=self._number_(log_shape),
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_ShapeInfo); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 948, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_18);

        /* "cython/core/manifold.pyx":949
 *                 else:
 *                     result.append(ShapeInfo(
 *                             rect=self._number_(rect_shape),             # <<<<<<<<<<<<<<
 *                             log=self._number_(log_shape),
 *                             volume=rect_shape.volume(),
 */
        __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 949, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 949, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_12 = NULL;
        __pyx_t_15 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_17))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_17);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_17, function);
            __pyx_t_15 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_rect_shape};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 949, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        }
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_rect, __pyx_t_4) < 0) __PYX_ERR(1, 949, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "cython/core/manifold.pyx":950
 *                     result.append(ShapeInfo(
 *                             rect=self._number_(rect_shape),
 *                             log=self._number_(log_shape),             # <<<<<<<<<<<<<<
 *                             volume=rect_shape.volume(),
 *                             accuracies=(acc_rec_re, acc_rec_im,
 */
        __pyx_t_17 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 950, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_12 = NULL;
        __pyx_t_15 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_17))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_17);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_17, function);
            __pyx_t_15 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_v_log_shape};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 950, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        }
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_log, __pyx_t_4) < 0) __PYX_ERR(1, 949, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "cython/core/manifold.pyx":951
 *                             rect=self._number_(rect_shape),
 *                             log=self._number_(log_shape),
 *                             volume=rect_shape.volume(),             # <<<<<<<<<<<<<<
 *                             accuracies=(acc_rec_re, acc_rec_im,
 *                                         acc_log_re, acc_log_im)))
 */
        __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_rect_shape, __pyx_n_s_volume); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 951, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);
        __pyx_t_12 = NULL;
        __pyx_t_15 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_17))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_17);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_17, function);
            __pyx_t_15 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_15, 0+__pyx_t_15);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 951, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        }
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_volume, __pyx_t_4) < 0) __PYX_ERR(1, 949, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "cython/core/manifold.pyx":952
 *                             log=self._number_(log_shape),
 *                             volume=rect_shape.volume(),
 *                             accuracies=(acc_rec_re, acc_rec_im,             # <<<<<<<<<<<<<<
 *                                         acc_log_re, acc_log_im)))
 * 
 */
        __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_acc_rec_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 952, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_acc_rec_im); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 952, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_17);

        /* "cython/core/manifold.pyx":953
 *                             volume=rect_shape.volume(),
 *                             accuracies=(acc_rec_re, acc_rec_im,
 *                                         acc_log_re, acc_log_im)))             # <<<<<<<<<<<<<<
 * 
 *         if intervals:
 */
        __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_acc_log_re); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 953, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_acc_log_im); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 953, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);

        /* "cython/core/manifold.pyx":952
 *                             log=self._number_(log_shape),
 *                             volume=rect_shape.volume(),
 *                             accuracies=(acc_rec_re, acc_rec_im,             # <<<<<<<<<<<<<<
 *                                         acc_log_re, acc_log_im)))
 * 
 */
        __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 952, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_4);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 952, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_17);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_17)) __PYX_ERR(1, 952, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_12);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_12)) __PYX_ERR(1, 952, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_11);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_11)) __PYX_ERR(1, 952, __pyx_L1_error);
        __pyx_t_4 = 0;
        __pyx_t_17 = 0;
        __pyx_t_12 = 0;
        __pyx_t_11 = 0;
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_accuracies, __pyx_t_3) < 0) __PYX_ERR(1, 949, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "cython/core/manifold.pyx":948
 *                                         acc_log_re, acc_log_im)))
 *                 else:
 *                     result.append(ShapeInfo(             # <<<<<<<<<<<<<<
 *                             rect=self._number_(rect_shape),
 *                             log=self._number_(log_shape),
 */
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 948, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(1, 948, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_L19:;

      /* "cython/core/manifold.pyx":929
 *                                         accuracies=(None, None, None, None)))
 *         else:
 *             for i in range(self.num_tetrahedra()):             # <<<<<<<<<<<<<<
 *                 get_tet_shape(self.c_triangulation, i, filled, fixed_alignment,
 *                               &rect_re, &rect_im, &log_re, &log_im,
 */
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __pyx_L10:;

  /* "cython/core/manifold.pyx":955
 *                                         acc_log_re, acc_log_im)))
 * 
 *         if intervals:             # <<<<<<<<<<<<<<
 *             if bits_prec or dec_prec:
 *                 engine = verify.CertifiedShapesEngine(
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_intervals); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(1, 955, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "cython/core/manifold.pyx":956
 * 
 *         if intervals:
 *             if bits_prec or dec_prec:             # <<<<<<<<<<<<<<
 *                 engine = verify.CertifiedShapesEngine(
 *                     self, [a['rect'] for a in result],
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_bits_prec); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 956, __pyx_L1_error)
    if (!__pyx_t_1) {
    } else {
      __pyx_t_7 = __pyx_t_1;
      goto __pyx_L26_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_dec_prec); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 956, __pyx_L1_error)
    __pyx_t_7 = __pyx_t_1;
    __pyx_L26_bool_binop_done:;
    if (__pyx_t_7) {

      /* "cython/core/manifold.pyx":957
 *         if intervals:
 *             if bits_prec or dec_prec:
 *                 engine = verify.CertifiedShapesEngine(             # <<<<<<<<<<<<<<
 *                     self, [a['rect'] for a in result],
 *                     dec_prec=dec_prec, bits_prec=bits_prec)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_verify); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 957, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_CertifiedShapesEngine); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 957, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cython/core/manifold.pyx":958
 *             if bits_prec or dec_prec:
 *                 engine = verify.CertifiedShapesEngine(
 *                     self, [a['rect'] for a in result],             # <<<<<<<<<<<<<<
 *                     dec_prec=dec_prec, bits_prec=bits_prec)
 *             else:
 */
      { /* enter inner scope */
        __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 958, __pyx_L30_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (likely(PyList_CheckExact(__pyx_v_result)) || PyTuple_CheckExact(__pyx_v_result)) {
          __pyx_t_2 = __pyx_v_result; __Pyx_INCREF(__pyx_t_2);
          __pyx_t_9 = 0;
          __pyx_t_10 = NULL;
        } else {
          __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 958, __pyx_L30_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 958, __pyx_L30_error)
        }
        for (;;) {
          if (likely(!__pyx_t_10)) {
            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(1, 958, __pyx_L30_error)
                #endif
                if (__pyx_t_9 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_18 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_18); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(1, 958, __pyx_L30_error)
              #else
              __pyx_t_18 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 958, __pyx_L30_error)
              __Pyx_GOTREF(__pyx_t_18);
              #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(1, 958, __pyx_L30_error)
                #endif
                if (__pyx_t_9 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_18 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_18); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(1, 958, __pyx_L30_error)
              #else
              __pyx_t_18 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 958, __pyx_L30_error)
              __Pyx_GOTREF(__pyx_t_18);
              #endif
            }
          } else {
            __pyx_t_18 = __pyx_t_10(__pyx_t_2);
            if (unlikely(!__pyx_t_18)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(1, 958, __pyx_L30_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_18);
          }
          __Pyx_XDECREF_SET(__pyx_9genexpr49__pyx_v_a, __pyx_t_18);
          __pyx_t_18 = 0;
          __pyx_t_18 = __Pyx_PyObject_Dict_GetItem(__pyx_9genexpr49__pyx_v_a, __pyx_n_s_rect); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 958, __pyx_L30_error)
          __Pyx_GOTREF(__pyx_t_18);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_18))) __PYX_ERR(1, 958, __pyx_L30_error)
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_9genexpr49__pyx_v_a); __pyx_9genexpr49__pyx_v_a = 0;
        goto __pyx_L34_exit_scope;
        __pyx_L30_error:;
        __Pyx_XDECREF(__pyx_9genexpr49__pyx_v_a); __pyx_9genexpr49__pyx_v_a = 0;
        goto __pyx_L1_error;
        __pyx_L34_exit_scope:;
      } /* exit inner scope */

      /* "cython/core/manifold.pyx":957
 *         if intervals:
 *             if bits_prec or dec_prec:
 *                 engine = verify.CertifiedShapesEngine(             # <<<<<<<<<<<<<<
 *                     self, [a['rect'] for a in result],
 *                     dec_prec=dec_prec, bits_prec=bits_prec)
 */
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 957, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(1, 957, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_8);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_8)) __PYX_ERR(1, 957, __pyx_L1_error);
      __pyx_t_8 = 0;

      /* "cython/core/manifold.pyx":959
 *                 engine = verify.CertifiedShapesEngine(
 *                     self, [a['rect'] for a in result],
 *                     dec_prec=dec_prec, bits_prec=bits_prec)             # <<<<<<<<<<<<<<
 *             else:
 *                 engine = verify.CertifiedShapesEngine(
 */
      __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 959, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dec_prec, __pyx_v_dec_prec) < 0) __PYX_ERR(1, 959, __pyx_L1_error)
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_bits_prec, __pyx_v_bits_prec) < 0) __PYX_ERR(1, 959, __pyx_L1_error)

      /* "cython/core/manifold.pyx":957
 *         if intervals:
 *             if bits_prec or dec_prec:
 *                 engine = verify.CertifiedShapesEngine(             # <<<<<<<<<<<<<<
 *                     self, [a['rect'] for a in result],
 *                     dec_prec=dec_prec, bits_prec=bits_prec)
 */
      __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 957, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_engine = __pyx_t_18;
      __pyx_t_18 = 0;

      /* "cython/core/manifold.pyx":956
 * 
 *         if intervals:
 *             if bits_prec or dec_prec:             # <<<<<<<<<<<<<<
 *                 engine = verify.CertifiedShapesEngine(
 *                     self, [a['rect'] for a in result],
 */
      goto __pyx_L25;
    }

    /* "cython/core/manifold.pyx":961
 *                     dec_prec=dec_prec, bits_prec=bits_prec)
 *             else:
 *                 engine = verify.CertifiedShapesEngine(             # <<<<<<<<<<<<<<
 *                     self, [a['rect'] for a in result],
 *                     bits_prec = Number._default_precision)
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_verify); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_CertifiedShapesEngine); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

      /* "cython/core/manifold.pyx":962
 *             else:
 *                 engine = verify.CertifiedShapesEngine(
 *                     self, [a['rect'] for a in result],             # <<<<<<<<<<<<<<
 *                     bits_prec = Number._default_precision)
 *             if not engine.expand_until_certified():
 */
      { /* enter inner scope */
        __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 962, __pyx_L37_error)
        __Pyx_GOTREF(__pyx_t_18);
        if (likely(PyList_CheckExact(__pyx_v_result)) || PyTuple_CheckExact(__pyx_v_result)) {
          __pyx_t_2 = __pyx_v_result; __Pyx_INCREF(__pyx_t_2);
          __pyx_t_9 = 0;
          __pyx_t_10 = NULL;
        } else {
          __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 962, __pyx_L37_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 962, __pyx_L37_error)
        }
        for (;;) {
          if (likely(!__pyx_t_10)) {
            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(1, 962, __pyx_L37_error)
                #endif
                if (__pyx_t_9 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(1, 962, __pyx_L37_error)
              #else
              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 962, __pyx_L37_error)
              __Pyx_GOTREF(__pyx_t_3);
              #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(1, 962, __pyx_L37_error)
                #endif
                if (__pyx_t_9 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(1, 962, __pyx_L37_error)
              #else
              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 962, __pyx_L37_error)
              __Pyx_GOTREF(__pyx_t_3);
              #endif
            }
          } else {
            __pyx_t_3 = __pyx_t_10(__pyx_t_2);
            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(1, 962, __pyx_L37_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_XDECREF_SET(__pyx_9genexpr50__pyx_v_a, __pyx_t_3);
          __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_9genexpr50__pyx_v_a, __pyx_n_s_rect); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 962, __pyx_L37_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_18, (PyObject*)__pyx_t_3))) __PYX_ERR(1, 962, __pyx_L37_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_9genexpr50__pyx_v_a); __pyx_9genexpr50__pyx_v_a = 0;
        goto __pyx_L41_exit_scope;
        __pyx_L37_error:;
        __Pyx_XDECREF(__pyx_9genexpr50__pyx_v_a); __pyx_9genexpr50__pyx_v_a = 0;
        goto __pyx_L1_error;
        __pyx_L41_exit_scope:;
      } /* exit inner scope */

      /* "cython/core/manifold.pyx":961
 *                     dec_prec=dec_prec, bits_prec=bits_prec)
 *             else:
 *                 engine = verify.CertifiedShapesEngine(             # <<<<<<<<<<<<<<
 *                     self, [a['rect'] for a in result],
 *                     bits_prec = Number._default_precision)
 */
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF((PyObject *)__pyx_v_self);
      __Pyx_GIVEREF((PyObject *)__pyx_v_self);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(1, 961, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_18);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_18)) __PYX_ERR(1, 961, __pyx_L1_error);
      __pyx_t_18 = 0;

      /* "cython/core/manifold.pyx":963
 *                 engine = verify.CertifiedShapesEngine(
 *                     self, [a['rect'] for a in result],
 *                     bits_prec = Number._default_precision)             # <<<<<<<<<<<<<<
 *             if not engine.expand_until_certified():
 *                 raise RuntimeError('Could not certify shape intervals, either '
 */
      __pyx_t_18 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 963, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Number); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 963, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_default_precision); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 963, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_bits_prec, __pyx_t_11) < 0) __PYX_ERR(1, 963, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "cython/core/manifold.pyx":961
 *                     dec_prec=dec_prec, bits_prec=bits_prec)
 *             else:
 *                 engine = verify.CertifiedShapesEngine(             # <<<<<<<<<<<<<<
 *                     self, [a['rect'] for a in result],
 *                     bits_prec = Number._default_precision)
 */
      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_2, __pyx_t_18); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 961, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      __pyx_v_engine = __pyx_t_11;
      __pyx_t_11 = 0;
    }
    __pyx_L25:;

    /* "cython/core/manifold.pyx":964
 *                     self, [a['rect'] for a in result],
 *                     bits_prec = Number._default_precision)
 *             if not engine.expand_until_certified():             # <<<<<<<<<<<<<<
 *                 raise RuntimeError('Could not certify shape intervals, either '
 *                                    'there are degenerate shapes or the '
 */
    __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_engine, __pyx_n_s_expand_until_certified); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_18);
    __pyx_t_2 = NULL;
    __pyx_t_15 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_18))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_18);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_18, function);
        __pyx_t_15 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_18, __pyx_callargs+1-__pyx_t_15, 0+__pyx_t_15);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 964, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
    }
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(1, 964, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_1 = (!__pyx_t_7);
    if (unlikely(__pyx_t_1)) {

      /* "cython/core/manifold.pyx":965
 *                     bits_prec = Number._default_precision)
 *             if not engine.expand_until_certified():
 *                 raise RuntimeError('Could not certify shape intervals, either '             # <<<<<<<<<<<<<<
 *                                    'there are degenerate shapes or the '
 *                                    'precision must be increased.')
 */
      __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 965, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_Raise(__pyx_t_11, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __PYX_ERR(1, 965, __pyx_L1_error)

      /* "cython/core/manifold.pyx":964
 *                     self, [a['rect'] for a in result],
 *                     bits_prec = Number._default_precision)
 *             if not engine.expand_until_certified():             # <<<<<<<<<<<<<<
 *                 raise RuntimeError('Could not certify shape intervals, either '
 *                                    'there are degenerate shapes or the '
 */
    }

    /* "cython/core/manifold.pyx":968
 *                                    'there are degenerate shapes or the '
 *                                    'precision must be increased.')
 *             result = [ ShapeInfo(rect=z,             # <<<<<<<<<<<<<<
 *                                  log=z.log(),
 *                                  accuracies=(None,None,None,None))
 */
    { /* enter inner scope */
      __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 968, __pyx_L45_error)
      __Pyx_GOTREF(__pyx_t_11);

      /* "cython/core/manifold.pyx":971
 *                                  log=z.log(),
 *                                  accuracies=(None,None,None,None))
 *                        for z in engine.certified_shapes ]             # <<<<<<<<<<<<<<
 * 
 *         if part is not None:
 */
      __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_engine, __pyx_n_s_certified_shapes); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 971, __pyx_L45_error)
      __Pyx_GOTREF(__pyx_t_18);
      if (likely(PyList_CheckExact(__pyx_t_18)) || PyTuple_CheckExact(__pyx_t_18)) {
        __pyx_t_2 = __pyx_t_18; __Pyx_INCREF(__pyx_t_2);
        __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_18); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 971, __pyx_L45_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 971, __pyx_L45_error)
      }
      __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
      for (;;) {
        if (likely(!__pyx_t_10)) {
          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(1, 971, __pyx_L45_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_18 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_18); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(1, 971, __pyx_L45_error)
            #else
            __pyx_t_18 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 971, __pyx_L45_error)
            __Pyx_GOTREF(__pyx_t_18);
            #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(1, 971, __pyx_L45_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_18 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_18); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(1, 971, __pyx_L45_error)
            #else
            __pyx_t_18 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 971, __pyx_L45_error)
            __Pyx_GOTREF(__pyx_t_18);
            #endif
          }
        } else {
          __pyx_t_18 = __pyx_t_10(__pyx_t_2);
          if (unlikely(!__pyx_t_18)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(1, 971, __pyx_L45_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_18);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr51__pyx_v_z, __pyx_t_18);
        __pyx_t_18 = 0;

        /* "cython/core/manifold.pyx":968
 *                                    'there are degenerate shapes or the '
 *                                    'precision must be increased.')
 *             result = [ ShapeInfo(rect=z,             # <<<<<<<<<<<<<<
 *                                  log=z.log(),
 *                                  accuracies=(None,None,None,None))
 */
        __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_ShapeInfo); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 968, __pyx_L45_error)
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_8 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 968, __pyx_L45_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_rect, __pyx_9genexpr51__pyx_v_z) < 0) __PYX_ERR(1, 968, __pyx_L45_error)

        /* "cython/core/manifold.pyx":969
 *                                    'precision must be increased.')
 *             result = [ ShapeInfo(rect=z,
 *                                  log=z.log(),             # <<<<<<<<<<<<<<
 *                                  accuracies=(None,None,None,None))
 *                        for z in engine.certified_shapes ]
 */
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr51__pyx_v_z, __pyx_n_s_log); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 969, __pyx_L45_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_17 = NULL;
        __pyx_t_15 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_17)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_17);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
            __pyx_t_15 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_17, NULL};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_15, 0+__pyx_t_15);
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 969, __pyx_L45_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_log, __pyx_t_3) < 0) __PYX_ERR(1, 968, __pyx_L45_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "cython/core/manifold.pyx":970
 *             result = [ ShapeInfo(rect=z,
 *                                  log=z.log(),
 *                                  accuracies=(None,None,None,None))             # <<<<<<<<<<<<<<
 *                        for z in engine.certified_shapes ]
 * 
 */
        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_accuracies, __pyx_tuple__94) < 0) __PYX_ERR(1, 968, __pyx_L45_error)

        /* "cython/core/manifold.pyx":968
 *                                    'there are degenerate shapes or the '
 *                                    'precision must be increased.')
 *             result = [ ShapeInfo(rect=z,             # <<<<<<<<<<<<<<
 *                                  log=z.log(),
 *                                  accuracies=(None,None,None,None))
 */
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 968, __pyx_L45_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_3))) __PYX_ERR(1, 968, __pyx_L45_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "cython/core/manifold.pyx":971
 *                                  log=z.log(),
 *                                  accuracies=(None,None,None,None))
 *                        for z in engine.certified_shapes ]             # <<<<<<<<<<<<<<
 * 
 *         if part is not None:
 */
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_9genexpr51__pyx_v_z); __pyx_9genexpr51__pyx_v_z = 0;
      goto __pyx_L49_exit_scope;
      __pyx_L45_error:;
      __Pyx_XDECREF(__pyx_9genexpr51__pyx_v_z); __pyx_9genexpr51__pyx_v_z = 0;
      goto __pyx_L1_error;
      __pyx_L49_exit_scope:;
    } /* exit inner scope */
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_11);
    __pyx_t_11 = 0;

    /* "cython/core/manifold.pyx":955
 *                                         acc_log_re, acc_log_im)))
 * 
 *         if intervals:             # <<<<<<<<<<<<<<
 *             if bits_prec or dec_prec:
 *                 engine = verify.CertifiedShapesEngine(
 */
  }

  /* "cython/core/manifold.pyx":973
 *                        for z in engine.certified_shapes ]
 * 
 *         if part is not None:             # <<<<<<<<<<<<<<
 *             try:
 *                 return [a[part] for a in result]
 */
  __pyx_t_1 = (__pyx_v_part != Py_None);
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":974
 * 
 *         if part is not None:
 *             try:             # <<<<<<<<<<<<<<
 *                 return [a[part] for a in result]
 *             except KeyError:
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
      __Pyx_XGOTREF(__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_21);
      /*try:*/ {

        /* "cython/core/manifold.pyx":975
 *         if part is not None:
 *             try:
 *                 return [a[part] for a in result]             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 raise ValueError('A non-existent shape data type '
 */
        __Pyx_XDECREF(__pyx_r);
        { /* enter inner scope */
          __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 975, __pyx_L59_error)
          __Pyx_GOTREF(__pyx_t_11);
          if (likely(PyList_CheckExact(__pyx_v_result)) || PyTuple_CheckExact(__pyx_v_result)) {
            __pyx_t_2 = __pyx_v_result; __Pyx_INCREF(__pyx_t_2);
            __pyx_t_9 = 0;
            __pyx_t_10 = NULL;
          } else {
            __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 975, __pyx_L59_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 975, __pyx_L59_error)
          }
          for (;;) {
            if (likely(!__pyx_t_10)) {
              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(1, 975, __pyx_L59_error)
                  #endif
                  if (__pyx_t_9 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(1, 975, __pyx_L59_error)
                #else
                __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 975, __pyx_L59_error)
                __Pyx_GOTREF(__pyx_t_3);
                #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(1, 975, __pyx_L59_error)
                  #endif
                  if (__pyx_t_9 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(1, 975, __pyx_L59_error)
                #else
                __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 975, __pyx_L59_error)
                __Pyx_GOTREF(__pyx_t_3);
                #endif
              }
            } else {
              __pyx_t_3 = __pyx_t_10(__pyx_t_2);
              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(1, 975, __pyx_L59_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_3);
            }
            __Pyx_XDECREF_SET(__pyx_9genexpr52__pyx_v_a, __pyx_t_3);
            __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_9genexpr52__pyx_v_a, __pyx_v_part); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 975, __pyx_L59_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_3))) __PYX_ERR(1, 975, __pyx_L59_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_9genexpr52__pyx_v_a); __pyx_9genexpr52__pyx_v_a = 0;
          goto __pyx_L63_exit_scope;
          __pyx_L59_error:;
          __Pyx_XDECREF(__pyx_9genexpr52__pyx_v_a); __pyx_9genexpr52__pyx_v_a = 0;
          goto __pyx_L51_error;
          __pyx_L63_exit_scope:;
        } /* exit inner scope */
        __pyx_r = __pyx_t_11;
        __pyx_t_11 = 0;
        goto __pyx_L55_try_return;

        /* "cython/core/manifold.pyx":974
 * 
 *         if part is not None:
 *             try:             # <<<<<<<<<<<<<<
 *                 return [a[part] for a in result]
 *             except KeyError:
 */
      }
      __pyx_L51_error:;
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
      __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cython/core/manifold.pyx":976
 *             try:
 *                 return [a[part] for a in result]
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 raise ValueError('A non-existent shape data type '
 *                                  'was specified.')
 */
      __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_15) {
        __Pyx_AddTraceback("SnapPy.Manifold.tetrahedra_shapes", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(1, 976, __pyx_L53_except_error)
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_2);
        __Pyx_XGOTREF(__pyx_t_3);

        /* "cython/core/manifold.pyx":977
 *                 return [a[part] for a in result]
 *             except KeyError:
 *                 raise ValueError('A non-existent shape data type '             # <<<<<<<<<<<<<<
 *                                  'was specified.')
 *         else:
 */
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 977, __pyx_L53_except_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_Raise(__pyx_t_8, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(1, 977, __pyx_L53_except_error)
      }
      goto __pyx_L53_except_error;

      /* "cython/core/manifold.pyx":974
 * 
 *         if part is not None:
 *             try:             # <<<<<<<<<<<<<<
 *                 return [a[part] for a in result]
 *             except KeyError:
 */
      __pyx_L53_except_error:;
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
      goto __pyx_L1_error;
      __pyx_L55_try_return:;
      __Pyx_XGIVEREF(__pyx_t_19);
      __Pyx_XGIVEREF(__pyx_t_20);
      __Pyx_XGIVEREF(__pyx_t_21);
      __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21);
      goto __pyx_L0;
    }

    /* "cython/core/manifold.pyx":973
 *                        for z in engine.certified_shapes ]
 * 
 *         if part is not None:             # <<<<<<<<<<<<<<
 *             try:
 *                 return [a[part] for a in result]
 */
  }

  /* "cython/core/manifold.pyx":980
 *                                  'was specified.')
 *         else:
 *             return ListOnePerLine(result)             # <<<<<<<<<<<<<<
 * 
 *     def _get_tetrahedra_shapes(self, which_solution):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ListOnePerLine); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_11 = NULL;
    __pyx_t_15 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_15 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_result};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 980, __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;
  }

  /* "cython/core/manifold.pyx":863
 *         polish_hyperbolic_structures(self.c_triangulation)
 * 
 *     def tetrahedra_shapes(self, part=None, fixed_alignment=True,             # <<<<<<<<<<<<<<
 *                           bits_prec=None, dec_prec=None,
 *                           intervals=False):
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("SnapPy.Manifold.tetrahedra_shapes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_shapes);
  __Pyx_XDECREF(__pyx_v_z);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_rect_shape);
  __Pyx_XDECREF(__pyx_v_log_shape);
  __Pyx_XDECREF(__pyx_v_engine);
  __Pyx_XDECREF(__pyx_9genexpr49__pyx_v_a);
  __Pyx_XDECREF(__pyx_9genexpr50__pyx_v_a);
  __Pyx_XDECREF(__pyx_9genexpr51__pyx_v_z);
  __Pyx_XDECREF(__pyx_9genexpr52__pyx_v_a);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":982
 *             return ListOnePerLine(result)
 * 
 *     def _get_tetrahedra_shapes(self, which_solution):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of the tetrahedra shapes from one of the two
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_53_get_tetrahedra_shapes(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_6SnapPy_8Manifold_52_get_tetrahedra_shapes, "Manifold._get_tetrahedra_shapes(self, which_solution)\n\n        Return a list of the tetrahedra shapes from one of the two\n        solutions maintained in the SnapPea triangulation structure.\n        The which_solution argument must take one of the values\n        'filled' or 'complete'.  This sets fixed_alignment = True.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_53_get_tetrahedra_shapes = {"_get_tetrahedra_shapes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_53_get_tetrahedra_shapes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_52_get_tetrahedra_shapes};
static PyObject *__pyx_pw_6SnapPy_8Manifold_53_get_tetrahedra_shapes(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_which_solution = 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_tetrahedra_shapes (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_which_solution,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_which_solution)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 982, __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, "_get_tetrahedra_shapes") < 0)) __PYX_ERR(1, 982, __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_which_solution = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_get_tetrahedra_shapes", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 982, __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("SnapPy.Manifold._get_tetrahedra_shapes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_52_get_tetrahedra_shapes(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_which_solution);

  /* 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_6SnapPy_8Manifold_52_get_tetrahedra_shapes(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_which_solution) {
  int __pyx_v_i;
  __pyx_t_6SnapPy_Real __pyx_v_rect_re;
  __pyx_t_6SnapPy_Real __pyx_v_rect_im;
  __pyx_t_6SnapPy_Real __pyx_v_log_re;
  __pyx_t_6SnapPy_Real __pyx_v_log_im;
  int __pyx_v_acc_rec_re;
  int __pyx_v_acc_rec_im;
  int __pyx_v_acc_log_re;
  int __pyx_v_acc_log_im;
  Boolean __pyx_v_is_geometric;
  FillingStatus __pyx_v_soln;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  long __pyx_t_6;
  long __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_tetrahedra_shapes", 1);

  /* "cython/core/manifold.pyx":995
 *         cdef c_FillingStatus soln
 * 
 *         if which_solution == 'filled':             # <<<<<<<<<<<<<<
 *             soln = filled
 *         elif which_solution == 'complete':
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_which_solution, __pyx_n_s_filled_2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 995, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":996
 * 
 *         if which_solution == 'filled':
 *             soln = filled             # <<<<<<<<<<<<<<
 *         elif which_solution == 'complete':
 *             soln = complete
 */
    __pyx_v_soln = filled;

    /* "cython/core/manifold.pyx":995
 *         cdef c_FillingStatus soln
 * 
 *         if which_solution == 'filled':             # <<<<<<<<<<<<<<
 *             soln = filled
 *         elif which_solution == 'complete':
 */
    goto __pyx_L3;
  }

  /* "cython/core/manifold.pyx":997
 *         if which_solution == 'filled':
 *             soln = filled
 *         elif which_solution == 'complete':             # <<<<<<<<<<<<<<
 *             soln = complete
 *         else:
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_which_solution, __pyx_n_s_complete, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 997, __pyx_L1_error)
  if (likely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":998
 *             soln = filled
 *         elif which_solution == 'complete':
 *             soln = complete             # <<<<<<<<<<<<<<
 *         else:
 *             raise ValueError("Please specify 'filled' or 'complete'.")
 */
    __pyx_v_soln = complete;

    /* "cython/core/manifold.pyx":997
 *         if which_solution == 'filled':
 *             soln = filled
 *         elif which_solution == 'complete':             # <<<<<<<<<<<<<<
 *             soln = complete
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cython/core/manifold.pyx":1000
 *             soln = complete
 *         else:
 *             raise ValueError("Please specify 'filled' or 'complete'.")             # <<<<<<<<<<<<<<
 *         result = []
 *         for i in range(self.num_tetrahedra()):
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1000, __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(1, 1000, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cython/core/manifold.pyx":1001
 *         else:
 *             raise ValueError("Please specify 'filled' or 'complete'.")
 *         result = []             # <<<<<<<<<<<<<<
 *         for i in range(self.num_tetrahedra()):
 *             get_tet_shape(self.c_triangulation, i, soln, True,
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1001, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_result = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":1002
 *             raise ValueError("Please specify 'filled' or 'complete'.")
 *         result = []
 *         for i in range(self.num_tetrahedra()):             # <<<<<<<<<<<<<<
 *             get_tet_shape(self.c_triangulation, i, soln, True,
 *                           &rect_re, &rect_im, &log_re, &log_im,
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_tetrahedra); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1002, __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(1, 1002, __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(1, 1002, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = __pyx_t_6;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_7; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "cython/core/manifold.pyx":1003
 *         result = []
 *         for i in range(self.num_tetrahedra()):
 *             get_tet_shape(self.c_triangulation, i, soln, True,             # <<<<<<<<<<<<<<
 *                           &rect_re, &rect_im, &log_re, &log_im,
 *                           &acc_rec_re, &acc_rec_im, &acc_log_re, &acc_log_im,
 */
    get_tet_shape(__pyx_v_self->__pyx_base.c_triangulation, __pyx_v_i, __pyx_v_soln, 1, (&__pyx_v_rect_re), (&__pyx_v_rect_im), (&__pyx_v_log_re), (&__pyx_v_log_im), (&__pyx_v_acc_rec_re), (&__pyx_v_acc_rec_im), (&__pyx_v_acc_log_re), (&__pyx_v_acc_log_im), (&__pyx_v_is_geometric)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1003, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1007
 *                           &acc_rec_re, &acc_rec_im, &acc_log_re, &acc_log_im,
 *                           &is_geometric)
 *             result.append(Number(RealImag2gen(rect_re, rect_im)))             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Number); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __pyx_f_6SnapPy_RealImag2gen(__pyx_v_rect_re, __pyx_v_rect_im); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1007, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1007, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 1007, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "cython/core/manifold.pyx":1008
 *                           &is_geometric)
 *             result.append(Number(RealImag2gen(rect_re, rect_im)))
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def set_tetrahedra_shapes(self,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":982
 *             return ListOnePerLine(result)
 * 
 *     def _get_tetrahedra_shapes(self, which_solution):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of the tetrahedra shapes from one of the two
 */

  /* 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_8);
  __Pyx_AddTraceback("SnapPy.Manifold._get_tetrahedra_shapes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":1010
 *         return result
 * 
 *     def set_tetrahedra_shapes(self,             # <<<<<<<<<<<<<<
 *                               filled_shapes=None,
 *                               complete_shapes=None,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_55set_tetrahedra_shapes(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_6SnapPy_8Manifold_54set_tetrahedra_shapes, "Manifold.set_tetrahedra_shapes(self, filled_shapes=None, complete_shapes=None, fillings=None)\n\n        Replaces the tetrahedron shapes with those in the given lists,\n        and sets the Dehn filling coefficients as specified by the\n        fillings argument.  The shapes will get double precision\n        values; polishing will be needed for high precision shapes.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_55set_tetrahedra_shapes = {"set_tetrahedra_shapes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_55set_tetrahedra_shapes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_54set_tetrahedra_shapes};
static PyObject *__pyx_pw_6SnapPy_8Manifold_55set_tetrahedra_shapes(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_filled_shapes = 0;
  PyObject *__pyx_v_complete_shapes = 0;
  PyObject *__pyx_v_fillings = 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("set_tetrahedra_shapes (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_filled_shapes,&__pyx_n_s_complete_shapes,&__pyx_n_s_fillings,0};

    /* "cython/core/manifold.pyx":1011
 * 
 *     def set_tetrahedra_shapes(self,
 *                               filled_shapes=None,             # <<<<<<<<<<<<<<
 *                               complete_shapes=None,
 *                               fillings=None, ):
 */
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "cython/core/manifold.pyx":1012
 *     def set_tetrahedra_shapes(self,
 *                               filled_shapes=None,
 *                               complete_shapes=None,             # <<<<<<<<<<<<<<
 *                               fillings=None, ):
 *         """
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));

    /* "cython/core/manifold.pyx":1013
 *                               filled_shapes=None,
 *                               complete_shapes=None,
 *                               fillings=None, ):             # <<<<<<<<<<<<<<
 *         """
 *         Replaces the tetrahedron shapes with those in the given lists,
 */
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filled_shapes);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1010, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_complete_shapes);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1010, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fillings);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1010, __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, "set_tetrahedra_shapes") < 0)) __PYX_ERR(1, 1010, __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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filled_shapes = values[0];
    __pyx_v_complete_shapes = values[1];
    __pyx_v_fillings = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_tetrahedra_shapes", 0, 0, 3, __pyx_nargs); __PYX_ERR(1, 1010, __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("SnapPy.Manifold.set_tetrahedra_shapes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_54set_tetrahedra_shapes(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_filled_shapes, __pyx_v_complete_shapes, __pyx_v_fillings);

  /* "cython/core/manifold.pyx":1010
 *         return result
 * 
 *     def set_tetrahedra_shapes(self,             # <<<<<<<<<<<<<<
 *                               filled_shapes=None,
 *                               complete_shapes=None,
 */

  /* 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_6SnapPy_8Manifold_54set_tetrahedra_shapes(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_filled_shapes, PyObject *__pyx_v_complete_shapes, PyObject *__pyx_v_fillings) {
  int __pyx_v_i;
  int __pyx_v_N;
  Complex *__pyx_v_filled_shape_array;
  Complex *__pyx_v_complete_shape_array;
  PyObject *__pyx_v_shape = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  __pyx_t_double_complex __pyx_t_7;
  Complex __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_tetrahedra_shapes", 1);

  /* "cython/core/manifold.pyx":1021
 *         """
 *         cdef int i, N
 *         cdef Complex *filled_shape_array = NULL             # <<<<<<<<<<<<<<
 *         cdef Complex *complete_shape_array = NULL
 * 
 */
  __pyx_v_filled_shape_array = NULL;

  /* "cython/core/manifold.pyx":1022
 *         cdef int i, N
 *         cdef Complex *filled_shape_array = NULL
 *         cdef Complex *complete_shape_array = NULL             # <<<<<<<<<<<<<<
 * 
 *         if self.c_triangulation is NULL:
 */
  __pyx_v_complete_shape_array = NULL;

  /* "cython/core/manifold.pyx":1024
 *         cdef Complex *complete_shape_array = NULL
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         N = get_num_tetrahedra(self.c_triangulation)
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":1025
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         N = get_num_tetrahedra(self.c_triangulation)
 *         if filled_shapes is not None:
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 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(1, 1025, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1024
 *         cdef Complex *complete_shape_array = NULL
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         N = get_num_tetrahedra(self.c_triangulation)
 */
  }

  /* "cython/core/manifold.pyx":1026
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         N = get_num_tetrahedra(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         if filled_shapes is not None:
 *             filled_shape_array = <Complex *>malloc(N*sizeof(Complex))
 */
  __pyx_t_3 = get_num_tetrahedra(__pyx_v_self->__pyx_base.c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1026, __pyx_L1_error)
  __pyx_v_N = __pyx_t_3;

  /* "cython/core/manifold.pyx":1027
 *             raise ValueError('The Triangulation is empty.')
 *         N = get_num_tetrahedra(self.c_triangulation)
 *         if filled_shapes is not None:             # <<<<<<<<<<<<<<
 *             filled_shape_array = <Complex *>malloc(N*sizeof(Complex))
 *             for i, shape in enumerate(filled_shapes):
 */
  __pyx_t_1 = (__pyx_v_filled_shapes != Py_None);
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":1028
 *         N = get_num_tetrahedra(self.c_triangulation)
 *         if filled_shapes is not None:
 *             filled_shape_array = <Complex *>malloc(N*sizeof(Complex))             # <<<<<<<<<<<<<<
 *             for i, shape in enumerate(filled_shapes):
 *                 filled_shape_array[i] = complex2Complex(complex(shape))
 */
    __pyx_v_filled_shape_array = ((Complex *)malloc((__pyx_v_N * (sizeof(Complex)))));

    /* "cython/core/manifold.pyx":1029
 *         if filled_shapes is not None:
 *             filled_shape_array = <Complex *>malloc(N*sizeof(Complex))
 *             for i, shape in enumerate(filled_shapes):             # <<<<<<<<<<<<<<
 *                 filled_shape_array[i] = complex2Complex(complex(shape))
 *         if complete_shapes is not None:
 */
    __pyx_t_3 = 0;
    if (likely(PyList_CheckExact(__pyx_v_filled_shapes)) || PyTuple_CheckExact(__pyx_v_filled_shapes)) {
      __pyx_t_2 = __pyx_v_filled_shapes; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_filled_shapes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1029, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1029, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        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(1, 1029, __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_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(1, 1029, __pyx_L1_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1029, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #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(1, 1029, __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_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(1, 1029, __pyx_L1_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1029, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_2);
        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(1, 1029, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_shape, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_v_i = __pyx_t_3;
      __pyx_t_3 = (__pyx_t_3 + 1);

      /* "cython/core/manifold.pyx":1030
 *             filled_shape_array = <Complex *>malloc(N*sizeof(Complex))
 *             for i, shape in enumerate(filled_shapes):
 *                 filled_shape_array[i] = complex2Complex(complex(shape))             # <<<<<<<<<<<<<<
 *         if complete_shapes is not None:
 *             complete_shape_array = <Complex *>malloc(N*sizeof(Complex))
 */
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyComplex_Type)), __pyx_v_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1030, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1030, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8 = __pyx_f_6SnapPy_complex2Complex(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1030, __pyx_L1_error)
      (__pyx_v_filled_shape_array[__pyx_v_i]) = __pyx_t_8;

      /* "cython/core/manifold.pyx":1029
 *         if filled_shapes is not None:
 *             filled_shape_array = <Complex *>malloc(N*sizeof(Complex))
 *             for i, shape in enumerate(filled_shapes):             # <<<<<<<<<<<<<<
 *                 filled_shape_array[i] = complex2Complex(complex(shape))
 *         if complete_shapes is not None:
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/manifold.pyx":1027
 *             raise ValueError('The Triangulation is empty.')
 *         N = get_num_tetrahedra(self.c_triangulation)
 *         if filled_shapes is not None:             # <<<<<<<<<<<<<<
 *             filled_shape_array = <Complex *>malloc(N*sizeof(Complex))
 *             for i, shape in enumerate(filled_shapes):
 */
  }

  /* "cython/core/manifold.pyx":1031
 *             for i, shape in enumerate(filled_shapes):
 *                 filled_shape_array[i] = complex2Complex(complex(shape))
 *         if complete_shapes is not None:             # <<<<<<<<<<<<<<
 *             complete_shape_array = <Complex *>malloc(N*sizeof(Complex))
 *             for i, shape in enumerate(complete_shapes):
 */
  __pyx_t_1 = (__pyx_v_complete_shapes != Py_None);
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":1032
 *                 filled_shape_array[i] = complex2Complex(complex(shape))
 *         if complete_shapes is not None:
 *             complete_shape_array = <Complex *>malloc(N*sizeof(Complex))             # <<<<<<<<<<<<<<
 *             for i, shape in enumerate(complete_shapes):
 *                 complete_shape_array[i] = complex2Complex(complex(shape))
 */
    __pyx_v_complete_shape_array = ((Complex *)malloc((__pyx_v_N * (sizeof(Complex)))));

    /* "cython/core/manifold.pyx":1033
 *         if complete_shapes is not None:
 *             complete_shape_array = <Complex *>malloc(N*sizeof(Complex))
 *             for i, shape in enumerate(complete_shapes):             # <<<<<<<<<<<<<<
 *                 complete_shape_array[i] = complex2Complex(complex(shape))
 *         if fillings:
 */
    __pyx_t_3 = 0;
    if (likely(PyList_CheckExact(__pyx_v_complete_shapes)) || PyTuple_CheckExact(__pyx_v_complete_shapes)) {
      __pyx_t_2 = __pyx_v_complete_shapes; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_complete_shapes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1033, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        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(1, 1033, __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_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(1, 1033, __pyx_L1_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1033, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #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(1, 1033, __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_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(1, 1033, __pyx_L1_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1033, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_2);
        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(1, 1033, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_v_shape, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_v_i = __pyx_t_3;
      __pyx_t_3 = (__pyx_t_3 + 1);

      /* "cython/core/manifold.pyx":1034
 *             complete_shape_array = <Complex *>malloc(N*sizeof(Complex))
 *             for i, shape in enumerate(complete_shapes):
 *                 complete_shape_array[i] = complex2Complex(complex(shape))             # <<<<<<<<<<<<<<
 *         if fillings:
 *             set_cusps(self.c_triangulation, fillings)
 */
      __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyComplex_Type)), __pyx_v_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1034, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyComplex_As___pyx_t_double_complex(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1034, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_8 = __pyx_f_6SnapPy_complex2Complex(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1034, __pyx_L1_error)
      (__pyx_v_complete_shape_array[__pyx_v_i]) = __pyx_t_8;

      /* "cython/core/manifold.pyx":1033
 *         if complete_shapes is not None:
 *             complete_shape_array = <Complex *>malloc(N*sizeof(Complex))
 *             for i, shape in enumerate(complete_shapes):             # <<<<<<<<<<<<<<
 *                 complete_shape_array[i] = complex2Complex(complex(shape))
 *         if fillings:
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/manifold.pyx":1031
 *             for i, shape in enumerate(filled_shapes):
 *                 filled_shape_array[i] = complex2Complex(complex(shape))
 *         if complete_shapes is not None:             # <<<<<<<<<<<<<<
 *             complete_shape_array = <Complex *>malloc(N*sizeof(Complex))
 *             for i, shape in enumerate(complete_shapes):
 */
  }

  /* "cython/core/manifold.pyx":1035
 *             for i, shape in enumerate(complete_shapes):
 *                 complete_shape_array[i] = complex2Complex(complex(shape))
 *         if fillings:             # <<<<<<<<<<<<<<
 *             set_cusps(self.c_triangulation, fillings)
 *         set_tet_shapes(self.c_triangulation,
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_fillings); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1035, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":1036
 *                 complete_shape_array[i] = complex2Complex(complex(shape))
 *         if fillings:
 *             set_cusps(self.c_triangulation, fillings)             # <<<<<<<<<<<<<<
 *         set_tet_shapes(self.c_triangulation,
 *                        filled_shape_array,
 */
    __pyx_t_3 = __pyx_f_6SnapPy_set_cusps(__pyx_v_self->__pyx_base.c_triangulation, __pyx_v_fillings); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1036, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1035
 *             for i, shape in enumerate(complete_shapes):
 *                 complete_shape_array[i] = complex2Complex(complex(shape))
 *         if fillings:             # <<<<<<<<<<<<<<
 *             set_cusps(self.c_triangulation, fillings)
 *         set_tet_shapes(self.c_triangulation,
 */
  }

  /* "cython/core/manifold.pyx":1037
 *         if fillings:
 *             set_cusps(self.c_triangulation, fillings)
 *         set_tet_shapes(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                        filled_shape_array,
 *                        complete_shape_array)
 */
  set_tet_shapes(__pyx_v_self->__pyx_base.c_triangulation, __pyx_v_filled_shape_array, __pyx_v_complete_shape_array);

  /* "cython/core/manifold.pyx":1040
 *                        filled_shape_array,
 *                        complete_shape_array)
 *         compute_holonomies(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         compute_edge_angle_sums(self.c_triangulation)
 *         if filled_shape_array != NULL:
 */
  compute_holonomies(__pyx_v_self->__pyx_base.c_triangulation);

  /* "cython/core/manifold.pyx":1041
 *                        complete_shape_array)
 *         compute_holonomies(self.c_triangulation)
 *         compute_edge_angle_sums(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         if filled_shape_array != NULL:
 *             free(filled_shape_array)
 */
  compute_edge_angle_sums(__pyx_v_self->__pyx_base.c_triangulation);

  /* "cython/core/manifold.pyx":1042
 *         compute_holonomies(self.c_triangulation)
 *         compute_edge_angle_sums(self.c_triangulation)
 *         if filled_shape_array != NULL:             # <<<<<<<<<<<<<<
 *             free(filled_shape_array)
 *         if complete_shape_array != NULL:
 */
  __pyx_t_1 = (__pyx_v_filled_shape_array != NULL);
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":1043
 *         compute_edge_angle_sums(self.c_triangulation)
 *         if filled_shape_array != NULL:
 *             free(filled_shape_array)             # <<<<<<<<<<<<<<
 *         if complete_shape_array != NULL:
 *             free(complete_shape_array)
 */
    free(__pyx_v_filled_shape_array);

    /* "cython/core/manifold.pyx":1042
 *         compute_holonomies(self.c_triangulation)
 *         compute_edge_angle_sums(self.c_triangulation)
 *         if filled_shape_array != NULL:             # <<<<<<<<<<<<<<
 *             free(filled_shape_array)
 *         if complete_shape_array != NULL:
 */
  }

  /* "cython/core/manifold.pyx":1044
 *         if filled_shape_array != NULL:
 *             free(filled_shape_array)
 *         if complete_shape_array != NULL:             # <<<<<<<<<<<<<<
 *             free(complete_shape_array)
 *         self._cache.clear(message='Manifold.set_tetrahedra_shapes')
 */
  __pyx_t_1 = (__pyx_v_complete_shape_array != NULL);
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":1045
 *             free(filled_shape_array)
 *         if complete_shape_array != NULL:
 *             free(complete_shape_array)             # <<<<<<<<<<<<<<
 *         self._cache.clear(message='Manifold.set_tetrahedra_shapes')
 * 
 */
    free(__pyx_v_complete_shape_array);

    /* "cython/core/manifold.pyx":1044
 *         if filled_shape_array != NULL:
 *             free(filled_shape_array)
 *         if complete_shape_array != NULL:             # <<<<<<<<<<<<<<
 *             free(complete_shape_array)
 *         self._cache.clear(message='Manifold.set_tetrahedra_shapes')
 */
  }

  /* "cython/core/manifold.pyx":1046
 *         if complete_shape_array != NULL:
 *             free(complete_shape_array)
 *         self._cache.clear(message='Manifold.set_tetrahedra_shapes')             # <<<<<<<<<<<<<<
 * 
 *     def solution_type(self, enum=False):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._cache, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_message, __pyx_kp_s_Manifold_set_tetrahedra_shapes) < 0) __PYX_ERR(1, 1046, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "cython/core/manifold.pyx":1010
 *         return result
 * 
 *     def set_tetrahedra_shapes(self,             # <<<<<<<<<<<<<<
 *                               filled_shapes=None,
 *                               complete_shapes=None,
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("SnapPy.Manifold.set_tetrahedra_shapes", __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;
}

/* "cython/core/manifold.pyx":1048
 *         self._cache.clear(message='Manifold.set_tetrahedra_shapes')
 * 
 *     def solution_type(self, enum=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the type of the current solution to the gluing
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_57solution_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_6SnapPy_8Manifold_56solution_type, "Manifold.solution_type(self, enum=False)\n\n        Returns the type of the current solution to the gluing\n        equations, basically a summary of how degenerate the solution\n        is.  If the flag enum=True is set, then an integer value is\n        returned. The possible answers are:\n\n        - 0: 'not attempted'\n\n        - 1: 'all tetrahedra positively oriented' aka 'geometric_solution'\n          Should correspond to a genuine hyperbolic structure.\n\n        - 2: 'contains negatively oriented tetrahedra' aka 'nongeometric_solution'\n          Probably corresponds to a hyperbolic structure but some\n          simplices have reversed orientations.\n\n        - 3: 'contains flat tetrahedra' All tetrahedra have shape in R - {0, 1}.\n\n        - 4: 'contains degenerate tetrahedra' Some shapes are close to\n          {0,1, or infinity}.\n\n        - 5: 'unrecognized solution type'\n\n        - 6: 'no solution found'\n\n        >>> M = Manifold('m007')\n        >>> M.solution_type()\n        'all tetrahedra positively oriented'\n        >>> M.dehn_fill( (3,1) )\n        >>> M.solution_type()\n        'contains negatively oriented tetrahedra'\n        >>> M.dehn_fill( (3,-1) )\n        >>> M.solution_type()\n        'contains degenerate tetrahedra'\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_57solution_type = {"solution_type", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_57solution_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_56solution_type};
static PyObject *__pyx_pw_6SnapPy_8Manifold_57solution_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_enum = 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("solution_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_enum,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_enum);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1048, __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, "solution_type") < 0)) __PYX_ERR(1, 1048, __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_enum = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("solution_type", 0, 0, 1, __pyx_nargs); __PYX_ERR(1, 1048, __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("SnapPy.Manifold.solution_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_56solution_type(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_enum);

  /* 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_6SnapPy_8Manifold_56solution_type(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_enum) {
  SolutionType __pyx_v_solution_type;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  SolutionType __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("solution_type", 1);

  /* "cython/core/manifold.pyx":1085
 *         cdef c_SolutionType solution_type
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         solution_type = get_filled_solution_type(self.c_triangulation)
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":1086
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         solution_type = get_filled_solution_type(self.c_triangulation)
 *         if enum:
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1086, __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(1, 1086, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1085
 *         cdef c_SolutionType solution_type
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         solution_type = get_filled_solution_type(self.c_triangulation)
 */
  }

  /* "cython/core/manifold.pyx":1087
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         solution_type = get_filled_solution_type(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         if enum:
 *             return solution_type
 */
  __pyx_t_3 = get_filled_solution_type(__pyx_v_self->__pyx_base.c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1087, __pyx_L1_error)
  __pyx_v_solution_type = __pyx_t_3;

  /* "cython/core/manifold.pyx":1088
 *             raise ValueError('The Triangulation is empty.')
 *         solution_type = get_filled_solution_type(self.c_triangulation)
 *         if enum:             # <<<<<<<<<<<<<<
 *             return solution_type
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_enum); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1088, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":1089
 *         solution_type = get_filled_solution_type(self.c_triangulation)
 *         if enum:
 *             return solution_type             # <<<<<<<<<<<<<<
 *         else:
 *             return SolutionType[solution_type]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_SolutionType(__pyx_v_solution_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":1088
 *             raise ValueError('The Triangulation is empty.')
 *         solution_type = get_filled_solution_type(self.c_triangulation)
 *         if enum:             # <<<<<<<<<<<<<<
 *             return solution_type
 *         else:
 */
  }

  /* "cython/core/manifold.pyx":1091
 *             return solution_type
 *         else:
 *             return SolutionType[solution_type]             # <<<<<<<<<<<<<<
 * 
 *     def set_target_holonomy(self, target, which_cusp=0, recompute=True):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SolutionType); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyInt_From_SolutionType(__pyx_v_solution_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;
  }

  /* "cython/core/manifold.pyx":1048
 *         self._cache.clear(message='Manifold.set_tetrahedra_shapes')
 * 
 *     def solution_type(self, enum=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the type of the current solution to the gluing
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("SnapPy.Manifold.solution_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":1093
 *             return SolutionType[solution_type]
 * 
 *     def set_target_holonomy(self, target, which_cusp=0, recompute=True):             # <<<<<<<<<<<<<<
 *         """
 *         M.set_target_holonomy(target, which_cusp=0, recompute=True)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_59set_target_holonomy(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_6SnapPy_8Manifold_58set_target_holonomy, "Manifold.set_target_holonomy(self, target, which_cusp=0, recompute=True)\n\n        M.set_target_holonomy(target, which_cusp=0, recompute=True)\n\n        Computes a geometric structure in which the Dehn filling curve\n        on the specified cusp has holonomy equal to the target value.\n        The holonomies of Dehn filling curves on other cusps are left\n        unchanged.  If the 'recompute' flag is False, the Dehn filling\n        equations are modified, but not solved.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_59set_target_holonomy = {"set_target_holonomy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_59set_target_holonomy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_58set_target_holonomy};
static PyObject *__pyx_pw_6SnapPy_8Manifold_59set_target_holonomy(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_target = 0;
  PyObject *__pyx_v_which_cusp = 0;
  PyObject *__pyx_v_recompute = 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("set_target_holonomy (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_target,&__pyx_n_s_which_cusp,&__pyx_n_s_recompute,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_0));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    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_target)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1093, __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_which_cusp);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1093, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_recompute);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1093, __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, "set_target_holonomy") < 0)) __PYX_ERR(1, 1093, __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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_target = values[0];
    __pyx_v_which_cusp = values[1];
    __pyx_v_recompute = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_target_holonomy", 0, 1, 3, __pyx_nargs); __PYX_ERR(1, 1093, __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("SnapPy.Manifold.set_target_holonomy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_58set_target_holonomy(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_target, __pyx_v_which_cusp, __pyx_v_recompute);

  /* 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_6SnapPy_8Manifold_58set_target_holonomy(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_target, PyObject *__pyx_v_which_cusp, PyObject *__pyx_v_recompute) {
  Complex __pyx_v_c_target;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Complex __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_target_holonomy", 1);

  /* "cython/core/manifold.pyx":1104
 *         """
 *         cdef Complex c_target
 *         c_target = Object2Complex(target)             # <<<<<<<<<<<<<<
 *         set_target_holonomy(self.c_triangulation,
 *                             which_cusp, c_target, recompute)
 */
  __pyx_t_1 = __pyx_f_6SnapPy_Object2Complex(__pyx_v_target); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1104, __pyx_L1_error)
  __pyx_v_c_target = __pyx_t_1;

  /* "cython/core/manifold.pyx":1106
 *         c_target = Object2Complex(target)
 *         set_target_holonomy(self.c_triangulation,
 *                             which_cusp, c_target, recompute)             # <<<<<<<<<<<<<<
 * 
 *     def cusp_info(self, data_spec=None, verified = False, bits_prec = None):
 */
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_which_cusp); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1106, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_recompute); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1106, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1105
 *         cdef Complex c_target
 *         c_target = Object2Complex(target)
 *         set_target_holonomy(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                             which_cusp, c_target, recompute)
 * 
 */
  set_target_holonomy(__pyx_v_self->__pyx_base.c_triangulation, __pyx_t_2, __pyx_v_c_target, __pyx_t_3);

  /* "cython/core/manifold.pyx":1093
 *             return SolutionType[solution_type]
 * 
 *     def set_target_holonomy(self, target, which_cusp=0, recompute=True):             # <<<<<<<<<<<<<<
 *         """
 *         M.set_target_holonomy(target, which_cusp=0, recompute=True)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("SnapPy.Manifold.set_target_holonomy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":1108
 *                             which_cusp, c_target, recompute)
 * 
 *     def cusp_info(self, data_spec=None, verified = False, bits_prec = None):             # <<<<<<<<<<<<<<
 *         """
 *         Returns an info object containing information about the given
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_61cusp_info(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_6SnapPy_8Manifold_60cusp_info, "Manifold.cusp_info(self, data_spec=None, verified=False, bits_prec=None)\n\n        Returns an info object containing information about the given\n        cusp.   Usage:\n\n        >>> M = Manifold('v3227(0,0)(1,2)(3,2)')\n        >>> M.cusp_info(1)\n        Cusp 1 : torus cusp with Dehn filling coefficients (M, L) = (1.0, 2.0)\n\n        To get more detailed information about the cusp, we do\n\n        >>> c = M.cusp_info(0)\n        >>> c.shape # doctest: +NUMERIC6\n        0.11044502 + 0.94677098*I\n        >>> c.modulus# doctest: +NUMERIC6\n        -0.12155872 + 1.04204128*I\n        >>> sorted(c.keys())\n        ['filling', 'holonomies', 'holonomy_accuracy', 'index', 'is_complete', 'modulus', 'shape', 'shape_accuracy', 'topology']\n\n        Here 'shape' is the shape of the cusp, i.e.\n        (longitude/meridian)\n        and 'modulus' is its shape in the geometrically preferred\n        basis, i.e.\n        ( (second shortest translation)/(shortest translation)).\n        For cusps that are filled, one instead cares about the\n        holonomies:\n\n        >>> M.cusp_info(-1)['holonomies'] # doctest: +NUMERIC6\n        (-0.59883089 + 1.09812548*I, 0.89824633 + 1.49440443*I)\n\n        The complex numbers returned for the shape and for the two\n        holonomies have an extra attribute, accuracy, which is\n        SnapPea's *estimate* of their accuracy.\n\n        You can also get information about multiple cusps at once:\n\n        >>> M.cusp_info() # doctest: +NUMERIC6\n        [Cusp 0 : complete torus cusp of shape 0.11044502 + 0.94677098*I,\n         Cusp 1 : torus cusp with Dehn filling coefficients (M, L) = (1.0, 2.0),\n         Cusp 2 : torus cusp with Dehn filling coefficients (M, L) = (3.0, 2.0)]\n        >>> M.cusp_info('is_complete')\n        [True, False, False]\n\n        The cusp shapes can be verified::\n\n            sage: M = Manifold('m292')\n            sage: M.cusp_info('shape', verified = True, bits_prec = 60) # doctest: +NUMERIC12\n    ""        [-0.1766049820997? + 1.2028208192855?*I,\n             -0.1766049820997? + 1.2028208192855?*I]\n\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_61cusp_info = {"cusp_info", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_61cusp_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_60cusp_info};
static PyObject *__pyx_pw_6SnapPy_8Manifold_61cusp_info(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_data_spec = 0;
  PyObject *__pyx_v_verified = 0;
  PyObject *__pyx_v_bits_prec = 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("cusp_info (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_data_spec,&__pyx_n_s_verified,&__pyx_n_s_bits_prec,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_data_spec);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1108, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_verified);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1108, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_bits_prec);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1108, __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, "cusp_info") < 0)) __PYX_ERR(1, 1108, __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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data_spec = values[0];
    __pyx_v_verified = values[1];
    __pyx_v_bits_prec = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cusp_info", 0, 0, 3, __pyx_nargs); __PYX_ERR(1, 1108, __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("SnapPy.Manifold.cusp_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_60cusp_info(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_data_spec, __pyx_v_verified, __pyx_v_bits_prec);

  /* 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_6SnapPy_8Manifold_60cusp_info(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_data_spec, PyObject *__pyx_v_verified, PyObject *__pyx_v_bits_prec) {
  int __pyx_v_cusp_index;
  CuspTopology __pyx_v_topology;
  Boolean __pyx_v_is_complete;
  __pyx_t_6SnapPy_Real __pyx_v_m;
  __pyx_t_6SnapPy_Real __pyx_v_l;
  Complex __pyx_v_initial_shape;
  Complex __pyx_v_current_shape;
  int __pyx_v_initial_shape_accuracy;
  int __pyx_v_current_shape_accuracy;
  Complex __pyx_v_initial_modulus;
  Complex __pyx_v_current_modulus;
  int __pyx_v_meridian_accuracy;
  int __pyx_v_longitude_accuracy;
  int __pyx_v_singularity_index;
  int __pyx_v_accuracy;
  Complex __pyx_v_c_meridian;
  Complex __pyx_v_c_longitude;
  Complex __pyx_v_c_core_length;
  PyObject *__pyx_v_shape = NULL;
  PyObject *__pyx_v_meridian = NULL;
  PyObject *__pyx_v_longitude = NULL;
  PyObject *__pyx_v_modulus = NULL;
  PyObject *__pyx_v_info = NULL;
  PyObject *__pyx_v_core_length = NULL;
  PyObject *__pyx_9genexpr53__pyx_v_i = NULL;
  PyObject *__pyx_9genexpr54__pyx_v_c = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cusp_info", 1);

  /* "cython/core/manifold.pyx":1169
 *         cdef Complex c_meridian, c_longitude, c_core_length
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":1170
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 * 
 *         if verified or bits_prec:
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1170, __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(1, 1170, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1169
 *         cdef Complex c_meridian, c_longitude, c_core_length
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  }

  /* "cython/core/manifold.pyx":1172
 *             raise ValueError('The Triangulation is empty.')
 * 
 *         if verified or bits_prec:             # <<<<<<<<<<<<<<
 *             if not data_spec == 'shape':
 *                 raise Exception("Verified and arbitrary precision computation "
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_verified); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 1172, __pyx_L1_error)
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_bits_prec); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 1172, __pyx_L1_error)
  __pyx_t_1 = __pyx_t_3;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":1173
 * 
 *         if verified or bits_prec:
 *             if not data_spec == 'shape':             # <<<<<<<<<<<<<<
 *                 raise Exception("Verified and arbitrary precision computation "
 *                                 "of cusp_info only "
 */
    __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_data_spec, __pyx_n_s_shape, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1173, __pyx_L1_error)
    __pyx_t_3 = (!__pyx_t_1);
    if (unlikely(__pyx_t_3)) {

      /* "cython/core/manifold.pyx":1174
 *         if verified or bits_prec:
 *             if not data_spec == 'shape':
 *                 raise Exception("Verified and arbitrary precision computation "             # <<<<<<<<<<<<<<
 *                                 "of cusp_info only "
 *                                 "implemented for cusp shapes. Pass 'shape' "
 */
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1174, __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(1, 1174, __pyx_L1_error)

      /* "cython/core/manifold.pyx":1173
 * 
 *         if verified or bits_prec:
 *             if not data_spec == 'shape':             # <<<<<<<<<<<<<<
 *                 raise Exception("Verified and arbitrary precision computation "
 *                                 "of cusp_info only "
 */
    }

    /* "cython/core/manifold.pyx":1178
 *                                 "implemented for cusp shapes. Pass 'shape' "
 *                                 "as first argument to cusp_info().")
 *             return verify.compute_cusp_shapes(self, verified = verified,             # <<<<<<<<<<<<<<
 *                                               bits_prec = bits_prec)
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_verify); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_compute_cusp_shapes); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(1, 1178, __pyx_L1_error);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_verified, __pyx_v_verified) < 0) __PYX_ERR(1, 1178, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1179
 *                                 "as first argument to cusp_info().")
 *             return verify.compute_cusp_shapes(self, verified = verified,
 *                                               bits_prec = bits_prec)             # <<<<<<<<<<<<<<
 * 
 *         if data_spec is None:
 */
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_bits_prec, __pyx_v_bits_prec) < 0) __PYX_ERR(1, 1178, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1178
 *                                 "implemented for cusp shapes. Pass 'shape' "
 *                                 "as first argument to cusp_info().")
 *             return verify.compute_cusp_shapes(self, verified = verified,             # <<<<<<<<<<<<<<
 *                                               bits_prec = bits_prec)
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":1172
 *             raise ValueError('The Triangulation is empty.')
 * 
 *         if verified or bits_prec:             # <<<<<<<<<<<<<<
 *             if not data_spec == 'shape':
 *                 raise Exception("Verified and arbitrary precision computation "
 */
  }

  /* "cython/core/manifold.pyx":1181
 *                                               bits_prec = bits_prec)
 * 
 *         if data_spec is None:             # <<<<<<<<<<<<<<
 *             return ListOnePerLine([self.cusp_info(i)
 *                                    for i in range(self.num_cusps())])
 */
  __pyx_t_3 = (__pyx_v_data_spec == Py_None);
  if (__pyx_t_3) {

    /* "cython/core/manifold.pyx":1182
 * 
 *         if data_spec is None:
 *             return ListOnePerLine([self.cusp_info(i)             # <<<<<<<<<<<<<<
 *                                    for i in range(self.num_cusps())])
 *         # Need to check that data_spec has string type
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ListOnePerLine); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1182, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cython/core/manifold.pyx":1183
 *         if data_spec is None:
 *             return ListOnePerLine([self.cusp_info(i)
 *                                    for i in range(self.num_cusps())])             # <<<<<<<<<<<<<<
 *         # Need to check that data_spec has string type
 *         if isinstance(data_spec, str):
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1183, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_7);
      __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, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1183, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1183, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
        __pyx_t_4 = __pyx_t_7; __Pyx_INCREF(__pyx_t_4);
        __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1183, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1183, __pyx_L11_error)
      }
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      for (;;) {
        if (likely(!__pyx_t_11)) {
          if (likely(PyList_CheckExact(__pyx_t_4))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 1183, __pyx_L11_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(1, 1183, __pyx_L11_error)
            #else
            __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1183, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_7);
            #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(1, 1183, __pyx_L11_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_7); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(1, 1183, __pyx_L11_error)
            #else
            __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1183, __pyx_L11_error)
            __Pyx_GOTREF(__pyx_t_7);
            #endif
          }
        } else {
          __pyx_t_7 = __pyx_t_11(__pyx_t_4);
          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(1, 1183, __pyx_L11_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_7);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr53__pyx_v_i, __pyx_t_7);
        __pyx_t_7 = 0;

        /* "cython/core/manifold.pyx":1182
 * 
 *         if data_spec is None:
 *             return ListOnePerLine([self.cusp_info(i)             # <<<<<<<<<<<<<<
 *                                    for i in range(self.num_cusps())])
 *         # Need to check that data_spec has string type
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1182, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_12 = NULL;
        __pyx_t_9 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_9 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_9genexpr53__pyx_v_i};
          __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1182, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_7))) __PYX_ERR(1, 1182, __pyx_L11_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "cython/core/manifold.pyx":1183
 *         if data_spec is None:
 *             return ListOnePerLine([self.cusp_info(i)
 *                                    for i in range(self.num_cusps())])             # <<<<<<<<<<<<<<
 *         # Need to check that data_spec has string type
 *         if isinstance(data_spec, str):
 */
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_9genexpr53__pyx_v_i); __pyx_9genexpr53__pyx_v_i = 0;
      goto __pyx_L15_exit_scope;
      __pyx_L11_error:;
      __Pyx_XDECREF(__pyx_9genexpr53__pyx_v_i); __pyx_9genexpr53__pyx_v_i = 0;
      goto __pyx_L1_error;
      __pyx_L15_exit_scope:;
    } /* exit inner scope */
    __pyx_t_4 = NULL;
    __pyx_t_9 = 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_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_2};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1182, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":1181
 *                                               bits_prec = bits_prec)
 * 
 *         if data_spec is None:             # <<<<<<<<<<<<<<
 *             return ListOnePerLine([self.cusp_info(i)
 *                                    for i in range(self.num_cusps())])
 */
  }

  /* "cython/core/manifold.pyx":1185
 *                                    for i in range(self.num_cusps())])
 *         # Need to check that data_spec has string type
 *         if isinstance(data_spec, str):             # <<<<<<<<<<<<<<
 *             return [c[data_spec] for c in self.cusp_info()]
 *         cusp_index = valid_index(
 */
  __pyx_t_3 = PyString_Check(__pyx_v_data_spec); 
  if (__pyx_t_3) {

    /* "cython/core/manifold.pyx":1186
 *         # Need to check that data_spec has string type
 *         if isinstance(data_spec, str):
 *             return [c[data_spec] for c in self.cusp_info()]             # <<<<<<<<<<<<<<
 *         cusp_index = valid_index(
 *             data_spec, self.num_cusps(),
 */
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1186, __pyx_L19_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1186, __pyx_L19_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = NULL;
      __pyx_t_9 = 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_9 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1186, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
        __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2);
        __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
      } else {
        __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1186, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 1186, __pyx_L19_error)
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      for (;;) {
        if (likely(!__pyx_t_11)) {
          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(1, 1186, __pyx_L19_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_5); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(1, 1186, __pyx_L19_error)
            #else
            __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1186, __pyx_L19_error)
            __Pyx_GOTREF(__pyx_t_5);
            #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(1, 1186, __pyx_L19_error)
              #endif
              if (__pyx_t_10 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_5); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(1, 1186, __pyx_L19_error)
            #else
            __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1186, __pyx_L19_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          }
        } else {
          __pyx_t_5 = __pyx_t_11(__pyx_t_2);
          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(1, 1186, __pyx_L19_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_XDECREF_SET(__pyx_9genexpr54__pyx_v_c, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_9genexpr54__pyx_v_c, __pyx_v_data_spec); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1186, __pyx_L19_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 1186, __pyx_L19_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_9genexpr54__pyx_v_c); __pyx_9genexpr54__pyx_v_c = 0;
      goto __pyx_L23_exit_scope;
      __pyx_L19_error:;
      __Pyx_XDECREF(__pyx_9genexpr54__pyx_v_c); __pyx_9genexpr54__pyx_v_c = 0;
      goto __pyx_L1_error;
      __pyx_L23_exit_scope:;
    } /* exit inner scope */
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":1185
 *                                    for i in range(self.num_cusps())])
 *         # Need to check that data_spec has string type
 *         if isinstance(data_spec, str):             # <<<<<<<<<<<<<<
 *             return [c[data_spec] for c in self.cusp_info()]
 *         cusp_index = valid_index(
 */
  }

  /* "cython/core/manifold.pyx":1187
 *         if isinstance(data_spec, str):
 *             return [c[data_spec] for c in self.cusp_info()]
 *         cusp_index = valid_index(             # <<<<<<<<<<<<<<
 *             data_spec, self.num_cusps(),
 *             'The specified cusp (%s) does not exist.')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_valid_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cython/core/manifold.pyx":1188
 *             return [c[data_spec] for c in self.cusp_info()]
 *         cusp_index = valid_index(
 *             data_spec, self.num_cusps(),             # <<<<<<<<<<<<<<
 *             'The specified cusp (%s) does not exist.')
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = NULL;
  __pyx_t_9 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(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_9 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = NULL;
  __pyx_t_9 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(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_9 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_v_data_spec, __pyx_t_5, __pyx_kp_s_The_specified_cusp_s_does_not_ex};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_9, 3+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "cython/core/manifold.pyx":1187
 *         if isinstance(data_spec, str):
 *             return [c[data_spec] for c in self.cusp_info()]
 *         cusp_index = valid_index(             # <<<<<<<<<<<<<<
 *             data_spec, self.num_cusps(),
 *             'The specified cusp (%s) does not exist.')
 */
  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_cusp_index = __pyx_t_9;

  /* "cython/core/manifold.pyx":1191
 *             'The specified cusp (%s) does not exist.')
 * 
 *         get_cusp_info(self.c_triangulation, cusp_index,             # <<<<<<<<<<<<<<
 *                       &topology, &is_complete, &m, &l,
 *                       &initial_shape, &current_shape,
 */
  get_cusp_info(__pyx_v_self->__pyx_base.c_triangulation, __pyx_v_cusp_index, (&__pyx_v_topology), (&__pyx_v_is_complete), (&__pyx_v_m), (&__pyx_v_l), (&__pyx_v_initial_shape), (&__pyx_v_current_shape), (&__pyx_v_initial_shape_accuracy), (&__pyx_v_current_shape_accuracy), (&__pyx_v_initial_modulus), (&__pyx_v_current_modulus));

  /* "cython/core/manifold.pyx":1196
 *                       &initial_shape_accuracy, &current_shape_accuracy,
 *                       &initial_modulus, &current_modulus)
 *         get_holonomy(self.c_triangulation, cusp_index,             # <<<<<<<<<<<<<<
 *                      &c_meridian, &c_longitude,
 *                      &meridian_accuracy, &longitude_accuracy)
 */
  get_holonomy(__pyx_v_self->__pyx_base.c_triangulation, __pyx_v_cusp_index, (&__pyx_v_c_meridian), (&__pyx_v_c_longitude), (&__pyx_v_meridian_accuracy), (&__pyx_v_longitude_accuracy)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1196, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1199
 *                      &c_meridian, &c_longitude,
 *                      &meridian_accuracy, &longitude_accuracy)
 *         shape= Complex2Number(current_shape)             # <<<<<<<<<<<<<<
 *         shape.accuracy = current_shape_accuracy
 *         meridian = Complex2Number(c_meridian)
 */
  __pyx_t_6 = __pyx_f_6SnapPy_Complex2Number(__pyx_v_current_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1199, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_shape = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "cython/core/manifold.pyx":1200
 *                      &meridian_accuracy, &longitude_accuracy)
 *         shape= Complex2Number(current_shape)
 *         shape.accuracy = current_shape_accuracy             # <<<<<<<<<<<<<<
 *         meridian = Complex2Number(c_meridian)
 *         meridian.accuracy = meridian_accuracy
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_current_shape_accuracy); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_shape, __pyx_n_s_accuracy, __pyx_t_6) < 0) __PYX_ERR(1, 1200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cython/core/manifold.pyx":1201
 *         shape= Complex2Number(current_shape)
 *         shape.accuracy = current_shape_accuracy
 *         meridian = Complex2Number(c_meridian)             # <<<<<<<<<<<<<<
 *         meridian.accuracy = meridian_accuracy
 *         longitude = Complex2Number(c_longitude)
 */
  __pyx_t_6 = __pyx_f_6SnapPy_Complex2Number(__pyx_v_c_meridian); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_meridian = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "cython/core/manifold.pyx":1202
 *         shape.accuracy = current_shape_accuracy
 *         meridian = Complex2Number(c_meridian)
 *         meridian.accuracy = meridian_accuracy             # <<<<<<<<<<<<<<
 *         longitude = Complex2Number(c_longitude)
 *         longitude.accuracy = longitude_accuracy
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_meridian_accuracy); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_meridian, __pyx_n_s_accuracy, __pyx_t_6) < 0) __PYX_ERR(1, 1202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cython/core/manifold.pyx":1203
 *         meridian = Complex2Number(c_meridian)
 *         meridian.accuracy = meridian_accuracy
 *         longitude = Complex2Number(c_longitude)             # <<<<<<<<<<<<<<
 *         longitude.accuracy = longitude_accuracy
 *         modulus = Complex2Number(current_modulus)
 */
  __pyx_t_6 = __pyx_f_6SnapPy_Complex2Number(__pyx_v_c_longitude); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_longitude = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "cython/core/manifold.pyx":1204
 *         meridian.accuracy = meridian_accuracy
 *         longitude = Complex2Number(c_longitude)
 *         longitude.accuracy = longitude_accuracy             # <<<<<<<<<<<<<<
 *         modulus = Complex2Number(current_modulus)
 *         info = {
 */
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_longitude_accuracy); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1204, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_longitude, __pyx_n_s_accuracy, __pyx_t_6) < 0) __PYX_ERR(1, 1204, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cython/core/manifold.pyx":1205
 *         longitude = Complex2Number(c_longitude)
 *         longitude.accuracy = longitude_accuracy
 *         modulus = Complex2Number(current_modulus)             # <<<<<<<<<<<<<<
 *         info = {
 *             'index' : cusp_index,
 */
  __pyx_t_6 = __pyx_f_6SnapPy_Complex2Number(__pyx_v_current_modulus); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_modulus = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "cython/core/manifold.pyx":1207
 *         modulus = Complex2Number(current_modulus)
 *         info = {
 *             'index' : cusp_index,             # <<<<<<<<<<<<<<
 *             'topology' : CuspTopology[topology],
 *             'is_complete' : B2B(is_complete),
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_cusp_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_index, __pyx_t_2) < 0) __PYX_ERR(1, 1207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":1208
 *         info = {
 *             'index' : cusp_index,
 *             'topology' : CuspTopology[topology],             # <<<<<<<<<<<<<<
 *             'is_complete' : B2B(is_complete),
 *             'filling' : (Real2float(m), Real2float(l)),
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_CuspTopology); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyInt_From_CuspTopology(__pyx_v_topology); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_topology, __pyx_t_4) < 0) __PYX_ERR(1, 1207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/manifold.pyx":1209
 *             'index' : cusp_index,
 *             'topology' : CuspTopology[topology],
 *             'is_complete' : B2B(is_complete),             # <<<<<<<<<<<<<<
 *             'filling' : (Real2float(m), Real2float(l)),
 *             'shape': self._number_(shape),
 */
  __pyx_t_4 = __pyx_f_6SnapPy_B2B(__pyx_v_is_complete); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_is_complete, __pyx_t_4) < 0) __PYX_ERR(1, 1207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/manifold.pyx":1210
 *             'topology' : CuspTopology[topology],
 *             'is_complete' : B2B(is_complete),
 *             'filling' : (Real2float(m), Real2float(l)),             # <<<<<<<<<<<<<<
 *             'shape': self._number_(shape),
 *             'shape_accuracy': current_shape_accuracy,
 */
  __pyx_t_4 = __pyx_f_6SnapPy_Real2float(__pyx_v_m); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __pyx_f_6SnapPy_Real2float(__pyx_v_l); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1210, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(1, 1210, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5)) __PYX_ERR(1, 1210, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_filling, __pyx_t_2) < 0) __PYX_ERR(1, 1207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":1211
 *             'is_complete' : B2B(is_complete),
 *             'filling' : (Real2float(m), Real2float(l)),
 *             'shape': self._number_(shape),             # <<<<<<<<<<<<<<
 *             'shape_accuracy': current_shape_accuracy,
 *             'modulus': self._number_(modulus),
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  __pyx_t_9 = 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_9 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_shape};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_shape, __pyx_t_2) < 0) __PYX_ERR(1, 1207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":1212
 *             'filling' : (Real2float(m), Real2float(l)),
 *             'shape': self._number_(shape),
 *             'shape_accuracy': current_shape_accuracy,             # <<<<<<<<<<<<<<
 *             'modulus': self._number_(modulus),
 *             'holonomies': (self._number_(meridian), self._number_(longitude)),
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_current_shape_accuracy); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_shape_accuracy, __pyx_t_2) < 0) __PYX_ERR(1, 1207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":1213
 *             'shape': self._number_(shape),
 *             'shape_accuracy': current_shape_accuracy,
 *             'modulus': self._number_(modulus),             # <<<<<<<<<<<<<<
 *             'holonomies': (self._number_(meridian), self._number_(longitude)),
 *             'holonomy_accuracy': min(meridian_accuracy,longitude_accuracy)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  __pyx_t_9 = 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_9 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_modulus};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_modulus, __pyx_t_2) < 0) __PYX_ERR(1, 1207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":1214
 *             'shape_accuracy': current_shape_accuracy,
 *             'modulus': self._number_(modulus),
 *             'holonomies': (self._number_(meridian), self._number_(longitude)),             # <<<<<<<<<<<<<<
 *             'holonomy_accuracy': min(meridian_accuracy,longitude_accuracy)
 *         }
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  __pyx_t_9 = 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_9 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_meridian};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = NULL;
  __pyx_t_9 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(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_9 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_longitude};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1214, __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(1, 1214, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5)) __PYX_ERR(1, 1214, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_holonomies, __pyx_t_4) < 0) __PYX_ERR(1, 1207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/manifold.pyx":1215
 *             'modulus': self._number_(modulus),
 *             'holonomies': (self._number_(meridian), self._number_(longitude)),
 *             'holonomy_accuracy': min(meridian_accuracy,longitude_accuracy)             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_9 = __pyx_v_longitude_accuracy;
  __pyx_t_13 = __pyx_v_meridian_accuracy;
  __pyx_t_3 = (__pyx_t_9 < __pyx_t_13);
  if (__pyx_t_3) {
    __pyx_t_14 = __pyx_t_9;
  } else {
    __pyx_t_14 = __pyx_t_13;
  }
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_holonomy_accuracy, __pyx_t_4) < 0) __PYX_ERR(1, 1207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_info = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "cython/core/manifold.pyx":1218
 *         }
 * 
 *         core_geodesic(self.c_triangulation, cusp_index,             # <<<<<<<<<<<<<<
 *                       &singularity_index, &c_core_length, &accuracy)
 * 
 */
  core_geodesic(__pyx_v_self->__pyx_base.c_triangulation, __pyx_v_cusp_index, (&__pyx_v_singularity_index), (&__pyx_v_c_core_length), (&__pyx_v_accuracy)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1218, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1221
 *                       &singularity_index, &c_core_length, &accuracy)
 * 
 *         if singularity_index != 0:             # <<<<<<<<<<<<<<
 *             core_length = Complex2Number(c_core_length)
 *             core_length.accuracy = accuracy
 */
  __pyx_t_3 = (__pyx_v_singularity_index != 0);
  if (__pyx_t_3) {

    /* "cython/core/manifold.pyx":1222
 * 
 *         if singularity_index != 0:
 *             core_length = Complex2Number(c_core_length)             # <<<<<<<<<<<<<<
 *             core_length.accuracy = accuracy
 *             info.update({
 */
    __pyx_t_6 = __pyx_f_6SnapPy_Complex2Number(__pyx_v_c_core_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_core_length = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "cython/core/manifold.pyx":1223
 *         if singularity_index != 0:
 *             core_length = Complex2Number(c_core_length)
 *             core_length.accuracy = accuracy             # <<<<<<<<<<<<<<
 *             info.update({
 *                 'core_length': self._number_(core_length),
 */
    __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_accuracy); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_core_length, __pyx_n_s_accuracy, __pyx_t_6) < 0) __PYX_ERR(1, 1223, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "cython/core/manifold.pyx":1225
 *             core_length.accuracy = accuracy
 *             info.update({
 *                 'core_length': self._number_(core_length),             # <<<<<<<<<<<<<<
 *                 'singularity_index': singularity_index
 *             })
 */
    __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = NULL;
    __pyx_t_14 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_14 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_core_length};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_14, 1+__pyx_t_14);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1225, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_core_length, __pyx_t_4) < 0) __PYX_ERR(1, 1225, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/manifold.pyx":1226
 *             info.update({
 *                 'core_length': self._number_(core_length),
 *                 'singularity_index': singularity_index             # <<<<<<<<<<<<<<
 *             })
 * 
 */
    __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_singularity_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_singularity_index, __pyx_t_4) < 0) __PYX_ERR(1, 1225, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/manifold.pyx":1224
 *             core_length = Complex2Number(c_core_length)
 *             core_length.accuracy = accuracy
 *             info.update({             # <<<<<<<<<<<<<<
 *                 'core_length': self._number_(core_length),
 *                 'singularity_index': singularity_index
 */
    __pyx_t_4 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_update, __pyx_v_info, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/manifold.pyx":1221
 *                       &singularity_index, &c_core_length, &accuracy)
 * 
 *         if singularity_index != 0:             # <<<<<<<<<<<<<<
 *             core_length = Complex2Number(c_core_length)
 *             core_length.accuracy = accuracy
 */
  }

  /* "cython/core/manifold.pyx":1229
 *             })
 * 
 *         return CuspInfo(**info)             # <<<<<<<<<<<<<<
 * 
 *     def dehn_fill(self, filling_data, which_cusp=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CuspInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = PyDict_Copy(__pyx_v_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":1108
 *                             which_cusp, c_target, recompute)
 * 
 *     def cusp_info(self, data_spec=None, verified = False, bits_prec = None):             # <<<<<<<<<<<<<<
 *         """
 *         Returns an info object containing information about the given
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __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_12);
  __Pyx_AddTraceback("SnapPy.Manifold.cusp_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_shape);
  __Pyx_XDECREF(__pyx_v_meridian);
  __Pyx_XDECREF(__pyx_v_longitude);
  __Pyx_XDECREF(__pyx_v_modulus);
  __Pyx_XDECREF(__pyx_v_info);
  __Pyx_XDECREF(__pyx_v_core_length);
  __Pyx_XDECREF(__pyx_9genexpr53__pyx_v_i);
  __Pyx_XDECREF(__pyx_9genexpr54__pyx_v_c);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":1231
 *         return CuspInfo(**info)
 * 
 *     def dehn_fill(self, filling_data, which_cusp=None):             # <<<<<<<<<<<<<<
 *         """
 *         Set the Dehn filling coefficients of the cusps.  This can be
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_63dehn_fill(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_6SnapPy_8Manifold_62dehn_fill, "Manifold.dehn_fill(self, filling_data, which_cusp=None)\n\n        Set the Dehn filling coefficients of the cusps.  This can be\n        specified in the following ways, where the cusps are numbered\n        by 0,1,...,(num_cusps - 1).\n\n        - Fill cusp 2:\n\n          >>> M = Manifold('8^4_1')\n          >>> M.dehn_fill((2,3), 2)\n          >>> M\n          8^4_1(0,0)(0,0)(2,3)(0,0)\n\n        - Fill the last cusp:\n\n          >>> M.dehn_fill((1,5), -1)\n          >>> M\n          8^4_1(0,0)(0,0)(2,3)(1,5)\n\n        - Fill the first two cusps:\n\n          >>> M.dehn_fill( [ (3,0), (1, -4) ])\n          >>> M\n          8^4_1(3,0)(1,-4)(2,3)(1,5)\n\n        - When there is only one cusp, there's a shortcut\n\n          >>> N = Manifold('m004')\n          >>> N.dehn_fill( (-3,4) )\n          >>> N\n          m004(-3,4)\n\n        Does not return a new Manifold.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_63dehn_fill = {"dehn_fill", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_63dehn_fill, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_62dehn_fill};
static PyObject *__pyx_pw_6SnapPy_8Manifold_63dehn_fill(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_filling_data = 0;
  PyObject *__pyx_v_which_cusp = 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("dehn_fill (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_filling_data,&__pyx_n_s_which_cusp,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_filling_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1231, __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_which_cusp);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1231, __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, "dehn_fill") < 0)) __PYX_ERR(1, 1231, __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_filling_data = values[0];
    __pyx_v_which_cusp = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dehn_fill", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 1231, __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("SnapPy.Manifold.dehn_fill", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_62dehn_fill(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_filling_data, __pyx_v_which_cusp);

  /* 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_6SnapPy_8Manifold_62dehn_fill(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_filling_data, PyObject *__pyx_v_which_cusp) {
  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("dehn_fill", 1);

  /* "cython/core/manifold.pyx":1265
 *         Does not return a new Manifold.
 *         """
 *         Triangulation.dehn_fill(self, filling_data, which_cusp)             # <<<<<<<<<<<<<<
 *         do_Dehn_filling(self.c_triangulation)
 *         self._cache.clear(message='Manifold.dehn_fill')
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6SnapPy_Triangulation), __pyx_n_s_dehn_fill); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1265, __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[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_filling_data, __pyx_v_which_cusp};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1265, __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;

  /* "cython/core/manifold.pyx":1266
 *         """
 *         Triangulation.dehn_fill(self, filling_data, which_cusp)
 *         do_Dehn_filling(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         self._cache.clear(message='Manifold.dehn_fill')
 * 
 */
  do_Dehn_filling(__pyx_v_self->__pyx_base.c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1266, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1267
 *         Triangulation.dehn_fill(self, filling_data, which_cusp)
 *         do_Dehn_filling(self.c_triangulation)
 *         self._cache.clear(message='Manifold.dehn_fill')             # <<<<<<<<<<<<<<
 * 
 *     def set_peripheral_curves(self, peripheral_data,
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._cache, __pyx_n_s_clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_message, __pyx_kp_s_Manifold_dehn_fill) < 0) __PYX_ERR(1, 1267, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1267, __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_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/manifold.pyx":1231
 *         return CuspInfo(**info)
 * 
 *     def dehn_fill(self, filling_data, which_cusp=None):             # <<<<<<<<<<<<<<
 *         """
 *         Set the Dehn filling coefficients of the cusps.  This can be
 */

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

/* "cython/core/manifold.pyx":1269
 *         self._cache.clear(message='Manifold.dehn_fill')
 * 
 *     def set_peripheral_curves(self, peripheral_data,             # <<<<<<<<<<<<<<
 *                               which_cusp=None, return_matrices=False):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_65set_peripheral_curves(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_6SnapPy_8Manifold_64set_peripheral_curves, "Manifold.set_peripheral_curves(self, peripheral_data, which_cusp=None, return_matrices=False)\n\n        Each cusp has a preferred marking. In the case of a torus\n        cusp, this is pair of essential simple curves meeting in one\n        point; equivalently, a basis of the first homology of the\n        boundary torus. These curves are called the meridian and the\n        longitude.\n\n        This method changes these markings in various ways.  In many\n        cases, if the flag return_matrices is True then it returns\n        a list of change-of-basis matrices is returned, one per\n        cusp, which will restore the original markings if passed\n        as peripheral_data.\n\n        - Make the shortest curves the meridians, and the second\n          shortest curves the longitudes.\n\n          >>> M = Manifold('5_2')\n          >>> M.cusp_info('shape') # doctest: +NUMERIC6\n          [-2.49024467 + 2.97944707*I]\n          >>> cob = M.set_peripheral_curves('shortest', return_matrices=True)\n          >>> M.cusp_info('shape') # doctest: +NUMERIC6\n          [-0.49024467 + 2.97944707*I]\n          >>> cob\n          [[[1, 0], [-2, 1]]]\n          >>> M.set_peripheral_curves(cob)\n          >>> M.cusp_info('shape') # doctest: +NUMERIC6\n          [-2.49024467 + 2.97944707*I]\n\n          You can also make just the meridians as short as\n          possible while fixing the longitudes via the option\n          'shortest_meridians', and conversely with\n          'shortest_longitudes'.\n\n        - If cusps are Dehn filled, make those curves meridians.\n\n          >>> M = Manifold('m125(0,0)(2,5)')\n          >>> M.set_peripheral_curves('fillings')\n          >>> M\n          m125(0,0)(1,0)\n\n        - Change the basis of a particular cusp, say the first one:\n\n          >>> M.set_peripheral_curves( [ (1,2), (1,3) ] , 0)\n\n          Here (1,2) is the new meridian written in the old basis, and\n          (1,3) the new longitude.\n\n        - Change the basis o""f all the cusps at once\n\n          >>> new_curves = [ [(1,-1), (1,0)],  [(3,2), (-2,-1)] ]\n          >>> M.set_peripheral_curves(new_curves)\n          >>> M\n          m125(0,0)(-1,-2)\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_65set_peripheral_curves = {"set_peripheral_curves", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_65set_peripheral_curves, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_64set_peripheral_curves};
static PyObject *__pyx_pw_6SnapPy_8Manifold_65set_peripheral_curves(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_peripheral_data = 0;
  PyObject *__pyx_v_which_cusp = 0;
  PyObject *__pyx_v_return_matrices = 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("set_peripheral_curves (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_peripheral_data,&__pyx_n_s_which_cusp,&__pyx_n_s_return_matrices,0};

    /* "cython/core/manifold.pyx":1270
 * 
 *     def set_peripheral_curves(self, peripheral_data,
 *                               which_cusp=None, return_matrices=False):             # <<<<<<<<<<<<<<
 *         """
 *         Each cusp has a preferred marking. In the case of a torus
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    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_peripheral_data)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1269, __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_which_cusp);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1269, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_return_matrices);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1269, __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, "set_peripheral_curves") < 0)) __PYX_ERR(1, 1269, __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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_peripheral_data = values[0];
    __pyx_v_which_cusp = values[1];
    __pyx_v_return_matrices = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_peripheral_curves", 0, 1, 3, __pyx_nargs); __PYX_ERR(1, 1269, __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("SnapPy.Manifold.set_peripheral_curves", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_64set_peripheral_curves(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_peripheral_data, __pyx_v_which_cusp, __pyx_v_return_matrices);

  /* "cython/core/manifold.pyx":1269
 *         self._cache.clear(message='Manifold.dehn_fill')
 * 
 *     def set_peripheral_curves(self, peripheral_data,             # <<<<<<<<<<<<<<
 *                               which_cusp=None, return_matrices=False):
 *         """
 */

  /* 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_6SnapPy_8Manifold_64set_peripheral_curves(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_peripheral_data, PyObject *__pyx_v_which_cusp, PyObject *__pyx_v_return_matrices) {
  int __pyx_v_d;
  MatrixInt22 *__pyx_v_matrices;
  PyObject *__pyx_v_cusps = NULL;
  PyObject *__pyx_v_cobs = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  size_t __pyx_t_11;
  Py_ssize_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_peripheral_curves", 0);
  __Pyx_INCREF(__pyx_v_which_cusp);

  /* "cython/core/manifold.pyx":1328
 *         cdef MatrixInt22 *matrices
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":1329
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty')             # <<<<<<<<<<<<<<
 * 
 *         if which_cusp is not None:
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1329, __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(1, 1329, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1328
 *         cdef MatrixInt22 *matrices
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty')
 * 
 */
  }

  /* "cython/core/manifold.pyx":1331
 *             raise ValueError('The Triangulation is empty')
 * 
 *         if which_cusp is not None:             # <<<<<<<<<<<<<<
 *             which_cusp = valid_index(
 *                 which_cusp, self.num_cusps(),
 */
  __pyx_t_1 = (__pyx_v_which_cusp != Py_None);
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":1332
 * 
 *         if which_cusp is not None:
 *             which_cusp = valid_index(             # <<<<<<<<<<<<<<
 *                 which_cusp, self.num_cusps(),
 *                 'The specified cusp (%s) does not exist.')
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_valid_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1332, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "cython/core/manifold.pyx":1333
 *         if which_cusp is not None:
 *             which_cusp = valid_index(
 *                 which_cusp, self.num_cusps(),             # <<<<<<<<<<<<<<
 *                 'The specified cusp (%s) does not exist.')
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1333, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1333, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_5, __pyx_v_which_cusp, __pyx_t_4, __pyx_kp_s_The_specified_cusp_s_does_not_ex};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1332, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_which_cusp, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/manifold.pyx":1331
 *             raise ValueError('The Triangulation is empty')
 * 
 *         if which_cusp is not None:             # <<<<<<<<<<<<<<
 *             which_cusp = valid_index(
 *                 which_cusp, self.num_cusps(),
 */
  }

  /* "cython/core/manifold.pyx":1336
 *                 'The specified cusp (%s) does not exist.')
 * 
 *         self._cache.clear(message='Manifold.set_peripheral_curves')             # <<<<<<<<<<<<<<
 * 
 *         if peripheral_data == 'shortest_meridians':
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._cache, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_message, __pyx_kp_s_Manifold_set_peripheral_curves) < 0) __PYX_ERR(1, 1336, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/manifold.pyx":1338
 *         self._cache.clear(message='Manifold.set_peripheral_curves')
 * 
 *         if peripheral_data == 'shortest_meridians':             # <<<<<<<<<<<<<<
 *             # For each cusp, replace its current meridian with the
 *             # shortest one possible.
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_peripheral_data, __pyx_n_s_shortest_meridians, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1338, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":1341
 *             # For each cusp, replace its current meridian with the
 *             # shortest one possible.
 *             cusps = [which_cusp] if which_cusp else range(self.num_cusps())             # <<<<<<<<<<<<<<
 *             cobs = []
 *             for i in cusps:
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_which_cusp); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1341, __pyx_L1_error)
    if (__pyx_t_1) {
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_which_cusp);
      __Pyx_GIVEREF(__pyx_v_which_cusp);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_which_cusp)) __PYX_ERR(1, 1341, __pyx_L1_error);
      __pyx_t_4 = __pyx_t_3;
      __pyx_t_3 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1341, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_4 = __pyx_t_2;
      __pyx_t_2 = 0;
    }
    __pyx_v_cusps = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cython/core/manifold.pyx":1342
 *             # shortest one possible.
 *             cusps = [which_cusp] if which_cusp else range(self.num_cusps())
 *             cobs = []             # <<<<<<<<<<<<<<
 *             for i in cusps:
 *                 d = round((1/self.cusp_info(i)['shape']).real, 0)
 */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_cobs = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/manifold.pyx":1343
 *             cusps = [which_cusp] if which_cusp else range(self.num_cusps())
 *             cobs = []
 *             for i in cusps:             # <<<<<<<<<<<<<<
 *                 d = round((1/self.cusp_info(i)['shape']).real, 0)
 *                 self.set_peripheral_curves([(1, -d), (0,1)], i)
 */
    if (likely(PyList_CheckExact(__pyx_v_cusps)) || PyTuple_CheckExact(__pyx_v_cusps)) {
      __pyx_t_4 = __pyx_v_cusps; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_cusps); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1343, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        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(1, 1343, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(1, 1343, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1343, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #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(1, 1343, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(1, 1343, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1343, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_9(__pyx_t_4);
        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(1, 1343, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "cython/core/manifold.pyx":1344
 *             cobs = []
 *             for i in cusps:
 *                 d = round((1/self.cusp_info(i)['shape']).real, 0)             # <<<<<<<<<<<<<<
 *                 self.set_peripheral_curves([(1, -d), (0,1)], i)
 *                 cobs.append([[1,d],[0,1]])
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_i};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1344, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_int_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1344, __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_real); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(1, 1344, __pyx_L1_error);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_0)) __PYX_ERR(1, 1344, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1344, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_d = __pyx_t_7;

      /* "cython/core/manifold.pyx":1345
 *             for i in cusps:
 *                 d = round((1/self.cusp_info(i)['shape']).real, 0)
 *                 self.set_peripheral_curves([(1, -d), (0,1)], i)             # <<<<<<<<<<<<<<
 *                 cobs.append([[1,d],[0,1]])
 *             if return_matrices:
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_peripheral_curves); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1345, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyInt_From_int((-__pyx_v_d)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1345, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1345, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_int_1)) __PYX_ERR(1, 1345, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5)) __PYX_ERR(1, 1345, __pyx_L1_error);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1345, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_6)) __PYX_ERR(1, 1345, __pyx_L1_error);
      __Pyx_INCREF(__pyx_tuple__20);
      __Pyx_GIVEREF(__pyx_tuple__20);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_tuple__20)) __PYX_ERR(1, 1345, __pyx_L1_error);
      __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_5, __pyx_v_i};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1345, __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;

      /* "cython/core/manifold.pyx":1346
 *                 d = round((1/self.cusp_info(i)['shape']).real, 0)
 *                 self.set_peripheral_curves([(1, -d), (0,1)], i)
 *                 cobs.append([[1,d],[0,1]])             # <<<<<<<<<<<<<<
 *             if return_matrices:
 *                 return cobs
 */
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_1)) __PYX_ERR(1, 1346, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(1, 1346, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_0)) __PYX_ERR(1, 1346, __pyx_L1_error);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_1)) __PYX_ERR(1, 1346, __pyx_L1_error);
      __pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_2)) __PYX_ERR(1, 1346, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_3)) __PYX_ERR(1, 1346, __pyx_L1_error);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_cobs, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 1346, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cython/core/manifold.pyx":1343
 *             cusps = [which_cusp] if which_cusp else range(self.num_cusps())
 *             cobs = []
 *             for i in cusps:             # <<<<<<<<<<<<<<
 *                 d = round((1/self.cusp_info(i)['shape']).real, 0)
 *                 self.set_peripheral_curves([(1, -d), (0,1)], i)
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/manifold.pyx":1347
 *                 self.set_peripheral_curves([(1, -d), (0,1)], i)
 *                 cobs.append([[1,d],[0,1]])
 *             if return_matrices:             # <<<<<<<<<<<<<<
 *                 return cobs
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_return_matrices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1347, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "cython/core/manifold.pyx":1348
 *                 cobs.append([[1,d],[0,1]])
 *             if return_matrices:
 *                 return cobs             # <<<<<<<<<<<<<<
 * 
 *         elif peripheral_data == 'shortest_longitudes':
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_cobs);
      __pyx_r = __pyx_v_cobs;
      goto __pyx_L0;

      /* "cython/core/manifold.pyx":1347
 *                 self.set_peripheral_curves([(1, -d), (0,1)], i)
 *                 cobs.append([[1,d],[0,1]])
 *             if return_matrices:             # <<<<<<<<<<<<<<
 *                 return cobs
 * 
 */
    }

    /* "cython/core/manifold.pyx":1338
 *         self._cache.clear(message='Manifold.set_peripheral_curves')
 * 
 *         if peripheral_data == 'shortest_meridians':             # <<<<<<<<<<<<<<
 *             # For each cusp, replace its current meridian with the
 *             # shortest one possible.
 */
    goto __pyx_L5;
  }

  /* "cython/core/manifold.pyx":1350
 *                 return cobs
 * 
 *         elif peripheral_data == 'shortest_longitudes':             # <<<<<<<<<<<<<<
 *             # For each cusp, replace its current longitude with the
 *             # shortest one possible.
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_peripheral_data, __pyx_n_s_shortest_longitudes, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1350, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":1353
 *             # For each cusp, replace its current longitude with the
 *             # shortest one possible.
 *             cusps = [which_cusp] if which_cusp else range(self.num_cusps())             # <<<<<<<<<<<<<<
 *             cobs = []
 *             for i in cusps:
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_which_cusp); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1353, __pyx_L1_error)
    if (__pyx_t_1) {
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_which_cusp);
      __Pyx_GIVEREF(__pyx_v_which_cusp);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_which_cusp)) __PYX_ERR(1, 1353, __pyx_L1_error);
      __pyx_t_4 = __pyx_t_5;
      __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = NULL;
      __pyx_t_7 = 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_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1353, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1353, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_4 = __pyx_t_3;
      __pyx_t_3 = 0;
    }
    __pyx_v_cusps = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cython/core/manifold.pyx":1354
 *             # shortest one possible.
 *             cusps = [which_cusp] if which_cusp else range(self.num_cusps())
 *             cobs = []             # <<<<<<<<<<<<<<
 *             for i in cusps:
 *                 d = round(self.cusp_info(i)['shape'].real, 0)
 */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_cobs = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/manifold.pyx":1355
 *             cusps = [which_cusp] if which_cusp else range(self.num_cusps())
 *             cobs = []
 *             for i in cusps:             # <<<<<<<<<<<<<<
 *                 d = round(self.cusp_info(i)['shape'].real, 0)
 *                 self.set_peripheral_curves([(1, 0), (-d,1)], i)
 */
    if (likely(PyList_CheckExact(__pyx_v_cusps)) || PyTuple_CheckExact(__pyx_v_cusps)) {
      __pyx_t_4 = __pyx_v_cusps; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_cusps); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1355, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1355, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        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(1, 1355, __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_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(1, 1355, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1355, __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(1, 1355, __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_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(1, 1355, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1355, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_9(__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(1, 1355, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cython/core/manifold.pyx":1356
 *             cobs = []
 *             for i in cusps:
 *                 d = round(self.cusp_info(i)['shape'].real, 0)             # <<<<<<<<<<<<<<
 *                 self.set_peripheral_curves([(1, 0), (-d,1)], i)
 *                 cobs.append([[1,0],[d,1]])
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1356, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_i};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1356, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1356, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_real); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1356, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1356, __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, 1356, __pyx_L1_error);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_0)) __PYX_ERR(1, 1356, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1356, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1356, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_d = __pyx_t_7;

      /* "cython/core/manifold.pyx":1357
 *             for i in cusps:
 *                 d = round(self.cusp_info(i)['shape'].real, 0)
 *                 self.set_peripheral_curves([(1, 0), (-d,1)], i)             # <<<<<<<<<<<<<<
 *                 cobs.append([[1,0],[d,1]])
 *             if return_matrices:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_peripheral_curves); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1357, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyInt_From_int((-__pyx_v_d)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1357, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1357, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2)) __PYX_ERR(1, 1357, __pyx_L1_error);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_1)) __PYX_ERR(1, 1357, __pyx_L1_error);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1357, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_tuple__21);
      __Pyx_GIVEREF(__pyx_tuple__21);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_tuple__21)) __PYX_ERR(1, 1357, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_6)) __PYX_ERR(1, 1357, __pyx_L1_error);
      __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_2, __pyx_v_i};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1357, __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;

      /* "cython/core/manifold.pyx":1358
 *                 d = round(self.cusp_info(i)['shape'].real, 0)
 *                 self.set_peripheral_curves([(1, 0), (-d,1)], i)
 *                 cobs.append([[1,0],[d,1]])             # <<<<<<<<<<<<<<
 *             if return_matrices:
 *                 return cobs
 */
      __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1358, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_1)) __PYX_ERR(1, 1358, __pyx_L1_error);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0)) __PYX_ERR(1, 1358, __pyx_L1_error);
      __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_d); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1358, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1358, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_5)) __PYX_ERR(1, 1358, __pyx_L1_error);
      __Pyx_INCREF(__pyx_int_1);
      __Pyx_GIVEREF(__pyx_int_1);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_1)) __PYX_ERR(1, 1358, __pyx_L1_error);
      __pyx_t_5 = 0;
      __pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1358, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(1, 1358, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_2)) __PYX_ERR(1, 1358, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_2 = 0;
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_cobs, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 1358, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cython/core/manifold.pyx":1355
 *             cusps = [which_cusp] if which_cusp else range(self.num_cusps())
 *             cobs = []
 *             for i in cusps:             # <<<<<<<<<<<<<<
 *                 d = round(self.cusp_info(i)['shape'].real, 0)
 *                 self.set_peripheral_curves([(1, 0), (-d,1)], i)
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/manifold.pyx":1359
 *                 self.set_peripheral_curves([(1, 0), (-d,1)], i)
 *                 cobs.append([[1,0],[d,1]])
 *             if return_matrices:             # <<<<<<<<<<<<<<
 *                 return cobs
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_return_matrices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1359, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "cython/core/manifold.pyx":1360
 *                 cobs.append([[1,0],[d,1]])
 *             if return_matrices:
 *                 return cobs             # <<<<<<<<<<<<<<
 * 
 *         elif peripheral_data == 'shortest':
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_cobs);
      __pyx_r = __pyx_v_cobs;
      goto __pyx_L0;

      /* "cython/core/manifold.pyx":1359
 *                 self.set_peripheral_curves([(1, 0), (-d,1)], i)
 *                 cobs.append([[1,0],[d,1]])
 *             if return_matrices:             # <<<<<<<<<<<<<<
 *                 return cobs
 * 
 */
    }

    /* "cython/core/manifold.pyx":1350
 *                 return cobs
 * 
 *         elif peripheral_data == 'shortest_longitudes':             # <<<<<<<<<<<<<<
 *             # For each cusp, replace its current longitude with the
 *             # shortest one possible.
 */
    goto __pyx_L5;
  }

  /* "cython/core/manifold.pyx":1362
 *                 return cobs
 * 
 *         elif peripheral_data == 'shortest':             # <<<<<<<<<<<<<<
 *             if which_cusp is not None:
 *                 raise ValueError("You must apply 'shortest' to all "
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_peripheral_data, __pyx_n_s_shortest, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1362, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":1363
 * 
 *         elif peripheral_data == 'shortest':
 *             if which_cusp is not None:             # <<<<<<<<<<<<<<
 *                 raise ValueError("You must apply 'shortest' to all "
 *                                  "of the cusps.")
 */
    __pyx_t_1 = (__pyx_v_which_cusp != Py_None);
    if (unlikely(__pyx_t_1)) {

      /* "cython/core/manifold.pyx":1364
 *         elif peripheral_data == 'shortest':
 *             if which_cusp is not None:
 *                 raise ValueError("You must apply 'shortest' to all "             # <<<<<<<<<<<<<<
 *                                  "of the cusps.")
 *             if return_matrices:
 */
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1364, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(1, 1364, __pyx_L1_error)

      /* "cython/core/manifold.pyx":1363
 * 
 *         elif peripheral_data == 'shortest':
 *             if which_cusp is not None:             # <<<<<<<<<<<<<<
 *                 raise ValueError("You must apply 'shortest' to all "
 *                                  "of the cusps.")
 */
    }

    /* "cython/core/manifold.pyx":1366
 *                 raise ValueError("You must apply 'shortest' to all "
 *                                  "of the cusps.")
 *             if return_matrices:             # <<<<<<<<<<<<<<
 *                 matrices = <MatrixInt22 *>malloc(self.num_cusps() *
 *                                                  sizeof(MatrixInt22))
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_return_matrices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1366, __pyx_L1_error)
    if (__pyx_t_1) {

      /* "cython/core/manifold.pyx":1367
 *                                  "of the cusps.")
 *             if return_matrices:
 *                 matrices = <MatrixInt22 *>malloc(self.num_cusps() *             # <<<<<<<<<<<<<<
 *                                                  sizeof(MatrixInt22))
 *                 install_shortest_with_matrices(self.c_triangulation, matrices)
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1367, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1367, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }

      /* "cython/core/manifold.pyx":1368
 *             if return_matrices:
 *                 matrices = <MatrixInt22 *>malloc(self.num_cusps() *
 *                                                  sizeof(MatrixInt22))             # <<<<<<<<<<<<<<
 *                 install_shortest_with_matrices(self.c_triangulation, matrices)
 *                 cobs = []
 */
      __pyx_t_5 = __Pyx_PyInt_FromSize_t((sizeof(MatrixInt22))); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1368, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "cython/core/manifold.pyx":1367
 *                                  "of the cusps.")
 *             if return_matrices:
 *                 matrices = <MatrixInt22 *>malloc(self.num_cusps() *             # <<<<<<<<<<<<<<
 *                                                  sizeof(MatrixInt22))
 *                 install_shortest_with_matrices(self.c_triangulation, matrices)
 */
      __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1367, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_11 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_11 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1367, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_matrices = ((MatrixInt22 *)malloc(__pyx_t_11));

      /* "cython/core/manifold.pyx":1369
 *                 matrices = <MatrixInt22 *>malloc(self.num_cusps() *
 *                                                  sizeof(MatrixInt22))
 *                 install_shortest_with_matrices(self.c_triangulation, matrices)             # <<<<<<<<<<<<<<
 *                 cobs = []
 *                 for n in range(self.num_cusps()):
 */
      install_shortest_with_matrices(__pyx_v_self->__pyx_base.c_triangulation, __pyx_v_matrices);

      /* "cython/core/manifold.pyx":1370
 *                                                  sizeof(MatrixInt22))
 *                 install_shortest_with_matrices(self.c_triangulation, matrices)
 *                 cobs = []             # <<<<<<<<<<<<<<
 *                 for n in range(self.num_cusps()):
 *                     cobs.append([ [ matrices[n][1][1], -matrices[n][0][1] ],
 */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1370, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_cobs = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cython/core/manifold.pyx":1371
 *                 install_shortest_with_matrices(self.c_triangulation, matrices)
 *                 cobs = []
 *                 for n in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *                     cobs.append([ [ matrices[n][1][1], -matrices[n][0][1] ],
 *                                   [ -matrices[n][1][0], matrices[n][0][0] ] ])
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1371, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = NULL;
      __pyx_t_7 = 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_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1371, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1371, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
        __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2);
        __pyx_t_8 = 0;
        __pyx_t_9 = NULL;
      } else {
        __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1371, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1371, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      for (;;) {
        if (likely(!__pyx_t_9)) {
          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(1, 1371, __pyx_L1_error)
              #endif
              if (__pyx_t_8 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(1, 1371, __pyx_L1_error)
            #else
            __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1371, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #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(1, 1371, __pyx_L1_error)
              #endif
              if (__pyx_t_8 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(1, 1371, __pyx_L1_error)
            #else
            __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1371, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            #endif
          }
        } else {
          __pyx_t_5 = __pyx_t_9(__pyx_t_2);
          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(1, 1371, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "cython/core/manifold.pyx":1372
 *                 cobs = []
 *                 for n in range(self.num_cusps()):
 *                     cobs.append([ [ matrices[n][1][1], -matrices[n][0][1] ],             # <<<<<<<<<<<<<<
 *                                   [ -matrices[n][1][0], matrices[n][0][0] ] ])
 *                 free(matrices)
 */
        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1372, __pyx_L1_error)
        __pyx_t_5 = __Pyx_PyInt_From_int((((__pyx_v_matrices[__pyx_t_12])[1])[1])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1372, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1372, __pyx_L1_error)
        __pyx_t_4 = __Pyx_PyInt_From_int((-(((__pyx_v_matrices[__pyx_t_12])[0])[1]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1372, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1372, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_5);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(1, 1372, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_4);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_4)) __PYX_ERR(1, 1372, __pyx_L1_error);
        __pyx_t_5 = 0;
        __pyx_t_4 = 0;

        /* "cython/core/manifold.pyx":1373
 *                 for n in range(self.num_cusps()):
 *                     cobs.append([ [ matrices[n][1][1], -matrices[n][0][1] ],
 *                                   [ -matrices[n][1][0], matrices[n][0][0] ] ])             # <<<<<<<<<<<<<<
 *                 free(matrices)
 *                 return cobs
 */
        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1373, __pyx_L1_error)
        __pyx_t_4 = __Pyx_PyInt_From_int((-(((__pyx_v_matrices[__pyx_t_12])[1])[0]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1373, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1373, __pyx_L1_error)
        __pyx_t_5 = __Pyx_PyInt_From_int((((__pyx_v_matrices[__pyx_t_12])[0])[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1373, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1373, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_4);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)) __PYX_ERR(1, 1373, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_5);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_5)) __PYX_ERR(1, 1373, __pyx_L1_error);
        __pyx_t_4 = 0;
        __pyx_t_5 = 0;

        /* "cython/core/manifold.pyx":1372
 *                 cobs = []
 *                 for n in range(self.num_cusps()):
 *                     cobs.append([ [ matrices[n][1][1], -matrices[n][0][1] ],             # <<<<<<<<<<<<<<
 *                                   [ -matrices[n][1][0], matrices[n][0][0] ] ])
 *                 free(matrices)
 */
        __pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1372, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_3);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(1, 1372, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_6);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_6)) __PYX_ERR(1, 1372, __pyx_L1_error);
        __pyx_t_3 = 0;
        __pyx_t_6 = 0;
        __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_cobs, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 1372, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "cython/core/manifold.pyx":1371
 *                 install_shortest_with_matrices(self.c_triangulation, matrices)
 *                 cobs = []
 *                 for n in range(self.num_cusps()):             # <<<<<<<<<<<<<<
 *                     cobs.append([ [ matrices[n][1][1], -matrices[n][0][1] ],
 *                                   [ -matrices[n][1][0], matrices[n][0][0] ] ])
 */
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/manifold.pyx":1374
 *                     cobs.append([ [ matrices[n][1][1], -matrices[n][0][1] ],
 *                                   [ -matrices[n][1][0], matrices[n][0][0] ] ])
 *                 free(matrices)             # <<<<<<<<<<<<<<
 *                 return cobs
 *             else:
 */
      free(__pyx_v_matrices);

      /* "cython/core/manifold.pyx":1375
 *                                   [ -matrices[n][1][0], matrices[n][0][0] ] ])
 *                 free(matrices)
 *                 return cobs             # <<<<<<<<<<<<<<
 *             else:
 *                 install_shortest_bases(self.c_triangulation)
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_cobs);
      __pyx_r = __pyx_v_cobs;
      goto __pyx_L0;

      /* "cython/core/manifold.pyx":1366
 *                 raise ValueError("You must apply 'shortest' to all "
 *                                  "of the cusps.")
 *             if return_matrices:             # <<<<<<<<<<<<<<
 *                 matrices = <MatrixInt22 *>malloc(self.num_cusps() *
 *                                                  sizeof(MatrixInt22))
 */
    }

    /* "cython/core/manifold.pyx":1377
 *                 return cobs
 *             else:
 *                 install_shortest_bases(self.c_triangulation)             # <<<<<<<<<<<<<<
 * 
 *         else:
 */
    /*else*/ {
      install_shortest_bases(__pyx_v_self->__pyx_base.c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1377, __pyx_L1_error)
    }

    /* "cython/core/manifold.pyx":1362
 *                 return cobs
 * 
 *         elif peripheral_data == 'shortest':             # <<<<<<<<<<<<<<
 *             if which_cusp is not None:
 *                 raise ValueError("You must apply 'shortest' to all "
 */
    goto __pyx_L5;
  }

  /* "cython/core/manifold.pyx":1380
 * 
 *         else:
 *             return Triangulation.set_peripheral_curves(             # <<<<<<<<<<<<<<
 *                 self, peripheral_data, which_cusp,return_matrices)
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6SnapPy_Triangulation), __pyx_n_s_set_peripheral_curves); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1380, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);

    /* "cython/core/manifold.pyx":1381
 *         else:
 *             return Triangulation.set_peripheral_curves(
 *                 self, peripheral_data, which_cusp,return_matrices)             # <<<<<<<<<<<<<<
 * 
 *     def dual_curves(self, max_segments=6):
 */
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_6, ((PyObject *)__pyx_v_self), __pyx_v_peripheral_data, __pyx_v_which_cusp, __pyx_v_return_matrices};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 4+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1380, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }
  __pyx_L5:;

  /* "cython/core/manifold.pyx":1269
 *         self._cache.clear(message='Manifold.dehn_fill')
 * 
 *     def set_peripheral_curves(self, peripheral_data,             # <<<<<<<<<<<<<<
 *                               which_cusp=None, return_matrices=False):
 *         """
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.Manifold.set_peripheral_curves", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_cusps);
  __Pyx_XDECREF(__pyx_v_cobs);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_which_cusp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":1383
 *                 self, peripheral_data, which_cusp,return_matrices)
 * 
 *     def dual_curves(self, max_segments=6):             # <<<<<<<<<<<<<<
 *         """
 *         Constructs a *reasonable* selection of simple closed curves in
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_67dual_curves(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_6SnapPy_8Manifold_66dual_curves, "Manifold.dual_curves(self, max_segments=6)\n\n        Constructs a *reasonable* selection of simple closed curves in\n        a manifold's dual 1-skeleton.  In particular, it returns those\n        that appear to represent geodesics. The resulting curves can\n        be drilled out.\n\n        >>> M = Manifold('m015')\n        >>> curves = M.dual_curves()\n        >>> curves # doctest: +NUMERIC6\n        [  0: orientation-preserving curve of length 0.56239915 - 2.81543089*I,\n           1: orientation-preserving curve of length 1.12479830 + 0.65232354*I,\n           2: orientation-preserving curve of length 1.26080402 + 1.97804689*I,\n           3: orientation-preserving curve of length 1.58826933 + 1.67347167*I,\n           4: orientation-preserving curve of length 1.68719745 + 2.81543089*I]\n\n        Each curve is returned as an info object with these keys\n\n        >>> sorted(curves[0].keys())\n        ['complete_length', 'filled_length', 'index', 'max_segments', 'parity']\n\n        We can drill out any of these curves to get a new manifold\n        with one more cusp.\n\n        >>> N = M.drill(curves[0])\n        >>> (M.num_cusps(), N.num_cusps())\n        (1, 2)\n\n        By default, this function only finds curves of length 6; this\n        can be changed by specifying the optional argument\n        max_segments\n\n        >>> M.dual_curves(max_segments=2) # doctest: +NUMERIC6\n        [  0: orientation-preserving curve of length 0.56239915 - 2.81543089*I]\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_67dual_curves = {"dual_curves", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_67dual_curves, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_66dual_curves};
static PyObject *__pyx_pw_6SnapPy_8Manifold_67dual_curves(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_max_segments = 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("dual_curves (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_max_segments,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_6));
    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_max_segments);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1383, __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, "dual_curves") < 0)) __PYX_ERR(1, 1383, __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_max_segments = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dual_curves", 0, 0, 1, __pyx_nargs); __PYX_ERR(1, 1383, __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("SnapPy.Manifold.dual_curves", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_66dual_curves(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_max_segments);

  /* 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_6SnapPy_8Manifold_66dual_curves(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_max_segments) {
  int __pyx_v_i;
  int __pyx_v_num_curves;
  DualOneSkeletonCurve **__pyx_v_curve_list;
  MatrixParity __pyx_v_parity;
  Complex __pyx_v_complete_length;
  Complex __pyx_v_filled_length;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dual_curves", 1);

  /* "cython/core/manifold.pyx":1423
 *         cdef Complex complete_length, filled_length
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         dual_curves(self.c_triangulation,
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":1424
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         dual_curves(self.c_triangulation,
 *                     max_segments,
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1424, __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(1, 1424, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1423
 *         cdef Complex complete_length, filled_length
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         dual_curves(self.c_triangulation,
 */
  }

  /* "cython/core/manifold.pyx":1426
 *             raise ValueError('The Triangulation is empty.')
 *         dual_curves(self.c_triangulation,
 *                     max_segments,             # <<<<<<<<<<<<<<
 *                     &num_curves,
 *                     &curve_list)
 */
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_max_segments); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1426, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1425
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         dual_curves(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                     max_segments,
 *                     &num_curves,
 */
  dual_curves(__pyx_v_self->__pyx_base.c_triangulation, __pyx_t_3, (&__pyx_v_num_curves), (&__pyx_v_curve_list)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1425, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1429
 *                     &num_curves,
 *                     &curve_list)
 *         result = []             # <<<<<<<<<<<<<<
 *         for i from 0 <= i < num_curves:
 *             get_dual_curve_info(
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_result = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":1430
 *                     &curve_list)
 *         result = []
 *         for i from 0 <= i < num_curves:             # <<<<<<<<<<<<<<
 *             get_dual_curve_info(
 *                 curve_list[i],
 */
  __pyx_t_3 = __pyx_v_num_curves;
  for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) {

    /* "cython/core/manifold.pyx":1431
 *         result = []
 *         for i from 0 <= i < num_curves:
 *             get_dual_curve_info(             # <<<<<<<<<<<<<<
 *                 curve_list[i],
 *                 &complete_length,
 */
    get_dual_curve_info((__pyx_v_curve_list[__pyx_v_i]), (&__pyx_v_complete_length), (&__pyx_v_filled_length), (&__pyx_v_parity)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1431, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1438
 *                 )
 *             result.append(
 *                 DualCurveInfo(             # <<<<<<<<<<<<<<
 *                     index=i,
 *                     parity=parity,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DualCurveInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cython/core/manifold.pyx":1439
 *             result.append(
 *                 DualCurveInfo(
 *                     index=i,             # <<<<<<<<<<<<<<
 *                     parity=parity,
 *                     filled_length=self._number_(Complex2Number(filled_length)),
 */
    __pyx_t_4 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1439, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_index, __pyx_t_5) < 0) __PYX_ERR(1, 1439, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/manifold.pyx":1440
 *                 DualCurveInfo(
 *                     index=i,
 *                     parity=parity,             # <<<<<<<<<<<<<<
 *                     filled_length=self._number_(Complex2Number(filled_length)),
 *                     complete_length=self._number_(Complex2Number(complete_length)),
 */
    __pyx_t_5 = __Pyx_PyInt_From_MatrixParity(__pyx_v_parity); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1440, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_parity, __pyx_t_5) < 0) __PYX_ERR(1, 1439, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/manifold.pyx":1441
 *                     index=i,
 *                     parity=parity,
 *                     filled_length=self._number_(Complex2Number(filled_length)),             # <<<<<<<<<<<<<<
 *                     complete_length=self._number_(Complex2Number(complete_length)),
 *                     max_segments=max_segments
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __pyx_f_6SnapPy_Complex2Number(__pyx_v_filled_length); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 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_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1441, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_filled_length, __pyx_t_5) < 0) __PYX_ERR(1, 1439, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/manifold.pyx":1442
 *                     parity=parity,
 *                     filled_length=self._number_(Complex2Number(filled_length)),
 *                     complete_length=self._number_(Complex2Number(complete_length)),             # <<<<<<<<<<<<<<
 *                     max_segments=max_segments
 *                   )
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __pyx_f_6SnapPy_Complex2Number(__pyx_v_complete_length); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 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_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1442, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_complete_length, __pyx_t_5) < 0) __PYX_ERR(1, 1439, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/manifold.pyx":1443
 *                     filled_length=self._number_(Complex2Number(filled_length)),
 *                     complete_length=self._number_(Complex2Number(complete_length)),
 *                     max_segments=max_segments             # <<<<<<<<<<<<<<
 *                   )
 *                )
 */
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_max_segments, __pyx_v_max_segments) < 0) __PYX_ERR(1, 1439, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1438
 *                 )
 *             result.append(
 *                 DualCurveInfo(             # <<<<<<<<<<<<<<
 *                     index=i,
 *                     parity=parity,
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1438, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/manifold.pyx":1437
 *                 &parity
 *                 )
 *             result.append(             # <<<<<<<<<<<<<<
 *                 DualCurveInfo(
 *                     index=i,
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 1437, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }

  /* "cython/core/manifold.pyx":1446
 *                   )
 *                )
 *         free_dual_curves(num_curves, curve_list)             # <<<<<<<<<<<<<<
 *         return ListOnePerLine(result)
 * 
 */
  free_dual_curves(__pyx_v_num_curves, __pyx_v_curve_list); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1446, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1447
 *                )
 *         free_dual_curves(num_curves, curve_list)
 *         return ListOnePerLine(result)             # <<<<<<<<<<<<<<
 * 
 *     def length_spectrum(self,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ListOnePerLine); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = NULL;
  __pyx_t_3 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_3 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_result};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_3, 1+__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1447, __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;

  /* "cython/core/manifold.pyx":1383
 *                 self, peripheral_data, which_cusp,return_matrices)
 * 
 *     def dual_curves(self, max_segments=6):             # <<<<<<<<<<<<<<
 *         """
 *         Constructs a *reasonable* selection of simple closed curves in
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __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_AddTraceback("SnapPy.Manifold.dual_curves", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":1449
 *         return ListOnePerLine(result)
 * 
 *     def length_spectrum(self,             # <<<<<<<<<<<<<<
 *                         cutoff=1.0,
 *                         full_rigor=True,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_69length_spectrum(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_6SnapPy_8Manifold_68length_spectrum, "Manifold.length_spectrum(self, cutoff=1.0, full_rigor=True, grouped=True, include_words=False)\n\n        Returns a list of geodesics (with multiplicities) of length\n        up to the specified cutoff value. (The default cutoff is 1.0.)\n\n        Here's a quick example:\n\n        >>> L = Manifold(\"m016\").length_spectrum(0.75, include_words=True)\n        >>> L # doctest: +SKIP\n        mult  length                                  topology     parity word\n        1     0.58460368501799 +  2.49537045556047*I  circle       +      a\n        1     0.72978937305180 +  3.02669828218116*I  circle       +      Bc\n\n        Access just the length:\n\n        >>> L[0].length # doctest: +NUMERIC6\n        0.584603685017987 + 2.495370455560469*I\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_69length_spectrum = {"length_spectrum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_69length_spectrum, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_68length_spectrum};
static PyObject *__pyx_pw_6SnapPy_8Manifold_69length_spectrum(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_cutoff = 0;
  PyObject *__pyx_v_full_rigor = 0;
  PyObject *__pyx_v_grouped = 0;
  PyObject *__pyx_v_include_words = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("length_spectrum (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_cutoff,&__pyx_n_s_full_rigor,&__pyx_n_s_grouped,&__pyx_n_s_include_words,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_float_1_0));

    /* "cython/core/manifold.pyx":1451
 *     def length_spectrum(self,
 *                         cutoff=1.0,
 *                         full_rigor=True,             # <<<<<<<<<<<<<<
 *                         grouped = True,
 *                         include_words = False):
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));

    /* "cython/core/manifold.pyx":1452
 *                         cutoff=1.0,
 *                         full_rigor=True,
 *                         grouped = True,             # <<<<<<<<<<<<<<
 *                         include_words = False):
 *         """
 */
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));

    /* "cython/core/manifold.pyx":1453
 *                         full_rigor=True,
 *                         grouped = True,
 *                         include_words = False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of geodesics (with multiplicities) of length
 */
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cutoff);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1449, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_full_rigor);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1449, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_grouped);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1449, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_include_words);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1449, __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, "length_spectrum") < 0)) __PYX_ERR(1, 1449, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        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;
      }
    }
    __pyx_v_cutoff = values[0];
    __pyx_v_full_rigor = values[1];
    __pyx_v_grouped = values[2];
    __pyx_v_include_words = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("length_spectrum", 0, 0, 4, __pyx_nargs); __PYX_ERR(1, 1449, __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("SnapPy.Manifold.length_spectrum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_68length_spectrum(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_cutoff, __pyx_v_full_rigor, __pyx_v_grouped, __pyx_v_include_words);

  /* "cython/core/manifold.pyx":1449
 *         return ListOnePerLine(result)
 * 
 *     def length_spectrum(self,             # <<<<<<<<<<<<<<
 *                         cutoff=1.0,
 *                         full_rigor=True,
 */

  /* 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_6SnapPy_8Manifold_68length_spectrum(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_cutoff, PyObject *__pyx_v_full_rigor, PyObject *__pyx_v_grouped, PyObject *__pyx_v_include_words) {
  PyObject *__pyx_v_args = NULL;
  PyObject *__pyx_v_D = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("length_spectrum", 1);

  /* "cython/core/manifold.pyx":1471
 *         0.584603685017987 + 2.495370455560469*I
 *         """
 *         args = (cutoff, full_rigor, grouped, include_words)             # <<<<<<<<<<<<<<
 *         try:
 *             return self._cache.lookup('length_spectrum', *args)
 */
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_cutoff);
  __Pyx_GIVEREF(__pyx_v_cutoff);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cutoff)) __PYX_ERR(1, 1471, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_full_rigor);
  __Pyx_GIVEREF(__pyx_v_full_rigor);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_full_rigor)) __PYX_ERR(1, 1471, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_grouped);
  __Pyx_GIVEREF(__pyx_v_grouped);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_grouped)) __PYX_ERR(1, 1471, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_include_words);
  __Pyx_GIVEREF(__pyx_v_include_words);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_include_words)) __PYX_ERR(1, 1471, __pyx_L1_error);
  __pyx_v_args = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/manifold.pyx":1472
 *         """
 *         args = (cutoff, full_rigor, grouped, include_words)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('length_spectrum', *args)
 *         except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    /*try:*/ {

      /* "cython/core/manifold.pyx":1473
 *         args = (cutoff, full_rigor, grouped, include_words)
 *         try:
 *             return self._cache.lookup('length_spectrum', *args)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._cache, __pyx_n_s_lookup); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1473, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PyNumber_Add(__pyx_tuple__100, __pyx_v_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1473, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1473, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_6;
      __pyx_t_6 = 0;
      goto __pyx_L7_try_return;

      /* "cython/core/manifold.pyx":1472
 *         """
 *         args = (cutoff, full_rigor, grouped, include_words)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('length_spectrum', *args)
 *         except KeyError:
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "cython/core/manifold.pyx":1474
 *         try:
 *             return self._cache.lookup('length_spectrum', *args)
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             pass
 *         D = self.dirichlet_domain(include_words = include_words)
 */
    __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_7) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L4_exception_handled;
    }
    goto __pyx_L5_except_error;

    /* "cython/core/manifold.pyx":1472
 *         """
 *         args = (cutoff, full_rigor, grouped, include_words)
 *         try:             # <<<<<<<<<<<<<<
 *             return self._cache.lookup('length_spectrum', *args)
 *         except KeyError:
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    goto __pyx_L0;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  }

  /* "cython/core/manifold.pyx":1476
 *         except KeyError:
 *             pass
 *         D = self.dirichlet_domain(include_words = include_words)             # <<<<<<<<<<<<<<
 *         return self._cache.save(
 *             D.length_spectrum_dicts(
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dirichlet_domain); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_include_words, __pyx_v_include_words) < 0) __PYX_ERR(1, 1476, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_D = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/manifold.pyx":1477
 *             pass
 *         D = self.dirichlet_domain(include_words = include_words)
 *         return self._cache.save(             # <<<<<<<<<<<<<<
 *             D.length_spectrum_dicts(
 *                 cutoff_length = cutoff,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->__pyx_base._cache, __pyx_n_s_save); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "cython/core/manifold.pyx":1478
 *         D = self.dirichlet_domain(include_words = include_words)
 *         return self._cache.save(
 *             D.length_spectrum_dicts(             # <<<<<<<<<<<<<<
 *                 cutoff_length = cutoff,
 *                 full_rigor = full_rigor,
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_D, __pyx_n_s_length_spectrum_dicts); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cython/core/manifold.pyx":1479
 *         return self._cache.save(
 *             D.length_spectrum_dicts(
 *                 cutoff_length = cutoff,             # <<<<<<<<<<<<<<
 *                 full_rigor = full_rigor,
 *                 grouped = grouped),
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_cutoff_length, __pyx_v_cutoff) < 0) __PYX_ERR(1, 1479, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1480
 *             D.length_spectrum_dicts(
 *                 cutoff_length = cutoff,
 *                 full_rigor = full_rigor,             # <<<<<<<<<<<<<<
 *                 grouped = grouped),
 *             'length_spectrum',
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_full_rigor, __pyx_v_full_rigor) < 0) __PYX_ERR(1, 1479, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1481
 *                 cutoff_length = cutoff,
 *                 full_rigor = full_rigor,
 *                 grouped = grouped),             # <<<<<<<<<<<<<<
 *             'length_spectrum',
 *             *args)
 */
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_grouped, __pyx_v_grouped) < 0) __PYX_ERR(1, 1479, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1478
 *         D = self.dirichlet_domain(include_words = include_words)
 *         return self._cache.save(
 *             D.length_spectrum_dicts(             # <<<<<<<<<<<<<<
 *                 cutoff_length = cutoff,
 *                 full_rigor = full_rigor,
 */
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cython/core/manifold.pyx":1477
 *             pass
 *         D = self.dirichlet_domain(include_words = include_words)
 *         return self._cache.save(             # <<<<<<<<<<<<<<
 *             D.length_spectrum_dicts(
 *                 cutoff_length = cutoff,
 */
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_8);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8)) __PYX_ERR(1, 1477, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_length_spectrum);
  __Pyx_GIVEREF(__pyx_n_s_length_spectrum);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_length_spectrum)) __PYX_ERR(1, 1477, __pyx_L1_error);
  __pyx_t_8 = 0;

  /* "cython/core/manifold.pyx":1483
 *                 grouped = grouped),
 *             'length_spectrum',
 *             *args)             # <<<<<<<<<<<<<<
 * 
 *     def drill(self, which_curve, max_segments=6):
 */
  __pyx_t_8 = PyNumber_Add(__pyx_t_6, __pyx_v_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cython/core/manifold.pyx":1477
 *             pass
 *         D = self.dirichlet_domain(include_words = include_words)
 *         return self._cache.save(             # <<<<<<<<<<<<<<
 *             D.length_spectrum_dicts(
 *                 cutoff_length = cutoff,
 */
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":1449
 *         return ListOnePerLine(result)
 * 
 *     def length_spectrum(self,             # <<<<<<<<<<<<<<
 *                         cutoff=1.0,
 *                         full_rigor=True,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("SnapPy.Manifold.length_spectrum", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_args);
  __Pyx_XDECREF(__pyx_v_D);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":1485
 *             *args)
 * 
 *     def drill(self, which_curve, max_segments=6):             # <<<<<<<<<<<<<<
 *         """
 *         Drills out the specified dual curve from among all dual curves
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_71drill(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_6SnapPy_8Manifold_70drill, "Manifold.drill(self, which_curve, max_segments=6)\n\n        Drills out the specified dual curve from among all dual curves\n        with at most max_segments, which defaults to 6. The method\n        dual_curve allows one to see the properties of curves before\n        choosing which one to drill out.\n\n        >>> M = Manifold('v3000')\n        >>> N = M.drill(0, max_segments=3)\n        >>> (M.num_cusps(), N.num_cusps())\n        (1, 2)\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_71drill = {"drill", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_71drill, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_70drill};
static PyObject *__pyx_pw_6SnapPy_8Manifold_71drill(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_which_curve = 0;
  PyObject *__pyx_v_max_segments = 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("drill (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_which_curve,&__pyx_n_s_max_segments,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_6));
    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_which_curve)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1485, __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_max_segments);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1485, __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, "drill") < 0)) __PYX_ERR(1, 1485, __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_which_curve = values[0];
    __pyx_v_max_segments = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("drill", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 1485, __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("SnapPy.Manifold.drill", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_70drill(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_which_curve, __pyx_v_max_segments);

  /* 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_6SnapPy_8Manifold_70drill(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_which_curve, PyObject *__pyx_v_max_segments) {
  int __pyx_v_num_curves;
  DualOneSkeletonCurve **__pyx_v_curve_list;
  Triangulation *__pyx_v_c_triangulation;
  struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_result = 0;
  char *__pyx_v_c_new_name;
  PyObject *__pyx_v_new_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  char *__pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Triangulation *__pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("drill", 0);
  __Pyx_INCREF(__pyx_v_which_curve);
  __Pyx_INCREF(__pyx_v_max_segments);

  /* "cython/core/manifold.pyx":1504
 *         cdef char* c_new_name
 * 
 *         if isinstance(which_curve, DualCurveInfo):             # <<<<<<<<<<<<<<
 *             max_segments = which_curve.max_segments
 *             which_curve = which_curve.index
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DualCurveInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_IsInstance(__pyx_v_which_curve, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 1504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cython/core/manifold.pyx":1505
 * 
 *         if isinstance(which_curve, DualCurveInfo):
 *             max_segments = which_curve.max_segments             # <<<<<<<<<<<<<<
 *             which_curve = which_curve.index
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_which_curve, __pyx_n_s_max_segments); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_max_segments, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cython/core/manifold.pyx":1506
 *         if isinstance(which_curve, DualCurveInfo):
 *             max_segments = which_curve.max_segments
 *             which_curve = which_curve.index             # <<<<<<<<<<<<<<
 * 
 *         new_name = to_byte_str(self.name() + '-%d' % which_curve)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_which_curve, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_which_curve, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cython/core/manifold.pyx":1504
 *         cdef char* c_new_name
 * 
 *         if isinstance(which_curve, DualCurveInfo):             # <<<<<<<<<<<<<<
 *             max_segments = which_curve.max_segments
 *             which_curve = which_curve.index
 */
  }

  /* "cython/core/manifold.pyx":1508
 *             which_curve = which_curve.index
 * 
 *         new_name = to_byte_str(self.name() + '-%d' % which_curve)             # <<<<<<<<<<<<<<
 *         c_new_name = new_name
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_to_byte_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = __Pyx_PyString_FormatSafe(__pyx_kp_s_d_3, __pyx_v_which_curve); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_6};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1508, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_new_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/manifold.pyx":1509
 * 
 *         new_name = to_byte_str(self.name() + '-%d' % which_curve)
 *         c_new_name = new_name             # <<<<<<<<<<<<<<
 * 
 *         dual_curves(self.c_triangulation,
 */
  __pyx_t_8 = __Pyx_PyObject_AsWritableString(__pyx_v_new_name); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(1, 1509, __pyx_L1_error)
  __pyx_v_c_new_name = __pyx_t_8;

  /* "cython/core/manifold.pyx":1512
 * 
 *         dual_curves(self.c_triangulation,
 *                     max_segments,             # <<<<<<<<<<<<<<
 *                     &num_curves,
 *                     &curve_list)
 */
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_max_segments); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1512, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1511
 *         c_new_name = new_name
 * 
 *         dual_curves(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                     max_segments,
 *                     &num_curves,
 */
  dual_curves(__pyx_v_self->__pyx_base.c_triangulation, __pyx_t_7, (&__pyx_v_num_curves), (&__pyx_v_curve_list)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1511, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1516
 *                     &curve_list)
 * 
 *         if which_curve not in range(num_curves):             # <<<<<<<<<<<<<<
 *             raise IndexError('The drilling curve requested is not '
 *                              'in range(%d).' % num_curves)
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_num_curves); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1516, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_which_curve, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 1516, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "cython/core/manifold.pyx":1518
 *         if which_curve not in range(num_curves):
 *             raise IndexError('The drilling curve requested is not '
 *                              'in range(%d).' % num_curves)             # <<<<<<<<<<<<<<
 * 
 *         c_triangulation = drill_cusp(self.c_triangulation,
 */
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_num_curves); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_The_drilling_curve_requested_is, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1518, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/manifold.pyx":1517
 * 
 *         if which_curve not in range(num_curves):
 *             raise IndexError('The drilling curve requested is not '             # <<<<<<<<<<<<<<
 *                              'in range(%d).' % num_curves)
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1517, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(1, 1517, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1516
 *                     &curve_list)
 * 
 *         if which_curve not in range(num_curves):             # <<<<<<<<<<<<<<
 *             raise IndexError('The drilling curve requested is not '
 *                              'in range(%d).' % num_curves)
 */
  }

  /* "cython/core/manifold.pyx":1521
 * 
 *         c_triangulation = drill_cusp(self.c_triangulation,
 *                                      curve_list[which_curve],             # <<<<<<<<<<<<<<
 *                                      c_new_name)
 *         free_dual_curves(num_curves, curve_list)
 */
  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_which_curve); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1521, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1520
 *                              'in range(%d).' % num_curves)
 * 
 *         c_triangulation = drill_cusp(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                      curve_list[which_curve],
 *                                      c_new_name)
 */
  __pyx_t_10 = drill_cusp(__pyx_v_self->__pyx_base.c_triangulation, (__pyx_v_curve_list[__pyx_t_9]), __pyx_v_c_new_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1520, __pyx_L1_error)
  __pyx_v_c_triangulation = __pyx_t_10;

  /* "cython/core/manifold.pyx":1523
 *                                      curve_list[which_curve],
 *                                      c_new_name)
 *         free_dual_curves(num_curves, curve_list)             # <<<<<<<<<<<<<<
 * 
 *         if c_triangulation == NULL:
 */
  free_dual_curves(__pyx_v_num_curves, __pyx_v_curve_list); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1523, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1525
 *         free_dual_curves(num_curves, curve_list)
 * 
 *         if c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('The curve is not isotopic to a geodesic.')
 *         else:
 */
  __pyx_t_2 = (__pyx_v_c_triangulation == NULL);
  if (unlikely(__pyx_t_2)) {

    /* "cython/core/manifold.pyx":1526
 * 
 *         if c_triangulation == NULL:
 *             raise RuntimeError('The curve is not isotopic to a geodesic.')             # <<<<<<<<<<<<<<
 *         else:
 *             result = self.__class__('empty')
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1526, __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(1, 1526, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1525
 *         free_dual_curves(num_curves, curve_list)
 * 
 *         if c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('The curve is not isotopic to a geodesic.')
 *         else:
 */
  }

  /* "cython/core/manifold.pyx":1528
 *             raise RuntimeError('The curve is not isotopic to a geodesic.')
 *         else:
 *             result = self.__class__('empty')             # <<<<<<<<<<<<<<
 *             result.set_c_triangulation(c_triangulation)
 *             return result
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1528, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_n_s_empty};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1528, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6SnapPy_Triangulation))))) __PYX_ERR(1, 1528, __pyx_L1_error)
    __pyx_v_result = ((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "cython/core/manifold.pyx":1529
 *         else:
 *             result = self.__class__('empty')
 *             result.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 *             return result
 * 
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_result->__pyx_vtab)->set_c_triangulation(__pyx_v_result, __pyx_v_c_triangulation); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1529, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/manifold.pyx":1530
 *             result = self.__class__('empty')
 *             result.set_c_triangulation(c_triangulation)
 *             return result             # <<<<<<<<<<<<<<
 * 
 *     def is_isometric_to(self, Manifold other, return_isometries=False):
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_result);
    __pyx_r = ((PyObject *)__pyx_v_result);
    goto __pyx_L0;
  }

  /* "cython/core/manifold.pyx":1485
 *             *args)
 * 
 *     def drill(self, which_curve, max_segments=6):             # <<<<<<<<<<<<<<
 *         """
 *         Drills out the specified dual curve from among all dual curves
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.Manifold.drill", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_new_name);
  __Pyx_XDECREF(__pyx_v_which_curve);
  __Pyx_XDECREF(__pyx_v_max_segments);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":1532
 *             return result
 * 
 *     def is_isometric_to(self, Manifold other, return_isometries=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns True if M and N are isometric, False if they not.  A
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_73is_isometric_to(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_6SnapPy_8Manifold_72is_isometric_to, "Manifold.is_isometric_to(self, Manifold other, return_isometries=False)\n\n        Returns True if M and N are isometric, False if they not.  A\n        RuntimeError is raised in cases where the SnapPea kernel fails\n        to determine either answer.  (This is fairly common for closed\n        manifolds.)\n\n        >>> M = Manifold('m004')\n        >>> N = Manifold('4_1')\n        >>> K = Manifold('5_2')\n        >>> M.is_isometric_to(N)\n        True\n        >>> N.is_isometric_to(K)\n        False\n\n        We can also get a complete list of isometries between the two\n        manifolds:\n\n        >>> M = Manifold('5^2_1')  # The Whitehead link\n        >>> N = Manifold('m129')\n        >>> isoms = M.is_isometric_to(N, return_isometries = True)\n        >>> isoms[6]  # Includes action on cusps\n        0 -> 1  1 -> 0\n        [1  2]  [-1 -2]\n        [0 -1]  [ 0  1]\n        Extends to link\n\n        Each transformation between cusps is given by a matrix which\n        acts on the left.  That is, the two *columns* of the matrix\n        give the image of the meridian and longitude respectively.  In\n        the above example, the meridian of cusp 0 is sent to the\n        meridian of cusp 1.\n\n        Note: The answer True is rigorous, but the answer False may\n        not be as there could be numerical errors resulting in finding\n        an incorrect canonical triangulation.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_73is_isometric_to = {"is_isometric_to", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_73is_isometric_to, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_72is_isometric_to};
static PyObject *__pyx_pw_6SnapPy_8Manifold_73is_isometric_to(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_6SnapPy_Manifold *__pyx_v_other = 0;
  PyObject *__pyx_v_return_isometries = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_isometric_to (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_other,&__pyx_n_s_return_isometries,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    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_other)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1532, __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_return_isometries);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1532, __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, "is_isometric_to") < 0)) __PYX_ERR(1, 1532, __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_other = ((struct __pyx_obj_6SnapPy_Manifold *)values[0]);
    __pyx_v_return_isometries = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_isometric_to", 0, 1, 2, __pyx_nargs); __PYX_ERR(1, 1532, __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("SnapPy.Manifold.is_isometric_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_6SnapPy_Manifold, 1, "other", 0))) __PYX_ERR(1, 1532, __pyx_L1_error)
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_72is_isometric_to(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_other, __pyx_v_return_isometries);

  /* 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_6SnapPy_8Manifold_72is_isometric_to(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, struct __pyx_obj_6SnapPy_Manifold *__pyx_v_other, PyObject *__pyx_v_return_isometries) {
  Boolean __pyx_v_are_isometric;
  FuncResult __pyx_v_result;
  IsometryList *__pyx_v_isometries;
  PyObject *__pyx_v_ans = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  FuncResult __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_isometric_to", 1);

  /* "cython/core/manifold.pyx":1571
 *         cdef Boolean are_isometric
 *         cdef c_FuncResult result
 *         cdef IsometryList *isometries = NULL             # <<<<<<<<<<<<<<
 * 
 *         if self.c_triangulation is NULL or other.c_triangulation is NULL:
 */
  __pyx_v_isometries = NULL;

  /* "cython/core/manifold.pyx":1573
 *         cdef IsometryList *isometries = NULL
 * 
 *         if self.c_triangulation is NULL or other.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('Manifolds must be non-empty.')
 * 
 */
  __pyx_t_2 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_other->__pyx_base.c_triangulation == NULL);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":1574
 * 
 *         if self.c_triangulation is NULL or other.c_triangulation is NULL:
 *             raise ValueError('Manifolds must be non-empty.')             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1574, __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(1, 1574, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1573
 *         cdef IsometryList *isometries = NULL
 * 
 *         if self.c_triangulation is NULL or other.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('Manifolds must be non-empty.')
 * 
 */
  }

  /* "cython/core/manifold.pyx":1576
 *             raise ValueError('Manifolds must be non-empty.')
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if self.homology() != other.homology():
 *                 if return_isometries:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    /*try:*/ {

      /* "cython/core/manifold.pyx":1577
 * 
 *         try:
 *             if self.homology() != other.homology():             # <<<<<<<<<<<<<<
 *                 if return_isometries:
 *                     return []
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_homology); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1577, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_7);
      __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, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1577, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_homology); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1577, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = NULL;
      __pyx_t_9 = 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_9 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
        __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1577, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_t_7, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1577, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1577, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (__pyx_t_1) {

        /* "cython/core/manifold.pyx":1578
 *         try:
 *             if self.homology() != other.homology():
 *                 if return_isometries:             # <<<<<<<<<<<<<<
 *                     return []
 *                 else:
 */
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_return_isometries); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1578, __pyx_L6_error)
        if (__pyx_t_1) {

          /* "cython/core/manifold.pyx":1579
 *             if self.homology() != other.homology():
 *                 if return_isometries:
 *                     return []             # <<<<<<<<<<<<<<
 *                 else:
 *                     return False
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1579, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_r = __pyx_t_8;
          __pyx_t_8 = 0;
          goto __pyx_L10_try_return;

          /* "cython/core/manifold.pyx":1578
 *         try:
 *             if self.homology() != other.homology():
 *                 if return_isometries:             # <<<<<<<<<<<<<<
 *                     return []
 *                 else:
 */
        }

        /* "cython/core/manifold.pyx":1581
 *                     return []
 *                 else:
 *                     return False             # <<<<<<<<<<<<<<
 *         except ValueError:
 *             pass
 */
        /*else*/ {
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(Py_False);
          __pyx_r = Py_False;
          goto __pyx_L10_try_return;
        }

        /* "cython/core/manifold.pyx":1577
 * 
 *         try:
 *             if self.homology() != other.homology():             # <<<<<<<<<<<<<<
 *                 if return_isometries:
 *                     return []
 */
      }

      /* "cython/core/manifold.pyx":1576
 *             raise ValueError('Manifolds must be non-empty.')
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if self.homology() != other.homology():
 *                 if return_isometries:
 */
    }
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L11_try_end;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cython/core/manifold.pyx":1582
 *                 else:
 *                     return False
 *         except ValueError:             # <<<<<<<<<<<<<<
 *             pass
 * 
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_9) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L7_exception_handled;
    }
    goto __pyx_L8_except_error;

    /* "cython/core/manifold.pyx":1576
 *             raise ValueError('Manifolds must be non-empty.')
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if self.homology() != other.homology():
 *                 if return_isometries:
 */
    __pyx_L8_except_error:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    goto __pyx_L1_error;
    __pyx_L10_try_return:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    goto __pyx_L0;
    __pyx_L7_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    __pyx_L11_try_end:;
  }

  /* "cython/core/manifold.pyx":1585
 *             pass
 * 
 *         if return_isometries:             # <<<<<<<<<<<<<<
 *             result = compute_isometries(self.c_triangulation,
 *                                         other.c_triangulation,
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_return_isometries); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1585, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":1586
 * 
 *         if return_isometries:
 *             result = compute_isometries(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                         other.c_triangulation,
 *                                         &are_isometric,
 */
    __pyx_t_11 = compute_isometries(__pyx_v_self->__pyx_base.c_triangulation, __pyx_v_other->__pyx_base.c_triangulation, (&__pyx_v_are_isometric), (&__pyx_v_isometries), NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1586, __pyx_L1_error)
    __pyx_v_result = __pyx_t_11;

    /* "cython/core/manifold.pyx":1585
 *             pass
 * 
 *         if return_isometries:             # <<<<<<<<<<<<<<
 *             result = compute_isometries(self.c_triangulation,
 *                                         other.c_triangulation,
 */
    goto __pyx_L14;
  }

  /* "cython/core/manifold.pyx":1591
 *                                         &isometries, NULL)
 *         else:
 *             result = compute_isometries(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                         other.c_triangulation,
 *                                         &are_isometric, NULL, NULL)
 */
  /*else*/ {

    /* "cython/core/manifold.pyx":1593
 *             result = compute_isometries(self.c_triangulation,
 *                                         other.c_triangulation,
 *                                         &are_isometric, NULL, NULL)             # <<<<<<<<<<<<<<
 * 
 *         if FuncResult[result] == 'func_bad_input':
 */
    __pyx_t_11 = compute_isometries(__pyx_v_self->__pyx_base.c_triangulation, __pyx_v_other->__pyx_base.c_triangulation, (&__pyx_v_are_isometric), NULL, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1591, __pyx_L1_error)
    __pyx_v_result = __pyx_t_11;
  }
  __pyx_L14:;

  /* "cython/core/manifold.pyx":1595
 *                                         &are_isometric, NULL, NULL)
 * 
 *         if FuncResult[result] == 'func_bad_input':             # <<<<<<<<<<<<<<
 *             raise ValueError('The Dehn filling coefficients must be '
 *                              'relatively prime integers.')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_FuncResult); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_7 = __Pyx_PyInt_From_FuncResult(__pyx_v_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1595, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_func_bad_input, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1595, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":1596
 * 
 *         if FuncResult[result] == 'func_bad_input':
 *             raise ValueError('The Dehn filling coefficients must be '             # <<<<<<<<<<<<<<
 *                              'relatively prime integers.')
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1596, __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(1, 1596, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1595
 *                                         &are_isometric, NULL, NULL)
 * 
 *         if FuncResult[result] == 'func_bad_input':             # <<<<<<<<<<<<<<
 *             raise ValueError('The Dehn filling coefficients must be '
 *                              'relatively prime integers.')
 */
  }

  /* "cython/core/manifold.pyx":1599
 *                              'relatively prime integers.')
 * 
 *         if FuncResult[result] == 'func_failed':             # <<<<<<<<<<<<<<
 *             raise RuntimeError('The SnapPea kernel was not able to '
 *                                'determine if the manifolds are isometric.')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FuncResult); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = __Pyx_PyInt_From_FuncResult(__pyx_v_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_n_s_func_failed, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1599, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":1600
 * 
 *         if FuncResult[result] == 'func_failed':
 *             raise RuntimeError('The SnapPea kernel was not able to '             # <<<<<<<<<<<<<<
 *                                'determine if the manifolds are isometric.')
 * 
 */
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1600, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_Raise(__pyx_t_8, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __PYX_ERR(1, 1600, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1599
 *                              'relatively prime integers.')
 * 
 *         if FuncResult[result] == 'func_failed':             # <<<<<<<<<<<<<<
 *             raise RuntimeError('The SnapPea kernel was not able to '
 *                                'determine if the manifolds are isometric.')
 */
  }

  /* "cython/core/manifold.pyx":1603
 *                                'determine if the manifolds are isometric.')
 * 
 *         ans = bool(are_isometric)             # <<<<<<<<<<<<<<
 * 
 *         if return_isometries:
 */
  __pyx_t_8 = __Pyx_PyInt_From_Boolean(__pyx_v_are_isometric); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1603, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1603, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_v_ans = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "cython/core/manifold.pyx":1605
 *         ans = bool(are_isometric)
 * 
 *         if return_isometries:             # <<<<<<<<<<<<<<
 *             if not ans:
 *                 return []
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_return_isometries); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1605, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":1606
 * 
 *         if return_isometries:
 *             if not ans:             # <<<<<<<<<<<<<<
 *                 return []
 *             else:
 */
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ans); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1606, __pyx_L1_error)
    __pyx_t_2 = (!__pyx_t_1);
    if (__pyx_t_2) {

      /* "cython/core/manifold.pyx":1607
 *         if return_isometries:
 *             if not ans:
 *                 return []             # <<<<<<<<<<<<<<
 *             else:
 *                 if isometries is NULL:  # means manifold is closed
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_r = __pyx_t_8;
      __pyx_t_8 = 0;
      goto __pyx_L0;

      /* "cython/core/manifold.pyx":1606
 * 
 *         if return_isometries:
 *             if not ans:             # <<<<<<<<<<<<<<
 *                 return []
 *             else:
 */
    }

    /* "cython/core/manifold.pyx":1609
 *                 return []
 *             else:
 *                 if isometries is NULL:  # means manifold is closed             # <<<<<<<<<<<<<<
 *                     raise ValueError("Can't get the list of isometries for closed manifolds")
 *                 ans = IsometryListToIsometries(isometries)
 */
    /*else*/ {
      __pyx_t_2 = (__pyx_v_isometries == NULL);
      if (unlikely(__pyx_t_2)) {

        /* "cython/core/manifold.pyx":1610
 *             else:
 *                 if isometries is NULL:  # means manifold is closed
 *                     raise ValueError("Can't get the list of isometries for closed manifolds")             # <<<<<<<<<<<<<<
 *                 ans = IsometryListToIsometries(isometries)
 *                 free_isometry_list(isometries)
 */
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__104, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_Raise(__pyx_t_8, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __PYX_ERR(1, 1610, __pyx_L1_error)

        /* "cython/core/manifold.pyx":1609
 *                 return []
 *             else:
 *                 if isometries is NULL:  # means manifold is closed             # <<<<<<<<<<<<<<
 *                     raise ValueError("Can't get the list of isometries for closed manifolds")
 *                 ans = IsometryListToIsometries(isometries)
 */
      }

      /* "cython/core/manifold.pyx":1611
 *                 if isometries is NULL:  # means manifold is closed
 *                     raise ValueError("Can't get the list of isometries for closed manifolds")
 *                 ans = IsometryListToIsometries(isometries)             # <<<<<<<<<<<<<<
 *                 free_isometry_list(isometries)
 * 
 */
      __pyx_t_8 = __pyx_f_6SnapPy_IsometryListToIsometries(__pyx_v_isometries); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1611, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_ans, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "cython/core/manifold.pyx":1612
 *                     raise ValueError("Can't get the list of isometries for closed manifolds")
 *                 ans = IsometryListToIsometries(isometries)
 *                 free_isometry_list(isometries)             # <<<<<<<<<<<<<<
 * 
 *         return ans
 */
      free_isometry_list(__pyx_v_isometries); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1612, __pyx_L1_error)
    }

    /* "cython/core/manifold.pyx":1605
 *         ans = bool(are_isometric)
 * 
 *         if return_isometries:             # <<<<<<<<<<<<<<
 *             if not ans:
 *                 return []
 */
  }

  /* "cython/core/manifold.pyx":1614
 *                 free_isometry_list(isometries)
 * 
 *         return ans             # <<<<<<<<<<<<<<
 * 
 *     def is_two_bridge(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ans);
  __pyx_r = __pyx_v_ans;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":1532
 *             return result
 * 
 *     def is_isometric_to(self, Manifold other, return_isometries=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns True if M and N are isometric, False if they not.  A
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("SnapPy.Manifold.is_isometric_to", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ans);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":1616
 *         return ans
 * 
 *     def is_two_bridge(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the manifold is the complement of a two-bridge knot or link
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_75is_two_bridge(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_6SnapPy_8Manifold_74is_two_bridge, "Manifold.is_two_bridge(self)\n\n        If the manifold is the complement of a two-bridge knot or link\n        in S^3, then this method returns (p,q) where p/q is the\n        fraction describing the link.  Otherwise, returns False.\n\n        >>> M = Manifold('m004')\n        >>> M.is_two_bridge()\n        (2, 5)\n        >>> M = Manifold('m016')\n        >>> M.is_two_bridge()\n        False\n\n        Note: An answer of 'True' is rigorous, but not the answer\n        'False', as there could be numerical errors resulting in\n        finding an incorrect canonical triangulation.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_75is_two_bridge = {"is_two_bridge", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_75is_two_bridge, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_74is_two_bridge};
static PyObject *__pyx_pw_6SnapPy_8Manifold_75is_two_bridge(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("is_two_bridge (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("is_two_bridge", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_two_bridge", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_74is_two_bridge(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_8Manifold_74is_two_bridge(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self) {
  Boolean __pyx_v_is_two_bridge;
  long __pyx_v_p;
  long __pyx_v_q;
  Triangulation *__pyx_v_c_canonized_triangulation;
  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("is_two_bridge", 1);

  /* "cython/core/manifold.pyx":1637
 *         cdef c_Triangulation *c_canonized_triangulation
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":1638
 * 
 *         if self.c_triangulation is NULL:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         copy_triangulation(self.c_triangulation, &c_canonized_triangulation)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":1637
 *         cdef c_Triangulation *c_canonized_triangulation
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
  }

  /* "cython/core/manifold.pyx":1640
 *             return False
 * 
 *         copy_triangulation(self.c_triangulation, &c_canonized_triangulation)             # <<<<<<<<<<<<<<
 *         proto_canonize(c_canonized_triangulation)
 *         two_bridge(c_canonized_triangulation, &is_two_bridge, &p, &q)
 */
  copy_triangulation(__pyx_v_self->__pyx_base.c_triangulation, (&__pyx_v_c_canonized_triangulation)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1640, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1641
 * 
 *         copy_triangulation(self.c_triangulation, &c_canonized_triangulation)
 *         proto_canonize(c_canonized_triangulation)             # <<<<<<<<<<<<<<
 *         two_bridge(c_canonized_triangulation, &is_two_bridge, &p, &q)
 *         free_triangulation(c_canonized_triangulation)
 */
  proto_canonize(__pyx_v_c_canonized_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1641, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1642
 *         copy_triangulation(self.c_triangulation, &c_canonized_triangulation)
 *         proto_canonize(c_canonized_triangulation)
 *         two_bridge(c_canonized_triangulation, &is_two_bridge, &p, &q)             # <<<<<<<<<<<<<<
 *         free_triangulation(c_canonized_triangulation)
 *         if is_two_bridge:
 */
  two_bridge(__pyx_v_c_canonized_triangulation, (&__pyx_v_is_two_bridge), (&__pyx_v_p), (&__pyx_v_q)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1642, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1643
 *         proto_canonize(c_canonized_triangulation)
 *         two_bridge(c_canonized_triangulation, &is_two_bridge, &p, &q)
 *         free_triangulation(c_canonized_triangulation)             # <<<<<<<<<<<<<<
 *         if is_two_bridge:
 *             return (p,q)
 */
  free_triangulation(__pyx_v_c_canonized_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1643, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1644
 *         two_bridge(c_canonized_triangulation, &is_two_bridge, &p, &q)
 *         free_triangulation(c_canonized_triangulation)
 *         if is_two_bridge:             # <<<<<<<<<<<<<<
 *             return (p,q)
 *         else:
 */
  __pyx_t_1 = (__pyx_v_is_two_bridge != 0);
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":1645
 *         free_triangulation(c_canonized_triangulation)
 *         if is_two_bridge:
 *             return (p,q)             # <<<<<<<<<<<<<<
 *         else:
 *             return False
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_p); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_q); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1645, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1645, __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(1, 1645, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(1, 1645, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;

    /* "cython/core/manifold.pyx":1644
 *         two_bridge(c_canonized_triangulation, &is_two_bridge, &p, &q)
 *         free_triangulation(c_canonized_triangulation)
 *         if is_two_bridge:             # <<<<<<<<<<<<<<
 *             return (p,q)
 *         else:
 */
  }

  /* "cython/core/manifold.pyx":1647
 *             return (p,q)
 *         else:
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     def _choose_generators(self, compute_corners, centroid_at_origin):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;
  }

  /* "cython/core/manifold.pyx":1616
 *         return ans
 * 
 *     def is_two_bridge(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the manifold is the complement of a two-bridge knot or link
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("SnapPy.Manifold.is_two_bridge", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":1649
 *             return False
 * 
 *     def _choose_generators(self, compute_corners, centroid_at_origin):             # <<<<<<<<<<<<<<
 *         choose_generators(self.c_triangulation,
 *                           compute_corners,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_77_choose_generators(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_6SnapPy_8Manifold_76_choose_generators, "Manifold._choose_generators(self, compute_corners, centroid_at_origin)");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_77_choose_generators = {"_choose_generators", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_77_choose_generators, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_76_choose_generators};
static PyObject *__pyx_pw_6SnapPy_8Manifold_77_choose_generators(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_compute_corners = 0;
  PyObject *__pyx_v_centroid_at_origin = 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("_choose_generators (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_compute_corners,&__pyx_n_s_centroid_at_origin,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_compute_corners)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1649, __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_centroid_at_origin)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1649, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_choose_generators", 1, 2, 2, 1); __PYX_ERR(1, 1649, __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, "_choose_generators") < 0)) __PYX_ERR(1, 1649, __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_compute_corners = values[0];
    __pyx_v_centroid_at_origin = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_choose_generators", 1, 2, 2, __pyx_nargs); __PYX_ERR(1, 1649, __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("SnapPy.Manifold._choose_generators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_76_choose_generators(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_compute_corners, __pyx_v_centroid_at_origin);

  /* 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_6SnapPy_8Manifold_76_choose_generators(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_compute_corners, PyObject *__pyx_v_centroid_at_origin) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Boolean __pyx_t_1;
  Boolean __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_choose_generators", 1);

  /* "cython/core/manifold.pyx":1651
 *     def _choose_generators(self, compute_corners, centroid_at_origin):
 *         choose_generators(self.c_triangulation,
 *                           compute_corners,             # <<<<<<<<<<<<<<
 *                           centroid_at_origin)
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_Boolean(__pyx_v_compute_corners); if (unlikely((__pyx_t_1 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(1, 1651, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1652
 *         choose_generators(self.c_triangulation,
 *                           compute_corners,
 *                           centroid_at_origin)             # <<<<<<<<<<<<<<
 * 
 *     def _choose_generators_info(self):
 */
  __pyx_t_2 = __Pyx_PyInt_As_Boolean(__pyx_v_centroid_at_origin); if (unlikely((__pyx_t_2 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(1, 1652, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1650
 * 
 *     def _choose_generators(self, compute_corners, centroid_at_origin):
 *         choose_generators(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                           compute_corners,
 *                           centroid_at_origin)
 */
  choose_generators(__pyx_v_self->__pyx_base.c_triangulation, __pyx_t_1, __pyx_t_2);

  /* "cython/core/manifold.pyx":1649
 *             return False
 * 
 *     def _choose_generators(self, compute_corners, centroid_at_origin):             # <<<<<<<<<<<<<<
 *         choose_generators(self.c_triangulation,
 *                           compute_corners,
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("SnapPy.Manifold._choose_generators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":1654
 *                           centroid_at_origin)
 * 
 *     def _choose_generators_info(self):             # <<<<<<<<<<<<<<
 *         """
 *         Extracts, from the bowels of SnapPea, the information about the
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_79_choose_generators_info(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_6SnapPy_8Manifold_78_choose_generators_info, "Manifold._choose_generators_info(self)\n\n        Extracts, from the bowels of SnapPea, the information about the\n        underlying generators of the fundamental group.  Returns a\n        list with one entry for each tetrahedra.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_79_choose_generators_info = {"_choose_generators_info", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_79_choose_generators_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_78_choose_generators_info};
static PyObject *__pyx_pw_6SnapPy_8Manifold_79_choose_generators_info(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("_choose_generators_info (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("_choose_generators_info", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_choose_generators_info", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_78_choose_generators_info(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_8Manifold_78_choose_generators_info(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self) {
  int __pyx_v_generator_path;
  int __pyx_v_face0_gen;
  int __pyx_v_face1_gen;
  int __pyx_v_face2_gen;
  int __pyx_v_face3_gen;
  Complex __pyx_v_c0;
  Complex __pyx_v_c1;
  Complex __pyx_v_c2;
  Complex __pyx_v_c3;
  int __pyx_v_neighbor0_idx;
  int __pyx_v_neighbor1_idx;
  int __pyx_v_neighbor2_idx;
  int __pyx_v_neighbor3_idx;
  int __pyx_v_perm0;
  int __pyx_v_perm1;
  int __pyx_v_perm2;
  int __pyx_v_perm3;
  PyObject *__pyx_v_ans = NULL;
  PyObject *__pyx_v_i = NULL;
  long __pyx_9genexpr55__pyx_v_i;
  long __pyx_9genexpr56__pyx_v_i;
  long __pyx_9genexpr57__pyx_v_i;
  long __pyx_9genexpr58__pyx_v_i;
  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;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  long __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_choose_generators_info", 1);

  /* "cython/core/manifold.pyx":1665
 *         cdef int perm0, perm1, perm2, perm3
 * 
 *         ans = []             # <<<<<<<<<<<<<<
 *         for i in range(self.num_tetrahedra()):
 *             choose_gen_tetrahedron_info(self.c_triangulation,
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_ans = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/manifold.pyx":1666
 * 
 *         ans = []
 *         for i in range(self.num_tetrahedra()):             # <<<<<<<<<<<<<<
 *             choose_gen_tetrahedron_info(self.c_triangulation,
 *                                         i, &generator_path,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_tetrahedra); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1666, __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(1, 1666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1666, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      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(1, 1666, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(1, 1666, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #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(1, 1666, __pyx_L1_error)
          #endif
          if (__pyx_t_5 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(1, 1666, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1666, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_6(__pyx_t_1);
      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(1, 1666, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/manifold.pyx":1668
 *         for i in range(self.num_tetrahedra()):
 *             choose_gen_tetrahedron_info(self.c_triangulation,
 *                                         i, &generator_path,             # <<<<<<<<<<<<<<
 *                                         &face0_gen, &face1_gen,
 *                                         &face2_gen, &face3_gen,
 */
    __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1668, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1667
 *         ans = []
 *         for i in range(self.num_tetrahedra()):
 *             choose_gen_tetrahedron_info(self.c_triangulation,             # <<<<<<<<<<<<<<
 *                                         i, &generator_path,
 *                                         &face0_gen, &face1_gen,
 */
    choose_gen_tetrahedron_info(__pyx_v_self->__pyx_base.c_triangulation, __pyx_t_4, (&__pyx_v_generator_path), (&__pyx_v_face0_gen), (&__pyx_v_face1_gen), (&__pyx_v_face2_gen), (&__pyx_v_face3_gen), (&__pyx_v_c0), (&__pyx_v_c1), (&__pyx_v_c2), (&__pyx_v_c3), (&__pyx_v_neighbor0_idx), (&__pyx_v_neighbor1_idx), (&__pyx_v_neighbor2_idx), (&__pyx_v_neighbor3_idx), (&__pyx_v_perm0), (&__pyx_v_perm1), (&__pyx_v_perm2), (&__pyx_v_perm3));

    /* "cython/core/manifold.pyx":1676
 *                                         &perm0, &perm1, &perm2, &perm3)
 *             ans.append(
 *                 {'index':i,             # <<<<<<<<<<<<<<
 *                  'generators': (face0_gen, face1_gen, face2_gen, face3_gen),
 *                  'neighbors': (neighbor0_idx, neighbor1_idx,
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_index, __pyx_v_i) < 0) __PYX_ERR(1, 1676, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1677
 *             ans.append(
 *                 {'index':i,
 *                  'generators': (face0_gen, face1_gen, face2_gen, face3_gen),             # <<<<<<<<<<<<<<
 *                  'neighbors': (neighbor0_idx, neighbor1_idx,
 *                                neighbor2_idx, neighbor3_idx),
 */
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_face0_gen); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_face1_gen); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_face2_gen); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_face3_gen); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3)) __PYX_ERR(1, 1677, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_7)) __PYX_ERR(1, 1677, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_8)) __PYX_ERR(1, 1677, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_9);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_9)) __PYX_ERR(1, 1677, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_generators, __pyx_t_10) < 0) __PYX_ERR(1, 1676, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "cython/core/manifold.pyx":1678
 *                 {'index':i,
 *                  'generators': (face0_gen, face1_gen, face2_gen, face3_gen),
 *                  'neighbors': (neighbor0_idx, neighbor1_idx,             # <<<<<<<<<<<<<<
 *                                neighbor2_idx, neighbor3_idx),
 *                  'gluings': (tuple([ perm0>>(2 * i) & 3 for i in range(4)]),
 */
    __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_neighbor0_idx); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_neighbor1_idx); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);

    /* "cython/core/manifold.pyx":1679
 *                  'generators': (face0_gen, face1_gen, face2_gen, face3_gen),
 *                  'neighbors': (neighbor0_idx, neighbor1_idx,
 *                                neighbor2_idx, neighbor3_idx),             # <<<<<<<<<<<<<<
 *                  'gluings': (tuple([ perm0>>(2 * i) & 3 for i in range(4)]),
 *                              tuple([ perm1>>(2 * i) & 3 for i in range(4)]),
 */
    __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_neighbor2_idx); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_neighbor3_idx); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "cython/core/manifold.pyx":1678
 *                 {'index':i,
 *                  'generators': (face0_gen, face1_gen, face2_gen, face3_gen),
 *                  'neighbors': (neighbor0_idx, neighbor1_idx,             # <<<<<<<<<<<<<<
 *                                neighbor2_idx, neighbor3_idx),
 *                  'gluings': (tuple([ perm0>>(2 * i) & 3 for i in range(4)]),
 */
    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1678, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10)) __PYX_ERR(1, 1678, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_9);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_9)) __PYX_ERR(1, 1678, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_8)) __PYX_ERR(1, 1678, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_7)) __PYX_ERR(1, 1678, __pyx_L1_error);
    __pyx_t_10 = 0;
    __pyx_t_9 = 0;
    __pyx_t_8 = 0;
    __pyx_t_7 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_neighbors, __pyx_t_3) < 0) __PYX_ERR(1, 1676, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/manifold.pyx":1680
 *                  'neighbors': (neighbor0_idx, neighbor1_idx,
 *                                neighbor2_idx, neighbor3_idx),
 *                  'gluings': (tuple([ perm0>>(2 * i) & 3 for i in range(4)]),             # <<<<<<<<<<<<<<
 *                              tuple([ perm1>>(2 * i) & 3 for i in range(4)]),
 *                              tuple([ perm2>>(2 * i) & 3 for i in range(4)]),
 */
    { /* enter inner scope */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1680, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      for (__pyx_t_11 = 0; __pyx_t_11 < 4; __pyx_t_11+=1) {
        __pyx_9genexpr55__pyx_v_i = __pyx_t_11;
        __pyx_t_7 = __Pyx_PyInt_From_long(((__pyx_v_perm0 >> (2 * __pyx_9genexpr55__pyx_v_i)) & 3)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1680, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) __PYX_ERR(1, 1680, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    } /* exit inner scope */
    __pyx_t_7 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/manifold.pyx":1681
 *                                neighbor2_idx, neighbor3_idx),
 *                  'gluings': (tuple([ perm0>>(2 * i) & 3 for i in range(4)]),
 *                              tuple([ perm1>>(2 * i) & 3 for i in range(4)]),             # <<<<<<<<<<<<<<
 *                              tuple([ perm2>>(2 * i) & 3 for i in range(4)]),
 *                              tuple([ perm3>>(2 * i) & 3 for i in range(4)])),
 */
    { /* enter inner scope */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1681, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      for (__pyx_t_11 = 0; __pyx_t_11 < 4; __pyx_t_11+=1) {
        __pyx_9genexpr56__pyx_v_i = __pyx_t_11;
        __pyx_t_8 = __Pyx_PyInt_From_long(((__pyx_v_perm1 >> (2 * __pyx_9genexpr56__pyx_v_i)) & 3)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1681, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_8))) __PYX_ERR(1, 1681, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    } /* exit inner scope */
    __pyx_t_8 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1681, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/manifold.pyx":1682
 *                  'gluings': (tuple([ perm0>>(2 * i) & 3 for i in range(4)]),
 *                              tuple([ perm1>>(2 * i) & 3 for i in range(4)]),
 *                              tuple([ perm2>>(2 * i) & 3 for i in range(4)]),             # <<<<<<<<<<<<<<
 *                              tuple([ perm3>>(2 * i) & 3 for i in range(4)])),
 *                  'corners': (self._number_(Complex2Number(c0)),
 */
    { /* enter inner scope */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1682, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      for (__pyx_t_11 = 0; __pyx_t_11 < 4; __pyx_t_11+=1) {
        __pyx_9genexpr57__pyx_v_i = __pyx_t_11;
        __pyx_t_9 = __Pyx_PyInt_From_long(((__pyx_v_perm2 >> (2 * __pyx_9genexpr57__pyx_v_i)) & 3)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1682, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_9))) __PYX_ERR(1, 1682, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
    } /* exit inner scope */
    __pyx_t_9 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/manifold.pyx":1683
 *                              tuple([ perm1>>(2 * i) & 3 for i in range(4)]),
 *                              tuple([ perm2>>(2 * i) & 3 for i in range(4)]),
 *                              tuple([ perm3>>(2 * i) & 3 for i in range(4)])),             # <<<<<<<<<<<<<<
 *                  'corners': (self._number_(Complex2Number(c0)),
 *                              self._number_(Complex2Number(c1)),
 */
    { /* enter inner scope */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      for (__pyx_t_11 = 0; __pyx_t_11 < 4; __pyx_t_11+=1) {
        __pyx_9genexpr58__pyx_v_i = __pyx_t_11;
        __pyx_t_10 = __Pyx_PyInt_From_long(((__pyx_v_perm3 >> (2 * __pyx_9genexpr58__pyx_v_i)) & 3)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1683, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_10))) __PYX_ERR(1, 1683, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
    } /* exit inner scope */
    __pyx_t_10 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/manifold.pyx":1680
 *                  'neighbors': (neighbor0_idx, neighbor1_idx,
 *                                neighbor2_idx, neighbor3_idx),
 *                  'gluings': (tuple([ perm0>>(2 * i) & 3 for i in range(4)]),             # <<<<<<<<<<<<<<
 *                              tuple([ perm1>>(2 * i) & 3 for i in range(4)]),
 *                              tuple([ perm2>>(2 * i) & 3 for i in range(4)]),
 */
    __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7)) __PYX_ERR(1, 1680, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_8)) __PYX_ERR(1, 1680, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_9);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_9)) __PYX_ERR(1, 1680, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_10)) __PYX_ERR(1, 1680, __pyx_L1_error);
    __pyx_t_7 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_gluings, __pyx_t_3) < 0) __PYX_ERR(1, 1676, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/manifold.pyx":1684
 *                              tuple([ perm2>>(2 * i) & 3 for i in range(4)]),
 *                              tuple([ perm3>>(2 * i) & 3 for i in range(4)])),
 *                  'corners': (self._number_(Complex2Number(c0)),             # <<<<<<<<<<<<<<
 *                              self._number_(Complex2Number(c1)),
 *                              self._number_(Complex2Number(c2)),
 */
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = __pyx_f_6SnapPy_Complex2Number(__pyx_v_c0); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_9};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1684, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }

    /* "cython/core/manifold.pyx":1685
 *                              tuple([ perm3>>(2 * i) & 3 for i in range(4)])),
 *                  'corners': (self._number_(Complex2Number(c0)),
 *                              self._number_(Complex2Number(c1)),             # <<<<<<<<<<<<<<
 *                              self._number_(Complex2Number(c2)),
 *                              self._number_(Complex2Number(c3)) ),
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1685, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __pyx_f_6SnapPy_Complex2Number(__pyx_v_c1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1685, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_8};
      __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 1685, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }

    /* "cython/core/manifold.pyx":1686
 *                  'corners': (self._number_(Complex2Number(c0)),
 *                              self._number_(Complex2Number(c1)),
 *                              self._number_(Complex2Number(c2)),             # <<<<<<<<<<<<<<
 *                              self._number_(Complex2Number(c3)) ),
 *                  'generator_path': generator_path}
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_7 = __pyx_f_6SnapPy_Complex2Number(__pyx_v_c2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1686, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_12 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_12)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_12);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_7};
      __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1686, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }

    /* "cython/core/manifold.pyx":1687
 *                              self._number_(Complex2Number(c1)),
 *                              self._number_(Complex2Number(c2)),
 *                              self._number_(Complex2Number(c3)) ),             # <<<<<<<<<<<<<<
 *                  'generator_path': generator_path}
 *                 )
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_12 = __pyx_f_6SnapPy_Complex2Number(__pyx_v_c3); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __pyx_t_13 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_12};
      __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1687, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }

    /* "cython/core/manifold.pyx":1684
 *                              tuple([ perm2>>(2 * i) & 3 for i in range(4)]),
 *                              tuple([ perm3>>(2 * i) & 3 for i in range(4)])),
 *                  'corners': (self._number_(Complex2Number(c0)),             # <<<<<<<<<<<<<<
 *                              self._number_(Complex2Number(c1)),
 *                              self._number_(Complex2Number(c2)),
 */
    __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3)) __PYX_ERR(1, 1684, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_10)) __PYX_ERR(1, 1684, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_9);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_9)) __PYX_ERR(1, 1684, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_8)) __PYX_ERR(1, 1684, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_10 = 0;
    __pyx_t_9 = 0;
    __pyx_t_8 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_corners, __pyx_t_7) < 0) __PYX_ERR(1, 1676, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cython/core/manifold.pyx":1688
 *                              self._number_(Complex2Number(c2)),
 *                              self._number_(Complex2Number(c3)) ),
 *                  'generator_path': generator_path}             # <<<<<<<<<<<<<<
 *                 )
 *         return ans
 */
    __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_generator_path); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1688, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_generator_path, __pyx_t_7) < 0) __PYX_ERR(1, 1676, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cython/core/manifold.pyx":1675
 *                                         &neighbor2_idx, &neighbor3_idx,
 *                                         &perm0, &perm1, &perm2, &perm3)
 *             ans.append(             # <<<<<<<<<<<<<<
 *                 {'index':i,
 *                  'generators': (face0_gen, face1_gen, face2_gen, face3_gen),
 */
    __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_ans, __pyx_t_2); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(1, 1675, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/manifold.pyx":1666
 * 
 *         ans = []
 *         for i in range(self.num_tetrahedra()):             # <<<<<<<<<<<<<<
 *             choose_gen_tetrahedron_info(self.c_triangulation,
 *                                         i, &generator_path,
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/manifold.pyx":1690
 *                  'generator_path': generator_path}
 *                 )
 *         return ans             # <<<<<<<<<<<<<<
 * 
 *     def splitting_surfaces(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ans);
  __pyx_r = __pyx_v_ans;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":1654
 *                           centroid_at_origin)
 * 
 *     def _choose_generators_info(self):             # <<<<<<<<<<<<<<
 *         """
 *         Extracts, from the bowels of SnapPea, the information about the
 */

  /* 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_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("SnapPy.Manifold._choose_generators_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ans);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":1692
 *         return ans
 * 
 *     def splitting_surfaces(self):             # <<<<<<<<<<<<<<
 *         """
 *         Searches for connected closed normal surfaces of nonnegative Euler
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_81splitting_surfaces(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_6SnapPy_8Manifold_80splitting_surfaces, "Manifold.splitting_surfaces(self)\n\n        Searches for connected closed normal surfaces of nonnegative Euler\n        characteristic.  If spheres or projective planes are found, then\n        tori and Klein bottles aren't reported.  There is no guarantee\n        that all such normal surfaces will be found nor that any given\n        surface is incompressible.  The search is confined to surfaces\n        whose quads are in the tetrahedra that have degenerate shapes.\n\n        You can split the manifold open along one of these surfaces\n        using the method \"split\".\n\n        A connect sum of two trefoils:\n\n        >>> M1 = Manifold('DT: fafBCAEFD')\n        >>> len(M1.splitting_surfaces())\n        2\n\n        First satellite knot in the table.\n\n        >>> M2 = Manifold('K13n4587')\n        >>> M2.splitting_surfaces()\n        [Orientable two-sided with euler = 0]\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_81splitting_surfaces = {"splitting_surfaces", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_81splitting_surfaces, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_80splitting_surfaces};
static PyObject *__pyx_pw_6SnapPy_8Manifold_81splitting_surfaces(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("splitting_surfaces (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("splitting_surfaces", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "splitting_surfaces", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_80splitting_surfaces(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_8Manifold_80splitting_surfaces(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self) {
  NormalSurfaceList *__pyx_v_surfaces;
  FuncResult __pyx_v_result;
  PyObject *__pyx_v_ans = NULL;
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  FuncResult __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Boolean __pyx_t_8;
  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("splitting_surfaces", 1);

  /* "cython/core/manifold.pyx":1719
 *         cdef c_FuncResult result
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         result = find_normal_surfaces(self.c_triangulation, &surfaces)
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":1720
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         result = find_normal_surfaces(self.c_triangulation, &surfaces)
 *         if result != func_OK:
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1720, __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(1, 1720, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1719
 *         cdef c_FuncResult result
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         result = find_normal_surfaces(self.c_triangulation, &surfaces)
 */
  }

  /* "cython/core/manifold.pyx":1721
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         result = find_normal_surfaces(self.c_triangulation, &surfaces)             # <<<<<<<<<<<<<<
 *         if result != func_OK:
 *             raise RuntimeError('SnapPea kernel failed when computing normal surfaces')
 */
  __pyx_t_3 = find_normal_surfaces(__pyx_v_self->__pyx_base.c_triangulation, (&__pyx_v_surfaces)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1721, __pyx_L1_error)
  __pyx_v_result = __pyx_t_3;

  /* "cython/core/manifold.pyx":1722
 *             raise ValueError('The Triangulation is empty.')
 *         result = find_normal_surfaces(self.c_triangulation, &surfaces)
 *         if result != func_OK:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('SnapPea kernel failed when computing normal surfaces')
 * 
 */
  __pyx_t_1 = (__pyx_v_result != func_OK);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":1723
 *         result = find_normal_surfaces(self.c_triangulation, &surfaces)
 *         if result != func_OK:
 *             raise RuntimeError('SnapPea kernel failed when computing normal surfaces')             # <<<<<<<<<<<<<<
 * 
 *         ans = []
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1723, __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(1, 1723, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1722
 *             raise ValueError('The Triangulation is empty.')
 *         result = find_normal_surfaces(self.c_triangulation, &surfaces)
 *         if result != func_OK:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('SnapPea kernel failed when computing normal surfaces')
 * 
 */
  }

  /* "cython/core/manifold.pyx":1725
 *             raise RuntimeError('SnapPea kernel failed when computing normal surfaces')
 * 
 *         ans = []             # <<<<<<<<<<<<<<
 *         for i in range(number_of_normal_surfaces_on_list(surfaces)):
 *             ans.append( NormalSurfaceInfo(
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1725, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_ans = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":1726
 * 
 *         ans = []
 *         for i in range(number_of_normal_surfaces_on_list(surfaces)):             # <<<<<<<<<<<<<<
 *             ans.append( NormalSurfaceInfo(
 *                 orientable=B2B(normal_surface_is_orientable(surfaces, i)),
 */
  __pyx_t_4 = number_of_normal_surfaces_on_list(__pyx_v_surfaces); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1726, __pyx_L1_error)
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "cython/core/manifold.pyx":1727
 *         ans = []
 *         for i in range(number_of_normal_surfaces_on_list(surfaces)):
 *             ans.append( NormalSurfaceInfo(             # <<<<<<<<<<<<<<
 *                 orientable=B2B(normal_surface_is_orientable(surfaces, i)),
 *                 two_sided=B2B(normal_surface_is_two_sided(surfaces, i)),
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_NormalSurfaceInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cython/core/manifold.pyx":1728
 *         for i in range(number_of_normal_surfaces_on_list(surfaces)):
 *             ans.append( NormalSurfaceInfo(
 *                 orientable=B2B(normal_surface_is_orientable(surfaces, i)),             # <<<<<<<<<<<<<<
 *                 two_sided=B2B(normal_surface_is_two_sided(surfaces, i)),
 *                 euler=normal_surface_Euler_characteristic(surfaces, i),
 */
    __pyx_t_7 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = normal_surface_is_orientable(__pyx_v_surfaces, __pyx_v_i); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1728, __pyx_L1_error)
    __pyx_t_9 = __pyx_f_6SnapPy_B2B(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1728, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_orientable, __pyx_t_9) < 0) __PYX_ERR(1, 1728, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cython/core/manifold.pyx":1729
 *             ans.append( NormalSurfaceInfo(
 *                 orientable=B2B(normal_surface_is_orientable(surfaces, i)),
 *                 two_sided=B2B(normal_surface_is_two_sided(surfaces, i)),             # <<<<<<<<<<<<<<
 *                 euler=normal_surface_Euler_characteristic(surfaces, i),
 *                 index=i))
 */
    __pyx_t_8 = normal_surface_is_two_sided(__pyx_v_surfaces, __pyx_v_i); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1729, __pyx_L1_error)
    __pyx_t_9 = __pyx_f_6SnapPy_B2B(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1729, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_two_sided, __pyx_t_9) < 0) __PYX_ERR(1, 1728, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cython/core/manifold.pyx":1730
 *                 orientable=B2B(normal_surface_is_orientable(surfaces, i)),
 *                 two_sided=B2B(normal_surface_is_two_sided(surfaces, i)),
 *                 euler=normal_surface_Euler_characteristic(surfaces, i),             # <<<<<<<<<<<<<<
 *                 index=i))
 * 
 */
    __pyx_t_10 = normal_surface_Euler_characteristic(__pyx_v_surfaces, __pyx_v_i); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1730, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1730, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_euler, __pyx_t_9) < 0) __PYX_ERR(1, 1728, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cython/core/manifold.pyx":1731
 *                 two_sided=B2B(normal_surface_is_two_sided(surfaces, i)),
 *                 euler=normal_surface_Euler_characteristic(surfaces, i),
 *                 index=i))             # <<<<<<<<<<<<<<
 * 
 *         free_normal_surfaces(surfaces)
 */
    __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1731, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_index, __pyx_t_9) < 0) __PYX_ERR(1, 1728, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cython/core/manifold.pyx":1727
 *         ans = []
 *         for i in range(number_of_normal_surfaces_on_list(surfaces)):
 *             ans.append( NormalSurfaceInfo(             # <<<<<<<<<<<<<<
 *                 orientable=B2B(normal_surface_is_orientable(surfaces, i)),
 *                 two_sided=B2B(normal_surface_is_two_sided(surfaces, i)),
 */
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_ans, __pyx_t_9); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 1727, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }

  /* "cython/core/manifold.pyx":1733
 *                 index=i))
 * 
 *         free_normal_surfaces(surfaces)             # <<<<<<<<<<<<<<
 *         return ListOnePerLine(ans)
 * 
 */
  free_normal_surfaces(__pyx_v_surfaces); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1733, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1734
 * 
 *         free_normal_surfaces(surfaces)
 *         return ListOnePerLine(ans)             # <<<<<<<<<<<<<<
 * 
 *     def split(self, which_surface):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ListOnePerLine); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1734, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_ans};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 1734, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_r = __pyx_t_9;
  __pyx_t_9 = 0;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":1692
 *         return ans
 * 
 *     def splitting_surfaces(self):             # <<<<<<<<<<<<<<
 *         """
 *         Searches for connected closed normal surfaces of nonnegative Euler
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("SnapPy.Manifold.splitting_surfaces", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ans);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":1736
 *         return ListOnePerLine(ans)
 * 
 *     def split(self, which_surface):             # <<<<<<<<<<<<<<
 *         """
 *         Split the manifold open along a surface of positive characteristic found
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_83split(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_6SnapPy_8Manifold_82split, "Manifold.split(self, which_surface)\n\n        Split the manifold open along a surface of positive characteristic found\n        by the method \"splitting_surfaces\".  Returns a list of the pieces, with any\n        sphere boundary components filled in.\n\n        Here's an example of a Whitehead double on the trefoil.\n\n        >>> M = Manifold('K14n26039')\n        >>> S = M.splitting_surfaces()[0]\n        >>> S\n        Orientable two-sided with euler = 0\n\n        >>> pieces = M.split(S); pieces\n        [K14n26039.a(0,0)(0,0), K14n26039.b(0,0)]\n        >>> pieces[0].volume() # doctest: +NUMERIC6\n        3.66386238\n        >>> pieces[1].fundamental_group().relators()\n        ['aabbb']\n\n        You can also specify a surface by its index.\n\n        >>> M = Manifold('L10n111')\n        >>> max( P.volume() for P in M.split(0) ) # doctest: +NUMERIC6\n        5.33348957\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_83split = {"split", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_83split, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_82split};
static PyObject *__pyx_pw_6SnapPy_8Manifold_83split(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_which_surface = 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("split (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_which_surface,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_which_surface)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1736, __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, "split") < 0)) __PYX_ERR(1, 1736, __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_which_surface = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("split", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 1736, __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("SnapPy.Manifold.split", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_82split(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_which_surface);

  /* 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_6SnapPy_8Manifold_82split(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_which_surface) {
  NormalSurfaceList *__pyx_v_surfaces;
  FuncResult __pyx_v_result;
  int __pyx_v_num_surfaces;
  Triangulation *__pyx_v_pieces[2];
  struct __pyx_obj_6SnapPy_Manifold *__pyx_v_M0 = 0;
  struct __pyx_obj_6SnapPy_Manifold *__pyx_v_M1 = 0;
  PyObject *__pyx_v_ans = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  FuncResult __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("split", 0);
  __Pyx_INCREF(__pyx_v_which_surface);

  /* "cython/core/manifold.pyx":1768
 *         cdef Manifold M0, M1
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":1769
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 * 
 *         result = find_normal_surfaces(self.c_triangulation, &surfaces)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1769, __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(1, 1769, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1768
 *         cdef Manifold M0, M1
 * 
 *         if self.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 * 
 */
  }

  /* "cython/core/manifold.pyx":1771
 *             raise ValueError('The Triangulation is empty.')
 * 
 *         result = find_normal_surfaces(self.c_triangulation, &surfaces)             # <<<<<<<<<<<<<<
 *         if result != func_OK:
 *             raise RuntimeError('SnapPea kernel failed when computing normal surfaces.')
 */
  __pyx_t_3 = find_normal_surfaces(__pyx_v_self->__pyx_base.c_triangulation, (&__pyx_v_surfaces)); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1771, __pyx_L1_error)
  __pyx_v_result = __pyx_t_3;

  /* "cython/core/manifold.pyx":1772
 * 
 *         result = find_normal_surfaces(self.c_triangulation, &surfaces)
 *         if result != func_OK:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('SnapPea kernel failed when computing normal surfaces.')
 * 
 */
  __pyx_t_1 = (__pyx_v_result != func_OK);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/manifold.pyx":1773
 *         result = find_normal_surfaces(self.c_triangulation, &surfaces)
 *         if result != func_OK:
 *             raise RuntimeError('SnapPea kernel failed when computing normal surfaces.')             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(which_surface, NormalSurfaceInfo):
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__106, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1773, __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(1, 1773, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1772
 * 
 *         result = find_normal_surfaces(self.c_triangulation, &surfaces)
 *         if result != func_OK:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('SnapPea kernel failed when computing normal surfaces.')
 * 
 */
  }

  /* "cython/core/manifold.pyx":1775
 *             raise RuntimeError('SnapPea kernel failed when computing normal surfaces.')
 * 
 *         if isinstance(which_surface, NormalSurfaceInfo):             # <<<<<<<<<<<<<<
 *             which_surface = which_surface.index
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_NormalSurfaceInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1775, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyObject_IsInstance(__pyx_v_which_surface, __pyx_t_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 1775, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "cython/core/manifold.pyx":1776
 * 
 *         if isinstance(which_surface, NormalSurfaceInfo):
 *             which_surface = which_surface.index             # <<<<<<<<<<<<<<
 * 
 *         num_surfaces = number_of_normal_surfaces_on_list(surfaces)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_which_surface, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_which_surface, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/manifold.pyx":1775
 *             raise RuntimeError('SnapPea kernel failed when computing normal surfaces.')
 * 
 *         if isinstance(which_surface, NormalSurfaceInfo):             # <<<<<<<<<<<<<<
 *             which_surface = which_surface.index
 * 
 */
  }

  /* "cython/core/manifold.pyx":1778
 *             which_surface = which_surface.index
 * 
 *         num_surfaces = number_of_normal_surfaces_on_list(surfaces)             # <<<<<<<<<<<<<<
 *         if not (0 <= which_surface < num_surfaces):
 *             raise ValueError('SnapPea only found %d surfaces, but you asked for surface number %s.' % (num_surfaces, which_surface))
 */
  __pyx_t_4 = number_of_normal_surfaces_on_list(__pyx_v_surfaces); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1778, __pyx_L1_error)
  __pyx_v_num_surfaces = __pyx_t_4;

  /* "cython/core/manifold.pyx":1779
 * 
 *         num_surfaces = number_of_normal_surfaces_on_list(surfaces)
 *         if not (0 <= which_surface < num_surfaces):             # <<<<<<<<<<<<<<
 *             raise ValueError('SnapPea only found %d surfaces, but you asked for surface number %s.' % (num_surfaces, which_surface))
 * 
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_int_0, __pyx_v_which_surface, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1779, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
    __Pyx_DECREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_num_surfaces); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_which_surface, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1779, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 1779, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = (!__pyx_t_1);
  if (unlikely(__pyx_t_6)) {

    /* "cython/core/manifold.pyx":1780
 *         num_surfaces = number_of_normal_surfaces_on_list(surfaces)
 *         if not (0 <= which_surface < num_surfaces):
 *             raise ValueError('SnapPea only found %d surfaces, but you asked for surface number %s.' % (num_surfaces, which_surface))             # <<<<<<<<<<<<<<
 * 
 *         result = split_along_normal_surface(surfaces, which_surface, pieces)
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_num_surfaces); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2)) __PYX_ERR(1, 1780, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_which_surface);
    __Pyx_GIVEREF(__pyx_v_which_surface);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_which_surface)) __PYX_ERR(1, 1780, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_SnapPea_only_found_d_surfaces_bu, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(1, 1780, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1779
 * 
 *         num_surfaces = number_of_normal_surfaces_on_list(surfaces)
 *         if not (0 <= which_surface < num_surfaces):             # <<<<<<<<<<<<<<
 *             raise ValueError('SnapPea only found %d surfaces, but you asked for surface number %s.' % (num_surfaces, which_surface))
 * 
 */
  }

  /* "cython/core/manifold.pyx":1782
 *             raise ValueError('SnapPea only found %d surfaces, but you asked for surface number %s.' % (num_surfaces, which_surface))
 * 
 *         result = split_along_normal_surface(surfaces, which_surface, pieces)             # <<<<<<<<<<<<<<
 *         if result != func_OK:
 *             raise RuntimeError('SnapPea kernel failed when splitting open along the given surface.')
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_which_surface); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 1782, __pyx_L1_error)
  __pyx_t_3 = split_along_normal_surface(__pyx_v_surfaces, __pyx_t_4, __pyx_v_pieces); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1782, __pyx_L1_error)
  __pyx_v_result = __pyx_t_3;

  /* "cython/core/manifold.pyx":1783
 * 
 *         result = split_along_normal_surface(surfaces, which_surface, pieces)
 *         if result != func_OK:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('SnapPea kernel failed when splitting open along the given surface.')
 * 
 */
  __pyx_t_6 = (__pyx_v_result != func_OK);
  if (unlikely(__pyx_t_6)) {

    /* "cython/core/manifold.pyx":1784
 *         result = split_along_normal_surface(surfaces, which_surface, pieces)
 *         if result != func_OK:
 *             raise RuntimeError('SnapPea kernel failed when splitting open along the given surface.')             # <<<<<<<<<<<<<<
 * 
 *         ans = []
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__107, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1784, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(1, 1784, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1783
 * 
 *         result = split_along_normal_surface(surfaces, which_surface, pieces)
 *         if result != func_OK:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('SnapPea kernel failed when splitting open along the given surface.')
 * 
 */
  }

  /* "cython/core/manifold.pyx":1786
 *             raise RuntimeError('SnapPea kernel failed when splitting open along the given surface.')
 * 
 *         ans = []             # <<<<<<<<<<<<<<
 *         if pieces[0] != NULL:
 *             M0 = self.__class__('empty')
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_ans = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cython/core/manifold.pyx":1787
 * 
 *         ans = []
 *         if pieces[0] != NULL:             # <<<<<<<<<<<<<<
 *             M0 = self.__class__('empty')
 *             M0.set_c_triangulation(pieces[0])
 */
  __pyx_t_6 = ((__pyx_v_pieces[0]) != NULL);
  if (__pyx_t_6) {

    /* "cython/core/manifold.pyx":1788
 *         ans = []
 *         if pieces[0] != NULL:
 *             M0 = self.__class__('empty')             # <<<<<<<<<<<<<<
 *             M0.set_c_triangulation(pieces[0])
 *             M0.set_name(self.name() + '.a')
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __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_n_s_empty};
      __pyx_t_5 = __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_5)) __PYX_ERR(1, 1788, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6SnapPy_Manifold))))) __PYX_ERR(1, 1788, __pyx_L1_error)
    __pyx_v_M0 = ((struct __pyx_obj_6SnapPy_Manifold *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "cython/core/manifold.pyx":1789
 *         if pieces[0] != NULL:
 *             M0 = self.__class__('empty')
 *             M0.set_c_triangulation(pieces[0])             # <<<<<<<<<<<<<<
 *             M0.set_name(self.name() + '.a')
 *             ans.append(M0)
 */
    __pyx_t_5 = ((struct __pyx_vtabstruct_6SnapPy_Manifold *)__pyx_v_M0->__pyx_base.__pyx_vtab)->__pyx_base.set_c_triangulation(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_M0), (__pyx_v_pieces[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/manifold.pyx":1790
 *             M0 = self.__class__('empty')
 *             M0.set_c_triangulation(pieces[0])
 *             M0.set_name(self.name() + '.a')             # <<<<<<<<<<<<<<
 *             ans.append(M0)
 *         if pieces[1] != NULL:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_M0), __pyx_n_s_set_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
      __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1790, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s_a); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1790, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __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_8};
      __pyx_t_5 = __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_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1790, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/manifold.pyx":1791
 *             M0.set_c_triangulation(pieces[0])
 *             M0.set_name(self.name() + '.a')
 *             ans.append(M0)             # <<<<<<<<<<<<<<
 *         if pieces[1] != NULL:
 *             M1 = self.__class__('empty')
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ans, ((PyObject *)__pyx_v_M0)); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 1791, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1787
 * 
 *         ans = []
 *         if pieces[0] != NULL:             # <<<<<<<<<<<<<<
 *             M0 = self.__class__('empty')
 *             M0.set_c_triangulation(pieces[0])
 */
  }

  /* "cython/core/manifold.pyx":1792
 *             M0.set_name(self.name() + '.a')
 *             ans.append(M0)
 *         if pieces[1] != NULL:             # <<<<<<<<<<<<<<
 *             M1 = self.__class__('empty')
 *             M1.set_c_triangulation(pieces[1])
 */
  __pyx_t_6 = ((__pyx_v_pieces[1]) != NULL);
  if (__pyx_t_6) {

    /* "cython/core/manifold.pyx":1793
 *             ans.append(M0)
 *         if pieces[1] != NULL:
 *             M1 = self.__class__('empty')             # <<<<<<<<<<<<<<
 *             M1.set_c_triangulation(pieces[1])
 *             M1.set_name(self.name() + '.b')
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1793, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_n_s_empty};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1793, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_6SnapPy_Manifold))))) __PYX_ERR(1, 1793, __pyx_L1_error)
    __pyx_v_M1 = ((struct __pyx_obj_6SnapPy_Manifold *)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "cython/core/manifold.pyx":1794
 *         if pieces[1] != NULL:
 *             M1 = self.__class__('empty')
 *             M1.set_c_triangulation(pieces[1])             # <<<<<<<<<<<<<<
 *             M1.set_name(self.name() + '.b')
 *             ans.append(M1)
 */
    __pyx_t_5 = ((struct __pyx_vtabstruct_6SnapPy_Manifold *)__pyx_v_M1->__pyx_base.__pyx_vtab)->__pyx_base.set_c_triangulation(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_M1), (__pyx_v_pieces[1])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1794, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/manifold.pyx":1795
 *             M1 = self.__class__('empty')
 *             M1.set_c_triangulation(pieces[1])
 *             M1.set_name(self.name() + '.b')             # <<<<<<<<<<<<<<
 *             ans.append(M1)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_M1), __pyx_n_s_set_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1795, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __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, NULL};
      __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1795, __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_2))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/manifold.pyx":1796
 *             M1.set_c_triangulation(pieces[1])
 *             M1.set_name(self.name() + '.b')
 *             ans.append(M1)             # <<<<<<<<<<<<<<
 * 
 *         free_normal_surfaces(surfaces)
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ans, ((PyObject *)__pyx_v_M1)); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 1796, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1792
 *             M0.set_name(self.name() + '.a')
 *             ans.append(M0)
 *         if pieces[1] != NULL:             # <<<<<<<<<<<<<<
 *             M1 = self.__class__('empty')
 *             M1.set_c_triangulation(pieces[1])
 */
  }

  /* "cython/core/manifold.pyx":1798
 *             ans.append(M1)
 * 
 *         free_normal_surfaces(surfaces)             # <<<<<<<<<<<<<<
 *         return ans
 * 
 */
  free_normal_surfaces(__pyx_v_surfaces); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1798, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1799
 * 
 *         free_normal_surfaces(surfaces)
 *         return ans             # <<<<<<<<<<<<<<
 * 
 *     def _identify(self, extends_to_link=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ans);
  __pyx_r = __pyx_v_ans;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":1736
 *         return ListOnePerLine(ans)
 * 
 *     def split(self, which_surface):             # <<<<<<<<<<<<<<
 *         """
 *         Split the manifold open along a surface of positive characteristic found
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("SnapPy.Manifold.split", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_M0);
  __Pyx_XDECREF((PyObject *)__pyx_v_M1);
  __Pyx_XDECREF(__pyx_v_ans);
  __Pyx_XDECREF(__pyx_v_which_surface);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":1801
 *         return ans
 * 
 *     def _identify(self, extends_to_link=False):             # <<<<<<<<<<<<<<
 *         ans = []
 *         for table in database.__all_tables__.values():
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_85_identify(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_6SnapPy_8Manifold_84_identify, "Manifold._identify(self, extends_to_link=False)");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_85_identify = {"_identify", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_85_identify, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_84_identify};
static PyObject *__pyx_pw_6SnapPy_8Manifold_85_identify(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_extends_to_link = 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("_identify (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_extends_to_link,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_extends_to_link);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1801, __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, "_identify") < 0)) __PYX_ERR(1, 1801, __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_extends_to_link = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_identify", 0, 0, 1, __pyx_nargs); __PYX_ERR(1, 1801, __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("SnapPy.Manifold._identify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_84_identify(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self), __pyx_v_extends_to_link);

  /* 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_6SnapPy_8Manifold_84_identify(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self, PyObject *__pyx_v_extends_to_link) {
  PyObject *__pyx_v_ans = NULL;
  PyObject *__pyx_v_table = NULL;
  PyObject *__pyx_v_match = 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;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_identify", 1);

  /* "cython/core/manifold.pyx":1802
 * 
 *     def _identify(self, extends_to_link=False):
 *         ans = []             # <<<<<<<<<<<<<<
 *         for table in database.__all_tables__.values():
 *             match = table.identify(self, extends_to_link)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_ans = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/manifold.pyx":1803
 *     def _identify(self, extends_to_link=False):
 *         ans = []
 *         for table in database.__all_tables__.values():             # <<<<<<<<<<<<<<
 *             match = table.identify(self, extends_to_link)
 *             if match:
 */
  __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_database); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_all_tables); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(__pyx_t_6 == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values");
    __PYX_ERR(1, 1803, __pyx_L1_error)
  }
  __pyx_t_5 = __Pyx_dict_iterator(__pyx_t_6, 0, __pyx_n_s_values, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __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, NULL, &__pyx_t_5, NULL, __pyx_t_4);
    if (unlikely(__pyx_t_7 == 0)) break;
    if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(1, 1803, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_table, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cython/core/manifold.pyx":1804
 *         ans = []
 *         for table in database.__all_tables__.values():
 *             match = table.identify(self, extends_to_link)             # <<<<<<<<<<<<<<
 *             if match:
 *                 ans.append(match)
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_table, __pyx_n_s_identify); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1804, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_7 = 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_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_8, ((PyObject *)__pyx_v_self), __pyx_v_extends_to_link};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1804, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_match, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cython/core/manifold.pyx":1805
 *         for table in database.__all_tables__.values():
 *             match = table.identify(self, extends_to_link)
 *             if match:             # <<<<<<<<<<<<<<
 *                 ans.append(match)
 *         return ans
 */
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_match); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(1, 1805, __pyx_L1_error)
    if (__pyx_t_9) {

      /* "cython/core/manifold.pyx":1806
 *             match = table.identify(self, extends_to_link)
 *             if match:
 *                 ans.append(match)             # <<<<<<<<<<<<<<
 *         return ans
 * 
 */
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_ans, __pyx_v_match); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 1806, __pyx_L1_error)

      /* "cython/core/manifold.pyx":1805
 *         for table in database.__all_tables__.values():
 *             match = table.identify(self, extends_to_link)
 *             if match:             # <<<<<<<<<<<<<<
 *                 ans.append(match)
 *         return ans
 */
    }
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/manifold.pyx":1807
 *             if match:
 *                 ans.append(match)
 *         return ans             # <<<<<<<<<<<<<<
 * 
 *     def _cusp_cross_section_info(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ans);
  __pyx_r = __pyx_v_ans;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":1801
 *         return ans
 * 
 *     def _identify(self, extends_to_link=False):             # <<<<<<<<<<<<<<
 *         ans = []
 *         for table in database.__all_tables__.values():
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("SnapPy.Manifold._identify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ans);
  __Pyx_XDECREF(__pyx_v_table);
  __Pyx_XDECREF(__pyx_v_match);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/manifold.pyx":1809
 *         return ans
 * 
 *     def _cusp_cross_section_info(self):             # <<<<<<<<<<<<<<
 *         cdef c_Tetrahedron *tet
 *         allocate_cross_sections(self.c_triangulation)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_8Manifold_87_cusp_cross_section_info(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_6SnapPy_8Manifold_86_cusp_cross_section_info, "Manifold._cusp_cross_section_info(self)");
static PyMethodDef __pyx_mdef_6SnapPy_8Manifold_87_cusp_cross_section_info = {"_cusp_cross_section_info", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_87_cusp_cross_section_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_86_cusp_cross_section_info};
static PyObject *__pyx_pw_6SnapPy_8Manifold_87_cusp_cross_section_info(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("_cusp_cross_section_info (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("_cusp_cross_section_info", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_cusp_cross_section_info", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_8Manifold_86_cusp_cross_section_info(((struct __pyx_obj_6SnapPy_Manifold *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_8Manifold_86_cusp_cross_section_info(struct __pyx_obj_6SnapPy_Manifold *__pyx_v_self) {
  Tetrahedron *__pyx_v_tet;
  PyObject *__pyx_v_tilts = NULL;
  PyObject *__pyx_v_side_lengths = NULL;
  PyObject *__pyx_v_one_tet_tilts = NULL;
  PyObject *__pyx_v_one_tet_lengths = NULL;
  long __pyx_v_v;
  PyObject *__pyx_v_one_vertex_lengths = NULL;
  long __pyx_v_f;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Tetrahedron *__pyx_t_3;
  int __pyx_t_4;
  long __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  long __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_cusp_cross_section_info", 1);

  /* "cython/core/manifold.pyx":1811
 *     def _cusp_cross_section_info(self):
 *         cdef c_Tetrahedron *tet
 *         allocate_cross_sections(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         compute_cross_sections(self.c_triangulation)
 *         compute_tilts(self.c_triangulation)
 */
  allocate_cross_sections(__pyx_v_self->__pyx_base.c_triangulation);

  /* "cython/core/manifold.pyx":1812
 *         cdef c_Tetrahedron *tet
 *         allocate_cross_sections(self.c_triangulation)
 *         compute_cross_sections(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         compute_tilts(self.c_triangulation)
 *         tilts, side_lengths = [], []
 */
  compute_cross_sections(__pyx_v_self->__pyx_base.c_triangulation);

  /* "cython/core/manifold.pyx":1813
 *         allocate_cross_sections(self.c_triangulation)
 *         compute_cross_sections(self.c_triangulation)
 *         compute_tilts(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         tilts, side_lengths = [], []
 *         tet = self.c_triangulation.tet_list_begin.next
 */
  compute_tilts(__pyx_v_self->__pyx_base.c_triangulation);

  /* "cython/core/manifold.pyx":1814
 *         compute_cross_sections(self.c_triangulation)
 *         compute_tilts(self.c_triangulation)
 *         tilts, side_lengths = [], []             # <<<<<<<<<<<<<<
 *         tet = self.c_triangulation.tet_list_begin.next
 *         while tet != &self.c_triangulation.tet_list_end:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_tilts = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_v_side_lengths = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/manifold.pyx":1815
 *         compute_tilts(self.c_triangulation)
 *         tilts, side_lengths = [], []
 *         tet = self.c_triangulation.tet_list_begin.next             # <<<<<<<<<<<<<<
 *         while tet != &self.c_triangulation.tet_list_end:
 *             one_tet_tilts, one_tet_lengths = [], []
 */
  __pyx_t_3 = __pyx_v_self->__pyx_base.c_triangulation->tet_list_begin.next;
  __pyx_v_tet = __pyx_t_3;

  /* "cython/core/manifold.pyx":1816
 *         tilts, side_lengths = [], []
 *         tet = self.c_triangulation.tet_list_begin.next
 *         while tet != &self.c_triangulation.tet_list_end:             # <<<<<<<<<<<<<<
 *             one_tet_tilts, one_tet_lengths = [], []
 *             for v in range(4):
 */
  while (1) {
    __pyx_t_4 = (__pyx_v_tet != (&__pyx_v_self->__pyx_base.c_triangulation->tet_list_end));
    if (!__pyx_t_4) break;

    /* "cython/core/manifold.pyx":1817
 *         tet = self.c_triangulation.tet_list_begin.next
 *         while tet != &self.c_triangulation.tet_list_end:
 *             one_tet_tilts, one_tet_lengths = [], []             # <<<<<<<<<<<<<<
 *             for v in range(4):
 *                 one_tet_tilts.append(self._number_(Real2Number(<Real>tet.tilt[v])))
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1817, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_one_tet_tilts, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_one_tet_lengths, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "cython/core/manifold.pyx":1818
 *         while tet != &self.c_triangulation.tet_list_end:
 *             one_tet_tilts, one_tet_lengths = [], []
 *             for v in range(4):             # <<<<<<<<<<<<<<
 *                 one_tet_tilts.append(self._number_(Real2Number(<Real>tet.tilt[v])))
 *                 one_vertex_lengths = []
 */
    for (__pyx_t_5 = 0; __pyx_t_5 < 4; __pyx_t_5+=1) {
      __pyx_v_v = __pyx_t_5;

      /* "cython/core/manifold.pyx":1819
 *             one_tet_tilts, one_tet_lengths = [], []
 *             for v in range(4):
 *                 one_tet_tilts.append(self._number_(Real2Number(<Real>tet.tilt[v])))             # <<<<<<<<<<<<<<
 *                 one_vertex_lengths = []
 *                 for f in range(4):
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __pyx_f_6SnapPy_Real2Number(((__pyx_t_6SnapPy_Real)(__pyx_v_tet->tilt[__pyx_v_v]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1819, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = NULL;
      __pyx_t_8 = 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_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1819, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_one_tet_tilts, __pyx_t_1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 1819, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cython/core/manifold.pyx":1820
 *             for v in range(4):
 *                 one_tet_tilts.append(self._number_(Real2Number(<Real>tet.tilt[v])))
 *                 one_vertex_lengths = []             # <<<<<<<<<<<<<<
 *                 for f in range(4):
 *                     if v != f:
 */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1820, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_one_vertex_lengths, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "cython/core/manifold.pyx":1821
 *                 one_tet_tilts.append(self._number_(Real2Number(<Real>tet.tilt[v])))
 *                 one_vertex_lengths = []
 *                 for f in range(4):             # <<<<<<<<<<<<<<
 *                     if v != f:
 *                         one_vertex_lengths.append(self._number_(
 */
      for (__pyx_t_10 = 0; __pyx_t_10 < 4; __pyx_t_10+=1) {
        __pyx_v_f = __pyx_t_10;

        /* "cython/core/manifold.pyx":1822
 *                 one_vertex_lengths = []
 *                 for f in range(4):
 *                     if v != f:             # <<<<<<<<<<<<<<
 *                         one_vertex_lengths.append(self._number_(
 *                             Real2Number(<Real>tet.cross_section.edge_length[v][f])))
 */
        __pyx_t_4 = (__pyx_v_v != __pyx_v_f);
        if (__pyx_t_4) {

          /* "cython/core/manifold.pyx":1823
 *                 for f in range(4):
 *                     if v != f:
 *                         one_vertex_lengths.append(self._number_(             # <<<<<<<<<<<<<<
 *                             Real2Number(<Real>tet.cross_section.edge_length[v][f])))
 *                     else:
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1823, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);

          /* "cython/core/manifold.pyx":1824
 *                     if v != f:
 *                         one_vertex_lengths.append(self._number_(
 *                             Real2Number(<Real>tet.cross_section.edge_length[v][f])))             # <<<<<<<<<<<<<<
 *                     else:
 *                         one_vertex_lengths.append(None)
 */
          __pyx_t_6 = __pyx_f_6SnapPy_Real2Number(((__pyx_t_6SnapPy_Real)((__pyx_v_tet->cross_section->edge_length[__pyx_v_v])[__pyx_v_f]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1824, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = NULL;
          __pyx_t_8 = 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_8 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1823, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          }

          /* "cython/core/manifold.pyx":1823
 *                 for f in range(4):
 *                     if v != f:
 *                         one_vertex_lengths.append(self._number_(             # <<<<<<<<<<<<<<
 *                             Real2Number(<Real>tet.cross_section.edge_length[v][f])))
 *                     else:
 */
          __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_one_vertex_lengths, __pyx_t_1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 1823, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "cython/core/manifold.pyx":1822
 *                 one_vertex_lengths = []
 *                 for f in range(4):
 *                     if v != f:             # <<<<<<<<<<<<<<
 *                         one_vertex_lengths.append(self._number_(
 *                             Real2Number(<Real>tet.cross_section.edge_length[v][f])))
 */
          goto __pyx_L9;
        }

        /* "cython/core/manifold.pyx":1826
 *                             Real2Number(<Real>tet.cross_section.edge_length[v][f])))
 *                     else:
 *                         one_vertex_lengths.append(None)             # <<<<<<<<<<<<<<
 *                 one_tet_lengths.append(one_vertex_lengths)
 *             tilts.append(one_tet_tilts)
 */
        /*else*/ {
          __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_one_vertex_lengths, Py_None); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 1826, __pyx_L1_error)
        }
        __pyx_L9:;
      }

      /* "cython/core/manifold.pyx":1827
 *                     else:
 *                         one_vertex_lengths.append(None)
 *                 one_tet_lengths.append(one_vertex_lengths)             # <<<<<<<<<<<<<<
 *             tilts.append(one_tet_tilts)
 *             side_lengths.append(one_tet_lengths)
 */
      __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_one_tet_lengths, __pyx_v_one_vertex_lengths); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 1827, __pyx_L1_error)
    }

    /* "cython/core/manifold.pyx":1828
 *                         one_vertex_lengths.append(None)
 *                 one_tet_lengths.append(one_vertex_lengths)
 *             tilts.append(one_tet_tilts)             # <<<<<<<<<<<<<<
 *             side_lengths.append(one_tet_lengths)
 *             tet = tet.next
 */
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_tilts, __pyx_v_one_tet_tilts); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 1828, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1829
 *                 one_tet_lengths.append(one_vertex_lengths)
 *             tilts.append(one_tet_tilts)
 *             side_lengths.append(one_tet_lengths)             # <<<<<<<<<<<<<<
 *             tet = tet.next
 * 
 */
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_side_lengths, __pyx_v_one_tet_lengths); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 1829, __pyx_L1_error)

    /* "cython/core/manifold.pyx":1830
 *             tilts.append(one_tet_tilts)
 *             side_lengths.append(one_tet_lengths)
 *             tet = tet.next             # <<<<<<<<<<<<<<
 * 
 *         free_cross_sections(self.c_triangulation)
 */
    __pyx_t_3 = __pyx_v_tet->next;
    __pyx_v_tet = __pyx_t_3;
  }

  /* "cython/core/manifold.pyx":1832
 *             tet = tet.next
 * 
 *         free_cross_sections(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         return tilts, side_lengths
 */
  free_cross_sections(__pyx_v_self->__pyx_base.c_triangulation);

  /* "cython/core/manifold.pyx":1833
 * 
 *         free_cross_sections(self.c_triangulation)
 *         return tilts, side_lengths             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_tilts);
  __Pyx_GIVEREF(__pyx_v_tilts);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tilts)) __PYX_ERR(1, 1833, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_side_lengths);
  __Pyx_GIVEREF(__pyx_v_side_lengths);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_side_lengths)) __PYX_ERR(1, 1833, __pyx_L1_error);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/manifold.pyx":1809
 *         return ans
 * 
 *     def _cusp_cross_section_info(self):             # <<<<<<<<<<<<<<
 *         cdef c_Tetrahedron *tet
 *         allocate_cross_sections(self.c_triangulation)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.Manifold._cusp_cross_section_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_tilts);
  __Pyx_XDECREF(__pyx_v_side_lengths);
  __Pyx_XDECREF(__pyx_v_one_tet_tilts);
  __Pyx_XDECREF(__pyx_v_one_tet_lengths);
  __Pyx_XDECREF(__pyx_v_one_vertex_lengths);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/abelian_group.pyx":41
 *     cdef public coefficients
 * 
 *     def __init__(self, presentation=None, elementary_divisors=[]):             # <<<<<<<<<<<<<<
 *         if presentation is not None:
 *             self.divisors = smith_form(presentation)
 */

/* Python wrapper */
static int __pyx_pw_6SnapPy_12AbelianGroup_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6SnapPy_12AbelianGroup_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_presentation = 0;
  PyObject *__pyx_v_elementary_divisors = 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_presentation,&__pyx_n_s_elementary_divisors,0};
    values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
    values[1] = __Pyx_Arg_NewRef_VARARGS(__pyx_k__108);
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_presentation);
          if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 41, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_elementary_divisors);
          if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 41, __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(4, 41, __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);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_presentation = values[0];
    __pyx_v_elementary_divisors = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, __pyx_nargs); __PYX_ERR(4, 41, __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("SnapPy.AbelianGroup.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_12AbelianGroup___init__(((struct __pyx_obj_6SnapPy_AbelianGroup *)__pyx_v_self), __pyx_v_presentation, __pyx_v_elementary_divisors);

  /* 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_6SnapPy_12AbelianGroup___init__(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self, PyObject *__pyx_v_presentation, PyObject *__pyx_v_elementary_divisors) {
  PyObject *__pyx_v_int_types = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_9genexpr59__pyx_v_n = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *(*__pyx_t_14)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "cython/core/abelian_group.pyx":42
 * 
 *     def __init__(self, presentation=None, elementary_divisors=[]):
 *         if presentation is not None:             # <<<<<<<<<<<<<<
 *             self.divisors = smith_form(presentation)
 *         else:
 */
  __pyx_t_1 = (__pyx_v_presentation != Py_None);
  if (__pyx_t_1) {

    /* "cython/core/abelian_group.pyx":43
 *     def __init__(self, presentation=None, elementary_divisors=[]):
 *         if presentation is not None:
 *             self.divisors = smith_form(presentation)             # <<<<<<<<<<<<<<
 *         else:
 *             try:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_smith_form); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 43, __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_v_presentation};
      __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(4, 43, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->divisors);
    __Pyx_DECREF(__pyx_v_self->divisors);
    __pyx_v_self->divisors = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/abelian_group.pyx":42
 * 
 *     def __init__(self, presentation=None, elementary_divisors=[]):
 *         if presentation is not None:             # <<<<<<<<<<<<<<
 *             self.divisors = smith_form(presentation)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cython/core/abelian_group.pyx":45
 *             self.divisors = smith_form(presentation)
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 self.divisors = list(elementary_divisors)
 *             except:
 */
  /*else*/ {
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_8);
      /*try:*/ {

        /* "cython/core/abelian_group.pyx":46
 *         else:
 *             try:
 *                 self.divisors = list(elementary_divisors)             # <<<<<<<<<<<<<<
 *             except:
 *                 raise ValueError('Elementary divisors must be given '
 */
        __pyx_t_2 = PySequence_List(__pyx_v_elementary_divisors); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 46, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_v_self->divisors);
        __Pyx_DECREF(__pyx_v_self->divisors);
        __pyx_v_self->divisors = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "cython/core/abelian_group.pyx":45
 *             self.divisors = smith_form(presentation)
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 self.divisors = list(elementary_divisors)
 *             except:
 */
      }
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L9_try_end;
      __pyx_L4_error:;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/abelian_group.pyx":47
 *             try:
 *                 self.divisors = list(elementary_divisors)
 *             except:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Elementary divisors must be given '
 *                                  'as a sequence.')
 */
      /*except:*/ {
        __Pyx_AddTraceback("SnapPy.AbelianGroup.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4) < 0) __PYX_ERR(4, 47, __pyx_L6_except_error)
        __Pyx_XGOTREF(__pyx_t_2);
        __Pyx_XGOTREF(__pyx_t_3);
        __Pyx_XGOTREF(__pyx_t_4);

        /* "cython/core/abelian_group.pyx":48
 *                 self.divisors = list(elementary_divisors)
 *             except:
 *                 raise ValueError('Elementary divisors must be given '             # <<<<<<<<<<<<<<
 *                                  'as a sequence.')
 *         int_types = [int]
 */
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__109, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 48, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_Raise(__pyx_t_9, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __PYX_ERR(4, 48, __pyx_L6_except_error)
      }

      /* "cython/core/abelian_group.pyx":45
 *             self.divisors = smith_form(presentation)
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 self.divisors = list(elementary_divisors)
 *             except:
 */
      __pyx_L6_except_error:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      goto __pyx_L1_error;
      __pyx_L9_try_end:;
    }
  }
  __pyx_L3:;

  /* "cython/core/abelian_group.pyx":50
 *                 raise ValueError('Elementary divisors must be given '
 *                                  'as a sequence.')
 *         int_types = [int]             # <<<<<<<<<<<<<<
 *         if _within_sage:
 *             int_types += [sage.rings.integer.Integer]
 */
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF((PyObject *)(&PyInt_Type));
  __Pyx_GIVEREF((PyObject *)(&PyInt_Type));
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyInt_Type)))) __PYX_ERR(4, 50, __pyx_L1_error);
  __pyx_v_int_types = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cython/core/abelian_group.pyx":51
 *                                  'as a sequence.')
 *         int_types = [int]
 *         if _within_sage:             # <<<<<<<<<<<<<<
 *             int_types += [sage.rings.integer.Integer]
 *         for c in self.divisors:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_within_sage); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(4, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "cython/core/abelian_group.pyx":52
 *         int_types = [int]
 *         if _within_sage:
 *             int_types += [sage.rings.integer.Integer]             # <<<<<<<<<<<<<<
 *         for c in self.divisors:
 *             assert type(c) in int_types and c >= 0,\
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sage); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_rings); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_integer); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 52, __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_Integer); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(4, 52, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_int_types, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_int_types, ((PyObject*)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "cython/core/abelian_group.pyx":51
 *                                  'as a sequence.')
 *         int_types = [int]
 *         if _within_sage:             # <<<<<<<<<<<<<<
 *             int_types += [sage.rings.integer.Integer]
 *         for c in self.divisors:
 */
  }

  /* "cython/core/abelian_group.pyx":53
 *         if _within_sage:
 *             int_types += [sage.rings.integer.Integer]
 *         for c in self.divisors:             # <<<<<<<<<<<<<<
 *             assert type(c) in int_types and c >= 0,\
 *                    'Elementary divisors must be non-negative integers.\n'
 */
  if (likely(PyList_CheckExact(__pyx_v_self->divisors)) || PyTuple_CheckExact(__pyx_v_self->divisors)) {
    __pyx_t_3 = __pyx_v_self->divisors; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_10 = 0;
    __pyx_t_11 = NULL;
  } else {
    __pyx_t_10 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_self->divisors); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 53, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_11)) {
      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(4, 53, __pyx_L1_error)
          #endif
          if (__pyx_t_10 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(4, 53, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 53, __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(4, 53, __pyx_L1_error)
          #endif
          if (__pyx_t_10 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(4, 53, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 53, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_11(__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(4, 53, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/abelian_group.pyx":54
 *             int_types += [sage.rings.integer.Integer]
 *         for c in self.divisors:
 *             assert type(c) in int_types and c >= 0,\             # <<<<<<<<<<<<<<
 *                    'Elementary divisors must be non-negative integers.\n'
 *         for i in range(len(elementary_divisors) - 1):
 */
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_12 = (__Pyx_PySequence_ContainsTF(((PyObject *)Py_TYPE(__pyx_v_c)), __pyx_v_int_types, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(4, 54, __pyx_L1_error)
      if (__pyx_t_12) {
      } else {
        __pyx_t_1 = __pyx_t_12;
        goto __pyx_L15_bool_binop_done;
      }
      __pyx_t_4 = PyObject_RichCompare(__pyx_v_c, __pyx_int_0, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 54, __pyx_L1_error)
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(4, 54, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_1 = __pyx_t_12;
      __pyx_L15_bool_binop_done:;
      if (unlikely(!__pyx_t_1)) {
        __Pyx_Raise(__pyx_builtin_AssertionError, __pyx_kp_s_Elementary_divisors_must_be_non, 0, 0);
        __PYX_ERR(4, 54, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(4, 54, __pyx_L1_error)
    #endif

    /* "cython/core/abelian_group.pyx":53
 *         if _within_sage:
 *             int_types += [sage.rings.integer.Integer]
 *         for c in self.divisors:             # <<<<<<<<<<<<<<
 *             assert type(c) in int_types and c >= 0,\
 *                    'Elementary divisors must be non-negative integers.\n'
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/abelian_group.pyx":56
 *             assert type(c) in int_types and c >= 0,\
 *                    'Elementary divisors must be non-negative integers.\n'
 *         for i in range(len(elementary_divisors) - 1):             # <<<<<<<<<<<<<<
 *             n, m = elementary_divisors[i:i+2]
 *             assert (n == m == 0) or (m % n == 0),\
 */
  __pyx_t_10 = PyObject_Length(__pyx_v_elementary_divisors); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(4, 56, __pyx_L1_error)
  __pyx_t_3 = PyInt_FromSsize_t((__pyx_t_10 - 1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 56, __pyx_L1_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_10 = 0;
    __pyx_t_11 = NULL;
  } else {
    __pyx_t_10 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 56, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 56, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  for (;;) {
    if (likely(!__pyx_t_11)) {
      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(4, 56, __pyx_L1_error)
          #endif
          if (__pyx_t_10 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(4, 56, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 56, __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(4, 56, __pyx_L1_error)
          #endif
          if (__pyx_t_10 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(4, 56, __pyx_L1_error)
        #else
        __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 56, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_11(__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(4, 56, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/abelian_group.pyx":57
 *                    'Elementary divisors must be non-negative integers.\n'
 *         for i in range(len(elementary_divisors) - 1):
 *             n, m = elementary_divisors[i:i+2]             # <<<<<<<<<<<<<<
 *             assert (n == m == 0) or (m % n == 0),\
 *                    'The elementary divisors must form a divisibility chain\n'
 */
    __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 57, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_elementary_divisors, 0, 0, &__pyx_v_i, &__pyx_t_4, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 57, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      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(4, 57, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 57, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 57, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 57, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_13);
      index = 0; __pyx_t_4 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_4)) goto __pyx_L20_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_9 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_9)) goto __pyx_L20_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) __PYX_ERR(4, 57, __pyx_L1_error)
      __pyx_t_14 = NULL;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L21_unpacking_done;
      __pyx_L20_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_14 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(4, 57, __pyx_L1_error)
      __pyx_L21_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_4);
    __pyx_t_4 = 0;
    __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "cython/core/abelian_group.pyx":58
 *         for i in range(len(elementary_divisors) - 1):
 *             n, m = elementary_divisors[i:i+2]
 *             assert (n == m == 0) or (m % n == 0),\             # <<<<<<<<<<<<<<
 *                    'The elementary divisors must form a divisibility chain\n'
 * 
 */
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_n, __pyx_v_m, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 58, __pyx_L1_error)
      if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
        __Pyx_DECREF(__pyx_t_2);
        __pyx_t_2 = PyObject_RichCompare(__pyx_v_m, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 58, __pyx_L1_error)
      }
      __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(4, 58, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (!__pyx_t_12) {
      } else {
        __pyx_t_1 = __pyx_t_12;
        goto __pyx_L22_bool_binop_done;
      }
      __pyx_t_2 = PyNumber_Remainder(__pyx_v_m, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 58, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_12 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_2, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(4, 58, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_1 = __pyx_t_12;
      __pyx_L22_bool_binop_done:;
      if (unlikely(!__pyx_t_1)) {
        __Pyx_Raise(__pyx_builtin_AssertionError, __pyx_kp_s_The_elementary_divisors_must_for, 0, 0);
        __PYX_ERR(4, 58, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(4, 58, __pyx_L1_error)
    #endif

    /* "cython/core/abelian_group.pyx":56
 *             assert type(c) in int_types and c >= 0,\
 *                    'Elementary divisors must be non-negative integers.\n'
 *         for i in range(len(elementary_divisors) - 1):             # <<<<<<<<<<<<<<
 *             n, m = elementary_divisors[i:i+2]
 *             assert (n == m == 0) or (m % n == 0),\
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/abelian_group.pyx":63
 *         # So that the group is determined entirely by self.divisors
 *         # we don't allow '1' as a divisor.
 *         self.divisors = [n for n in self.divisors if n != 1]             # <<<<<<<<<<<<<<
 *         # Backwards compatibility hack, part 2.
 *         self.coefficients = self.divisors
 */
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 63, __pyx_L27_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (likely(PyList_CheckExact(__pyx_v_self->divisors)) || PyTuple_CheckExact(__pyx_v_self->divisors)) {
      __pyx_t_2 = __pyx_v_self->divisors; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_10 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->divisors); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 63, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(4, 63, __pyx_L27_error)
    }
    for (;;) {
      if (likely(!__pyx_t_11)) {
        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(4, 63, __pyx_L27_error)
            #endif
            if (__pyx_t_10 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(4, 63, __pyx_L27_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 63, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_9);
          #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(4, 63, __pyx_L27_error)
            #endif
            if (__pyx_t_10 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_9); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(4, 63, __pyx_L27_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 63, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_11(__pyx_t_2);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(4, 63, __pyx_L27_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr59__pyx_v_n, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_1 = (__Pyx_PyInt_BoolNeObjC(__pyx_9genexpr59__pyx_v_n, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(4, 63, __pyx_L27_error)
      if (__pyx_t_1) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_9genexpr59__pyx_v_n))) __PYX_ERR(4, 63, __pyx_L27_error)
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_9genexpr59__pyx_v_n); __pyx_9genexpr59__pyx_v_n = 0;
    goto __pyx_L32_exit_scope;
    __pyx_L27_error:;
    __Pyx_XDECREF(__pyx_9genexpr59__pyx_v_n); __pyx_9genexpr59__pyx_v_n = 0;
    goto __pyx_L1_error;
    __pyx_L32_exit_scope:;
  } /* exit inner scope */
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->divisors);
  __Pyx_DECREF(__pyx_v_self->divisors);
  __pyx_v_self->divisors = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cython/core/abelian_group.pyx":65
 *         self.divisors = [n for n in self.divisors if n != 1]
 *         # Backwards compatibility hack, part 2.
 *         self.coefficients = self.divisors             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_3 = __pyx_v_self->divisors;
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_GOTREF(__pyx_v_self->coefficients);
  __Pyx_DECREF(__pyx_v_self->coefficients);
  __pyx_v_self->coefficients = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cython/core/abelian_group.pyx":41
 *     cdef public coefficients
 * 
 *     def __init__(self, presentation=None, elementary_divisors=[]):             # <<<<<<<<<<<<<<
 *         if presentation is not None:
 *             self.divisors = smith_form(presentation)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("SnapPy.AbelianGroup.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_int_types);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_9genexpr59__pyx_v_n);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/abelian_group.pyx":67
 *         self.coefficients = self.divisors
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if len(self.divisors) == 0:
 *             return '0'
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_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_6SnapPy_12AbelianGroup_2__repr__(((struct __pyx_obj_6SnapPy_AbelianGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_2__repr__(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self) {
  PyObject *__pyx_v_factors = NULL;
  PyObject *__pyx_9genexpr60__pyx_v_n = NULL;
  PyObject *__pyx_9genexpr61__pyx_v_n = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  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("__repr__", 1);

  /* "cython/core/abelian_group.pyx":68
 * 
 *     def __repr__(self):
 *         if len(self.divisors) == 0:             # <<<<<<<<<<<<<<
 *             return '0'
 *         factors = (['Z/%d' % n for n in self.divisors if n] +
 */
  __pyx_t_1 = __pyx_v_self->divisors;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 68, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 == 0);
  if (__pyx_t_3) {

    /* "cython/core/abelian_group.pyx":69
 *     def __repr__(self):
 *         if len(self.divisors) == 0:
 *             return '0'             # <<<<<<<<<<<<<<
 *         factors = (['Z/%d' % n for n in self.divisors if n] +
 *                    ['Z' for n in self.divisors if not n])
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_kp_s_0);
    __pyx_r = __pyx_kp_s_0;
    goto __pyx_L0;

    /* "cython/core/abelian_group.pyx":68
 * 
 *     def __repr__(self):
 *         if len(self.divisors) == 0:             # <<<<<<<<<<<<<<
 *             return '0'
 *         factors = (['Z/%d' % n for n in self.divisors if n] +
 */
  }

  /* "cython/core/abelian_group.pyx":70
 *         if len(self.divisors) == 0:
 *             return '0'
 *         factors = (['Z/%d' % n for n in self.divisors if n] +             # <<<<<<<<<<<<<<
 *                    ['Z' for n in self.divisors if not n])
 *         return ' + '.join(factors)
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 70, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_self->divisors)) || PyTuple_CheckExact(__pyx_v_self->divisors)) {
      __pyx_t_4 = __pyx_v_self->divisors; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_2 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_self->divisors); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 70, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 70, __pyx_L6_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        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(4, 70, __pyx_L6_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(4, 70, __pyx_L6_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 70, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
          #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(4, 70, __pyx_L6_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(4, 70, __pyx_L6_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 70, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_5(__pyx_t_4);
        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(4, 70, __pyx_L6_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr60__pyx_v_n, __pyx_t_6);
      __pyx_t_6 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_9genexpr60__pyx_v_n); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(4, 70, __pyx_L6_error)
      if (__pyx_t_3) {
        __pyx_t_6 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Z_d, __pyx_9genexpr60__pyx_v_n); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 70, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(4, 70, __pyx_L6_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_9genexpr60__pyx_v_n); __pyx_9genexpr60__pyx_v_n = 0;
    goto __pyx_L11_exit_scope;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_9genexpr60__pyx_v_n); __pyx_9genexpr60__pyx_v_n = 0;
    goto __pyx_L1_error;
    __pyx_L11_exit_scope:;
  } /* exit inner scope */
  { /* enter inner scope */

    /* "cython/core/abelian_group.pyx":71
 *             return '0'
 *         factors = (['Z/%d' % n for n in self.divisors if n] +
 *                    ['Z' for n in self.divisors if not n])             # <<<<<<<<<<<<<<
 *         return ' + '.join(factors)
 * 
 */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 71, __pyx_L14_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_v_self->divisors)) || PyTuple_CheckExact(__pyx_v_self->divisors)) {
      __pyx_t_6 = __pyx_v_self->divisors; __Pyx_INCREF(__pyx_t_6);
      __pyx_t_2 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_2 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_self->divisors); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 71, __pyx_L14_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 71, __pyx_L14_error)
    }
    for (;;) {
      if (likely(!__pyx_t_5)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 71, __pyx_L14_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_7); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(4, 71, __pyx_L14_error)
          #else
          __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 71, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 71, __pyx_L14_error)
            #endif
            if (__pyx_t_2 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_2); __Pyx_INCREF(__pyx_t_7); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(4, 71, __pyx_L14_error)
          #else
          __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 71, __pyx_L14_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        }
      } else {
        __pyx_t_7 = __pyx_t_5(__pyx_t_6);
        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(4, 71, __pyx_L14_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr61__pyx_v_n, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_9genexpr61__pyx_v_n); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(4, 71, __pyx_L14_error)
      __pyx_t_8 = (!__pyx_t_3);
      if (__pyx_t_8) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_n_s_Z))) __PYX_ERR(4, 71, __pyx_L14_error)
      }
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_9genexpr61__pyx_v_n); __pyx_9genexpr61__pyx_v_n = 0;
    goto __pyx_L19_exit_scope;
    __pyx_L14_error:;
    __Pyx_XDECREF(__pyx_9genexpr61__pyx_v_n); __pyx_9genexpr61__pyx_v_n = 0;
    goto __pyx_L1_error;
    __pyx_L19_exit_scope:;
  } /* exit inner scope */

  /* "cython/core/abelian_group.pyx":70
 *         if len(self.divisors) == 0:
 *             return '0'
 *         factors = (['Z/%d' % n for n in self.divisors if n] +             # <<<<<<<<<<<<<<
 *                    ['Z' for n in self.divisors if not n])
 *         return ' + '.join(factors)
 */
  __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_factors = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "cython/core/abelian_group.pyx":72
 *         factors = (['Z/%d' % n for n in self.divisors if n] +
 *                    ['Z' for n in self.divisors if not n])
 *         return ' + '.join(factors)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_PyString_Join(__pyx_kp_s__12, __pyx_v_factors); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cython/core/abelian_group.pyx":67
 *         self.coefficients = self.divisors
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if len(self.divisors) == 0:
 *             return '0'
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.AbelianGroup.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_factors);
  __Pyx_XDECREF(__pyx_9genexpr60__pyx_v_n);
  __Pyx_XDECREF(__pyx_9genexpr61__pyx_v_n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/abelian_group.pyx":74
 *         return ' + '.join(factors)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return len(self.divisors)
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_6SnapPy_12AbelianGroup_5__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_6SnapPy_12AbelianGroup_5__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_6SnapPy_12AbelianGroup_4__len__(((struct __pyx_obj_6SnapPy_AbelianGroup *)__pyx_v_self));

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

static Py_ssize_t __pyx_pf_6SnapPy_12AbelianGroup_4__len__(struct __pyx_obj_6SnapPy_AbelianGroup *__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);

  /* "cython/core/abelian_group.pyx":75
 * 
 *     def __len__(self):
 *         return len(self.divisors)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, i):
 */
  __pyx_t_1 = __pyx_v_self->divisors;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 75, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "cython/core/abelian_group.pyx":74
 *         return ' + '.join(factors)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return len(self.divisors)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("SnapPy.AbelianGroup.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/abelian_group.pyx":77
 *         return len(self.divisors)
 * 
 *     def __getitem__(self, i):             # <<<<<<<<<<<<<<
 *         return self.divisors[i]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6SnapPy_12AbelianGroup_6__getitem__(((struct __pyx_obj_6SnapPy_AbelianGroup *)__pyx_v_self), ((PyObject *)__pyx_v_i));

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

static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_6__getitem__(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self, PyObject *__pyx_v_i) {
  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("__getitem__", 1);

  /* "cython/core/abelian_group.pyx":78
 * 
 *     def __getitem__(self, i):
 *         return self.divisors[i]             # <<<<<<<<<<<<<<
 * 
 *     def __reduce__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->divisors, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/abelian_group.pyx":77
 *         return len(self.divisors)
 * 
 *     def __getitem__(self, i):             # <<<<<<<<<<<<<<
 *         return self.divisors[i]
 * 
 */

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

/* "cython/core/abelian_group.pyx":80
 *         return self.divisors[i]
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Used by the pickle module to pickle an Abelian Group.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_9__reduce__(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_6SnapPy_12AbelianGroup_8__reduce__, "AbelianGroup.__reduce__(self)\n\n        Used by the pickle module to pickle an Abelian Group.\n        >>> from pickle import loads, dumps\n        >>> A = AbelianGroup([[n**2 + 3 for n in range(n+3,n+10)] for n in range(7)])\n        >>> A\n        Z/8 + Z + Z + Z + Z\n        >>> A == loads(dumps(A))\n        True\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_12AbelianGroup_9__reduce__ = {"__reduce__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_12AbelianGroup_9__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_12AbelianGroup_8__reduce__};
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_9__reduce__(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__ (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__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce__", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_12AbelianGroup_8__reduce__(((struct __pyx_obj_6SnapPy_AbelianGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_8__reduce__(struct __pyx_obj_6SnapPy_AbelianGroup *__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("__reduce__", 1);

  /* "cython/core/abelian_group.pyx":90
 *         True
 *         """
 *         return (AbelianGroup, (None, self.elementary_divisors()))             # <<<<<<<<<<<<<<
 * 
 *     def __richcmp__(AbelianGroup self, AbelianGroup other, op):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_elementary_divisors); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 90, __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(4, 90, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, Py_None)) __PYX_ERR(4, 90, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(4, 90, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 90, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_ptype_6SnapPy_AbelianGroup);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_6SnapPy_AbelianGroup);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_6SnapPy_AbelianGroup))) __PYX_ERR(4, 90, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(4, 90, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/abelian_group.pyx":80
 *         return self.divisors[i]
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Used by the pickle module to pickle an Abelian Group.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.AbelianGroup.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/abelian_group.pyx":92
 *         return (AbelianGroup, (None, self.elementary_divisors()))
 * 
 *     def __richcmp__(AbelianGroup self, AbelianGroup other, op):             # <<<<<<<<<<<<<<
 *         if op == 0:
 *             return self.divisors < other.elementary_divisors()
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_11__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_arg_op); /*proto*/
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_11__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_arg_op) {
  PyObject *__pyx_v_op = 0;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_v_op = __Pyx_PyInt_From_int(__pyx_arg_op); if (unlikely(!__pyx_v_op)) __PYX_ERR(4, 92, __pyx_L3_error)
  __Pyx_GOTREF(__pyx_v_op);
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("SnapPy.AbelianGroup.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_6SnapPy_AbelianGroup, 1, "other", 0))) __PYX_ERR(4, 92, __pyx_L1_error)
  __pyx_r = __pyx_pf_6SnapPy_12AbelianGroup_10__richcmp__(((struct __pyx_obj_6SnapPy_AbelianGroup *)__pyx_v_self), ((struct __pyx_obj_6SnapPy_AbelianGroup *)__pyx_v_other), ((PyObject *)__pyx_v_op));

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

static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_10__richcmp__(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self, struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_other, PyObject *__pyx_v_op) {
  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("__richcmp__", 1);

  /* "cython/core/abelian_group.pyx":93
 * 
 *     def __richcmp__(AbelianGroup self, AbelianGroup other, op):
 *         if op == 0:             # <<<<<<<<<<<<<<
 *             return self.divisors < other.elementary_divisors()
 *         elif op == 2:
 */
  __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_op, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(4, 93, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/abelian_group.pyx":94
 *     def __richcmp__(AbelianGroup self, AbelianGroup other, op):
 *         if op == 0:
 *             return self.divisors < other.elementary_divisors()             # <<<<<<<<<<<<<<
 *         elif op == 2:
 *             return self.divisors == other.elementary_divisors()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_elementary_divisors); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 94, __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(4, 94, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->divisors, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 94, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cython/core/abelian_group.pyx":93
 * 
 *     def __richcmp__(AbelianGroup self, AbelianGroup other, op):
 *         if op == 0:             # <<<<<<<<<<<<<<
 *             return self.divisors < other.elementary_divisors()
 *         elif op == 2:
 */
  }

  /* "cython/core/abelian_group.pyx":95
 *         if op == 0:
 *             return self.divisors < other.elementary_divisors()
 *         elif op == 2:             # <<<<<<<<<<<<<<
 *             return self.divisors == other.elementary_divisors()
 *         elif op == 4:
 */
  __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_op, __pyx_int_2, 2, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(4, 95, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/abelian_group.pyx":96
 *             return self.divisors < other.elementary_divisors()
 *         elif op == 2:
 *             return self.divisors == other.elementary_divisors()             # <<<<<<<<<<<<<<
 *         elif op == 4:
 *             return self.divisors > other.elementary_divisors()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_elementary_divisors); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 96, __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(4, 96, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_self->divisors, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 96, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/abelian_group.pyx":95
 *         if op == 0:
 *             return self.divisors < other.elementary_divisors()
 *         elif op == 2:             # <<<<<<<<<<<<<<
 *             return self.divisors == other.elementary_divisors()
 *         elif op == 4:
 */
  }

  /* "cython/core/abelian_group.pyx":97
 *         elif op == 2:
 *             return self.divisors == other.elementary_divisors()
 *         elif op == 4:             # <<<<<<<<<<<<<<
 *             return self.divisors > other.elementary_divisors()
 *         elif op == 1:
 */
  __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_op, __pyx_int_4, 4, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(4, 97, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/abelian_group.pyx":98
 *             return self.divisors == other.elementary_divisors()
 *         elif op == 4:
 *             return self.divisors > other.elementary_divisors()             # <<<<<<<<<<<<<<
 *         elif op == 1:
 *             return self.divisors <= other.elementary_divisors()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_elementary_divisors); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 98, __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(4, 98, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->divisors, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 98, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cython/core/abelian_group.pyx":97
 *         elif op == 2:
 *             return self.divisors == other.elementary_divisors()
 *         elif op == 4:             # <<<<<<<<<<<<<<
 *             return self.divisors > other.elementary_divisors()
 *         elif op == 1:
 */
  }

  /* "cython/core/abelian_group.pyx":99
 *         elif op == 4:
 *             return self.divisors > other.elementary_divisors()
 *         elif op == 1:             # <<<<<<<<<<<<<<
 *             return self.divisors <= other.elementary_divisors()
 *         elif op == 3:
 */
  __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_op, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(4, 99, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/abelian_group.pyx":100
 *             return self.divisors > other.elementary_divisors()
 *         elif op == 1:
 *             return self.divisors <= other.elementary_divisors()             # <<<<<<<<<<<<<<
 *         elif op == 3:
 *             return self.divisors != other.elementary_divisors()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_elementary_divisors); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 100, __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(4, 100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_self->divisors, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 100, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/abelian_group.pyx":99
 *         elif op == 4:
 *             return self.divisors > other.elementary_divisors()
 *         elif op == 1:             # <<<<<<<<<<<<<<
 *             return self.divisors <= other.elementary_divisors()
 *         elif op == 3:
 */
  }

  /* "cython/core/abelian_group.pyx":101
 *         elif op == 1:
 *             return self.divisors <= other.elementary_divisors()
 *         elif op == 3:             # <<<<<<<<<<<<<<
 *             return self.divisors != other.elementary_divisors()
 *         elif op == 5:
 */
  __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_op, __pyx_int_3, 3, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(4, 101, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/abelian_group.pyx":102
 *             return self.divisors <= other.elementary_divisors()
 *         elif op == 3:
 *             return self.divisors != other.elementary_divisors()             # <<<<<<<<<<<<<<
 *         elif op == 5:
 *             return self.divisors >= other.elementary_divisors()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_elementary_divisors); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 102, __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(4, 102, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_self->divisors, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 102, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cython/core/abelian_group.pyx":101
 *         elif op == 1:
 *             return self.divisors <= other.elementary_divisors()
 *         elif op == 3:             # <<<<<<<<<<<<<<
 *             return self.divisors != other.elementary_divisors()
 *         elif op == 5:
 */
  }

  /* "cython/core/abelian_group.pyx":103
 *         elif op == 3:
 *             return self.divisors != other.elementary_divisors()
 *         elif op == 5:             # <<<<<<<<<<<<<<
 *             return self.divisors >= other.elementary_divisors()
 *         else:
 */
  __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_op, __pyx_int_5, 5, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(4, 103, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/abelian_group.pyx":104
 *             return self.divisors != other.elementary_divisors()
 *         elif op == 5:
 *             return self.divisors >= other.elementary_divisors()             # <<<<<<<<<<<<<<
 *         else:
 *             return NotImplemented
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_elementary_divisors); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 104, __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(4, 104, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_self->divisors, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 104, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/abelian_group.pyx":103
 *         elif op == 3:
 *             return self.divisors != other.elementary_divisors()
 *         elif op == 5:             # <<<<<<<<<<<<<<
 *             return self.divisors >= other.elementary_divisors()
 *         else:
 */
  }

  /* "cython/core/abelian_group.pyx":106
 *             return self.divisors >= other.elementary_divisors()
 *         else:
 *             return NotImplemented             # <<<<<<<<<<<<<<
 * 
 *     def __call__(self):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_builtin_NotImplemented);
    __pyx_r = __pyx_builtin_NotImplemented;
    goto __pyx_L0;
  }

  /* "cython/core/abelian_group.pyx":92
 *         return (AbelianGroup, (None, self.elementary_divisors()))
 * 
 *     def __richcmp__(AbelianGroup self, AbelianGroup other, op):             # <<<<<<<<<<<<<<
 *         if op == 0:
 *             return self.divisors < other.elementary_divisors()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("SnapPy.AbelianGroup.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/abelian_group.pyx":108
 *             return NotImplemented
 * 
 *     def __call__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_13__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_13__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__ (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 NULL;
  #endif
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("__call__", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__call__", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_12AbelianGroup_12__call__(((struct __pyx_obj_6SnapPy_AbelianGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_12__call__(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__call__", 1);

  /* "cython/core/abelian_group.pyx":109
 * 
 *     def __call__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def elementary_divisors(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_self);
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "cython/core/abelian_group.pyx":108
 *             return NotImplemented
 * 
 *     def __call__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cython/core/abelian_group.pyx":111
 *         return self
 * 
 *     def elementary_divisors(self):             # <<<<<<<<<<<<<<
 *         """
 *         The elementary divisors of this finitely generated abelian group.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_15elementary_divisors(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_6SnapPy_12AbelianGroup_14elementary_divisors, "AbelianGroup.elementary_divisors(self)\n\n        The elementary divisors of this finitely generated abelian group.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_12AbelianGroup_15elementary_divisors = {"elementary_divisors", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_12AbelianGroup_15elementary_divisors, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_12AbelianGroup_14elementary_divisors};
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_15elementary_divisors(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("elementary_divisors (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("elementary_divisors", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "elementary_divisors", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_12AbelianGroup_14elementary_divisors(((struct __pyx_obj_6SnapPy_AbelianGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_14elementary_divisors(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("elementary_divisors", 1);

  /* "cython/core/abelian_group.pyx":115
 *         The elementary divisors of this finitely generated abelian group.
 *         """
 *         return self.divisors             # <<<<<<<<<<<<<<
 * 
 *     def rank(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->divisors);
  __pyx_r = __pyx_v_self->divisors;
  goto __pyx_L0;

  /* "cython/core/abelian_group.pyx":111
 *         return self
 * 
 *     def elementary_divisors(self):             # <<<<<<<<<<<<<<
 *         """
 *         The elementary divisors of this finitely generated abelian group.
 */

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

/* "cython/core/abelian_group.pyx":117
 *         return self.divisors
 * 
 *     def rank(self):             # <<<<<<<<<<<<<<
 *         """
 *         The rank of the group.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_17rank(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_6SnapPy_12AbelianGroup_16rank, "AbelianGroup.rank(self)\n\n        The rank of the group.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_12AbelianGroup_17rank = {"rank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_12AbelianGroup_17rank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_12AbelianGroup_16rank};
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_17rank(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("rank (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("rank", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "rank", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_12AbelianGroup_16rank(((struct __pyx_obj_6SnapPy_AbelianGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_16rank(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __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("rank", 1);

  /* "cython/core/abelian_group.pyx":121
 *         The rank of the group.
 *         """
 *         return len(self.divisors)             # <<<<<<<<<<<<<<
 * 
 *     def betti_number(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->divisors;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/abelian_group.pyx":117
 *         return self.divisors
 * 
 *     def rank(self):             # <<<<<<<<<<<<<<
 *         """
 *         The rank of the group.
 */

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

/* "cython/core/abelian_group.pyx":123
 *         return len(self.divisors)
 * 
 *     def betti_number(self):             # <<<<<<<<<<<<<<
 *         """
 *         The rank of the maximal free abelian subgroup.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_19betti_number(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_6SnapPy_12AbelianGroup_18betti_number, "AbelianGroup.betti_number(self)\n\n        The rank of the maximal free abelian subgroup.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_12AbelianGroup_19betti_number = {"betti_number", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_12AbelianGroup_19betti_number, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_12AbelianGroup_18betti_number};
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_19betti_number(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("betti_number (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("betti_number", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "betti_number", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_12AbelianGroup_18betti_number(((struct __pyx_obj_6SnapPy_AbelianGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_18betti_number(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self) {
  PyObject *__pyx_9genexpr62__pyx_v_n = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("betti_number", 1);

  /* "cython/core/abelian_group.pyx":127
 *         The rank of the maximal free abelian subgroup.
 *         """
 *         return len([1 for n in self.divisors if n == 0])             # <<<<<<<<<<<<<<
 * 
 *     def order(self):
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 127, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_self->divisors)) || PyTuple_CheckExact(__pyx_v_self->divisors)) {
      __pyx_t_2 = __pyx_v_self->divisors; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_self->divisors); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 127, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 127, __pyx_L5_error)
    }
    for (;;) {
      if (likely(!__pyx_t_4)) {
        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(4, 127, __pyx_L5_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(4, 127, __pyx_L5_error)
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 127, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_5);
          #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(4, 127, __pyx_L5_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(4, 127, __pyx_L5_error)
          #else
          __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 127, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_4(__pyx_t_2);
        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(4, 127, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr62__pyx_v_n, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_6 = (__Pyx_PyInt_BoolEqObjC(__pyx_9genexpr62__pyx_v_n, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(4, 127, __pyx_L5_error)
      if (__pyx_t_6) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_int_1))) __PYX_ERR(4, 127, __pyx_L5_error)
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_9genexpr62__pyx_v_n); __pyx_9genexpr62__pyx_v_n = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr62__pyx_v_n); __pyx_9genexpr62__pyx_v_n = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(4, 127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/abelian_group.pyx":123
 *         return len(self.divisors)
 * 
 *     def betti_number(self):             # <<<<<<<<<<<<<<
 *         """
 *         The rank of the maximal free abelian subgroup.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("SnapPy.AbelianGroup.betti_number", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_9genexpr62__pyx_v_n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/abelian_group.pyx":129
 *         return len([1 for n in self.divisors if n == 0])
 * 
 *     def order(self):             # <<<<<<<<<<<<<<
 *         """
 *         The order of the group.  Returns the string 'infinite' if the
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_21order(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_6SnapPy_12AbelianGroup_20order, "AbelianGroup.order(self)\n\n        The order of the group.  Returns the string 'infinite' if the\n        group is infinite.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_12AbelianGroup_21order = {"order", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_12AbelianGroup_21order, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_12AbelianGroup_20order};
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_21order(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("order (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("order", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "order", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_12AbelianGroup_20order(((struct __pyx_obj_6SnapPy_AbelianGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_12AbelianGroup_20order(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self) {
  PyObject *__pyx_v_det = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("order", 1);

  /* "cython/core/abelian_group.pyx":134
 *         group is infinite.
 *         """
 *         det = 1             # <<<<<<<<<<<<<<
 *         for c in self.divisors:
 *             det = det * c
 */
  __Pyx_INCREF(__pyx_int_1);
  __pyx_v_det = __pyx_int_1;

  /* "cython/core/abelian_group.pyx":135
 *         """
 *         det = 1
 *         for c in self.divisors:             # <<<<<<<<<<<<<<
 *             det = det * c
 *         return 'infinite' if det == 0 else det
 */
  if (likely(PyList_CheckExact(__pyx_v_self->divisors)) || PyTuple_CheckExact(__pyx_v_self->divisors)) {
    __pyx_t_1 = __pyx_v_self->divisors; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->divisors); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 135, __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(4, 135, __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(4, 135, __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(4, 135, __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(4, 135, __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(4, 135, __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(4, 135, __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(4, 135, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/abelian_group.pyx":136
 *         det = 1
 *         for c in self.divisors:
 *             det = det * c             # <<<<<<<<<<<<<<
 *         return 'infinite' if det == 0 else det
 * 
 */
    __pyx_t_4 = PyNumber_Multiply(__pyx_v_det, __pyx_v_c); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_det, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/abelian_group.pyx":135
 *         """
 *         det = 1
 *         for c in self.divisors:             # <<<<<<<<<<<<<<
 *             det = det * c
 *         return 'infinite' if det == 0 else det
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/abelian_group.pyx":137
 *         for c in self.divisors:
 *             det = det * c
 *         return 'infinite' if det == 0 else det             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_det, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(4, 137, __pyx_L1_error)
  if (__pyx_t_5) {
    __Pyx_INCREF(__pyx_n_s_infinite);
    __pyx_t_1 = __pyx_n_s_infinite;
  } else {
    __Pyx_INCREF(__pyx_v_det);
    __pyx_t_1 = __pyx_v_det;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/abelian_group.pyx":129
 *         return len([1 for n in self.divisors if n == 0])
 * 
 *     def order(self):             # <<<<<<<<<<<<<<
 *         """
 *         The order of the group.  Returns the string 'infinite' if the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("SnapPy.AbelianGroup.order", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_det);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/abelian_group.pyx":39
 *     cdef divisors
 *     # Backwards compatibility hack, part 1.
 *     cdef public coefficients             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, presentation=None, elementary_divisors=[]):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_12coefficients_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6SnapPy_12AbelianGroup_12coefficients_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_6SnapPy_12AbelianGroup_12coefficients___get__(((struct __pyx_obj_6SnapPy_AbelianGroup *)__pyx_v_self));

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

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

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

/* Python wrapper */
static int __pyx_pw_6SnapPy_12AbelianGroup_12coefficients_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6SnapPy_12AbelianGroup_12coefficients_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_6SnapPy_12AbelianGroup_12coefficients_2__set__(((struct __pyx_obj_6SnapPy_AbelianGroup *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6SnapPy_12AbelianGroup_12coefficients_2__set__(struct __pyx_obj_6SnapPy_AbelianGroup *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 1);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->coefficients);
  __Pyx_DECREF(__pyx_v_self->coefficients);
  __pyx_v_self->coefficients = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_6SnapPy_12AbelianGroup_12coefficients_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_6SnapPy_12AbelianGroup_12coefficients_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_6SnapPy_12AbelianGroup_12coefficients_4__del__(((struct __pyx_obj_6SnapPy_AbelianGroup *)__pyx_v_self));

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

static int __pyx_pf_6SnapPy_12AbelianGroup_12coefficients_4__del__(struct __pyx_obj_6SnapPy_AbelianGroup *__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->coefficients);
  __Pyx_DECREF(__pyx_v_self->coefficients);
  __pyx_v_self->coefficients = Py_None;

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

/* "cython/core/abelian_group.pyx":148
 *     cdef set _units, dead_columns
 * 
 *     def __init__(self, rows, cols):             # <<<<<<<<<<<<<<
 *         self.rows = rows
 *         self.cols = cols
 */

/* Python wrapper */
static int __pyx_pw_6SnapPy_18PresentationMatrix_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6SnapPy_18PresentationMatrix_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_rows = 0;
  PyObject *__pyx_v_cols = 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_rows,&__pyx_n_s_cols,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_rows)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 148, __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_cols)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 148, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(4, 148, __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(4, 148, __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_rows = values[0];
    __pyx_v_cols = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, __pyx_nargs); __PYX_ERR(4, 148, __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("SnapPy.PresentationMatrix.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_18PresentationMatrix___init__(((struct __pyx_obj_6SnapPy_PresentationMatrix *)__pyx_v_self), __pyx_v_rows, __pyx_v_cols);

  /* 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_6SnapPy_18PresentationMatrix___init__(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self, PyObject *__pyx_v_rows, PyObject *__pyx_v_cols) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "cython/core/abelian_group.pyx":149
 * 
 *     def __init__(self, rows, cols):
 *         self.rows = rows             # <<<<<<<<<<<<<<
 *         self.cols = cols
 *         self._row_support = {}
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_rows); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 149, __pyx_L1_error)
  __pyx_v_self->rows = __pyx_t_1;

  /* "cython/core/abelian_group.pyx":150
 *     def __init__(self, rows, cols):
 *         self.rows = rows
 *         self.cols = cols             # <<<<<<<<<<<<<<
 *         self._row_support = {}
 *         self._col_support = {}
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_cols); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 150, __pyx_L1_error)
  __pyx_v_self->cols = __pyx_t_1;

  /* "cython/core/abelian_group.pyx":151
 *         self.rows = rows
 *         self.cols = cols
 *         self._row_support = {}             # <<<<<<<<<<<<<<
 *         self._col_support = {}
 *         self._entries = {}
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_row_support);
  __Pyx_DECREF(__pyx_v_self->_row_support);
  __pyx_v_self->_row_support = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/abelian_group.pyx":152
 *         self.cols = cols
 *         self._row_support = {}
 *         self._col_support = {}             # <<<<<<<<<<<<<<
 *         self._entries = {}
 *         self._units = set()
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_col_support);
  __Pyx_DECREF(__pyx_v_self->_col_support);
  __pyx_v_self->_col_support = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/abelian_group.pyx":153
 *         self._row_support = {}
 *         self._col_support = {}
 *         self._entries = {}             # <<<<<<<<<<<<<<
 *         self._units = set()
 *         self.dead_columns = set()
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_entries);
  __Pyx_DECREF(__pyx_v_self->_entries);
  __pyx_v_self->_entries = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/abelian_group.pyx":154
 *         self._col_support = {}
 *         self._entries = {}
 *         self._units = set()             # <<<<<<<<<<<<<<
 *         self.dead_columns = set()
 * 
 */
  __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->_units);
  __Pyx_DECREF(__pyx_v_self->_units);
  __pyx_v_self->_units = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/abelian_group.pyx":155
 *         self._entries = {}
 *         self._units = set()
 *         self.dead_columns = set()             # <<<<<<<<<<<<<<
 * 
 *     def get_data(self):
 */
  __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->dead_columns);
  __Pyx_DECREF(__pyx_v_self->dead_columns);
  __pyx_v_self->dead_columns = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/abelian_group.pyx":148
 *     cdef set _units, dead_columns
 * 
 *     def __init__(self, rows, cols):             # <<<<<<<<<<<<<<
 *         self.rows = rows
 *         self.cols = cols
 */

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

/* "cython/core/abelian_group.pyx":157
 *         self.dead_columns = set()
 * 
 *     def get_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a triple (number of rows, number of columns, entries)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_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_6SnapPy_18PresentationMatrix_2get_data, "PresentationMatrix.get_data(self)\n\n        Returns a triple (number of rows, number of columns, entries)\n        where entries is a dictionary for the non-zero entries of the\n        presentation matrix: the key is a pair (i,j) indicating the row and\n        column, the value is the value of the corresponding matrix entry.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_18PresentationMatrix_3get_data = {"get_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_18PresentationMatrix_3get_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18PresentationMatrix_2get_data};
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_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
) {
  #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_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("get_data", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_data", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_18PresentationMatrix_2get_data(((struct __pyx_obj_6SnapPy_PresentationMatrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_18PresentationMatrix_2get_data(struct __pyx_obj_6SnapPy_PresentationMatrix *__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("get_data", 1);

  /* "cython/core/abelian_group.pyx":164
 *         column, the value is the value of the corresponding matrix entry.
 *         """
 *         return self.rows, self.cols, self._entries             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, ij, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->cols); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 164, __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(4, 164, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(4, 164, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_entries);
  __Pyx_GIVEREF(__pyx_v_self->_entries);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->_entries)) __PYX_ERR(4, 164, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cython/core/abelian_group.pyx":157
 *         self.dead_columns = set()
 * 
 *     def get_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a triple (number of rows, number of columns, entries)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.PresentationMatrix.get_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/abelian_group.pyx":166
 *         return self.rows, self.cols, self._entries
 * 
 *     def __setitem__(self, ij, value):             # <<<<<<<<<<<<<<
 *         i, j = ij
 *         # check bounds
 */

/* Python wrapper */
static int __pyx_pw_6SnapPy_18PresentationMatrix_5__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ij, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_6SnapPy_18PresentationMatrix_5__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ij, PyObject *__pyx_v_value) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6SnapPy_18PresentationMatrix_4__setitem__(((struct __pyx_obj_6SnapPy_PresentationMatrix *)__pyx_v_self), ((PyObject *)__pyx_v_ij), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_6SnapPy_18PresentationMatrix_4__setitem__(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self, PyObject *__pyx_v_ij, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_j = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 1);

  /* "cython/core/abelian_group.pyx":167
 * 
 *     def __setitem__(self, ij, value):
 *         i, j = ij             # <<<<<<<<<<<<<<
 *         # check bounds
 *         if not 0 <= i < self.rows or not 0 <= j < self.cols:
 */
  if ((likely(PyTuple_CheckExact(__pyx_v_ij))) || (PyList_CheckExact(__pyx_v_ij))) {
    PyObject* sequence = __pyx_v_ij;
    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(4, 167, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
  } else {
    Py_ssize_t index = -1;
    __pyx_t_3 = PyObject_GetIter(__pyx_v_ij); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
    index = 0; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < 0) __PYX_ERR(4, 167, __pyx_L1_error)
    __pyx_t_4 = NULL;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(4, 167, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_i = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_j = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/abelian_group.pyx":169
 *         i, j = ij
 *         # check bounds
 *         if not 0 <= i < self.rows or not 0 <= j < self.cols:             # <<<<<<<<<<<<<<
 *             raise IndexError
 *         self._set(ij, value)
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_int_0, __pyx_v_i, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 169, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
    __Pyx_DECREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_i, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 169, __pyx_L1_error)
    __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(4, 169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_7 = (!__pyx_t_6);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_2 = PyObject_RichCompare(__pyx_int_0, __pyx_v_j, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 169, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
    __Pyx_DECREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->cols); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_j, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 169, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(4, 169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = (!__pyx_t_7);
  __pyx_t_5 = __pyx_t_6;
  __pyx_L6_bool_binop_done:;
  if (unlikely(__pyx_t_5)) {

    /* "cython/core/abelian_group.pyx":170
 *         # check bounds
 *         if not 0 <= i < self.rows or not 0 <= j < self.cols:
 *             raise IndexError             # <<<<<<<<<<<<<<
 *         self._set(ij, value)
 * 
 */
    __Pyx_Raise(__pyx_builtin_IndexError, 0, 0, 0);
    __PYX_ERR(4, 170, __pyx_L1_error)

    /* "cython/core/abelian_group.pyx":169
 *         i, j = ij
 *         # check bounds
 *         if not 0 <= i < self.rows or not 0 <= j < self.cols:             # <<<<<<<<<<<<<<
 *             raise IndexError
 *         self._set(ij, value)
 */
  }

  /* "cython/core/abelian_group.pyx":171
 *         if not 0 <= i < self.rows or not 0 <= j < self.cols:
 *             raise IndexError
 *         self._set(ij, value)             # <<<<<<<<<<<<<<
 * 
 *     cdef _set(self, ij, value):
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_PresentationMatrix *)__pyx_v_self->__pyx_vtab)->_set(__pyx_v_self, __pyx_v_ij, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/abelian_group.pyx":166
 *         return self.rows, self.cols, self._entries
 * 
 *     def __setitem__(self, ij, value):             # <<<<<<<<<<<<<<
 *         i, j = ij
 *         # check bounds
 */

  /* 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_AddTraceback("SnapPy.PresentationMatrix.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/abelian_group.pyx":173
 *         self._set(ij, value)
 * 
 *     cdef _set(self, ij, value):             # <<<<<<<<<<<<<<
 *         # cdef'ed to allow for faster calling
 *         i, j = ij
 */

static PyObject *__pyx_f_6SnapPy_18PresentationMatrix__set(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self, PyObject *__pyx_v_ij, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_j = 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)(PyObject *);
  int __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_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_set", 1);

  /* "cython/core/abelian_group.pyx":175
 *     cdef _set(self, ij, value):
 *         # cdef'ed to allow for faster calling
 *         i, j = ij             # <<<<<<<<<<<<<<
 *         # keep track of units
 *         if value == 1 or value == -1:
 */
  if ((likely(PyTuple_CheckExact(__pyx_v_ij))) || (PyList_CheckExact(__pyx_v_ij))) {
    PyObject* sequence = __pyx_v_ij;
    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(4, 175, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_2);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
  } else {
    Py_ssize_t index = -1;
    __pyx_t_3 = PyObject_GetIter(__pyx_v_ij); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
    index = 0; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < 0) __PYX_ERR(4, 175, __pyx_L1_error)
    __pyx_t_4 = NULL;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(4, 175, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_i = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_j = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/abelian_group.pyx":177
 *         i, j = ij
 *         # keep track of units
 *         if value == 1 or value == -1:             # <<<<<<<<<<<<<<
 *             self._units.add(ij)
 *         else:
 */
  __pyx_t_6 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_value, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(4, 177, __pyx_L1_error)
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_6 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_value, __pyx_int_neg_1, -1L, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(4, 177, __pyx_L1_error)
  __pyx_t_5 = __pyx_t_6;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_5) {

    /* "cython/core/abelian_group.pyx":178
 *         # keep track of units
 *         if value == 1 or value == -1:
 *             self._units.add(ij)             # <<<<<<<<<<<<<<
 *         else:
 *             try:
 */
    if (unlikely(__pyx_v_self->_units == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add");
      __PYX_ERR(4, 178, __pyx_L1_error)
    }
    __pyx_t_7 = PySet_Add(__pyx_v_self->_units, __pyx_v_ij); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(4, 178, __pyx_L1_error)

    /* "cython/core/abelian_group.pyx":177
 *         i, j = ij
 *         # keep track of units
 *         if value == 1 or value == -1:             # <<<<<<<<<<<<<<
 *             self._units.add(ij)
 *         else:
 */
    goto __pyx_L5;
  }

  /* "cython/core/abelian_group.pyx":180
 *             self._units.add(ij)
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 self._units.remove(ij)
 *             except KeyError:
 */
  /*else*/ {
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      /*try:*/ {

        /* "cython/core/abelian_group.pyx":181
 *         else:
 *             try:
 *                 self._units.remove(ij)             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 pass
 */
        if (unlikely(__pyx_v_self->_units == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "remove");
          __PYX_ERR(4, 181, __pyx_L8_error)
        }
        __pyx_t_7 = __Pyx_PySet_Remove(__pyx_v_self->_units, __pyx_v_ij); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(4, 181, __pyx_L8_error)

        /* "cython/core/abelian_group.pyx":180
 *             self._units.add(ij)
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 self._units.remove(ij)
 *             except KeyError:
 */
      }
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L13_try_end;
      __pyx_L8_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cython/core/abelian_group.pyx":182
 *             try:
 *                 self._units.remove(ij)
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 pass
 *         # don't store any zeros
 */
      __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_11) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L9_exception_handled;
      }
      goto __pyx_L10_except_error;

      /* "cython/core/abelian_group.pyx":180
 *             self._units.add(ij)
 *         else:
 *             try:             # <<<<<<<<<<<<<<
 *                 self._units.remove(ij)
 *             except KeyError:
 */
      __pyx_L10_except_error:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      goto __pyx_L1_error;
      __pyx_L9_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      __pyx_L13_try_end:;
    }
  }
  __pyx_L5:;

  /* "cython/core/abelian_group.pyx":185
 *                 pass
 *         # don't store any zeros
 *         if value == 0:             # <<<<<<<<<<<<<<
 *             try:
 *                 self._entries.pop(ij)
 */
  __pyx_t_5 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_value, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(4, 185, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "cython/core/abelian_group.pyx":186
 *         # don't store any zeros
 *         if value == 0:
 *             try:             # <<<<<<<<<<<<<<
 *                 self._entries.pop(ij)
 *                 self._row_support[i].remove(j)
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_8);
      /*try:*/ {

        /* "cython/core/abelian_group.pyx":187
 *         if value == 0:
 *             try:
 *                 self._entries.pop(ij)             # <<<<<<<<<<<<<<
 *                 self._row_support[i].remove(j)
 *                 self._col_support[j].remove(i)
 */
        if (unlikely(__pyx_v_self->_entries == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop");
          __PYX_ERR(4, 187, __pyx_L15_error)
        }
        __pyx_t_2 = __Pyx_PyDict_Pop(__pyx_v_self->_entries, __pyx_v_ij, ((PyObject *)NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 187, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "cython/core/abelian_group.pyx":188
 *             try:
 *                 self._entries.pop(ij)
 *                 self._row_support[i].remove(j)             # <<<<<<<<<<<<<<
 *                 self._col_support[j].remove(i)
 *             except KeyError:
 */
        if (unlikely(__pyx_v_self->_row_support == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(4, 188, __pyx_L15_error)
        }
        __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->_row_support, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 188, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 188, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = NULL;
        __pyx_t_11 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(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_11 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_j};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 188, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "cython/core/abelian_group.pyx":189
 *                 self._entries.pop(ij)
 *                 self._row_support[i].remove(j)
 *                 self._col_support[j].remove(i)             # <<<<<<<<<<<<<<
 *             except KeyError:
 *                 pass
 */
        if (unlikely(__pyx_v_self->_col_support == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(4, 189, __pyx_L15_error)
        }
        __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->_col_support, __pyx_v_j); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 189, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 189, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        __pyx_t_11 = 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_11 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_i};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 189, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "cython/core/abelian_group.pyx":186
 *         # don't store any zeros
 *         if value == 0:
 *             try:             # <<<<<<<<<<<<<<
 *                 self._entries.pop(ij)
 *                 self._row_support[i].remove(j)
 */
      }
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L20_try_end;
      __pyx_L15_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cython/core/abelian_group.pyx":190
 *                 self._row_support[i].remove(j)
 *                 self._col_support[j].remove(i)
 *             except KeyError:             # <<<<<<<<<<<<<<
 *                 pass
 *             return
 */
      __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
      if (__pyx_t_11) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L16_exception_handled;
      }
      goto __pyx_L17_except_error;

      /* "cython/core/abelian_group.pyx":186
 *         # don't store any zeros
 *         if value == 0:
 *             try:             # <<<<<<<<<<<<<<
 *                 self._entries.pop(ij)
 *                 self._row_support[i].remove(j)
 */
      __pyx_L17_except_error:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      goto __pyx_L1_error;
      __pyx_L16_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      __pyx_L20_try_end:;
    }

    /* "cython/core/abelian_group.pyx":192
 *             except KeyError:
 *                 pass
 *             return             # <<<<<<<<<<<<<<
 *         # keep track of row and column supports
 *         try:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "cython/core/abelian_group.pyx":185
 *                 pass
 *         # don't store any zeros
 *         if value == 0:             # <<<<<<<<<<<<<<
 *             try:
 *                 self._entries.pop(ij)
 */
  }

  /* "cython/core/abelian_group.pyx":194
 *             return
 *         # keep track of row and column supports
 *         try:             # <<<<<<<<<<<<<<
 *             self._row_support[i].add(j)
 *         except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_10);
    /*try:*/ {

      /* "cython/core/abelian_group.pyx":195
 *         # keep track of row and column supports
 *         try:
 *             self._row_support[i].add(j)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             self._row_support[i] = set([j])
 */
      if (unlikely(__pyx_v_self->_row_support == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 195, __pyx_L21_error)
      }
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->_row_support, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 195, __pyx_L21_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 195, __pyx_L21_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_11 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(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_11 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_j};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 195, __pyx_L21_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/abelian_group.pyx":194
 *             return
 *         # keep track of row and column supports
 *         try:             # <<<<<<<<<<<<<<
 *             self._row_support[i].add(j)
 *         except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    goto __pyx_L26_try_end;
    __pyx_L21_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/abelian_group.pyx":196
 *         try:
 *             self._row_support[i].add(j)
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             self._row_support[i] = set([j])
 *         try:
 */
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_11) {
      __Pyx_AddTraceback("SnapPy.PresentationMatrix._set", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(4, 196, __pyx_L23_except_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_1);

      /* "cython/core/abelian_group.pyx":197
 *             self._row_support[i].add(j)
 *         except KeyError:
 *             self._row_support[i] = set([j])             # <<<<<<<<<<<<<<
 *         try:
 *             self._col_support[j].add(i)
 */
      __pyx_t_12 = PySet_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 197, __pyx_L23_except_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (PySet_Add(__pyx_t_12, __pyx_v_j) < 0) __PYX_ERR(4, 197, __pyx_L23_except_error)
      if (unlikely(__pyx_v_self->_row_support == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 197, __pyx_L23_except_error)
      }
      if (unlikely((PyDict_SetItem(__pyx_v_self->_row_support, __pyx_v_i, __pyx_t_12) < 0))) __PYX_ERR(4, 197, __pyx_L23_except_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L22_exception_handled;
    }
    goto __pyx_L23_except_error;

    /* "cython/core/abelian_group.pyx":194
 *             return
 *         # keep track of row and column supports
 *         try:             # <<<<<<<<<<<<<<
 *             self._row_support[i].add(j)
 *         except KeyError:
 */
    __pyx_L23_except_error:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    goto __pyx_L1_error;
    __pyx_L22_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
    __pyx_L26_try_end:;
  }

  /* "cython/core/abelian_group.pyx":198
 *         except KeyError:
 *             self._row_support[i] = set([j])
 *         try:             # <<<<<<<<<<<<<<
 *             self._col_support[j].add(i)
 *         except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_9);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "cython/core/abelian_group.pyx":199
 *             self._row_support[i] = set([j])
 *         try:
 *             self._col_support[j].add(i)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             self._col_support[j] = set([i])
 */
      if (unlikely(__pyx_v_self->_col_support == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 199, __pyx_L29_error)
      }
      __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->_col_support, __pyx_v_j); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 199, __pyx_L29_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 199, __pyx_L29_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_11 = 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_11 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_i};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 199, __pyx_L29_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cython/core/abelian_group.pyx":198
 *         except KeyError:
 *             self._row_support[i] = set([j])
 *         try:             # <<<<<<<<<<<<<<
 *             self._col_support[j].add(i)
 *         except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L34_try_end;
    __pyx_L29_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/abelian_group.pyx":200
 *         try:
 *             self._col_support[j].add(i)
 *         except KeyError:             # <<<<<<<<<<<<<<
 *             self._col_support[j] = set([i])
 *         # set the value
 */
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_11) {
      __Pyx_AddTraceback("SnapPy.PresentationMatrix._set", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(4, 200, __pyx_L31_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);

      /* "cython/core/abelian_group.pyx":201
 *             self._col_support[j].add(i)
 *         except KeyError:
 *             self._col_support[j] = set([i])             # <<<<<<<<<<<<<<
 *         # set the value
 *         self._entries[ij] = value
 */
      __pyx_t_12 = PySet_New(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(4, 201, __pyx_L31_except_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (PySet_Add(__pyx_t_12, __pyx_v_i) < 0) __PYX_ERR(4, 201, __pyx_L31_except_error)
      if (unlikely(__pyx_v_self->_col_support == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 201, __pyx_L31_except_error)
      }
      if (unlikely((PyDict_SetItem(__pyx_v_self->_col_support, __pyx_v_j, __pyx_t_12) < 0))) __PYX_ERR(4, 201, __pyx_L31_except_error)
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L30_exception_handled;
    }
    goto __pyx_L31_except_error;

    /* "cython/core/abelian_group.pyx":198
 *         except KeyError:
 *             self._row_support[i] = set([j])
 *         try:             # <<<<<<<<<<<<<<
 *             self._col_support[j].add(i)
 *         except KeyError:
 */
    __pyx_L31_except_error:;
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L30_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_9);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_9, __pyx_t_8);
    __pyx_L34_try_end:;
  }

  /* "cython/core/abelian_group.pyx":203
 *             self._col_support[j] = set([i])
 *         # set the value
 *         self._entries[ij] = value             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, ij):
 */
  if (unlikely(__pyx_v_self->_entries == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(4, 203, __pyx_L1_error)
  }
  if (unlikely((PyDict_SetItem(__pyx_v_self->_entries, __pyx_v_ij, __pyx_v_value) < 0))) __PYX_ERR(4, 203, __pyx_L1_error)

  /* "cython/core/abelian_group.pyx":173
 *         self._set(ij, value)
 * 
 *     cdef _set(self, ij, value):             # <<<<<<<<<<<<<<
 *         # cdef'ed to allow for faster calling
 *         i, j = ij
 */

  /* 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_12);
  __Pyx_AddTraceback("SnapPy.PresentationMatrix._set", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/abelian_group.pyx":205
 *         self._entries[ij] = value
 * 
 *     def __getitem__(self, ij):             # <<<<<<<<<<<<<<
 *         return self._entries.get(ij, 0)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ij); /*proto*/
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_ij) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6SnapPy_18PresentationMatrix_6__getitem__(((struct __pyx_obj_6SnapPy_PresentationMatrix *)__pyx_v_self), ((PyObject *)__pyx_v_ij));

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

static PyObject *__pyx_pf_6SnapPy_18PresentationMatrix_6__getitem__(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self, PyObject *__pyx_v_ij) {
  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("__getitem__", 1);

  /* "cython/core/abelian_group.pyx":206
 * 
 *     def __getitem__(self, ij):
 *         return self._entries.get(ij, 0)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_self->_entries == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
    __PYX_ERR(4, 206, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->_entries, __pyx_v_ij, __pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/abelian_group.pyx":205
 *         self._entries[ij] = value
 * 
 *     def __getitem__(self, ij):             # <<<<<<<<<<<<<<
 *         return self._entries.get(ij, 0)
 * 
 */

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

/* "cython/core/abelian_group.pyx":208
 *         return self._entries.get(ij, 0)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(self.explode())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_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_6SnapPy_18PresentationMatrix_8__repr__(((struct __pyx_obj_6SnapPy_PresentationMatrix *)__pyx_v_self));

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

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

  /* "cython/core/abelian_group.pyx":209
 * 
 *     def __repr__(self):
 *         return repr(self.explode())             # <<<<<<<<<<<<<<
 * 
 *     def add_rows(self, n):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_explode); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 209, __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(4, 209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 209, __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;

  /* "cython/core/abelian_group.pyx":208
 *         return self._entries.get(ij, 0)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(self.explode())
 * 
 */

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

/* "cython/core/abelian_group.pyx":211
 *         return repr(self.explode())
 * 
 *     def add_rows(self, n):             # <<<<<<<<<<<<<<
 *         self.rows += n
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_11add_rows(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_6SnapPy_18PresentationMatrix_10add_rows, "PresentationMatrix.add_rows(self, n)");
static PyMethodDef __pyx_mdef_6SnapPy_18PresentationMatrix_11add_rows = {"add_rows", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_18PresentationMatrix_11add_rows, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18PresentationMatrix_10add_rows};
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_11add_rows(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_n = 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_rows (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_n,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_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 211, __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_rows") < 0)) __PYX_ERR(4, 211, __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_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_rows", 1, 1, 1, __pyx_nargs); __PYX_ERR(4, 211, __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("SnapPy.PresentationMatrix.add_rows", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_18PresentationMatrix_10add_rows(((struct __pyx_obj_6SnapPy_PresentationMatrix *)__pyx_v_self), __pyx_v_n);

  /* 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_6SnapPy_18PresentationMatrix_10add_rows(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self, PyObject *__pyx_v_n) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_rows", 1);

  /* "cython/core/abelian_group.pyx":212
 * 
 *     def add_rows(self, n):
 *         self.rows += n             # <<<<<<<<<<<<<<
 * 
 *     def row_op(self, i, j, m):
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->rows = __pyx_t_3;

  /* "cython/core/abelian_group.pyx":211
 *         return repr(self.explode())
 * 
 *     def add_rows(self, n):             # <<<<<<<<<<<<<<
 *         self.rows += n
 * 
 */

  /* 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_AddTraceback("SnapPy.PresentationMatrix.add_rows", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/abelian_group.pyx":214
 *         self.rows += n
 * 
 *     def row_op(self, i, j, m):             # <<<<<<<<<<<<<<
 *         """
 *         Subtract m * row_i from row_j
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_13row_op(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_6SnapPy_18PresentationMatrix_12row_op, "PresentationMatrix.row_op(self, i, j, m)\n\n        Subtract m * row_i from row_j\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_18PresentationMatrix_13row_op = {"row_op", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_18PresentationMatrix_13row_op, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18PresentationMatrix_12row_op};
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_13row_op(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_i = 0;
  PyObject *__pyx_v_j = 0;
  PyObject *__pyx_v_m = 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("row_op (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_i,&__pyx_n_s_j,&__pyx_n_s_m,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_i)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 214, __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_j)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 214, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("row_op", 1, 3, 3, 1); __PYX_ERR(4, 214, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_m)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(4, 214, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("row_op", 1, 3, 3, 2); __PYX_ERR(4, 214, __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, "row_op") < 0)) __PYX_ERR(4, 214, __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_i = values[0];
    __pyx_v_j = values[1];
    __pyx_v_m = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("row_op", 1, 3, 3, __pyx_nargs); __PYX_ERR(4, 214, __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("SnapPy.PresentationMatrix.row_op", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_18PresentationMatrix_12row_op(((struct __pyx_obj_6SnapPy_PresentationMatrix *)__pyx_v_self), __pyx_v_i, __pyx_v_j, __pyx_v_m);

  /* 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_6SnapPy_18PresentationMatrix_12row_op(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, PyObject *__pyx_v_m) {
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_r = NULL;
  __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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("row_op", 1);

  /* "cython/core/abelian_group.pyx":218
 *         Subtract m * row_i from row_j
 *         """
 *         for k in list(self._row_support[i]):             # <<<<<<<<<<<<<<
 *             self[j,k] -= m*self[i,k]
 * 
 */
  if (unlikely(__pyx_v_self->_row_support == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(4, 218, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->_row_support, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
  __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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(4, 218, __pyx_L1_error)
      #endif
      if (__pyx_t_3 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(4, 218, __pyx_L1_error)
    #else
    __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/abelian_group.pyx":219
 *         """
 *         for k in list(self._row_support[i]):
 *             self[j,k] -= m*self[i,k]             # <<<<<<<<<<<<<<
 * 
 *     def explode(self):
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_j);
    __Pyx_GIVEREF(__pyx_v_j);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_j)) __PYX_ERR(4, 219, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_k);
    __Pyx_GIVEREF(__pyx_v_k);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_k)) __PYX_ERR(4, 219, __pyx_L1_error);
    __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_v_i);
    __Pyx_GIVEREF(__pyx_v_i);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_i)) __PYX_ERR(4, 219, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_k);
    __Pyx_GIVEREF(__pyx_v_k);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_k)) __PYX_ERR(4, 219, __pyx_L1_error);
    __pyx_t_6 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Multiply(__pyx_v_m, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_InPlaceSubtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_t_2, __pyx_t_6) < 0))) __PYX_ERR(4, 219, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/abelian_group.pyx":218
 *         Subtract m * row_i from row_j
 *         """
 *         for k in list(self._row_support[i]):             # <<<<<<<<<<<<<<
 *             self[j,k] -= m*self[i,k]
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/abelian_group.pyx":214
 *         self.rows += n
 * 
 *     def row_op(self, i, j, m):             # <<<<<<<<<<<<<<
 *         """
 *         Subtract m * row_i from row_j
 */

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.PresentationMatrix.row_op", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/abelian_group.pyx":221
 *             self[j,k] -= m*self[i,k]
 * 
 *     def explode(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the full matrix, including dead columns, as a list of lists.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_15explode(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_6SnapPy_18PresentationMatrix_14explode, "PresentationMatrix.explode(self)\n\n        Return the full matrix, including dead columns, as a list of lists.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_18PresentationMatrix_15explode = {"explode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_18PresentationMatrix_15explode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18PresentationMatrix_14explode};
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_15explode(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("explode (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("explode", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "explode", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_18PresentationMatrix_14explode(((struct __pyx_obj_6SnapPy_PresentationMatrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_18PresentationMatrix_14explode(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self) {
  PyObject *__pyx_9genexpr63__pyx_v_i = NULL;
  int __pyx_9genexpr64__pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  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("explode", 1);

  /* "cython/core/abelian_group.pyx":225
 *         Return the full matrix, including dead columns, as a list of lists.
 *         """
 *         return [[self._entries.get((i, j), 0) for j in range(self.cols)]             # <<<<<<<<<<<<<<
 *                 for i in range(self.rows)]
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 225, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cython/core/abelian_group.pyx":226
 *         """
 *         return [[self._entries.get((i, j), 0) for j in range(self.cols)]
 *                 for i in range(self.rows)]             # <<<<<<<<<<<<<<
 * 
 *     def simplify(self):
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 226, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 226, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 226, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 226, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        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(4, 226, __pyx_L5_error)
            #endif
            if (__pyx_t_4 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(4, 226, __pyx_L5_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 226, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_3);
          #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(4, 226, __pyx_L5_error)
            #endif
            if (__pyx_t_4 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(4, 226, __pyx_L5_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 226, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_5(__pyx_t_2);
        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(4, 226, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr63__pyx_v_i, __pyx_t_3);
      __pyx_t_3 = 0;
      { /* enter inner scope */

        /* "cython/core/abelian_group.pyx":225
 *         Return the full matrix, including dead columns, as a list of lists.
 *         """
 *         return [[self._entries.get((i, j), 0) for j in range(self.cols)]             # <<<<<<<<<<<<<<
 *                 for i in range(self.rows)]
 * 
 */
        __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 225, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_6 = __pyx_v_self->cols;
        __pyx_t_7 = __pyx_t_6;
        for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
          __pyx_9genexpr64__pyx_v_j = __pyx_t_8;
          if (unlikely(__pyx_v_self->_entries == Py_None)) {
            PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
            __PYX_ERR(4, 225, __pyx_L5_error)
          }
          __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_9genexpr64__pyx_v_j); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 225, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 225, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_INCREF(__pyx_9genexpr63__pyx_v_i);
          __Pyx_GIVEREF(__pyx_9genexpr63__pyx_v_i);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_9genexpr63__pyx_v_i)) __PYX_ERR(4, 225, __pyx_L5_error);
          __Pyx_GIVEREF(__pyx_t_9);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9)) __PYX_ERR(4, 225, __pyx_L5_error);
          __pyx_t_9 = 0;
          __pyx_t_9 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->_entries, __pyx_t_10, __pyx_int_0); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 225, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_9))) __PYX_ERR(4, 225, __pyx_L5_error)
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
      } /* exit inner scope */
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(4, 225, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cython/core/abelian_group.pyx":226
 *         """
 *         return [[self._entries.get((i, j), 0) for j in range(self.cols)]
 *                 for i in range(self.rows)]             # <<<<<<<<<<<<<<
 * 
 *     def simplify(self):
 */
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_9genexpr63__pyx_v_i); __pyx_9genexpr63__pyx_v_i = 0;
    goto __pyx_L11_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr63__pyx_v_i); __pyx_9genexpr63__pyx_v_i = 0;
    goto __pyx_L1_error;
    __pyx_L11_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/abelian_group.pyx":221
 *             self[j,k] -= m*self[i,k]
 * 
 *     def explode(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the full matrix, including dead columns, as a list of lists.
 */

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("SnapPy.PresentationMatrix.explode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_9genexpr63__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/abelian_group.pyx":228
 *                 for i in range(self.rows)]
 * 
 *     def simplify(self):             # <<<<<<<<<<<<<<
 *         """
 *         If any entry is a unit, eliminate the corresponding generator.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_17simplify(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_6SnapPy_18PresentationMatrix_16simplify, "PresentationMatrix.simplify(self)\n\n        If any entry is a unit, eliminate the corresponding generator.\n        Continue until no units remain.  When a generator is removed,\n        remember its column index.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_18PresentationMatrix_17simplify = {"simplify", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_18PresentationMatrix_17simplify, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18PresentationMatrix_16simplify};
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_17simplify(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("simplify (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("simplify", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "simplify", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_18PresentationMatrix_16simplify(((struct __pyx_obj_6SnapPy_PresentationMatrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_18PresentationMatrix_16simplify(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self) {
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_k;
  int __pyx_v_l;
  PyObject *__pyx_v_col_support = NULL;
  PyObject *__pyx_v_row_entries = NULL;
  PyObject *__pyx_v_unit = NULL;
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_v_a_il = NULL;
  PyObject *__pyx_v_kl = NULL;
  PyObject *__pyx_v_temp = NULL;
  int __pyx_9genexpr65__pyx_v_k;
  int __pyx_9genexpr66__pyx_v_l;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  int __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("simplify", 1);

  /* "cython/core/abelian_group.pyx":234
 *         remember its column index.
 *         """
 *         cdef int i = 0, j = 0, k, l             # <<<<<<<<<<<<<<
 *         while len(self._units) > 0:
 *             for i, j in self._units:
 */
  __pyx_v_i = 0;
  __pyx_v_j = 0;

  /* "cython/core/abelian_group.pyx":235
 *         """
 *         cdef int i = 0, j = 0, k, l
 *         while len(self._units) > 0:             # <<<<<<<<<<<<<<
 *             for i, j in self._units:
 *                 break
 */
  while (1) {
    __pyx_t_1 = __pyx_v_self->_units;
    __Pyx_INCREF(__pyx_t_1);
    if (unlikely(__pyx_t_1 == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
      __PYX_ERR(4, 235, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_PySet_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(4, 235, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = (__pyx_t_2 > 0);
    if (!__pyx_t_3) break;

    /* "cython/core/abelian_group.pyx":236
 *         cdef int i = 0, j = 0, k, l
 *         while len(self._units) > 0:
 *             for i, j in self._units:             # <<<<<<<<<<<<<<
 *                 break
 *             col_support = [k for k in self._col_support[j] if k != i] + [i]
 */
    __pyx_t_2 = 0;
    __pyx_t_6 = __Pyx_set_iterator(__pyx_v_self->_units, 1, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 236, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_1);
    __pyx_t_1 = __pyx_t_6;
    __pyx_t_6 = 0;
    while (1) {
      __pyx_t_7 = __Pyx_set_iter_next(__pyx_t_1, __pyx_t_4, &__pyx_t_2, &__pyx_t_6, __pyx_t_5);
      if (unlikely(__pyx_t_7 == 0)) break;
      if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(4, 236, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
        PyObject* sequence = __pyx_t_6;
        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(4, 236, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        #else
        __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 236, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 236, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_10 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 236, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_10);
        index = 0; __pyx_t_8 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L7_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L7_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(4, 236, __pyx_L1_error)
        __pyx_t_11 = NULL;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L8_unpacking_done;
        __pyx_L7_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(4, 236, __pyx_L1_error)
        __pyx_L8_unpacking_done:;
      }
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 236, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 236, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_i = __pyx_t_7;
      __pyx_v_j = __pyx_t_12;

      /* "cython/core/abelian_group.pyx":237
 *         while len(self._units) > 0:
 *             for i, j in self._units:
 *                 break             # <<<<<<<<<<<<<<
 *             col_support = [k for k in self._col_support[j] if k != i] + [i]
 *             row_entries = [(l, self._entries.get((i,l), 0))
 */
      goto __pyx_L6_break;
    }
    __pyx_L6_break:;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/abelian_group.pyx":238
 *             for i, j in self._units:
 *                 break
 *             col_support = [k for k in self._col_support[j] if k != i] + [i]             # <<<<<<<<<<<<<<
 *             row_entries = [(l, self._entries.get((i,l), 0))
 *                            for l in self._row_support[i]]
 */
    { /* enter inner scope */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 238, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(__pyx_v_self->_col_support == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 238, __pyx_L1_error)
      }
      __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 238, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_self->_col_support, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 238, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
        __pyx_t_6 = __pyx_t_9; __Pyx_INCREF(__pyx_t_6);
        __pyx_t_4 = 0;
        __pyx_t_13 = NULL;
      } else {
        __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 238, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 238, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      for (;;) {
        if (likely(!__pyx_t_13)) {
          if (likely(PyList_CheckExact(__pyx_t_6))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 238, __pyx_L1_error)
              #endif
              if (__pyx_t_4 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_9 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(4, 238, __pyx_L1_error)
            #else
            __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 238, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 238, __pyx_L1_error)
              #endif
              if (__pyx_t_4 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_9); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(4, 238, __pyx_L1_error)
            #else
            __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 238, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_9);
            #endif
          }
        } else {
          __pyx_t_9 = __pyx_t_13(__pyx_t_6);
          if (unlikely(!__pyx_t_9)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(4, 238, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_9);
        }
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 238, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_9genexpr65__pyx_v_k = __pyx_t_5;
        __pyx_t_3 = (__pyx_9genexpr65__pyx_v_k != __pyx_v_i);
        if (__pyx_t_3) {
          __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_9genexpr65__pyx_v_k); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 238, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(4, 238, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } /* exit inner scope */
    __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_6)) __PYX_ERR(4, 238, __pyx_L1_error);
    __pyx_t_6 = 0;
    __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF_SET(__pyx_v_col_support, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "cython/core/abelian_group.pyx":239
 *                 break
 *             col_support = [k for k in self._col_support[j] if k != i] + [i]
 *             row_entries = [(l, self._entries.get((i,l), 0))             # <<<<<<<<<<<<<<
 *                            for l in self._row_support[i]]
 *             unit = self[i,j]
 */
    { /* enter inner scope */
      __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 239, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);

      /* "cython/core/abelian_group.pyx":240
 *             col_support = [k for k in self._col_support[j] if k != i] + [i]
 *             row_entries = [(l, self._entries.get((i,l), 0))
 *                            for l in self._row_support[i]]             # <<<<<<<<<<<<<<
 *             unit = self[i,j]
 *             for k in col_support:
 */
      if (unlikely(__pyx_v_self->_row_support == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(4, 240, __pyx_L1_error)
      }
      __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 240, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->_row_support, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 240, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
        __pyx_t_9 = __pyx_t_1; __Pyx_INCREF(__pyx_t_9);
        __pyx_t_4 = 0;
        __pyx_t_13 = NULL;
      } else {
        __pyx_t_4 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 240, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 240, __pyx_L1_error)
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        if (likely(!__pyx_t_13)) {
          if (likely(PyList_CheckExact(__pyx_t_9))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 240, __pyx_L1_error)
              #endif
              if (__pyx_t_4 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(4, 240, __pyx_L1_error)
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 240, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 240, __pyx_L1_error)
              #endif
              if (__pyx_t_4 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(4, 240, __pyx_L1_error)
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 240, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            #endif
          }
        } else {
          __pyx_t_1 = __pyx_t_13(__pyx_t_9);
          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(4, 240, __pyx_L1_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_1);
        }
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 240, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_9genexpr66__pyx_v_l = __pyx_t_5;

        /* "cython/core/abelian_group.pyx":239
 *                 break
 *             col_support = [k for k in self._col_support[j] if k != i] + [i]
 *             row_entries = [(l, self._entries.get((i,l), 0))             # <<<<<<<<<<<<<<
 *                            for l in self._row_support[i]]
 *             unit = self[i,j]
 */
        __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_9genexpr66__pyx_v_l); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 239, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (unlikely(__pyx_v_self->_entries == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
          __PYX_ERR(4, 239, __pyx_L1_error)
        }
        __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 239, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_9genexpr66__pyx_v_l); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 239, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 239, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_8);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8)) __PYX_ERR(4, 239, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_10);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_10)) __PYX_ERR(4, 239, __pyx_L1_error);
        __pyx_t_8 = 0;
        __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->_entries, __pyx_t_14, __pyx_int_0); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 239, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 239, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_1);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1)) __PYX_ERR(4, 239, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_10);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_10)) __PYX_ERR(4, 239, __pyx_L1_error);
        __pyx_t_1 = 0;
        __pyx_t_10 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_14))) __PYX_ERR(4, 239, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

        /* "cython/core/abelian_group.pyx":240
 *             col_support = [k for k in self._col_support[j] if k != i] + [i]
 *             row_entries = [(l, self._entries.get((i,l), 0))
 *                            for l in self._row_support[i]]             # <<<<<<<<<<<<<<
 *             unit = self[i,j]
 *             for k in col_support:
 */
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } /* exit inner scope */
    __Pyx_XDECREF_SET(__pyx_v_row_entries, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "cython/core/abelian_group.pyx":241
 *             row_entries = [(l, self._entries.get((i,l), 0))
 *                            for l in self._row_support[i]]
 *             unit = self[i,j]             # <<<<<<<<<<<<<<
 *             for k in col_support:
 *                 m = unit*self[k,j]
 */
    __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_6)) __PYX_ERR(4, 241, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_9);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_9)) __PYX_ERR(4, 241, __pyx_L1_error);
    __pyx_t_6 = 0;
    __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF_SET(__pyx_v_unit, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "cython/core/abelian_group.pyx":242
 *                            for l in self._row_support[i]]
 *             unit = self[i,j]
 *             for k in col_support:             # <<<<<<<<<<<<<<
 *                 m = unit*self[k,j]
 *                 # this is an "inlined" call to self.row_op(k,i,m)
 */
    __pyx_t_9 = __pyx_v_col_support; __Pyx_INCREF(__pyx_t_9);
    __pyx_t_4 = 0;
    for (;;) {
      {
        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
        #if !CYTHON_ASSUME_SAFE_MACROS
        if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 242, __pyx_L1_error)
        #endif
        if (__pyx_t_4 >= __pyx_temp) break;
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      __pyx_t_14 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_4); __Pyx_INCREF(__pyx_t_14); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(4, 242, __pyx_L1_error)
      #else
      __pyx_t_14 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      #endif
      __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 242, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_v_k = __pyx_t_5;

      /* "cython/core/abelian_group.pyx":243
 *             unit = self[i,j]
 *             for k in col_support:
 *                 m = unit*self[k,j]             # <<<<<<<<<<<<<<
 *                 # this is an "inlined" call to self.row_op(k,i,m)
 *                 # (avoids calling python functions in the loop)
 */
      __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_14);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_14)) __PYX_ERR(4, 243, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6)) __PYX_ERR(4, 243, __pyx_L1_error);
      __pyx_t_14 = 0;
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = PyNumber_Multiply(__pyx_v_unit, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_m, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "cython/core/abelian_group.pyx":246
 *                 # this is an "inlined" call to self.row_op(k,i,m)
 *                 # (avoids calling python functions in the loop)
 *                 for l, a_il in row_entries:             # <<<<<<<<<<<<<<
 *                     kl = (k,l)
 *                     temp = self._entries.get(kl, 0)
 */
      __pyx_t_10 = __pyx_v_row_entries; __Pyx_INCREF(__pyx_t_10);
      __pyx_t_2 = 0;
      for (;;) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 246, __pyx_L1_error)
          #endif
          if (__pyx_t_2 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely((0 < 0))) __PYX_ERR(4, 246, __pyx_L1_error)
        #else
        __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 246, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
        if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
          PyObject* sequence = __pyx_t_6;
          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(4, 246, __pyx_L1_error)
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          if (likely(PyTuple_CheckExact(sequence))) {
            __pyx_t_14 = PyTuple_GET_ITEM(sequence, 0); 
            __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
          } else {
            __pyx_t_14 = PyList_GET_ITEM(sequence, 0); 
            __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
          }
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(__pyx_t_1);
          #else
          __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 246, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 246, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        } else {
          Py_ssize_t index = -1;
          __pyx_t_8 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(4, 246, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
          index = 0; __pyx_t_14 = __pyx_t_11(__pyx_t_8); if (unlikely(!__pyx_t_14)) goto __pyx_L20_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_14);
          index = 1; __pyx_t_1 = __pyx_t_11(__pyx_t_8); if (unlikely(!__pyx_t_1)) goto __pyx_L20_unpacking_failed;
          __Pyx_GOTREF(__pyx_t_1);
          if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_8), 2) < 0) __PYX_ERR(4, 246, __pyx_L1_error)
          __pyx_t_11 = NULL;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          goto __pyx_L21_unpacking_done;
          __pyx_L20_unpacking_failed:;
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __pyx_t_11 = NULL;
          if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
          __PYX_ERR(4, 246, __pyx_L1_error)
          __pyx_L21_unpacking_done:;
        }
        __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(4, 246, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_v_l = __pyx_t_5;
        __Pyx_XDECREF_SET(__pyx_v_a_il, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "cython/core/abelian_group.pyx":247
 *                 # (avoids calling python functions in the loop)
 *                 for l, a_il in row_entries:
 *                     kl = (k,l)             # <<<<<<<<<<<<<<
 *                     temp = self._entries.get(kl, 0)
 *                     self._set(kl, temp - m*a_il )
 */
        __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 247, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_l); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 247, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 247, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_6);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_6)) __PYX_ERR(4, 247, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_1);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_1)) __PYX_ERR(4, 247, __pyx_L1_error);
        __pyx_t_6 = 0;
        __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_kl, __pyx_t_14);
        __pyx_t_14 = 0;

        /* "cython/core/abelian_group.pyx":248
 *                 for l, a_il in row_entries:
 *                     kl = (k,l)
 *                     temp = self._entries.get(kl, 0)             # <<<<<<<<<<<<<<
 *                     self._set(kl, temp - m*a_il )
 *             self.dead_columns.add(j)
 */
        if (unlikely(__pyx_v_self->_entries == Py_None)) {
          PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
          __PYX_ERR(4, 248, __pyx_L1_error)
        }
        __pyx_t_14 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->_entries, __pyx_v_kl, __pyx_int_0); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 248, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_XDECREF_SET(__pyx_v_temp, __pyx_t_14);
        __pyx_t_14 = 0;

        /* "cython/core/abelian_group.pyx":249
 *                     kl = (k,l)
 *                     temp = self._entries.get(kl, 0)
 *                     self._set(kl, temp - m*a_il )             # <<<<<<<<<<<<<<
 *             self.dead_columns.add(j)
 * 
 */
        __pyx_t_14 = PyNumber_Multiply(__pyx_v_m, __pyx_v_a_il); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 249, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_1 = PyNumber_Subtract(__pyx_v_temp, __pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 249, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = ((struct __pyx_vtabstruct_6SnapPy_PresentationMatrix *)__pyx_v_self->__pyx_vtab)->_set(__pyx_v_self, __pyx_v_kl, __pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 249, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

        /* "cython/core/abelian_group.pyx":246
 *                 # this is an "inlined" call to self.row_op(k,i,m)
 *                 # (avoids calling python functions in the loop)
 *                 for l, a_il in row_entries:             # <<<<<<<<<<<<<<
 *                     kl = (k,l)
 *                     temp = self._entries.get(kl, 0)
 */
      }
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "cython/core/abelian_group.pyx":242
 *                            for l in self._row_support[i]]
 *             unit = self[i,j]
 *             for k in col_support:             # <<<<<<<<<<<<<<
 *                 m = unit*self[k,j]
 *                 # this is an "inlined" call to self.row_op(k,i,m)
 */
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cython/core/abelian_group.pyx":250
 *                     temp = self._entries.get(kl, 0)
 *                     self._set(kl, temp - m*a_il )
 *             self.dead_columns.add(j)             # <<<<<<<<<<<<<<
 * 
 *     def simplified_matrix(self):
 */
    if (unlikely(__pyx_v_self->dead_columns == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add");
      __PYX_ERR(4, 250, __pyx_L1_error)
    }
    __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_15 = PySet_Add(__pyx_v_self->dead_columns, __pyx_t_9); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(4, 250, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }

  /* "cython/core/abelian_group.pyx":228
 *                 for i in range(self.rows)]
 * 
 *     def simplify(self):             # <<<<<<<<<<<<<<
 *         """
 *         If any entry is a unit, eliminate the corresponding generator.
 */

  /* 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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("SnapPy.PresentationMatrix.simplify", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_col_support);
  __Pyx_XDECREF(__pyx_v_row_entries);
  __Pyx_XDECREF(__pyx_v_unit);
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_v_a_il);
  __Pyx_XDECREF(__pyx_v_kl);
  __Pyx_XDECREF(__pyx_v_temp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/abelian_group.pyx":252
 *             self.dead_columns.add(j)
 * 
 *     def simplified_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the simplified presentation as a matrix.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_19simplified_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_6SnapPy_18PresentationMatrix_18simplified_matrix, "PresentationMatrix.simplified_matrix(self)\n\n        Return the simplified presentation as a matrix.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_18PresentationMatrix_19simplified_matrix = {"simplified_matrix", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_18PresentationMatrix_19simplified_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18PresentationMatrix_18simplified_matrix};
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_19simplified_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("simplified_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("simplified_matrix", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "simplified_matrix", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_18PresentationMatrix_18simplified_matrix(((struct __pyx_obj_6SnapPy_PresentationMatrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_18PresentationMatrix_18simplified_matrix(struct __pyx_obj_6SnapPy_PresentationMatrix *__pyx_v_self) {
  PyObject *__pyx_v_columns = NULL;
  PyObject *__pyx_v_rows = NULL;
  PyObject *__pyx_v_presentation = NULL;
  int __pyx_9genexpr67__pyx_v_j;
  PyObject *__pyx_9genexpr68__pyx_v_i = NULL;
  CYTHON_UNUSED PyObject *__pyx_9genexpr69__pyx_v_j = NULL;
  PyObject *__pyx_9genexpr70__pyx_v_i = NULL;
  PyObject *__pyx_9genexpr71__pyx_v_j = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("simplified_matrix", 1);

  /* "cython/core/abelian_group.pyx":256
 *         Return the simplified presentation as a matrix.
 *         """
 *         self.simplify()             # <<<<<<<<<<<<<<
 *         columns = [j for j in range(self.cols) if j not in self.dead_columns]
 *         rows = [i for i in range(self.rows) if self._row_support.get(i, None)]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_simplify); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 256, __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(4, 256, __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;

  /* "cython/core/abelian_group.pyx":257
 *         """
 *         self.simplify()
 *         columns = [j for j in range(self.cols) if j not in self.dead_columns]             # <<<<<<<<<<<<<<
 *         rows = [i for i in range(self.rows) if self._row_support.get(i, None)]
 *         if not rows:
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __pyx_v_self->cols;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_9genexpr67__pyx_v_j = __pyx_t_6;
      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_9genexpr67__pyx_v_j); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(__pyx_v_self->dead_columns == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
        __PYX_ERR(4, 257, __pyx_L1_error)
      }
      __pyx_t_7 = (__Pyx_PySet_ContainsTF(__pyx_t_2, __pyx_v_self->dead_columns, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(4, 257, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_7) {
        __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_9genexpr67__pyx_v_j); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 257, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(4, 257, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
    }
  } /* exit inner scope */
  __pyx_v_columns = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/abelian_group.pyx":258
 *         self.simplify()
 *         columns = [j for j in range(self.cols) if j not in self.dead_columns]
 *         rows = [i for i in range(self.rows) if self._row_support.get(i, None)]             # <<<<<<<<<<<<<<
 *         if not rows:
 *             presentation = [[0 for j in columns]]
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 258, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 258, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 258, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 258, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(4, 258, __pyx_L8_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_9)) {
        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(4, 258, __pyx_L8_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_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(4, 258, __pyx_L8_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 258, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          #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(4, 258, __pyx_L8_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_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(4, 258, __pyx_L8_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 258, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_9(__pyx_t_2);
        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(4, 258, __pyx_L8_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr68__pyx_v_i, __pyx_t_3);
      __pyx_t_3 = 0;
      if (unlikely(__pyx_v_self->_row_support == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
        __PYX_ERR(4, 258, __pyx_L8_error)
      }
      __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->_row_support, __pyx_9genexpr68__pyx_v_i, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 258, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(4, 258, __pyx_L8_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_7) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_9genexpr68__pyx_v_i))) __PYX_ERR(4, 258, __pyx_L8_error)
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_9genexpr68__pyx_v_i); __pyx_9genexpr68__pyx_v_i = 0;
    goto __pyx_L13_exit_scope;
    __pyx_L8_error:;
    __Pyx_XDECREF(__pyx_9genexpr68__pyx_v_i); __pyx_9genexpr68__pyx_v_i = 0;
    goto __pyx_L1_error;
    __pyx_L13_exit_scope:;
  } /* exit inner scope */
  __pyx_v_rows = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/abelian_group.pyx":259
 *         columns = [j for j in range(self.cols) if j not in self.dead_columns]
 *         rows = [i for i in range(self.rows) if self._row_support.get(i, None)]
 *         if not rows:             # <<<<<<<<<<<<<<
 *             presentation = [[0 for j in columns]]
 *         else:
 */
  __pyx_t_7 = (PyList_GET_SIZE(__pyx_v_rows) != 0);
  __pyx_t_10 = (!__pyx_t_7);
  if (__pyx_t_10) {

    /* "cython/core/abelian_group.pyx":260
 *         rows = [i for i in range(self.rows) if self._row_support.get(i, None)]
 *         if not rows:
 *             presentation = [[0 for j in columns]]             # <<<<<<<<<<<<<<
 *         else:
 *             presentation = [[self._entries.get((i, j), 0) for j in columns]
 */
    { /* enter inner scope */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 260, __pyx_L17_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __pyx_v_columns; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_8 = 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(4, 260, __pyx_L17_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_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(4, 260, __pyx_L17_error)
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 260, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr69__pyx_v_j, __pyx_t_3);
        __pyx_t_3 = 0;
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_int_0))) __PYX_ERR(4, 260, __pyx_L17_error)
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_9genexpr69__pyx_v_j); __pyx_9genexpr69__pyx_v_j = 0;
      goto __pyx_L21_exit_scope;
      __pyx_L17_error:;
      __Pyx_XDECREF(__pyx_9genexpr69__pyx_v_j); __pyx_9genexpr69__pyx_v_j = 0;
      goto __pyx_L1_error;
      __pyx_L21_exit_scope:;
    } /* exit inner scope */
    __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(4, 260, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_v_presentation = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/abelian_group.pyx":259
 *         columns = [j for j in range(self.cols) if j not in self.dead_columns]
 *         rows = [i for i in range(self.rows) if self._row_support.get(i, None)]
 *         if not rows:             # <<<<<<<<<<<<<<
 *             presentation = [[0 for j in columns]]
 *         else:
 */
    goto __pyx_L14;
  }

  /* "cython/core/abelian_group.pyx":262
 *             presentation = [[0 for j in columns]]
 *         else:
 *             presentation = [[self._entries.get((i, j), 0) for j in columns]             # <<<<<<<<<<<<<<
 *                             for i in rows ]
 *         return matrix(presentation)
 */
  /*else*/ {
    { /* enter inner scope */
      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 262, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cython/core/abelian_group.pyx":263
 *         else:
 *             presentation = [[self._entries.get((i, j), 0) for j in columns]
 *                             for i in rows ]             # <<<<<<<<<<<<<<
 *         return matrix(presentation)
 */
      __pyx_t_1 = __pyx_v_rows; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_8 = 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(4, 263, __pyx_L24_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(4, 263, __pyx_L24_error)
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 263, __pyx_L24_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr70__pyx_v_i, __pyx_t_3);
        __pyx_t_3 = 0;
        { /* enter inner scope */

          /* "cython/core/abelian_group.pyx":262
 *             presentation = [[0 for j in columns]]
 *         else:
 *             presentation = [[self._entries.get((i, j), 0) for j in columns]             # <<<<<<<<<<<<<<
 *                             for i in rows ]
 *         return matrix(presentation)
 */
          __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 262, __pyx_L29_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_11 = __pyx_v_columns; __Pyx_INCREF(__pyx_t_11);
          __pyx_t_12 = 0;
          for (;;) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_11);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(4, 262, __pyx_L29_error)
              #endif
              if (__pyx_t_12 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_13 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_12); __Pyx_INCREF(__pyx_t_13); __pyx_t_12++; if (unlikely((0 < 0))) __PYX_ERR(4, 262, __pyx_L29_error)
            #else
            __pyx_t_13 = __Pyx_PySequence_ITEM(__pyx_t_11, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 262, __pyx_L29_error)
            __Pyx_GOTREF(__pyx_t_13);
            #endif
            __Pyx_XDECREF_SET(__pyx_9genexpr71__pyx_v_j, __pyx_t_13);
            __pyx_t_13 = 0;
            if (unlikely(__pyx_v_self->_entries == Py_None)) {
              PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get");
              __PYX_ERR(4, 262, __pyx_L29_error)
            }
            __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(4, 262, __pyx_L29_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_INCREF(__pyx_9genexpr70__pyx_v_i);
            __Pyx_GIVEREF(__pyx_9genexpr70__pyx_v_i);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_9genexpr70__pyx_v_i)) __PYX_ERR(4, 262, __pyx_L29_error);
            __Pyx_INCREF(__pyx_9genexpr71__pyx_v_j);
            __Pyx_GIVEREF(__pyx_9genexpr71__pyx_v_j);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_9genexpr71__pyx_v_j)) __PYX_ERR(4, 262, __pyx_L29_error);
            __pyx_t_14 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->_entries, __pyx_t_13, __pyx_int_0); if (unlikely(!__pyx_t_14)) __PYX_ERR(4, 262, __pyx_L29_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_14))) __PYX_ERR(4, 262, __pyx_L29_error)
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          }
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_9genexpr71__pyx_v_j); __pyx_9genexpr71__pyx_v_j = 0;
          goto __pyx_L33_exit_scope;
          __pyx_L29_error:;
          __Pyx_XDECREF(__pyx_9genexpr71__pyx_v_j); __pyx_9genexpr71__pyx_v_j = 0;
          goto __pyx_L24_error;
          __pyx_L33_exit_scope:;
        } /* exit inner scope */
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(4, 262, __pyx_L24_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "cython/core/abelian_group.pyx":263
 *         else:
 *             presentation = [[self._entries.get((i, j), 0) for j in columns]
 *                             for i in rows ]             # <<<<<<<<<<<<<<
 *         return matrix(presentation)
 */
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_9genexpr70__pyx_v_i); __pyx_9genexpr70__pyx_v_i = 0;
      goto __pyx_L35_exit_scope;
      __pyx_L24_error:;
      __Pyx_XDECREF(__pyx_9genexpr70__pyx_v_i); __pyx_9genexpr70__pyx_v_i = 0;
      goto __pyx_L1_error;
      __pyx_L35_exit_scope:;
    } /* exit inner scope */
    __pyx_v_presentation = ((PyObject*)__pyx_t_2);
    __pyx_t_2 = 0;
  }
  __pyx_L14:;

  /* "cython/core/abelian_group.pyx":264
 *             presentation = [[self._entries.get((i, j), 0) for j in columns]
 *                             for i in rows ]
 *         return matrix(presentation)             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_matrix); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(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_presentation};
    __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(4, 264, __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;

  /* "cython/core/abelian_group.pyx":252
 *             self.dead_columns.add(j)
 * 
 *     def simplified_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the simplified presentation as a 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_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("SnapPy.PresentationMatrix.simplified_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_columns);
  __Pyx_XDECREF(__pyx_v_rows);
  __Pyx_XDECREF(__pyx_v_presentation);
  __Pyx_XDECREF(__pyx_9genexpr68__pyx_v_i);
  __Pyx_XDECREF(__pyx_9genexpr69__pyx_v_j);
  __Pyx_XDECREF(__pyx_9genexpr70__pyx_v_i);
  __Pyx_XDECREF(__pyx_9genexpr71__pyx_v_j);
  __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_6SnapPy_18PresentationMatrix_21__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_6SnapPy_18PresentationMatrix_20__reduce_cython__, "PresentationMatrix.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_18PresentationMatrix_21__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_18PresentationMatrix_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18PresentationMatrix_20__reduce_cython__};
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_21__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_6SnapPy_18PresentationMatrix_20__reduce_cython__(((struct __pyx_obj_6SnapPy_PresentationMatrix *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_18PresentationMatrix_20__reduce_cython__(struct __pyx_obj_6SnapPy_PresentationMatrix *__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;
  int __pyx_t_4;
  int __pyx_t_5;
  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._col_support, self._entries, self._row_support, self._units, self.cols, self.dead_columns, self.rows)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->cols); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->rows); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_self->_col_support);
  __Pyx_GIVEREF(__pyx_v_self->_col_support);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->_col_support)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_entries);
  __Pyx_GIVEREF(__pyx_v_self->_entries);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->_entries)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_row_support);
  __Pyx_GIVEREF(__pyx_v_self->_row_support);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_self->_row_support)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->_units);
  __Pyx_GIVEREF(__pyx_v_self->_units);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->_units)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_1)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_self->dead_columns);
  __Pyx_GIVEREF(__pyx_v_self->dead_columns);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_v_self->dead_columns)) __PYX_ERR(7, 5, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_t_2)) __PYX_ERR(7, 5, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._col_support, self._entries, self._row_support, self._units, self.cols, self.dead_columns, self.rows)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self._col_support, self._entries, self._row_support, self._units, self.cols, self.dead_columns, self.rows)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  if (__pyx_t_4) {

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

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

    /* "(tree fragment)":7
 *     state = (self._col_support, self._entries, self._row_support, self._units, self.cols, self.dead_columns, self.rows)
 *     _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._col_support is not None or self._entries is not None or self._row_support is not None or self._units is not None or self.dead_columns is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_PresentationMatrix, (type(self), 0x59cf8a3, None), state
 */
  /*else*/ {
    __pyx_t_5 = (__pyx_v_self->_col_support != ((PyObject*)Py_None));
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->_entries != ((PyObject*)Py_None));
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->_row_support != ((PyObject*)Py_None));
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->_units != ((PyObject*)Py_None));
    if (!__pyx_t_5) {
    } else {
      __pyx_t_4 = __pyx_t_5;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_5 = (__pyx_v_self->dead_columns != ((PyObject*)Py_None));
    __pyx_t_4 = __pyx_t_5;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_4;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._col_support is not None or self._entries is not None or self._row_support is not None or self._units is not None or self.dead_columns is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_PresentationMatrix, (type(self), 0x59cf8a3, None), state
 *     else:
 */
  if (__pyx_v_use_setstate) {

    /* "(tree fragment)":13
 *         use_setstate = self._col_support is not None or self._entries is not None or self._row_support is not None or self._units is not None or self.dead_columns is not None
 *     if use_setstate:
 *         return __pyx_unpickle_PresentationMatrix, (type(self), 0x59cf8a3, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_PresentationMatrix, (type(self), 0x59cf8a3, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_PresentationMatri); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __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_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(7, 13, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_94173347);
    __Pyx_GIVEREF(__pyx_int_94173347);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_94173347)) __PYX_ERR(7, 13, __pyx_L1_error);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None)) __PYX_ERR(7, 13, __pyx_L1_error);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(7, 13, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(7, 13, __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(7, 13, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._col_support is not None or self._entries is not None or self._row_support is not None or self._units is not None or self.dead_columns is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_PresentationMatrix, (type(self), 0x59cf8a3, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_PresentationMatrix, (type(self), 0x59cf8a3, None), state
 *     else:
 *         return __pyx_unpickle_PresentationMatrix, (type(self), 0x59cf8a3, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_PresentationMatrix__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_PresentationMatri); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __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_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(7, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_94173347);
    __Pyx_GIVEREF(__pyx_int_94173347);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_94173347)) __PYX_ERR(7, 15, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state)) __PYX_ERR(7, 15, __pyx_L1_error);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(7, 15, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(7, 15, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 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_AddTraceback("SnapPy.PresentationMatrix.__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_PresentationMatrix, (type(self), 0x59cf8a3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_PresentationMatrix__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_23__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_6SnapPy_18PresentationMatrix_22__setstate_cython__, "PresentationMatrix.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_6SnapPy_18PresentationMatrix_23__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_18PresentationMatrix_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18PresentationMatrix_22__setstate_cython__};
static PyObject *__pyx_pw_6SnapPy_18PresentationMatrix_23__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(7, 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(7, 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(7, 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("SnapPy.PresentationMatrix.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_18PresentationMatrix_22__setstate_cython__(((struct __pyx_obj_6SnapPy_PresentationMatrix *)__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_6SnapPy_18PresentationMatrix_22__setstate_cython__(struct __pyx_obj_6SnapPy_PresentationMatrix *__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_PresentationMatrix, (type(self), 0x59cf8a3, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_PresentationMatrix__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(7, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_6SnapPy___pyx_unpickle_PresentationMatrix__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 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_PresentationMatrix, (type(self), 0x59cf8a3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_PresentationMatrix__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("SnapPy.PresentationMatrix.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":9
 * 
 * 
 * def inverse_list_word(word):             # <<<<<<<<<<<<<<
 *     return [ -x for x in word[::-1] ]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_35inverse_list_word(PyObject *__pyx_self, 
#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_6SnapPy_34inverse_list_word, "inverse_list_word(word)");
static PyMethodDef __pyx_mdef_6SnapPy_35inverse_list_word = {"inverse_list_word", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_35inverse_list_word, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_34inverse_list_word};
static PyObject *__pyx_pw_6SnapPy_35inverse_list_word(PyObject *__pyx_self, 
#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_word = 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("inverse_list_word (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_word,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_word)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 9, __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, "inverse_list_word") < 0)) __PYX_ERR(8, 9, __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_word = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("inverse_list_word", 1, 1, 1, __pyx_nargs); __PYX_ERR(8, 9, __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("SnapPy.inverse_list_word", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_34inverse_list_word(__pyx_self, __pyx_v_word);

  /* 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_6SnapPy_34inverse_list_word(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_word) {
  PyObject *__pyx_9genexpr72__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("inverse_list_word", 1);

  /* "cython/core/fundamental_group.pyx":10
 * 
 * def inverse_list_word(word):
 *     return [ -x for x in word[::-1] ]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 10, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_word, __pyx_slice__110); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 10, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    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_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 10, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 10, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        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(8, 10, __pyx_L5_error)
            #endif
            if (__pyx_t_4 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(8, 10, __pyx_L5_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 10, __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(8, 10, __pyx_L5_error)
            #endif
            if (__pyx_t_4 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(8, 10, __pyx_L5_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 10, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__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(8, 10, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr72__pyx_v_x, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyNumber_Negative(__pyx_9genexpr72__pyx_v_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 10, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(8, 10, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr72__pyx_v_x); __pyx_9genexpr72__pyx_v_x = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr72__pyx_v_x); __pyx_9genexpr72__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":9
 * 
 * 
 * def inverse_list_word(word):             # <<<<<<<<<<<<<<
 *     return [ -x for x in word[::-1] ]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.inverse_list_word", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_9genexpr72__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":13
 * 
 * 
 * def reduce_list_word(word):             # <<<<<<<<<<<<<<
 *     """
 *     Cancels inverse generators.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_37reduce_list_word(PyObject *__pyx_self, 
#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_6SnapPy_36reduce_list_word, "reduce_list_word(word)\n\n    Cancels inverse generators.\n    ");
static PyMethodDef __pyx_mdef_6SnapPy_37reduce_list_word = {"reduce_list_word", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_37reduce_list_word, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_36reduce_list_word};
static PyObject *__pyx_pw_6SnapPy_37reduce_list_word(PyObject *__pyx_self, 
#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_word = 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("reduce_list_word (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_word,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_word)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 13, __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, "reduce_list_word") < 0)) __PYX_ERR(8, 13, __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_word = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("reduce_list_word", 1, 1, 1, __pyx_nargs); __PYX_ERR(8, 13, __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("SnapPy.reduce_list_word", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_36reduce_list_word(__pyx_self, __pyx_v_word);

  /* 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_6SnapPy_36reduce_list_word(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_word) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_letter = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  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;
  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("reduce_list_word", 1);

  /* "cython/core/fundamental_group.pyx":17
 *     Cancels inverse generators.
 *     """
 *     result = []             # <<<<<<<<<<<<<<
 *     for letter in word:
 *         if result and result[-1] == -letter:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/fundamental_group.pyx":18
 *     """
 *     result = []
 *     for letter in word:             # <<<<<<<<<<<<<<
 *         if result and result[-1] == -letter:
 *             result.pop()
 */
  if (likely(PyList_CheckExact(__pyx_v_word)) || PyTuple_CheckExact(__pyx_v_word)) {
    __pyx_t_1 = __pyx_v_word; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_word); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 18, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 18, __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(8, 18, __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(8, 18, __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(8, 18, __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(8, 18, __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(8, 18, __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(8, 18, __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(8, 18, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_letter, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/fundamental_group.pyx":19
 *     result = []
 *     for letter in word:
 *         if result and result[-1] == -letter:             # <<<<<<<<<<<<<<
 *             result.pop()
 *         else:
 */
    __pyx_t_6 = (PyList_GET_SIZE(__pyx_v_result) != 0);
    if (__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L6_bool_binop_done;
    }
    __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_result, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 19, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = PyNumber_Negative(__pyx_v_letter); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 19, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_4, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 19, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(8, 19, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_5 = __pyx_t_6;
    __pyx_L6_bool_binop_done:;
    if (__pyx_t_5) {

      /* "cython/core/fundamental_group.pyx":20
 *     for letter in word:
 *         if result and result[-1] == -letter:
 *             result.pop()             # <<<<<<<<<<<<<<
 *         else:
 *             result.append(letter)
 */
      __pyx_t_8 = __Pyx_PyList_Pop(__pyx_v_result); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 20, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "cython/core/fundamental_group.pyx":19
 *     result = []
 *     for letter in word:
 *         if result and result[-1] == -letter:             # <<<<<<<<<<<<<<
 *             result.pop()
 *         else:
 */
      goto __pyx_L5;
    }

    /* "cython/core/fundamental_group.pyx":22
 *             result.pop()
 *         else:
 *             result.append(letter)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
    /*else*/ {
      __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_letter); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(8, 22, __pyx_L1_error)
    }
    __pyx_L5:;

    /* "cython/core/fundamental_group.pyx":18
 *     """
 *     result = []
 *     for letter in word:             # <<<<<<<<<<<<<<
 *         if result and result[-1] == -letter:
 *             result.pop()
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/fundamental_group.pyx":23
 *         else:
 *             result.append(letter)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":13
 * 
 * 
 * def reduce_list_word(word):             # <<<<<<<<<<<<<<
 *     """
 *     Cancels inverse generators.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("SnapPy.reduce_list_word", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_letter);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":26
 * 
 * 
 * cdef c_word_as_int_list(int *word):             # <<<<<<<<<<<<<<
 *     cdef int n = 0
 *     word_list = []
 */

static PyObject *__pyx_f_6SnapPy_c_word_as_int_list(int *__pyx_v_word) {
  int __pyx_v_n;
  PyObject *__pyx_v_word_list = 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("c_word_as_int_list", 1);

  /* "cython/core/fundamental_group.pyx":27
 * 
 * cdef c_word_as_int_list(int *word):
 *     cdef int n = 0             # <<<<<<<<<<<<<<
 *     word_list = []
 *     while word[n] != 0:
 */
  __pyx_v_n = 0;

  /* "cython/core/fundamental_group.pyx":28
 * cdef c_word_as_int_list(int *word):
 *     cdef int n = 0
 *     word_list = []             # <<<<<<<<<<<<<<
 *     while word[n] != 0:
 *         word_list.append(word[n])
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_word_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/fundamental_group.pyx":29
 *     cdef int n = 0
 *     word_list = []
 *     while word[n] != 0:             # <<<<<<<<<<<<<<
 *         word_list.append(word[n])
 *         n += 1
 */
  while (1) {
    __pyx_t_2 = ((__pyx_v_word[__pyx_v_n]) != 0);
    if (!__pyx_t_2) break;

    /* "cython/core/fundamental_group.pyx":30
 *     word_list = []
 *     while word[n] != 0:
 *         word_list.append(word[n])             # <<<<<<<<<<<<<<
 *         n += 1
 *     return word_list
 */
    __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_word[__pyx_v_n])); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 30, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_word_list, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(8, 30, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/fundamental_group.pyx":31
 *     while word[n] != 0:
 *         word_list.append(word[n])
 *         n += 1             # <<<<<<<<<<<<<<
 *     return word_list
 * 
 */
    __pyx_v_n = (__pyx_v_n + 1);
  }

  /* "cython/core/fundamental_group.pyx":32
 *         word_list.append(word[n])
 *         n += 1
 *     return word_list             # <<<<<<<<<<<<<<
 * 
 * cdef int *c_word_from_list(word_list):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_word_list);
  __pyx_r = __pyx_v_word_list;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":26
 * 
 * 
 * cdef c_word_as_int_list(int *word):             # <<<<<<<<<<<<<<
 *     cdef int n = 0
 *     word_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("SnapPy.c_word_as_int_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_word_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":34
 *     return word_list
 * 
 * cdef int *c_word_from_list(word_list):             # <<<<<<<<<<<<<<
 *     cdef int *c_word
 *     cdef int length, size, n
 */

static int *__pyx_f_6SnapPy_c_word_from_list(PyObject *__pyx_v_word_list) {
  int *__pyx_v_c_word;
  int __pyx_v_length;
  int __pyx_v_size;
  int __pyx_v_n;
  int *__pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("c_word_from_list", 1);

  /* "cython/core/fundamental_group.pyx":37
 *     cdef int *c_word
 *     cdef int length, size, n
 *     length = <int>len(word_list)             # <<<<<<<<<<<<<<
 *     size = sizeof(int)*(1+length)
 *     c_word = <int *>malloc(size)
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_word_list); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(8, 37, __pyx_L1_error)
  __pyx_v_length = ((int)__pyx_t_1);

  /* "cython/core/fundamental_group.pyx":38
 *     cdef int length, size, n
 *     length = <int>len(word_list)
 *     size = sizeof(int)*(1+length)             # <<<<<<<<<<<<<<
 *     c_word = <int *>malloc(size)
 *     for n from 0 <= n < length:
 */
  __pyx_v_size = ((sizeof(int)) * (1 + __pyx_v_length));

  /* "cython/core/fundamental_group.pyx":39
 *     length = <int>len(word_list)
 *     size = sizeof(int)*(1+length)
 *     c_word = <int *>malloc(size)             # <<<<<<<<<<<<<<
 *     for n from 0 <= n < length:
 *         c_word[n] = word_list[n]
 */
  __pyx_v_c_word = ((int *)malloc(__pyx_v_size));

  /* "cython/core/fundamental_group.pyx":40
 *     size = sizeof(int)*(1+length)
 *     c_word = <int *>malloc(size)
 *     for n from 0 <= n < length:             # <<<<<<<<<<<<<<
 *         c_word[n] = word_list[n]
 *     c_word[length] = 0
 */
  __pyx_t_2 = __pyx_v_length;
  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_2; __pyx_v_n++) {

    /* "cython/core/fundamental_group.pyx":41
 *     c_word = <int *>malloc(size)
 *     for n from 0 <= n < length:
 *         c_word[n] = word_list[n]             # <<<<<<<<<<<<<<
 *     c_word[length] = 0
 *     return c_word
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_word_list, __pyx_v_n, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 41, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 41, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_c_word[__pyx_v_n]) = __pyx_t_4;
  }

  /* "cython/core/fundamental_group.pyx":42
 *     for n from 0 <= n < length:
 *         c_word[n] = word_list[n]
 *     c_word[length] = 0             # <<<<<<<<<<<<<<
 *     return c_word
 * 
 */
  (__pyx_v_c_word[__pyx_v_length]) = 0;

  /* "cython/core/fundamental_group.pyx":43
 *         c_word[n] = word_list[n]
 *     c_word[length] = 0
 *     return c_word             # <<<<<<<<<<<<<<
 * 
 * cdef int_to_gen_string(int g, int num_generators, verbose_form):
 */
  __pyx_r = __pyx_v_c_word;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":34
 *     return word_list
 * 
 * cdef int *c_word_from_list(word_list):             # <<<<<<<<<<<<<<
 *     cdef int *c_word
 *     cdef int length, size, n
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.c_word_from_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":45
 *     return c_word
 * 
 * cdef int_to_gen_string(int g, int num_generators, verbose_form):             # <<<<<<<<<<<<<<
 *     if num_generators <=26:
 *         if verbose_form and g < 0:
 */

static PyObject *__pyx_f_6SnapPy_int_to_gen_string(int __pyx_v_g, int __pyx_v_num_generators, PyObject *__pyx_v_verbose_form) {
  PyObject *__pyx_v_ans = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  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("int_to_gen_string", 1);

  /* "cython/core/fundamental_group.pyx":46
 * 
 * cdef int_to_gen_string(int g, int num_generators, verbose_form):
 *     if num_generators <=26:             # <<<<<<<<<<<<<<
 *         if verbose_form and g < 0:
 *             return Alphabet[-g] + '^-1'
 */
  __pyx_t_1 = (__pyx_v_num_generators <= 26);
  if (__pyx_t_1) {

    /* "cython/core/fundamental_group.pyx":47
 * cdef int_to_gen_string(int g, int num_generators, verbose_form):
 *     if num_generators <=26:
 *         if verbose_form and g < 0:             # <<<<<<<<<<<<<<
 *             return Alphabet[-g] + '^-1'
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_verbose_form); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(8, 47, __pyx_L1_error)
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L5_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_g < 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L5_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cython/core/fundamental_group.pyx":48
 *     if num_generators <=26:
 *         if verbose_form and g < 0:
 *             return Alphabet[-g] + '^-1'             # <<<<<<<<<<<<<<
 *         else:
 *             return Alphabet[g]
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Alphabet); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 48, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = (-__pyx_v_g);
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, __pyx_t_4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 48, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_kp_s_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 48, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "cython/core/fundamental_group.pyx":47
 * cdef int_to_gen_string(int g, int num_generators, verbose_form):
 *     if num_generators <=26:
 *         if verbose_form and g < 0:             # <<<<<<<<<<<<<<
 *             return Alphabet[-g] + '^-1'
 *         else:
 */
    }

    /* "cython/core/fundamental_group.pyx":50
 *             return Alphabet[-g] + '^-1'
 *         else:
 *             return Alphabet[g]             # <<<<<<<<<<<<<<
 *     else:
 *         if verbose_form and g < 0:
 */
    /*else*/ {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Alphabet); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 50, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_g, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 50, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      goto __pyx_L0;
    }

    /* "cython/core/fundamental_group.pyx":46
 * 
 * cdef int_to_gen_string(int g, int num_generators, verbose_form):
 *     if num_generators <=26:             # <<<<<<<<<<<<<<
 *         if verbose_form and g < 0:
 *             return Alphabet[-g] + '^-1'
 */
  }

  /* "cython/core/fundamental_group.pyx":52
 *             return Alphabet[g]
 *     else:
 *         if verbose_form and g < 0:             # <<<<<<<<<<<<<<
 *             return 'x%d^-1' % -g
 *         else:
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_verbose_form); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(8, 52, __pyx_L1_error)
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L8_bool_binop_done;
    }
    __pyx_t_2 = (__pyx_v_g < 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L8_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cython/core/fundamental_group.pyx":53
 *     else:
 *         if verbose_form and g < 0:
 *             return 'x%d^-1' % -g             # <<<<<<<<<<<<<<
 *         else:
 *             ans = 'x' if g > 0 else 'X'
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyInt_From_int((-__pyx_v_g)); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 53, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_x_d_1, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 53, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "cython/core/fundamental_group.pyx":52
 *             return Alphabet[g]
 *     else:
 *         if verbose_form and g < 0:             # <<<<<<<<<<<<<<
 *             return 'x%d^-1' % -g
 *         else:
 */
    }

    /* "cython/core/fundamental_group.pyx":55
 *             return 'x%d^-1' % -g
 *         else:
 *             ans = 'x' if g > 0 else 'X'             # <<<<<<<<<<<<<<
 *             return ans + '%d' % abs(g)
 * 
 */
    /*else*/ {
      __pyx_t_1 = (__pyx_v_g > 0);
      if (__pyx_t_1) {
        __Pyx_INCREF(__pyx_n_s_x);
        __pyx_t_3 = __pyx_n_s_x;
      } else {
        __Pyx_INCREF(__pyx_n_s_X);
        __pyx_t_3 = __pyx_n_s_X;
      }
      __pyx_v_ans = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "cython/core/fundamental_group.pyx":56
 *         else:
 *             ans = 'x' if g > 0 else 'X'
 *             return ans + '%d' % abs(g)             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = abs(__pyx_v_g); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(8, 56, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 56, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_d, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 56, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyNumber_Add(__pyx_v_ans, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 56, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;
    }
  }

  /* "cython/core/fundamental_group.pyx":45
 *     return c_word
 * 
 * cdef int_to_gen_string(int g, int num_generators, verbose_form):             # <<<<<<<<<<<<<<
 *     if num_generators <=26:
 *         if verbose_form and g < 0:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("SnapPy.int_to_gen_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ans);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":59
 * 
 * 
 * def _letter_seperator(verbose_form):             # <<<<<<<<<<<<<<
 *     return '*' if verbose_form else ''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_39_letter_seperator(PyObject *__pyx_self, 
#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_6SnapPy_38_letter_seperator, "_letter_seperator(verbose_form)");
static PyMethodDef __pyx_mdef_6SnapPy_39_letter_seperator = {"_letter_seperator", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_39_letter_seperator, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_38_letter_seperator};
static PyObject *__pyx_pw_6SnapPy_39_letter_seperator(PyObject *__pyx_self, 
#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_verbose_form = 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("_letter_seperator (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_verbose_form,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_verbose_form)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 59, __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, "_letter_seperator") < 0)) __PYX_ERR(8, 59, __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_verbose_form = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_letter_seperator", 1, 1, 1, __pyx_nargs); __PYX_ERR(8, 59, __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("SnapPy._letter_seperator", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_38_letter_seperator(__pyx_self, __pyx_v_verbose_form);

  /* 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_6SnapPy_38_letter_seperator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_verbose_form) {
  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("_letter_seperator", 1);

  /* "cython/core/fundamental_group.pyx":60
 * 
 * def _letter_seperator(verbose_form):
 *     return '*' if verbose_form else ''             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_verbose_form); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(8, 60, __pyx_L1_error)
  if (__pyx_t_2) {
    __Pyx_INCREF(__pyx_kp_s__111);
    __pyx_t_1 = __pyx_kp_s__111;
  } else {
    __Pyx_INCREF(__pyx_kp_s__9);
    __pyx_t_1 = __pyx_kp_s__9;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":59
 * 
 * 
 * def _letter_seperator(verbose_form):             # <<<<<<<<<<<<<<
 *     return '*' if verbose_form else ''
 * 
 */

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

/* "cython/core/fundamental_group.pyx":63
 * 
 * 
 * cdef c_word_as_string(int *word, int num_generators, verbose_form):             # <<<<<<<<<<<<<<
 *     cdef int n = 0
 *     word_list = []
 */

static PyObject *__pyx_f_6SnapPy_c_word_as_string(int *__pyx_v_word, int __pyx_v_num_generators, PyObject *__pyx_v_verbose_form) {
  int __pyx_v_n;
  PyObject *__pyx_v_word_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("c_word_as_string", 1);

  /* "cython/core/fundamental_group.pyx":64
 * 
 * cdef c_word_as_string(int *word, int num_generators, verbose_form):
 *     cdef int n = 0             # <<<<<<<<<<<<<<
 *     word_list = []
 *     while word[n] != 0:
 */
  __pyx_v_n = 0;

  /* "cython/core/fundamental_group.pyx":65
 * cdef c_word_as_string(int *word, int num_generators, verbose_form):
 *     cdef int n = 0
 *     word_list = []             # <<<<<<<<<<<<<<
 *     while word[n] != 0:
 *         word_list.append(
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 65, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_word_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/fundamental_group.pyx":66
 *     cdef int n = 0
 *     word_list = []
 *     while word[n] != 0:             # <<<<<<<<<<<<<<
 *         word_list.append(
 *             int_to_gen_string(word[n], num_generators, verbose_form))
 */
  while (1) {
    __pyx_t_2 = ((__pyx_v_word[__pyx_v_n]) != 0);
    if (!__pyx_t_2) break;

    /* "cython/core/fundamental_group.pyx":68
 *     while word[n] != 0:
 *         word_list.append(
 *             int_to_gen_string(word[n], num_generators, verbose_form))             # <<<<<<<<<<<<<<
 *         n += 1
 *     return _letter_seperator(verbose_form).join(word_list)
 */
    __pyx_t_1 = __pyx_f_6SnapPy_int_to_gen_string((__pyx_v_word[__pyx_v_n]), __pyx_v_num_generators, __pyx_v_verbose_form); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cython/core/fundamental_group.pyx":67
 *     word_list = []
 *     while word[n] != 0:
 *         word_list.append(             # <<<<<<<<<<<<<<
 *             int_to_gen_string(word[n], num_generators, verbose_form))
 *         n += 1
 */
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_word_list, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(8, 67, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/fundamental_group.pyx":69
 *         word_list.append(
 *             int_to_gen_string(word[n], num_generators, verbose_form))
 *         n += 1             # <<<<<<<<<<<<<<
 *     return _letter_seperator(verbose_form).join(word_list)
 * 
 */
    __pyx_v_n = (__pyx_v_n + 1);
  }

  /* "cython/core/fundamental_group.pyx":70
 *             int_to_gen_string(word[n], num_generators, verbose_form))
 *         n += 1
 *     return _letter_seperator(verbose_form).join(word_list)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_letter_seperator); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_verbose_form};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 70, __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_join); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_7 = 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_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_word_list};
    __pyx_t_1 = __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;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 70, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":63
 * 
 * 
 * cdef c_word_as_string(int *word, int num_generators, verbose_form):             # <<<<<<<<<<<<<<
 *     cdef int n = 0
 *     word_list = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.c_word_as_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_word_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":73
 * 
 * 
 * def word_as_list(word, int num_generators):             # <<<<<<<<<<<<<<
 *     if not isinstance(word, str):
 *         raise TypeError('Words must be represented as Python strings.')
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_41word_as_list(PyObject *__pyx_self, 
#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_6SnapPy_40word_as_list, "word_as_list(word, int num_generators)");
static PyMethodDef __pyx_mdef_6SnapPy_41word_as_list = {"word_as_list", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_41word_as_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_40word_as_list};
static PyObject *__pyx_pw_6SnapPy_41word_as_list(PyObject *__pyx_self, 
#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_word = 0;
  int __pyx_v_num_generators;
  #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("word_as_list (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_word,&__pyx_n_s_num_generators,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_word)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 73, __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_num_generators)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 73, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("word_as_list", 1, 2, 2, 1); __PYX_ERR(8, 73, __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, "word_as_list") < 0)) __PYX_ERR(8, 73, __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_word = values[0];
    __pyx_v_num_generators = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_num_generators == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 73, __pyx_L3_error)
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("word_as_list", 1, 2, 2, __pyx_nargs); __PYX_ERR(8, 73, __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("SnapPy.word_as_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_40word_as_list(__pyx_self, __pyx_v_word, __pyx_v_num_generators);

  /* 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_6SnapPy_40word_as_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_word, int __pyx_v_num_generators) {
  PyObject *__pyx_v_word_list = NULL;
  PyObject *__pyx_v_prefix = NULL;
  PyObject *__pyx_v_number = NULL;
  PyObject *__pyx_v_g = NULL;
  PyObject *__pyx_v_letter = 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)(PyObject *);
  int __pyx_t_12;
  long __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("word_as_list", 1);

  /* "cython/core/fundamental_group.pyx":74
 * 
 * def word_as_list(word, int num_generators):
 *     if not isinstance(word, str):             # <<<<<<<<<<<<<<
 *         raise TypeError('Words must be represented as Python strings.')
 *     word_list = []
 */
  __pyx_t_1 = PyString_Check(__pyx_v_word); 
  __pyx_t_2 = (!__pyx_t_1);
  if (unlikely(__pyx_t_2)) {

    /* "cython/core/fundamental_group.pyx":75
 * def word_as_list(word, int num_generators):
 *     if not isinstance(word, str):
 *         raise TypeError('Words must be represented as Python strings.')             # <<<<<<<<<<<<<<
 *     word_list = []
 *     if num_generators > 26:
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__112, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 75, __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(8, 75, __pyx_L1_error)

    /* "cython/core/fundamental_group.pyx":74
 * 
 * def word_as_list(word, int num_generators):
 *     if not isinstance(word, str):             # <<<<<<<<<<<<<<
 *         raise TypeError('Words must be represented as Python strings.')
 *     word_list = []
 */
  }

  /* "cython/core/fundamental_group.pyx":76
 *     if not isinstance(word, str):
 *         raise TypeError('Words must be represented as Python strings.')
 *     word_list = []             # <<<<<<<<<<<<<<
 *     if num_generators > 26:
 *         for prefix, number in re.findall(r'([xX])(\d+)', word):
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_word_list = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cython/core/fundamental_group.pyx":77
 *         raise TypeError('Words must be represented as Python strings.')
 *     word_list = []
 *     if num_generators > 26:             # <<<<<<<<<<<<<<
 *         for prefix, number in re.findall(r'([xX])(\d+)', word):
 *             g = int(number)
 */
  __pyx_t_2 = (__pyx_v_num_generators > 26);
  if (__pyx_t_2) {

    /* "cython/core/fundamental_group.pyx":78
 *     word_list = []
 *     if num_generators > 26:
 *         for prefix, number in re.findall(r'([xX])(\d+)', word):             # <<<<<<<<<<<<<<
 *             g = int(number)
 *             if not (0 < g and g <= num_generators):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 78, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_findall); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 78, __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[3] = {__pyx_t_4, __pyx_kp_s_xX_d, __pyx_v_word};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 78, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5);
      __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 78, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 78, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_8)) {
        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(8, 78, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(8, 78, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 78, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #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(8, 78, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(8, 78, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 78, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_8(__pyx_t_5);
        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(8, 78, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      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(8, 78, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_9);
        #else
        __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 78, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 78, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #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(8, 78, __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_4 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L7_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(8, 78, __pyx_L1_error)
        __pyx_t_11 = NULL;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L8_unpacking_done;
        __pyx_L7_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_11 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(8, 78, __pyx_L1_error)
        __pyx_L8_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_number, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "cython/core/fundamental_group.pyx":79
 *     if num_generators > 26:
 *         for prefix, number in re.findall(r'([xX])(\d+)', word):
 *             g = int(number)             # <<<<<<<<<<<<<<
 *             if not (0 < g and g <= num_generators):
 *                 raise ValueError('The word contains a non-generator.')
 */
      __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_number); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 79, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cython/core/fundamental_group.pyx":80
 *         for prefix, number in re.findall(r'([xX])(\d+)', word):
 *             g = int(number)
 *             if not (0 < g and g <= num_generators):             # <<<<<<<<<<<<<<
 *                 raise ValueError('The word contains a non-generator.')
 *             if prefix.islower():
 */
      __pyx_t_3 = PyObject_RichCompare(__pyx_int_0, __pyx_v_g, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 80, __pyx_L1_error)
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(8, 80, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_1) {
      } else {
        __pyx_t_2 = __pyx_t_1;
        goto __pyx_L10_bool_binop_done;
      }
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_num_generators); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 80, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyObject_RichCompare(__pyx_v_g, __pyx_t_3, Py_LE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 80, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(8, 80, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_2 = __pyx_t_1;
      __pyx_L10_bool_binop_done:;
      __pyx_t_1 = (!__pyx_t_2);
      if (unlikely(__pyx_t_1)) {

        /* "cython/core/fundamental_group.pyx":81
 *             g = int(number)
 *             if not (0 < g and g <= num_generators):
 *                 raise ValueError('The word contains a non-generator.')             # <<<<<<<<<<<<<<
 *             if prefix.islower():
 *                 word_list.append( g)
 */
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 81, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_Raise(__pyx_t_9, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __PYX_ERR(8, 81, __pyx_L1_error)

        /* "cython/core/fundamental_group.pyx":80
 *         for prefix, number in re.findall(r'([xX])(\d+)', word):
 *             g = int(number)
 *             if not (0 < g and g <= num_generators):             # <<<<<<<<<<<<<<
 *                 raise ValueError('The word contains a non-generator.')
 *             if prefix.islower():
 */
      }

      /* "cython/core/fundamental_group.pyx":82
 *             if not (0 < g and g <= num_generators):
 *                 raise ValueError('The word contains a non-generator.')
 *             if prefix.islower():             # <<<<<<<<<<<<<<
 *                 word_list.append( g)
 *             else:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_prefix, __pyx_n_s_islower); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 82, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_6 = 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_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 82, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(8, 82, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__pyx_t_1) {

        /* "cython/core/fundamental_group.pyx":83
 *                 raise ValueError('The word contains a non-generator.')
 *             if prefix.islower():
 *                 word_list.append( g)             # <<<<<<<<<<<<<<
 *             else:
 *                 word_list.append(-g)
 */
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_word_list, __pyx_v_g); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(8, 83, __pyx_L1_error)

        /* "cython/core/fundamental_group.pyx":82
 *             if not (0 < g and g <= num_generators):
 *                 raise ValueError('The word contains a non-generator.')
 *             if prefix.islower():             # <<<<<<<<<<<<<<
 *                 word_list.append( g)
 *             else:
 */
        goto __pyx_L12;
      }

      /* "cython/core/fundamental_group.pyx":85
 *                 word_list.append( g)
 *             else:
 *                 word_list.append(-g)             # <<<<<<<<<<<<<<
 *     else:
 *         for letter in word:
 */
      /*else*/ {
        __pyx_t_9 = PyNumber_Negative(__pyx_v_g); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 85, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_word_list, __pyx_t_9); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(8, 85, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __pyx_L12:;

      /* "cython/core/fundamental_group.pyx":78
 *     word_list = []
 *     if num_generators > 26:
 *         for prefix, number in re.findall(r'([xX])(\d+)', word):             # <<<<<<<<<<<<<<
 *             g = int(number)
 *             if not (0 < g and g <= num_generators):
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/fundamental_group.pyx":77
 *         raise TypeError('Words must be represented as Python strings.')
 *     word_list = []
 *     if num_generators > 26:             # <<<<<<<<<<<<<<
 *         for prefix, number in re.findall(r'([xX])(\d+)', word):
 *             g = int(number)
 */
    goto __pyx_L4;
  }

  /* "cython/core/fundamental_group.pyx":87
 *                 word_list.append(-g)
 *     else:
 *         for letter in word:             # <<<<<<<<<<<<<<
 *             g = ord(letter.lower()) - ord("a") + 1
 *             if not (0 < g and g <= num_generators):
 */
  /*else*/ {
    if (likely(PyList_CheckExact(__pyx_v_word)) || PyTuple_CheckExact(__pyx_v_word)) {
      __pyx_t_5 = __pyx_v_word; __Pyx_INCREF(__pyx_t_5);
      __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_word); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 87, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 87, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_8)) {
        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(8, 87, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(8, 87, __pyx_L1_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 87, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #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(8, 87, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(8, 87, __pyx_L1_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 87, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_8(__pyx_t_5);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(8, 87, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_v_letter, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "cython/core/fundamental_group.pyx":88
 *     else:
 *         for letter in word:
 *             g = ord(letter.lower()) - ord("a") + 1             # <<<<<<<<<<<<<<
 *             if not (0 < g and g <= num_generators):
 *                 raise ValueError('The word contains a non-generator.')
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_letter, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 88, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = NULL;
      __pyx_t_6 = 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_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 88, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_t_13 = __Pyx_PyObject_Ord(__pyx_t_9); if (unlikely(__pyx_t_13 == ((long)(long)(Py_UCS4)-1))) __PYX_ERR(8, 88, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyInt_From_long(((__pyx_t_13 - 97) + 1)); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 88, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_XDECREF_SET(__pyx_v_g, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "cython/core/fundamental_group.pyx":89
 *         for letter in word:
 *             g = ord(letter.lower()) - ord("a") + 1
 *             if not (0 < g and g <= num_generators):             # <<<<<<<<<<<<<<
 *                 raise ValueError('The word contains a non-generator.')
 *             if letter.islower():
 */
      __pyx_t_9 = PyObject_RichCompare(__pyx_int_0, __pyx_v_g, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 89, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(8, 89, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__pyx_t_2) {
      } else {
        __pyx_t_1 = __pyx_t_2;
        goto __pyx_L17_bool_binop_done;
      }
      __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_num_generators); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 89, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_3 = PyObject_RichCompare(__pyx_v_g, __pyx_t_9, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 89, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(8, 89, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_1 = __pyx_t_2;
      __pyx_L17_bool_binop_done:;
      __pyx_t_2 = (!__pyx_t_1);
      if (unlikely(__pyx_t_2)) {

        /* "cython/core/fundamental_group.pyx":90
 *             g = ord(letter.lower()) - ord("a") + 1
 *             if not (0 < g and g <= num_generators):
 *                 raise ValueError('The word contains a non-generator.')             # <<<<<<<<<<<<<<
 *             if letter.islower():
 *                 word_list.append( g)
 */
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__113, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 90, __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(8, 90, __pyx_L1_error)

        /* "cython/core/fundamental_group.pyx":89
 *         for letter in word:
 *             g = ord(letter.lower()) - ord("a") + 1
 *             if not (0 < g and g <= num_generators):             # <<<<<<<<<<<<<<
 *                 raise ValueError('The word contains a non-generator.')
 *             if letter.islower():
 */
      }

      /* "cython/core/fundamental_group.pyx":91
 *             if not (0 < g and g <= num_generators):
 *                 raise ValueError('The word contains a non-generator.')
 *             if letter.islower():             # <<<<<<<<<<<<<<
 *                 word_list.append( g)
 *             else:
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_letter, __pyx_n_s_islower); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 91, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_4 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 91, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(8, 91, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_2) {

        /* "cython/core/fundamental_group.pyx":92
 *                 raise ValueError('The word contains a non-generator.')
 *             if letter.islower():
 *                 word_list.append( g)             # <<<<<<<<<<<<<<
 *             else:
 *                 word_list.append(-g)
 */
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_word_list, __pyx_v_g); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(8, 92, __pyx_L1_error)

        /* "cython/core/fundamental_group.pyx":91
 *             if not (0 < g and g <= num_generators):
 *                 raise ValueError('The word contains a non-generator.')
 *             if letter.islower():             # <<<<<<<<<<<<<<
 *                 word_list.append( g)
 *             else:
 */
        goto __pyx_L19;
      }

      /* "cython/core/fundamental_group.pyx":94
 *                 word_list.append( g)
 *             else:
 *                 word_list.append(-g)             # <<<<<<<<<<<<<<
 * 
 *     return word_list
 */
      /*else*/ {
        __pyx_t_3 = PyNumber_Negative(__pyx_v_g); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 94, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_word_list, __pyx_t_3); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(8, 94, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_L19:;

      /* "cython/core/fundamental_group.pyx":87
 *                 word_list.append(-g)
 *     else:
 *         for letter in word:             # <<<<<<<<<<<<<<
 *             g = ord(letter.lower()) - ord("a") + 1
 *             if not (0 < g and g <= num_generators):
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_L4:;

  /* "cython/core/fundamental_group.pyx":96
 *                 word_list.append(-g)
 * 
 *     return word_list             # <<<<<<<<<<<<<<
 * 
 * def list_as_word(int_list, int num_generators, verbose_form):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_word_list);
  __pyx_r = __pyx_v_word_list;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":73
 * 
 * 
 * def word_as_list(word, int num_generators):             # <<<<<<<<<<<<<<
 *     if not isinstance(word, str):
 *         raise TypeError('Words must be represented as Python strings.')
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("SnapPy.word_as_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_word_list);
  __Pyx_XDECREF(__pyx_v_prefix);
  __Pyx_XDECREF(__pyx_v_number);
  __Pyx_XDECREF(__pyx_v_g);
  __Pyx_XDECREF(__pyx_v_letter);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":98
 *     return word_list
 * 
 * def list_as_word(int_list, int num_generators, verbose_form):             # <<<<<<<<<<<<<<
 *     return _letter_seperator(verbose_form).join(
 *         int_to_gen_string(g, num_generators, verbose_form)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_43list_as_word(PyObject *__pyx_self, 
#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_6SnapPy_42list_as_word, "list_as_word(int_list, int num_generators, verbose_form)");
static PyMethodDef __pyx_mdef_6SnapPy_43list_as_word = {"list_as_word", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_43list_as_word, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_42list_as_word};
static PyObject *__pyx_pw_6SnapPy_43list_as_word(PyObject *__pyx_self, 
#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_int_list = 0;
  int __pyx_v_num_generators;
  PyObject *__pyx_v_verbose_form = 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("list_as_word (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_int_list,&__pyx_n_s_num_generators,&__pyx_n_s_verbose_form,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_int_list)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 98, __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_num_generators)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 98, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("list_as_word", 1, 3, 3, 1); __PYX_ERR(8, 98, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_verbose_form)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 98, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("list_as_word", 1, 3, 3, 2); __PYX_ERR(8, 98, __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, "list_as_word") < 0)) __PYX_ERR(8, 98, __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_int_list = values[0];
    __pyx_v_num_generators = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_num_generators == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 98, __pyx_L3_error)
    __pyx_v_verbose_form = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("list_as_word", 1, 3, 3, __pyx_nargs); __PYX_ERR(8, 98, __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("SnapPy.list_as_word", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_42list_as_word(__pyx_self, __pyx_v_int_list, __pyx_v_num_generators, __pyx_v_verbose_form);

  /* 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_gb_6SnapPy_12list_as_word_2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cython/core/fundamental_group.pyx":100
 * def list_as_word(int_list, int num_generators, verbose_form):
 *     return _letter_seperator(verbose_form).join(
 *         int_to_gen_string(g, num_generators, verbose_form)             # <<<<<<<<<<<<<<
 *         for g in int_list)
 * 
 */

static PyObject *__pyx_pf_6SnapPy_12list_as_word_genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
  struct __pyx_obj_6SnapPy___pyx_scope_struct_5_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_6SnapPy___pyx_scope_struct_5_genexpr *)__pyx_tp_new_6SnapPy___pyx_scope_struct_5_genexpr(__pyx_ptype_6SnapPy___pyx_scope_struct_5_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_5_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(8, 100, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word *) __pyx_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_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_6SnapPy_12list_as_word_2generator3, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_list_as_word_locals_genexpr, __pyx_n_s_SnapPy); if (unlikely(!gen)) __PYX_ERR(8, 100, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("SnapPy.list_as_word.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_6SnapPy_12list_as_word_2generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6SnapPy___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_5_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;
  PyObject *__pyx_t_6 = 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;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(8, 100, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":101
 *     return _letter_seperator(verbose_form).join(
 *         int_to_gen_string(g, num_generators, verbose_form)
 *         for g in int_list)             # <<<<<<<<<<<<<<
 * 
 * cdef class CFundamentalGroup():
 */
  if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(8, 101, __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(8, 101, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 101, __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(8, 101, __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(8, 101, __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(8, 101, __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(8, 101, __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(8, 101, __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(8, 101, __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(8, 101, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_g);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_g, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/fundamental_group.pyx":100
 * def list_as_word(int_list, int num_generators, verbose_form):
 *     return _letter_seperator(verbose_form).join(
 *         int_to_gen_string(g, num_generators, verbose_form)             # <<<<<<<<<<<<<<
 *         for g in int_list)
 * 
 */
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_g); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 100, __pyx_L1_error)
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_verbose_form)) { __Pyx_RaiseClosureNameError("verbose_form"); __PYX_ERR(8, 100, __pyx_L1_error) }
    __pyx_t_4 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_verbose_form;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_6 = __pyx_f_6SnapPy_int_to_gen_string(__pyx_t_5, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_num_generators, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(8, 100, __pyx_L1_error)

    /* "cython/core/fundamental_group.pyx":101
 *     return _letter_seperator(verbose_form).join(
 *         int_to_gen_string(g, num_generators, verbose_form)
 *         for g in int_list)             # <<<<<<<<<<<<<<
 * 
 * cdef class CFundamentalGroup():
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* "cython/core/fundamental_group.pyx":100
 * def list_as_word(int_list, int num_generators, verbose_form):
 *     return _letter_seperator(verbose_form).join(
 *         int_to_gen_string(g, num_generators, verbose_form)             # <<<<<<<<<<<<<<
 *         for g in int_list)
 * 
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_Generator_Replace_StopIteration(0);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #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;
}

/* "cython/core/fundamental_group.pyx":98
 *     return word_list
 * 
 * def list_as_word(int_list, int num_generators, verbose_form):             # <<<<<<<<<<<<<<
 *     return _letter_seperator(verbose_form).join(
 *         int_to_gen_string(g, num_generators, verbose_form)
 */

static PyObject *__pyx_pf_6SnapPy_42list_as_word(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_int_list, int __pyx_v_num_generators, PyObject *__pyx_v_verbose_form) {
  struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word *__pyx_cur_scope;
  PyObject *__pyx_gb_6SnapPy_12list_as_word_2generator3 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("list_as_word", 0);
  __pyx_cur_scope = (struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word *)__pyx_tp_new_6SnapPy___pyx_scope_struct_4_list_as_word(__pyx_ptype_6SnapPy___pyx_scope_struct_4_list_as_word, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(8, 98, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_num_generators = __pyx_v_num_generators;
  __pyx_cur_scope->__pyx_v_verbose_form = __pyx_v_verbose_form;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_verbose_form);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_verbose_form);

  /* "cython/core/fundamental_group.pyx":99
 * 
 * def list_as_word(int_list, int num_generators, verbose_form):
 *     return _letter_seperator(verbose_form).join(             # <<<<<<<<<<<<<<
 *         int_to_gen_string(g, num_generators, verbose_form)
 *         for g in int_list)
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_letter_seperator); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 99, __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_cur_scope->__pyx_v_verbose_form};
    __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(8, 99, __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_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/fundamental_group.pyx":100
 * def list_as_word(int_list, int num_generators, verbose_form):
 *     return _letter_seperator(verbose_form).join(
 *         int_to_gen_string(g, num_generators, verbose_form)             # <<<<<<<<<<<<<<
 *         for g in int_list)
 * 
 */
  __pyx_t_2 = __pyx_pf_6SnapPy_12list_as_word_genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_int_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 100, __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_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_2};
    __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;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":98
 *     return word_list
 * 
 * def list_as_word(int_list, int num_generators, verbose_form):             # <<<<<<<<<<<<<<
 *     return _letter_seperator(verbose_form).join(
 *         int_to_gen_string(g, num_generators, verbose_form)
 */

  /* 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("SnapPy.list_as_word", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_gb_6SnapPy_12list_as_word_2generator3);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":108
 *     cdef readonly num_cusps
 * 
 *     def __cinit__(self, Triangulation triangulation,             # <<<<<<<<<<<<<<
 *                   simplify_presentation=True,
 *                   fillings_may_affect_generators=True,
 */

/* Python wrapper */
static int __pyx_pw_6SnapPy_17CFundamentalGroup_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6SnapPy_17CFundamentalGroup_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_triangulation = 0;
  PyObject *__pyx_v_simplify_presentation = 0;
  PyObject *__pyx_v_fillings_may_affect_generators = 0;
  PyObject *__pyx_v_minimize_number_of_generators = 0;
  PyObject *__pyx_v_try_hard_to_shorten_relators = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  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;
  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_triangulation,&__pyx_n_s_simplify_presentation,&__pyx_n_s_fillings_may_affect_generators,&__pyx_n_s_minimize_number_of_generators,&__pyx_n_s_try_hard_to_shorten_relators,0};

    /* "cython/core/fundamental_group.pyx":109
 * 
 *     def __cinit__(self, Triangulation triangulation,
 *                   simplify_presentation=True,             # <<<<<<<<<<<<<<
 *                   fillings_may_affect_generators=True,
 *                   minimize_number_of_generators=True,
 */
    values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));

    /* "cython/core/fundamental_group.pyx":110
 *     def __cinit__(self, Triangulation triangulation,
 *                   simplify_presentation=True,
 *                   fillings_may_affect_generators=True,             # <<<<<<<<<<<<<<
 *                   minimize_number_of_generators=True,
 *                   try_hard_to_shorten_relators=True):
 */
    values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));

    /* "cython/core/fundamental_group.pyx":111
 *                   simplify_presentation=True,
 *                   fillings_may_affect_generators=True,
 *                   minimize_number_of_generators=True,             # <<<<<<<<<<<<<<
 *                   try_hard_to_shorten_relators=True):
 *         if triangulation.c_triangulation is NULL:
 */
    values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));

    /* "cython/core/fundamental_group.pyx":112
 *                   fillings_may_affect_generators=True,
 *                   minimize_number_of_generators=True,
 *                   try_hard_to_shorten_relators=True):             # <<<<<<<<<<<<<<
 *         if triangulation.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 */
    values[4] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        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_triangulation)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 108, __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_simplify_presentation);
          if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 108, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_fillings_may_affect_generators);
          if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 108, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_minimize_number_of_generators);
          if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 108, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_try_hard_to_shorten_relators);
          if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 108, __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(8, 108, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        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_triangulation = ((struct __pyx_obj_6SnapPy_Triangulation *)values[0]);
    __pyx_v_simplify_presentation = values[1];
    __pyx_v_fillings_may_affect_generators = values[2];
    __pyx_v_minimize_number_of_generators = values[3];
    __pyx_v_try_hard_to_shorten_relators = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 5, __pyx_nargs); __PYX_ERR(8, 108, __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("SnapPy.CFundamentalGroup.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_triangulation), __pyx_ptype_6SnapPy_Triangulation, 1, "triangulation", 0))) __PYX_ERR(8, 108, __pyx_L1_error)
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup___cinit__(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self), __pyx_v_triangulation, __pyx_v_simplify_presentation, __pyx_v_fillings_may_affect_generators, __pyx_v_minimize_number_of_generators, __pyx_v_try_hard_to_shorten_relators);

  /* "cython/core/fundamental_group.pyx":108
 *     cdef readonly num_cusps
 * 
 *     def __cinit__(self, Triangulation triangulation,             # <<<<<<<<<<<<<<
 *                   simplify_presentation=True,
 *                   fillings_may_affect_generators=True,
 */

  /* 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_6SnapPy_17CFundamentalGroup___cinit__(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_triangulation, PyObject *__pyx_v_simplify_presentation, PyObject *__pyx_v_fillings_may_affect_generators, PyObject *__pyx_v_minimize_number_of_generators, PyObject *__pyx_v_try_hard_to_shorten_relators) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  Boolean __pyx_t_3;
  Boolean __pyx_t_4;
  Boolean __pyx_t_5;
  Boolean __pyx_t_6;
  GroupPresentation *__pyx_t_7;
  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("__cinit__", 1);

  /* "cython/core/fundamental_group.pyx":113
 *                   minimize_number_of_generators=True,
 *                   try_hard_to_shorten_relators=True):
 *         if triangulation.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         copy_triangulation(triangulation.c_triangulation,
 */
  __pyx_t_1 = (__pyx_v_triangulation->c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/fundamental_group.pyx":114
 *                   try_hard_to_shorten_relators=True):
 *         if triangulation.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         copy_triangulation(triangulation.c_triangulation,
 *                            &self.c_triangulation)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 114, __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(8, 114, __pyx_L1_error)

    /* "cython/core/fundamental_group.pyx":113
 *                   minimize_number_of_generators=True,
 *                   try_hard_to_shorten_relators=True):
 *         if triangulation.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         copy_triangulation(triangulation.c_triangulation,
 */
  }

  /* "cython/core/fundamental_group.pyx":115
 *         if triangulation.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         copy_triangulation(triangulation.c_triangulation,             # <<<<<<<<<<<<<<
 *                            &self.c_triangulation)
 *         self.c_group_presentation = fundamental_group(
 */
  copy_triangulation(__pyx_v_triangulation->c_triangulation, (&__pyx_v_self->c_triangulation)); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 115, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":119
 *         self.c_group_presentation = fundamental_group(
 *             self.c_triangulation,
 *             simplify_presentation,             # <<<<<<<<<<<<<<
 *             fillings_may_affect_generators,
 *             minimize_number_of_generators,
 */
  __pyx_t_3 = __Pyx_PyInt_As_Boolean(__pyx_v_simplify_presentation); if (unlikely((__pyx_t_3 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(8, 119, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":120
 *             self.c_triangulation,
 *             simplify_presentation,
 *             fillings_may_affect_generators,             # <<<<<<<<<<<<<<
 *             minimize_number_of_generators,
 *             try_hard_to_shorten_relators)
 */
  __pyx_t_4 = __Pyx_PyInt_As_Boolean(__pyx_v_fillings_may_affect_generators); if (unlikely((__pyx_t_4 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(8, 120, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":121
 *             simplify_presentation,
 *             fillings_may_affect_generators,
 *             minimize_number_of_generators,             # <<<<<<<<<<<<<<
 *             try_hard_to_shorten_relators)
 *         self.num_cusps = triangulation.num_cusps()
 */
  __pyx_t_5 = __Pyx_PyInt_As_Boolean(__pyx_v_minimize_number_of_generators); if (unlikely((__pyx_t_5 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(8, 121, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":122
 *             fillings_may_affect_generators,
 *             minimize_number_of_generators,
 *             try_hard_to_shorten_relators)             # <<<<<<<<<<<<<<
 *         self.num_cusps = triangulation.num_cusps()
 * 
 */
  __pyx_t_6 = __Pyx_PyInt_As_Boolean(__pyx_v_try_hard_to_shorten_relators); if (unlikely((__pyx_t_6 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(8, 122, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":117
 *         copy_triangulation(triangulation.c_triangulation,
 *                            &self.c_triangulation)
 *         self.c_group_presentation = fundamental_group(             # <<<<<<<<<<<<<<
 *             self.c_triangulation,
 *             simplify_presentation,
 */
  __pyx_t_7 = fundamental_group(__pyx_v_self->c_triangulation, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 117, __pyx_L1_error)
  __pyx_v_self->c_group_presentation = __pyx_t_7;

  /* "cython/core/fundamental_group.pyx":123
 *             minimize_number_of_generators,
 *             try_hard_to_shorten_relators)
 *         self.num_cusps = triangulation.num_cusps()             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_triangulation), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->num_cusps);
  __Pyx_DECREF(__pyx_v_self->num_cusps);
  __pyx_v_self->num_cusps = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/fundamental_group.pyx":108
 *     cdef readonly num_cusps
 * 
 *     def __cinit__(self, Triangulation triangulation,             # <<<<<<<<<<<<<<
 *                   simplify_presentation=True,
 *                   fillings_may_affect_generators=True,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("SnapPy.CFundamentalGroup.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":125
 *         self.num_cusps = triangulation.num_cusps()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         free_triangulation(self.c_triangulation)
 *         free_group_presentation(self.c_group_presentation)
 */

/* Python wrapper */
static void __pyx_pw_6SnapPy_17CFundamentalGroup_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6SnapPy_17CFundamentalGroup_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_6SnapPy_17CFundamentalGroup_2__dealloc__(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self));

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

static void __pyx_pf_6SnapPy_17CFundamentalGroup_2__dealloc__(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "cython/core/fundamental_group.pyx":126
 * 
 *     def __dealloc__(self):
 *         free_triangulation(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         free_group_presentation(self.c_group_presentation)
 * 
 */
  free_triangulation(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 126, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":127
 *     def __dealloc__(self):
 *         free_triangulation(self.c_triangulation)
 *         free_group_presentation(self.c_group_presentation)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  free_group_presentation(__pyx_v_self->c_group_presentation); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 127, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":125
 *         self.num_cusps = triangulation.num_cusps()
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         free_triangulation(self.c_triangulation)
 *         free_group_presentation(self.c_group_presentation)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("SnapPy.CFundamentalGroup.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
}

/* "cython/core/fundamental_group.pyx":129
 *         free_group_presentation(self.c_group_presentation)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'Generators:\n   %s\nRelators:\n   %s' % (
 *             ','.join(self.generators()),
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_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_6SnapPy_17CFundamentalGroup_4__repr__(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self));

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

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

  /* "cython/core/fundamental_group.pyx":130
 * 
 *     def __repr__(self):
 *         return 'Generators:\n   %s\nRelators:\n   %s' % (             # <<<<<<<<<<<<<<
 *             ','.join(self.generators()),
 *             '\n   '.join(self.relators()))
 */
  __Pyx_XDECREF(__pyx_r);

  /* "cython/core/fundamental_group.pyx":131
 *     def __repr__(self):
 *         return 'Generators:\n   %s\nRelators:\n   %s' % (
 *             ','.join(self.generators()),             # <<<<<<<<<<<<<<
 *             '\n   '.join(self.relators()))
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_generators); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 131, __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(8, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__114, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/fundamental_group.pyx":132
 *         return 'Generators:\n   %s\nRelators:\n   %s' % (
 *             ','.join(self.generators()),
 *             '\n   '.join(self.relators()))             # <<<<<<<<<<<<<<
 * 
 *     def num_generators(self):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_relators); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 132, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__115, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/fundamental_group.pyx":131
 *     def __repr__(self):
 *         return 'Generators:\n   %s\nRelators:\n   %s' % (
 *             ','.join(self.generators()),             # <<<<<<<<<<<<<<
 *             '\n   '.join(self.relators()))
 * 
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2)) __PYX_ERR(8, 131, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(8, 131, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;

  /* "cython/core/fundamental_group.pyx":130
 * 
 *     def __repr__(self):
 *         return 'Generators:\n   %s\nRelators:\n   %s' % (             # <<<<<<<<<<<<<<
 *             ','.join(self.generators()),
 *             '\n   '.join(self.relators()))
 */
  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Generators_s_Relators_s, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":129
 *         free_group_presentation(self.c_group_presentation)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'Generators:\n   %s\nRelators:\n   %s' % (
 *             ','.join(self.generators()),
 */

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

/* "cython/core/fundamental_group.pyx":134
 *             '\n   '.join(self.relators()))
 * 
 *     def num_generators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of generators for the presentation.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_7num_generators(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_6SnapPy_17CFundamentalGroup_6num_generators, "CFundamentalGroup.num_generators(self)\n\n        Return the number of generators for the presentation.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_7num_generators = {"num_generators", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_7num_generators, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_6num_generators};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_7num_generators(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("num_generators (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("num_generators", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "num_generators", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_6num_generators(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_6num_generators(struct __pyx_obj_6SnapPy_CFundamentalGroup *__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("num_generators", 1);

  /* "cython/core/fundamental_group.pyx":138
 *         Return the number of generators for the presentation.
 *         """
 *         return fg_get_num_generators(self.c_group_presentation)             # <<<<<<<<<<<<<<
 * 
 *     def num_relators(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = fg_get_num_generators(__pyx_v_self->c_group_presentation); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 138, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":134
 *             '\n   '.join(self.relators()))
 * 
 *     def num_generators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of generators for the presentation.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.CFundamentalGroup.num_generators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":140
 *         return fg_get_num_generators(self.c_group_presentation)
 * 
 *     def num_relators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of generators for the presentation.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_9num_relators(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_6SnapPy_17CFundamentalGroup_8num_relators, "CFundamentalGroup.num_relators(self)\n\n        Return the number of generators for the presentation.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_9num_relators = {"num_relators", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_9num_relators, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_8num_relators};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_9num_relators(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("num_relators (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("num_relators", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "num_relators", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_8num_relators(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_8num_relators(struct __pyx_obj_6SnapPy_CFundamentalGroup *__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("num_relators", 1);

  /* "cython/core/fundamental_group.pyx":144
 *         Return the number of generators for the presentation.
 *         """
 *         return fg_get_num_relations(self.c_group_presentation)             # <<<<<<<<<<<<<<
 * 
 *     def num_original_generators(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = fg_get_num_relations(__pyx_v_self->c_group_presentation); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 144, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":140
 *         return fg_get_num_generators(self.c_group_presentation)
 * 
 *     def num_relators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of generators for the presentation.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.CFundamentalGroup.num_relators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":146
 *         return fg_get_num_relations(self.c_group_presentation)
 * 
 *     def num_original_generators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of geometric generators (before simplification).
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_11num_original_generators(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_6SnapPy_17CFundamentalGroup_10num_original_generators, "CFundamentalGroup.num_original_generators(self)\n\n        Return the number of geometric generators (before simplification).\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_11num_original_generators = {"num_original_generators", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_11num_original_generators, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_10num_original_generators};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_11num_original_generators(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("num_original_generators (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("num_original_generators", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "num_original_generators", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_10num_original_generators(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_10num_original_generators(struct __pyx_obj_6SnapPy_CFundamentalGroup *__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("num_original_generators", 1);

  /* "cython/core/fundamental_group.pyx":150
 *         Return the number of geometric generators (before simplification).
 *         """
 *         return fg_get_num_orig_gens(self.c_group_presentation)             # <<<<<<<<<<<<<<
 * 
 *     def original_generators(self, verbose_form=False, as_int_list=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = fg_get_num_orig_gens(__pyx_v_self->c_group_presentation); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 150, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":146
 *         return fg_get_num_relations(self.c_group_presentation)
 * 
 *     def num_original_generators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of geometric generators (before simplification).
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.CFundamentalGroup.num_original_generators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":152
 *         return fg_get_num_orig_gens(self.c_group_presentation)
 * 
 *     def original_generators(self, verbose_form=False, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return the original geometric generators (before
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_13original_generators(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_6SnapPy_17CFundamentalGroup_12original_generators, "CFundamentalGroup.original_generators(self, verbose_form=False, as_int_list=False)\n\n        Return the original geometric generators (before\n        simplification) in terms of the current generators.\n\n        >>> M = Manifold('v0000')\n        >>> G = M.fundamental_group()\n        >>> G.original_generators(as_int_list=True)\n        [[1], [-1, -2, 1, 2], [-1, 2], [-2, -1, 2], [2]]\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_13original_generators = {"original_generators", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_13original_generators, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_12original_generators};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_13original_generators(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_verbose_form = 0;
  PyObject *__pyx_v_as_int_list = 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("original_generators (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_verbose_form,&__pyx_n_s_as_int_list,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_verbose_form);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 152, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_as_int_list);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 152, __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, "original_generators") < 0)) __PYX_ERR(8, 152, __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);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_verbose_form = values[0];
    __pyx_v_as_int_list = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("original_generators", 0, 0, 2, __pyx_nargs); __PYX_ERR(8, 152, __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("SnapPy.CFundamentalGroup.original_generators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_12original_generators(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self), __pyx_v_verbose_form, __pyx_v_as_int_list);

  /* 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_6SnapPy_17CFundamentalGroup_12original_generators(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, PyObject *__pyx_v_verbose_form, PyObject *__pyx_v_as_int_list) {
  int __pyx_v_n;
  int *__pyx_v_gen;
  int __pyx_v_num_gen;
  int __pyx_v_num_orig_gens;
  PyObject *__pyx_v_orig_gens = NULL;
  PyObject *__pyx_v_word = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int *__pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("original_generators", 1);

  /* "cython/core/fundamental_group.pyx":164
 *         cdef int n
 *         cdef int *gen
 *         cdef int num_gen = self.num_generators()             # <<<<<<<<<<<<<<
 *         cdef int num_orig_gens = self.num_original_generators()
 *         orig_gens = []
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_generators); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 164, __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(8, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 164, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_num_gen = __pyx_t_4;

  /* "cython/core/fundamental_group.pyx":165
 *         cdef int *gen
 *         cdef int num_gen = self.num_generators()
 *         cdef int num_orig_gens = self.num_original_generators()             # <<<<<<<<<<<<<<
 *         orig_gens = []
 *         for n from 0 <= n < num_orig_gens:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_original_generators); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 165, __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(8, 165, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 165, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_num_orig_gens = __pyx_t_4;

  /* "cython/core/fundamental_group.pyx":166
 *         cdef int num_gen = self.num_generators()
 *         cdef int num_orig_gens = self.num_original_generators()
 *         orig_gens = []             # <<<<<<<<<<<<<<
 *         for n from 0 <= n < num_orig_gens:
 *             gen = fg_get_original_generator(self.c_group_presentation, n)
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_orig_gens = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/fundamental_group.pyx":167
 *         cdef int num_orig_gens = self.num_original_generators()
 *         orig_gens = []
 *         for n from 0 <= n < num_orig_gens:             # <<<<<<<<<<<<<<
 *             gen = fg_get_original_generator(self.c_group_presentation, n)
 *             if as_int_list:
 */
  __pyx_t_4 = __pyx_v_num_orig_gens;
  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {

    /* "cython/core/fundamental_group.pyx":168
 *         orig_gens = []
 *         for n from 0 <= n < num_orig_gens:
 *             gen = fg_get_original_generator(self.c_group_presentation, n)             # <<<<<<<<<<<<<<
 *             if as_int_list:
 *                 word = c_word_as_int_list(gen)
 */
    __pyx_t_5 = fg_get_original_generator(__pyx_v_self->c_group_presentation, __pyx_v_n); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 168, __pyx_L1_error)
    __pyx_v_gen = __pyx_t_5;

    /* "cython/core/fundamental_group.pyx":169
 *         for n from 0 <= n < num_orig_gens:
 *             gen = fg_get_original_generator(self.c_group_presentation, n)
 *             if as_int_list:             # <<<<<<<<<<<<<<
 *                 word = c_word_as_int_list(gen)
 *             else:
 */
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_as_int_list); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(8, 169, __pyx_L1_error)
    if (__pyx_t_6) {

      /* "cython/core/fundamental_group.pyx":170
 *             gen = fg_get_original_generator(self.c_group_presentation, n)
 *             if as_int_list:
 *                 word = c_word_as_int_list(gen)             # <<<<<<<<<<<<<<
 *             else:
 *                 word = c_word_as_string(gen, num_gen, verbose_form)
 */
      __pyx_t_1 = __pyx_f_6SnapPy_c_word_as_int_list(__pyx_v_gen); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 170, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_word, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cython/core/fundamental_group.pyx":169
 *         for n from 0 <= n < num_orig_gens:
 *             gen = fg_get_original_generator(self.c_group_presentation, n)
 *             if as_int_list:             # <<<<<<<<<<<<<<
 *                 word = c_word_as_int_list(gen)
 *             else:
 */
      goto __pyx_L5;
    }

    /* "cython/core/fundamental_group.pyx":172
 *                 word = c_word_as_int_list(gen)
 *             else:
 *                 word = c_word_as_string(gen, num_gen, verbose_form)             # <<<<<<<<<<<<<<
 *             orig_gens.append(word)
 *             fg_free_relation(gen)
 */
    /*else*/ {
      __pyx_t_1 = __pyx_f_6SnapPy_c_word_as_string(__pyx_v_gen, __pyx_v_num_gen, __pyx_v_verbose_form); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 172, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_word, __pyx_t_1);
      __pyx_t_1 = 0;
    }
    __pyx_L5:;

    /* "cython/core/fundamental_group.pyx":173
 *             else:
 *                 word = c_word_as_string(gen, num_gen, verbose_form)
 *             orig_gens.append(word)             # <<<<<<<<<<<<<<
 *             fg_free_relation(gen)
 *         return orig_gens
 */
    __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_orig_gens, __pyx_v_word); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(8, 173, __pyx_L1_error)

    /* "cython/core/fundamental_group.pyx":174
 *                 word = c_word_as_string(gen, num_gen, verbose_form)
 *             orig_gens.append(word)
 *             fg_free_relation(gen)             # <<<<<<<<<<<<<<
 *         return orig_gens
 * 
 */
    fg_free_relation(__pyx_v_gen); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 174, __pyx_L1_error)
  }

  /* "cython/core/fundamental_group.pyx":175
 *             orig_gens.append(word)
 *             fg_free_relation(gen)
 *         return orig_gens             # <<<<<<<<<<<<<<
 * 
 *     def generators_in_originals(self, verbose_form=False, raw_form=False, as_int_list=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_orig_gens);
  __pyx_r = __pyx_v_orig_gens;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":152
 *         return fg_get_num_orig_gens(self.c_group_presentation)
 * 
 *     def original_generators(self, verbose_form=False, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return the original geometric generators (before
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CFundamentalGroup.original_generators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_orig_gens);
  __Pyx_XDECREF(__pyx_v_word);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":177
 *         return orig_gens
 * 
 *     def generators_in_originals(self, verbose_form=False, raw_form=False, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return the current generators in terms of the original
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_15generators_in_originals(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_6SnapPy_17CFundamentalGroup_14generators_in_originals, "CFundamentalGroup.generators_in_originals(self, verbose_form=False, raw_form=False, as_int_list=False)\n\n        Return the current generators in terms of the original\n        geometric generators. Note that by default fundamental_group()\n        returns a simplified presentation of the group.\n\n        If the flag \"raw_form\" is set to True, it returns a sequence of\n        instructions for expressing the current generators in terms of\n        the original ones.  This is sometimes much more concise, though\n        the format is somewhat obscure.  See the source code of this\n        function in fundamental_group.pyx for details.\n\n        >>> M = Manifold('K7_1')\n        >>> G = M.fundamental_group()\n        >>> G.generators_in_originals()   #doctest: +NORMALIZE_WHITESPACE\n        ['DBcACbABcaCbDBcACbABcaCbACbaBcaCbd',\n         'DBcACbABcaCbDBcACbABcaCbCbDBcACbABcaBcACbaBcaCbdACbaBcaCbdBcBcACbaBcaCbd']\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_15generators_in_originals = {"generators_in_originals", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_15generators_in_originals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_14generators_in_originals};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_15generators_in_originals(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_verbose_form = 0;
  PyObject *__pyx_v_raw_form = 0;
  PyObject *__pyx_v_as_int_list = 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("generators_in_originals (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_verbose_form,&__pyx_n_s_raw_form,&__pyx_n_s_as_int_list,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_verbose_form);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 177, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_raw_form);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 177, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_as_int_list);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 177, __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, "generators_in_originals") < 0)) __PYX_ERR(8, 177, __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);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_verbose_form = values[0];
    __pyx_v_raw_form = values[1];
    __pyx_v_as_int_list = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("generators_in_originals", 0, 0, 3, __pyx_nargs); __PYX_ERR(8, 177, __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("SnapPy.CFundamentalGroup.generators_in_originals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_14generators_in_originals(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self), __pyx_v_verbose_form, __pyx_v_raw_form, __pyx_v_as_int_list);

  /* 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_6SnapPy_17CFundamentalGroup_14generators_in_originals(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, PyObject *__pyx_v_verbose_form, PyObject *__pyx_v_raw_form, PyObject *__pyx_v_as_int_list) {
  PyObject *__pyx_v_moves = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_words = NULL;
  PyObject *__pyx_v_a = NULL;
  PyObject *__pyx_v_word = NULL;
  PyObject *__pyx_v_parts = NULL;
  PyObject *__pyx_v_b = NULL;
  PyObject *__pyx_v_A = NULL;
  PyObject *__pyx_v_B = NULL;
  PyObject *__pyx_9genexpr74__pyx_v_i = NULL;
  PyObject *__pyx_9genexpr75__pyx_v_g = NULL;
  PyObject *__pyx_9genexpr76__pyx_v_word = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  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_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("generators_in_originals", 1);

  /* "cython/core/fundamental_group.pyx":195
 *          'DBcACbABcaCbDBcACbABcaCbCbDBcACbABcaBcACbaBcaCbdACbaBcaCbdBcBcACbaBcaCbd']
 *         """
 *         moves = self._word_moves()             # <<<<<<<<<<<<<<
 *         if raw_form:
 *             return moves
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_word_moves); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 195, __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(8, 195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_moves = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/fundamental_group.pyx":196
 *         """
 *         moves = self._word_moves()
 *         if raw_form:             # <<<<<<<<<<<<<<
 *             return moves
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_raw_form); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(8, 196, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "cython/core/fundamental_group.pyx":197
 *         moves = self._word_moves()
 *         if raw_form:
 *             return moves             # <<<<<<<<<<<<<<
 * 
 *         n = self.num_original_generators()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_moves);
    __pyx_r = __pyx_v_moves;
    goto __pyx_L0;

    /* "cython/core/fundamental_group.pyx":196
 *         """
 *         moves = self._word_moves()
 *         if raw_form:             # <<<<<<<<<<<<<<
 *             return moves
 * 
 */
  }

  /* "cython/core/fundamental_group.pyx":199
 *             return moves
 * 
 *         n = self.num_original_generators()             # <<<<<<<<<<<<<<
 * 
 *         words = [None] + [ [ i + 1 ] for i in range(n) ]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_original_generators); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 199, __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(8, 199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_n = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/fundamental_group.pyx":201
 *         n = self.num_original_generators()
 * 
 *         words = [None] + [ [ i + 1 ] for i in range(n) ]             # <<<<<<<<<<<<<<
 * 
 *         while len(moves) > 0:
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, Py_None)) __PYX_ERR(8, 201, __pyx_L1_error);
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 201, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 201, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6);
      __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 201, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 201, __pyx_L6_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_8)) {
        if (likely(PyList_CheckExact(__pyx_t_6))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(8, 201, __pyx_L6_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(8, 201, __pyx_L6_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 201, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_6);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(8, 201, __pyx_L6_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(8, 201, __pyx_L6_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 201, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_8(__pyx_t_6);
        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(8, 201, __pyx_L6_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr74__pyx_v_i, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_9genexpr74__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 201, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyList_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 201, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_3)) __PYX_ERR(8, 201, __pyx_L6_error);
      __pyx_t_3 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_9))) __PYX_ERR(8, 201, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_9genexpr74__pyx_v_i); __pyx_9genexpr74__pyx_v_i = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_9genexpr74__pyx_v_i); __pyx_9genexpr74__pyx_v_i = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __pyx_t_6 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_words = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "cython/core/fundamental_group.pyx":203
 *         words = [None] + [ [ i + 1 ] for i in range(n) ]
 * 
 *         while len(moves) > 0:             # <<<<<<<<<<<<<<
 *             a = moves.pop(0)
 *             if a >= len(words):  # new generator added
 */
  while (1) {
    __pyx_t_7 = PyObject_Length(__pyx_v_moves); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(8, 203, __pyx_L1_error)
    __pyx_t_5 = (__pyx_t_7 > 0);
    if (!__pyx_t_5) break;

    /* "cython/core/fundamental_group.pyx":204
 * 
 *         while len(moves) > 0:
 *             a = moves.pop(0)             # <<<<<<<<<<<<<<
 *             if a >= len(words):  # new generator added
 *                 n = moves.index(a)  # end symbol location
 */
    __pyx_t_6 = __Pyx_PyObject_PopIndex(__pyx_v_moves, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 204, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "cython/core/fundamental_group.pyx":205
 *         while len(moves) > 0:
 *             a = moves.pop(0)
 *             if a >= len(words):  # new generator added             # <<<<<<<<<<<<<<
 *                 n = moves.index(a)  # end symbol location
 *                 # word is the expression of the new generator in terms
 */
    __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_words); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(8, 205, __pyx_L1_error)
    __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_a, __pyx_t_6, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 205, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(8, 205, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_5) {

      /* "cython/core/fundamental_group.pyx":206
 *             a = moves.pop(0)
 *             if a >= len(words):  # new generator added
 *                 n = moves.index(a)  # end symbol location             # <<<<<<<<<<<<<<
 *                 # word is the expression of the new generator in terms
 *                 # of the old ones
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_moves, __pyx_n_s_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 206, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_a};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __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(8, 206, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "cython/core/fundamental_group.pyx":209
 *                 # word is the expression of the new generator in terms
 *                 # of the old ones
 *                 word, moves = moves[:n], moves[n+1:]             # <<<<<<<<<<<<<<
 *                 parts = [words[g] if g > 0 else inverse_list_word(words[-g])
 *                          for g in word]
 */
      __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_moves, 0, 0, NULL, &__pyx_v_n, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 209, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_n, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 209, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_moves, 0, 0, &__pyx_t_6, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 209, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_word, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_moves, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cython/core/fundamental_group.pyx":210
 *                 # of the old ones
 *                 word, moves = moves[:n], moves[n+1:]
 *                 parts = [words[g] if g > 0 else inverse_list_word(words[-g])             # <<<<<<<<<<<<<<
 *                          for g in word]
 *                 words.append(reduce_list_word(sum(parts, [])))
 */
      { /* enter inner scope */
        __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 210, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_1);

        /* "cython/core/fundamental_group.pyx":211
 *                 word, moves = moves[:n], moves[n+1:]
 *                 parts = [words[g] if g > 0 else inverse_list_word(words[-g])
 *                          for g in word]             # <<<<<<<<<<<<<<
 *                 words.append(reduce_list_word(sum(parts, [])))
 *             else:
 */
        if (likely(PyList_CheckExact(__pyx_v_word)) || PyTuple_CheckExact(__pyx_v_word)) {
          __pyx_t_2 = __pyx_v_word; __Pyx_INCREF(__pyx_t_2);
          __pyx_t_7 = 0;
          __pyx_t_8 = NULL;
        } else {
          __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_word); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 211, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 211, __pyx_L16_error)
        }
        for (;;) {
          if (likely(!__pyx_t_8)) {
            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(8, 211, __pyx_L16_error)
                #endif
                if (__pyx_t_7 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(8, 211, __pyx_L16_error)
              #else
              __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 211, __pyx_L16_error)
              __Pyx_GOTREF(__pyx_t_6);
              #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(8, 211, __pyx_L16_error)
                #endif
                if (__pyx_t_7 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(8, 211, __pyx_L16_error)
              #else
              __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 211, __pyx_L16_error)
              __Pyx_GOTREF(__pyx_t_6);
              #endif
            }
          } else {
            __pyx_t_6 = __pyx_t_8(__pyx_t_2);
            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(8, 211, __pyx_L16_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_6);
          }
          __Pyx_XDECREF_SET(__pyx_9genexpr75__pyx_v_g, __pyx_t_6);
          __pyx_t_6 = 0;

          /* "cython/core/fundamental_group.pyx":210
 *                 # of the old ones
 *                 word, moves = moves[:n], moves[n+1:]
 *                 parts = [words[g] if g > 0 else inverse_list_word(words[-g])             # <<<<<<<<<<<<<<
 *                          for g in word]
 *                 words.append(reduce_list_word(sum(parts, [])))
 */
          __pyx_t_9 = PyObject_RichCompare(__pyx_9genexpr75__pyx_v_g, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 210, __pyx_L16_error)
          __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(8, 210, __pyx_L16_error)
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (__pyx_t_5) {
            __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_words, __pyx_9genexpr75__pyx_v_g); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 210, __pyx_L16_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_6 = __pyx_t_9;
            __pyx_t_9 = 0;
          } else {
            __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_inverse_list_word); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 210, __pyx_L16_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_10 = PyNumber_Negative(__pyx_9genexpr75__pyx_v_g); if (unlikely(!__pyx_t_10)) __PYX_ERR(8, 210, __pyx_L16_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_words, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 210, __pyx_L16_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __pyx_t_10 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_10)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_10);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_11};
              __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 210, __pyx_L16_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            }
            __pyx_t_6 = __pyx_t_9;
            __pyx_t_9 = 0;
          }
          if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(8, 210, __pyx_L16_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "cython/core/fundamental_group.pyx":211
 *                 word, moves = moves[:n], moves[n+1:]
 *                 parts = [words[g] if g > 0 else inverse_list_word(words[-g])
 *                          for g in word]             # <<<<<<<<<<<<<<
 *                 words.append(reduce_list_word(sum(parts, [])))
 *             else:
 */
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_9genexpr75__pyx_v_g); __pyx_9genexpr75__pyx_v_g = 0;
        goto __pyx_L20_exit_scope;
        __pyx_L16_error:;
        __Pyx_XDECREF(__pyx_9genexpr75__pyx_v_g); __pyx_9genexpr75__pyx_v_g = 0;
        goto __pyx_L1_error;
        __pyx_L20_exit_scope:;
      } /* exit inner scope */
      __Pyx_XDECREF_SET(__pyx_v_parts, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "cython/core/fundamental_group.pyx":212
 *                 parts = [words[g] if g > 0 else inverse_list_word(words[-g])
 *                          for g in word]
 *                 words.append(reduce_list_word(sum(parts, [])))             # <<<<<<<<<<<<<<
 *             else:
 *                 b = moves.pop(0)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_reduce_list_word); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_v_parts);
      __Pyx_GIVEREF(__pyx_v_parts);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_parts)) __PYX_ERR(8, 212, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6)) __PYX_ERR(8, 212, __pyx_L1_error);
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 212, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 212, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_words, __pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(8, 212, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "cython/core/fundamental_group.pyx":205
 *         while len(moves) > 0:
 *             a = moves.pop(0)
 *             if a >= len(words):  # new generator added             # <<<<<<<<<<<<<<
 *                 n = moves.index(a)  # end symbol location
 *                 # word is the expression of the new generator in terms
 */
      goto __pyx_L13;
    }

    /* "cython/core/fundamental_group.pyx":214
 *                 words.append(reduce_list_word(sum(parts, [])))
 *             else:
 *                 b = moves.pop(0)             # <<<<<<<<<<<<<<
 *                 if a == b:  # generator removed
 *                     words[a] = words[-1]
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_PopIndex(__pyx_v_moves, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 214, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cython/core/fundamental_group.pyx":215
 *             else:
 *                 b = moves.pop(0)
 *                 if a == b:  # generator removed             # <<<<<<<<<<<<<<
 *                     words[a] = words[-1]
 *                     words = words[:-1]
 */
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_a, __pyx_v_b, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 215, __pyx_L1_error)
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(8, 215, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_5) {

        /* "cython/core/fundamental_group.pyx":216
 *                 b = moves.pop(0)
 *                 if a == b:  # generator removed
 *                     words[a] = words[-1]             # <<<<<<<<<<<<<<
 *                     words = words[:-1]
 *                 elif a == -b:  # invert generator
 */
        __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_words, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 216, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (unlikely((PyObject_SetItem(__pyx_v_words, __pyx_v_a, __pyx_t_1) < 0))) __PYX_ERR(8, 216, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "cython/core/fundamental_group.pyx":217
 *                 if a == b:  # generator removed
 *                     words[a] = words[-1]
 *                     words = words[:-1]             # <<<<<<<<<<<<<<
 *                 elif a == -b:  # invert generator
 *                     words[a] = inverse_list_word(words[a])
 */
        __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_v_words, 0, -1L); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 217, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_words, ((PyObject*)__pyx_t_1));
        __pyx_t_1 = 0;

        /* "cython/core/fundamental_group.pyx":215
 *             else:
 *                 b = moves.pop(0)
 *                 if a == b:  # generator removed             # <<<<<<<<<<<<<<
 *                     words[a] = words[-1]
 *                     words = words[:-1]
 */
        goto __pyx_L21;
      }

      /* "cython/core/fundamental_group.pyx":218
 *                     words[a] = words[-1]
 *                     words = words[:-1]
 *                 elif a == -b:  # invert generator             # <<<<<<<<<<<<<<
 *                     words[a] = inverse_list_word(words[a])
 *                 else:  # handle slide
 */
      __pyx_t_1 = PyNumber_Negative(__pyx_v_b); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyObject_RichCompare(__pyx_v_a, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 218, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(8, 218, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_5) {

        /* "cython/core/fundamental_group.pyx":219
 *                     words = words[:-1]
 *                 elif a == -b:  # invert generator
 *                     words[a] = inverse_list_word(words[a])             # <<<<<<<<<<<<<<
 *                 else:  # handle slide
 *                     A, B = words[abs(a)], words[abs(b)]
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_inverse_list_word); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 219, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_words, __pyx_v_a); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 219, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_9 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 219, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        if (unlikely((PyObject_SetItem(__pyx_v_words, __pyx_v_a, __pyx_t_2) < 0))) __PYX_ERR(8, 219, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "cython/core/fundamental_group.pyx":218
 *                     words[a] = words[-1]
 *                     words = words[:-1]
 *                 elif a == -b:  # invert generator             # <<<<<<<<<<<<<<
 *                     words[a] = inverse_list_word(words[a])
 *                 else:  # handle slide
 */
        goto __pyx_L21;
      }

      /* "cython/core/fundamental_group.pyx":221
 *                     words[a] = inverse_list_word(words[a])
 *                 else:  # handle slide
 *                     A, B = words[abs(a)], words[abs(b)]             # <<<<<<<<<<<<<<
 *                     if a*b < 0:
 *                         B = inverse_list_word(B)
 */
      /*else*/ {
        __pyx_t_2 = __Pyx_PyNumber_Absolute(__pyx_v_a); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 221, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_words, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 221, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyNumber_Absolute(__pyx_v_b); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 221, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_words, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 221, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF_SET(__pyx_v_A, __pyx_t_1);
        __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_B, __pyx_t_6);
        __pyx_t_6 = 0;

        /* "cython/core/fundamental_group.pyx":222
 *                 else:  # handle slide
 *                     A, B = words[abs(a)], words[abs(b)]
 *                     if a*b < 0:             # <<<<<<<<<<<<<<
 *                         B = inverse_list_word(B)
 *                     words[abs(a)] = reduce_list_word(A+B if a > 0 else B+A)
 */
        __pyx_t_6 = PyNumber_Multiply(__pyx_v_a, __pyx_v_b); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 222, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 222, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(8, 222, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_5) {

          /* "cython/core/fundamental_group.pyx":223
 *                     A, B = words[abs(a)], words[abs(b)]
 *                     if a*b < 0:
 *                         B = inverse_list_word(B)             # <<<<<<<<<<<<<<
 *                     words[abs(a)] = reduce_list_word(A+B if a > 0 else B+A)
 * 
 */
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_inverse_list_word); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 223, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_2 = NULL;
          __pyx_t_4 = 0;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
              __pyx_t_4 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_B};
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __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(8, 223, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          }
          __Pyx_DECREF_SET(__pyx_v_B, __pyx_t_1);
          __pyx_t_1 = 0;

          /* "cython/core/fundamental_group.pyx":222
 *                 else:  # handle slide
 *                     A, B = words[abs(a)], words[abs(b)]
 *                     if a*b < 0:             # <<<<<<<<<<<<<<
 *                         B = inverse_list_word(B)
 *                     words[abs(a)] = reduce_list_word(A+B if a > 0 else B+A)
 */
        }

        /* "cython/core/fundamental_group.pyx":224
 *                     if a*b < 0:
 *                         B = inverse_list_word(B)
 *                     words[abs(a)] = reduce_list_word(A+B if a > 0 else B+A)             # <<<<<<<<<<<<<<
 * 
 *         if as_int_list:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_reduce_list_word); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 224, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_9 = PyObject_RichCompare(__pyx_v_a, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 224, __pyx_L1_error)
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(8, 224, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (__pyx_t_5) {
          __pyx_t_9 = PyNumber_Add(__pyx_v_A, __pyx_v_B); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 224, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_2 = __pyx_t_9;
          __pyx_t_9 = 0;
        } else {
          __pyx_t_9 = PyNumber_Add(__pyx_v_B, __pyx_v_A); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 224, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __pyx_t_2 = __pyx_t_9;
          __pyx_t_9 = 0;
        }
        __pyx_t_9 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 224, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __pyx_t_6 = __Pyx_PyNumber_Absolute(__pyx_v_a); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 224, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (unlikely((PyObject_SetItem(__pyx_v_words, __pyx_t_6, __pyx_t_1) < 0))) __PYX_ERR(8, 224, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_L21:;
    }
    __pyx_L13:;
  }

  /* "cython/core/fundamental_group.pyx":226
 *                     words[abs(a)] = reduce_list_word(A+B if a > 0 else B+A)
 * 
 *         if as_int_list:             # <<<<<<<<<<<<<<
 *             return words[1:]
 *         else:
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_as_int_list); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(8, 226, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "cython/core/fundamental_group.pyx":227
 * 
 *         if as_int_list:
 *             return words[1:]             # <<<<<<<<<<<<<<
 *         else:
 *             n = self.num_original_generators()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_v_words, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 227, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cython/core/fundamental_group.pyx":226
 *                     words[abs(a)] = reduce_list_word(A+B if a > 0 else B+A)
 * 
 *         if as_int_list:             # <<<<<<<<<<<<<<
 *             return words[1:]
 *         else:
 */
  }

  /* "cython/core/fundamental_group.pyx":229
 *             return words[1:]
 *         else:
 *             n = self.num_original_generators()             # <<<<<<<<<<<<<<
 *             return [ list_as_word(word, n, verbose_form) for word in words[1:]]
 * 
 */
  /*else*/ {
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_original_generators); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __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(8, 229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cython/core/fundamental_group.pyx":230
 *         else:
 *             n = self.num_original_generators()
 *             return [ list_as_word(word, n, verbose_form) for word in words[1:]]             # <<<<<<<<<<<<<<
 * 
 *     def _word_moves(self):
 */
    __Pyx_XDECREF(__pyx_r);
    { /* enter inner scope */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 230, __pyx_L26_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyList_GetSlice(__pyx_v_words, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 230, __pyx_L26_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = __pyx_t_6; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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(8, 230, __pyx_L26_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(8, 230, __pyx_L26_error)
        #else
        __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 230, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_6);
        #endif
        __Pyx_XDECREF_SET(__pyx_9genexpr76__pyx_v_word, __pyx_t_6);
        __pyx_t_6 = 0;
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_list_as_word); if (unlikely(!__pyx_t_9)) __PYX_ERR(8, 230, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_3 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_9genexpr76__pyx_v_word, __pyx_v_n, __pyx_v_verbose_form};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 230, __pyx_L26_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(8, 230, __pyx_L26_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_9genexpr76__pyx_v_word); __pyx_9genexpr76__pyx_v_word = 0;
      goto __pyx_L30_exit_scope;
      __pyx_L26_error:;
      __Pyx_XDECREF(__pyx_9genexpr76__pyx_v_word); __pyx_9genexpr76__pyx_v_word = 0;
      goto __pyx_L1_error;
      __pyx_L30_exit_scope:;
    } /* exit inner scope */
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "cython/core/fundamental_group.pyx":177
 *         return orig_gens
 * 
 *     def generators_in_originals(self, verbose_form=False, raw_form=False, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return the current generators in terms of the original
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("SnapPy.CFundamentalGroup.generators_in_originals", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_moves);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_words);
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XDECREF(__pyx_v_word);
  __Pyx_XDECREF(__pyx_v_parts);
  __Pyx_XDECREF(__pyx_v_b);
  __Pyx_XDECREF(__pyx_v_A);
  __Pyx_XDECREF(__pyx_v_B);
  __Pyx_XDECREF(__pyx_9genexpr74__pyx_v_i);
  __Pyx_XDECREF(__pyx_9genexpr75__pyx_v_g);
  __Pyx_XDECREF(__pyx_9genexpr76__pyx_v_word);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":232
 *             return [ list_as_word(word, n, verbose_form) for word in words[1:]]
 * 
 *     def _word_moves(self):             # <<<<<<<<<<<<<<
 *         cdef int *c_moves
 *         c_moves = fg_get_word_moves(self.c_group_presentation)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_17_word_moves(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_6SnapPy_17CFundamentalGroup_16_word_moves, "CFundamentalGroup._word_moves(self)");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_17_word_moves = {"_word_moves", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_17_word_moves, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_16_word_moves};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_17_word_moves(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("_word_moves (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("_word_moves", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_word_moves", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_16_word_moves(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_16_word_moves(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self) {
  int *__pyx_v_c_moves;
  PyObject *__pyx_v_moves = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_word_moves", 1);

  /* "cython/core/fundamental_group.pyx":234
 *     def _word_moves(self):
 *         cdef int *c_moves
 *         c_moves = fg_get_word_moves(self.c_group_presentation)             # <<<<<<<<<<<<<<
 *         moves = c_word_as_int_list(c_moves)
 *         fg_free_relation(c_moves)
 */
  __pyx_t_1 = fg_get_word_moves(__pyx_v_self->c_group_presentation); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 234, __pyx_L1_error)
  __pyx_v_c_moves = __pyx_t_1;

  /* "cython/core/fundamental_group.pyx":235
 *         cdef int *c_moves
 *         c_moves = fg_get_word_moves(self.c_group_presentation)
 *         moves = c_word_as_int_list(c_moves)             # <<<<<<<<<<<<<<
 *         fg_free_relation(c_moves)
 *         return moves
 */
  __pyx_t_2 = __pyx_f_6SnapPy_c_word_as_int_list(__pyx_v_c_moves); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_moves = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/fundamental_group.pyx":236
 *         c_moves = fg_get_word_moves(self.c_group_presentation)
 *         moves = c_word_as_int_list(c_moves)
 *         fg_free_relation(c_moves)             # <<<<<<<<<<<<<<
 *         return moves
 * 
 */
  fg_free_relation(__pyx_v_c_moves); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 236, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":237
 *         moves = c_word_as_int_list(c_moves)
 *         fg_free_relation(c_moves)
 *         return moves             # <<<<<<<<<<<<<<
 * 
 *     def generators(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_moves);
  __pyx_r = __pyx_v_moves;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":232
 *             return [ list_as_word(word, n, verbose_form) for word in words[1:]]
 * 
 *     def _word_moves(self):             # <<<<<<<<<<<<<<
 *         cdef int *c_moves
 *         c_moves = fg_get_word_moves(self.c_group_presentation)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.CFundamentalGroup._word_moves", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_moves);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":239
 *         return moves
 * 
 *     def generators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the letters representing the generators in the presentation.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_19generators(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_6SnapPy_17CFundamentalGroup_18generators, "CFundamentalGroup.generators(self)\n\n        Return the letters representing the generators in the presentation.\n\n        >>> M = Manifold('9_42')\n        >>> G = M.fundamental_group() #Presentation simplified by default\n        >>> G\n        Generators:\n           a,b\n        Relators:\n           aaaabbABBBAbb\n        >>> H = M.fundamental_group(False) #Unsimplified presentation\n        >>> H\n        Generators:\n           a,b,c,d,e\n        Relators:\n           ECbC\n           dEb\n           dAcaB\n           dbaE\n\n        SnapPy stores a FundamentalGroup as a presentation of the group.\n        The following commands demonstrate how generators in the unsimplified\n        and simplified presentations above correspond:\n\n        >>> G.generators()\n        ['a', 'b']\n        >>> H.generators()\n        ['a', 'b', 'c', 'd', 'e']\n        >>> G.generators_in_originals()\n        ['BABcBcbCABcBcbCCbCba', 'BcBCbCbab']\n        >>> G.original_generators()\n        ['BBAbba', 'A', 'AB', 'abba', 'bba']\n        >>> G.num_generators()\n        2\n        >>> G.num_original_generators()\n        5\n        >>> H.num_generators()\n        5\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_19generators = {"generators", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_19generators, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_18generators};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_19generators(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("generators (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("generators", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "generators", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_18generators(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_18generators(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self) {
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_9genexpr77__pyx_v_i = 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 *);
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("generators", 1);

  /* "cython/core/fundamental_group.pyx":279
 *         5
 *         """
 *         n = self.num_generators()             # <<<<<<<<<<<<<<
 *         return [ int_to_gen_string(i, n, verbose_form=False)
 *                  for i in range(1, 1+n) ]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_generators); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 279, __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(8, 279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_n = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/fundamental_group.pyx":280
 *         """
 *         n = self.num_generators()
 *         return [ int_to_gen_string(i, n, verbose_form=False)             # <<<<<<<<<<<<<<
 *                  for i in range(1, 1+n) ]
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 280, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cython/core/fundamental_group.pyx":281
 *         n = self.num_generators()
 *         return [ int_to_gen_string(i, n, verbose_form=False)
 *                  for i in range(1, 1+n) ]             # <<<<<<<<<<<<<<
 * 
 *     def relators(self, verbose_form = False, as_int_list=False):
 */
    __pyx_t_2 = __Pyx_PyInt_AddCObj(__pyx_int_1, __pyx_v_n, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 281, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 281, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_int_1);
    __Pyx_GIVEREF(__pyx_int_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_1)) __PYX_ERR(8, 281, __pyx_L5_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(8, 281, __pyx_L5_error);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 281, __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_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 281, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 281, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        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(8, 281, __pyx_L5_error)
            #endif
            if (__pyx_t_5 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(8, 281, __pyx_L5_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 281, __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(8, 281, __pyx_L5_error)
            #endif
            if (__pyx_t_5 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(8, 281, __pyx_L5_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 281, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_6(__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(8, 281, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr77__pyx_v_i, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "cython/core/fundamental_group.pyx":280
 *         """
 *         n = self.num_generators()
 *         return [ int_to_gen_string(i, n, verbose_form=False)             # <<<<<<<<<<<<<<
 *                  for i in range(1, 1+n) ]
 * 
 */
      __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_9genexpr77__pyx_v_i); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 280, __pyx_L5_error)
      __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_n); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 280, __pyx_L5_error)
      __pyx_t_2 = __pyx_f_6SnapPy_int_to_gen_string(__pyx_t_4, __pyx_t_7, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 280, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(8, 280, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/fundamental_group.pyx":281
 *         n = self.num_generators()
 *         return [ int_to_gen_string(i, n, verbose_form=False)
 *                  for i in range(1, 1+n) ]             # <<<<<<<<<<<<<<
 * 
 *     def relators(self, verbose_form = False, as_int_list=False):
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr77__pyx_v_i); __pyx_9genexpr77__pyx_v_i = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr77__pyx_v_i); __pyx_9genexpr77__pyx_v_i = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":239
 *         return moves
 * 
 *     def generators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the letters representing the generators in the presentation.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CFundamentalGroup.generators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_9genexpr77__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":283
 *                  for i in range(1, 1+n) ]
 * 
 *     def relators(self, verbose_form = False, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of words representing the relators in the presentation.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_21relators(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_6SnapPy_17CFundamentalGroup_20relators, "CFundamentalGroup.relators(self, verbose_form=False, as_int_list=False)\n\n        Return a list of words representing the relators in the presentation.\n\n        If the optional argument verbose_form is True, then the\n        relator is returned in the form \"a*b*a^-1*b^-1\" instead of \"abAB\".\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_21relators = {"relators", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_21relators, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_20relators};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_21relators(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_verbose_form = 0;
  PyObject *__pyx_v_as_int_list = 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("relators (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_verbose_form,&__pyx_n_s_as_int_list,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_verbose_form);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 283, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_as_int_list);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 283, __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, "relators") < 0)) __PYX_ERR(8, 283, __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);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_verbose_form = values[0];
    __pyx_v_as_int_list = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("relators", 0, 0, 2, __pyx_nargs); __PYX_ERR(8, 283, __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("SnapPy.CFundamentalGroup.relators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_20relators(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self), __pyx_v_verbose_form, __pyx_v_as_int_list);

  /* 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_6SnapPy_17CFundamentalGroup_20relators(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, PyObject *__pyx_v_verbose_form, PyObject *__pyx_v_as_int_list) {
  int __pyx_v_n;
  int *__pyx_v_relation;
  int __pyx_v_num_gens;
  PyObject *__pyx_v_relation_list = NULL;
  int __pyx_v_num_relations;
  PyObject *__pyx_v_word = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int *__pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("relators", 1);

  /* "cython/core/fundamental_group.pyx":292
 *         cdef int n
 *         cdef int *relation
 *         cdef int num_gens = self.num_generators()             # <<<<<<<<<<<<<<
 * 
 *         relation_list = []
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_generators); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 292, __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(8, 292, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 292, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_num_gens = __pyx_t_4;

  /* "cython/core/fundamental_group.pyx":294
 *         cdef int num_gens = self.num_generators()
 * 
 *         relation_list = []             # <<<<<<<<<<<<<<
 *         num_relations = fg_get_num_relations(self.c_group_presentation)
 *         for n from 0 <= n < num_relations:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_relation_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/fundamental_group.pyx":295
 * 
 *         relation_list = []
 *         num_relations = fg_get_num_relations(self.c_group_presentation)             # <<<<<<<<<<<<<<
 *         for n from 0 <= n < num_relations:
 *             relation = fg_get_relation(self.c_group_presentation, n)
 */
  __pyx_t_4 = fg_get_num_relations(__pyx_v_self->c_group_presentation); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 295, __pyx_L1_error)
  __pyx_v_num_relations = __pyx_t_4;

  /* "cython/core/fundamental_group.pyx":296
 *         relation_list = []
 *         num_relations = fg_get_num_relations(self.c_group_presentation)
 *         for n from 0 <= n < num_relations:             # <<<<<<<<<<<<<<
 *             relation = fg_get_relation(self.c_group_presentation, n)
 *             if as_int_list:
 */
  __pyx_t_4 = __pyx_v_num_relations;
  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {

    /* "cython/core/fundamental_group.pyx":297
 *         num_relations = fg_get_num_relations(self.c_group_presentation)
 *         for n from 0 <= n < num_relations:
 *             relation = fg_get_relation(self.c_group_presentation, n)             # <<<<<<<<<<<<<<
 *             if as_int_list:
 *                 word = c_word_as_int_list(relation)
 */
    __pyx_t_5 = fg_get_relation(__pyx_v_self->c_group_presentation, __pyx_v_n); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 297, __pyx_L1_error)
    __pyx_v_relation = __pyx_t_5;

    /* "cython/core/fundamental_group.pyx":298
 *         for n from 0 <= n < num_relations:
 *             relation = fg_get_relation(self.c_group_presentation, n)
 *             if as_int_list:             # <<<<<<<<<<<<<<
 *                 word = c_word_as_int_list(relation)
 *             else:
 */
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_as_int_list); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(8, 298, __pyx_L1_error)
    if (__pyx_t_6) {

      /* "cython/core/fundamental_group.pyx":299
 *             relation = fg_get_relation(self.c_group_presentation, n)
 *             if as_int_list:
 *                 word = c_word_as_int_list(relation)             # <<<<<<<<<<<<<<
 *             else:
 *                 word = c_word_as_string(relation, num_gens, verbose_form)
 */
      __pyx_t_1 = __pyx_f_6SnapPy_c_word_as_int_list(__pyx_v_relation); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 299, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_word, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "cython/core/fundamental_group.pyx":298
 *         for n from 0 <= n < num_relations:
 *             relation = fg_get_relation(self.c_group_presentation, n)
 *             if as_int_list:             # <<<<<<<<<<<<<<
 *                 word = c_word_as_int_list(relation)
 *             else:
 */
      goto __pyx_L5;
    }

    /* "cython/core/fundamental_group.pyx":301
 *                 word = c_word_as_int_list(relation)
 *             else:
 *                 word = c_word_as_string(relation, num_gens, verbose_form)             # <<<<<<<<<<<<<<
 *             relation_list.append(word)
 *             fg_free_relation(relation)
 */
    /*else*/ {
      __pyx_t_1 = __pyx_f_6SnapPy_c_word_as_string(__pyx_v_relation, __pyx_v_num_gens, __pyx_v_verbose_form); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 301, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_word, __pyx_t_1);
      __pyx_t_1 = 0;
    }
    __pyx_L5:;

    /* "cython/core/fundamental_group.pyx":302
 *             else:
 *                 word = c_word_as_string(relation, num_gens, verbose_form)
 *             relation_list.append(word)             # <<<<<<<<<<<<<<
 *             fg_free_relation(relation)
 *         return relation_list
 */
    __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_relation_list, __pyx_v_word); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(8, 302, __pyx_L1_error)

    /* "cython/core/fundamental_group.pyx":303
 *                 word = c_word_as_string(relation, num_gens, verbose_form)
 *             relation_list.append(word)
 *             fg_free_relation(relation)             # <<<<<<<<<<<<<<
 *         return relation_list
 * 
 */
    fg_free_relation(__pyx_v_relation); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 303, __pyx_L1_error)
  }

  /* "cython/core/fundamental_group.pyx":304
 *             relation_list.append(word)
 *             fg_free_relation(relation)
 *         return relation_list             # <<<<<<<<<<<<<<
 * 
 *     def meridian(self, int which_cusp=0, as_int_list=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_relation_list);
  __pyx_r = __pyx_v_relation_list;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":283
 *                  for i in range(1, 1+n) ]
 * 
 *     def relators(self, verbose_form = False, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of words representing the relators in the presentation.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CFundamentalGroup.relators", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_relation_list);
  __Pyx_XDECREF(__pyx_v_word);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":306
 *         return relation_list
 * 
 *     def meridian(self, int which_cusp=0, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a word representing a conjugate of the current
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_23meridian(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_6SnapPy_17CFundamentalGroup_22meridian, "CFundamentalGroup.meridian(self, int which_cusp=0, as_int_list=False)\n\n        Returns a word representing a conjugate of the current\n        meridian for the given cusp.  Guaranteed to commute with the\n        longitude for the same cusp.\n\n        >>> G = Manifold('m125').fundamental_group()\n        >>> G.meridian(0)\n        'aaba'\n        >>> G.meridian(-1)  # The last cusp\n        'baaba'\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_23meridian = {"meridian", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_23meridian, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_22meridian};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_23meridian(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
) {
  int __pyx_v_which_cusp;
  PyObject *__pyx_v_as_int_list = 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("meridian (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_which_cusp,&__pyx_n_s_as_int_list,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_which_cusp);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 306, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_as_int_list);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 306, __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, "meridian") < 0)) __PYX_ERR(8, 306, __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);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_which_cusp = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_which_cusp == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 306, __pyx_L3_error)
    } else {
      __pyx_v_which_cusp = ((int)0);
    }
    __pyx_v_as_int_list = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("meridian", 0, 0, 2, __pyx_nargs); __PYX_ERR(8, 306, __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("SnapPy.CFundamentalGroup.meridian", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_22meridian(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self), __pyx_v_which_cusp, __pyx_v_as_int_list);

  /* 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_6SnapPy_17CFundamentalGroup_22meridian(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, int __pyx_v_which_cusp, PyObject *__pyx_v_as_int_list) {
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("meridian", 1);

  /* "cython/core/fundamental_group.pyx":318
 *         'baaba'
 *         """
 *         which_cusp = valid_index(             # <<<<<<<<<<<<<<
 *             which_cusp, self.num_cusps,
 *             'The specified cusp (%s) does not exist.')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_valid_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cython/core/fundamental_group.pyx":319
 *         """
 *         which_cusp = valid_index(
 *             which_cusp, self.num_cusps,             # <<<<<<<<<<<<<<
 *             'The specified cusp (%s) does not exist.')
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_which_cusp); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 319, __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_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[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self->num_cusps, __pyx_kp_s_The_specified_cusp_s_does_not_ex};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 318, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "cython/core/fundamental_group.pyx":318
 *         'baaba'
 *         """
 *         which_cusp = valid_index(             # <<<<<<<<<<<<<<
 *             which_cusp, self.num_cusps,
 *             'The specified cusp (%s) does not exist.')
 */
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 318, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_which_cusp = __pyx_t_5;

  /* "cython/core/fundamental_group.pyx":322
 *             'The specified cusp (%s) does not exist.')
 * 
 *         if as_int_list:             # <<<<<<<<<<<<<<
 *             return c_word_as_int_list(
 *                fg_get_meridian(self.c_group_presentation, which_cusp))
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_as_int_list); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(8, 322, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "cython/core/fundamental_group.pyx":323
 * 
 *         if as_int_list:
 *             return c_word_as_int_list(             # <<<<<<<<<<<<<<
 *                fg_get_meridian(self.c_group_presentation, which_cusp))
 *         else:
 */
    __Pyx_XDECREF(__pyx_r);

    /* "cython/core/fundamental_group.pyx":324
 *         if as_int_list:
 *             return c_word_as_int_list(
 *                fg_get_meridian(self.c_group_presentation, which_cusp))             # <<<<<<<<<<<<<<
 *         else:
 *             return c_word_as_string(
 */
    __pyx_t_7 = fg_get_meridian(__pyx_v_self->c_group_presentation, __pyx_v_which_cusp); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 324, __pyx_L1_error)

    /* "cython/core/fundamental_group.pyx":323
 * 
 *         if as_int_list:
 *             return c_word_as_int_list(             # <<<<<<<<<<<<<<
 *                fg_get_meridian(self.c_group_presentation, which_cusp))
 *         else:
 */
    __pyx_t_1 = __pyx_f_6SnapPy_c_word_as_int_list(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 323, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cython/core/fundamental_group.pyx":322
 *             'The specified cusp (%s) does not exist.')
 * 
 *         if as_int_list:             # <<<<<<<<<<<<<<
 *             return c_word_as_int_list(
 *                fg_get_meridian(self.c_group_presentation, which_cusp))
 */
  }

  /* "cython/core/fundamental_group.pyx":326
 *                fg_get_meridian(self.c_group_presentation, which_cusp))
 *         else:
 *             return c_word_as_string(             # <<<<<<<<<<<<<<
 *                fg_get_meridian(self.c_group_presentation, which_cusp),
 *                self.num_generators(),
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);

    /* "cython/core/fundamental_group.pyx":327
 *         else:
 *             return c_word_as_string(
 *                fg_get_meridian(self.c_group_presentation, which_cusp),             # <<<<<<<<<<<<<<
 *                self.num_generators(),
 *                verbose_form = False)
 */
    __pyx_t_7 = fg_get_meridian(__pyx_v_self->c_group_presentation, __pyx_v_which_cusp); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 327, __pyx_L1_error)

    /* "cython/core/fundamental_group.pyx":328
 *             return c_word_as_string(
 *                fg_get_meridian(self.c_group_presentation, which_cusp),
 *                self.num_generators(),             # <<<<<<<<<<<<<<
 *                verbose_form = False)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_generators); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 328, __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[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 328, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 328, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/fundamental_group.pyx":326
 *                fg_get_meridian(self.c_group_presentation, which_cusp))
 *         else:
 *             return c_word_as_string(             # <<<<<<<<<<<<<<
 *                fg_get_meridian(self.c_group_presentation, which_cusp),
 *                self.num_generators(),
 */
    __pyx_t_1 = __pyx_f_6SnapPy_c_word_as_string(__pyx_t_7, __pyx_t_5, Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "cython/core/fundamental_group.pyx":306
 *         return relation_list
 * 
 *     def meridian(self, int which_cusp=0, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a word representing a conjugate of the current
 */

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

/* "cython/core/fundamental_group.pyx":331
 *                verbose_form = False)
 * 
 *     def longitude(self, int which_cusp=0, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a word representing a conjugate of the current
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_25longitude(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_6SnapPy_17CFundamentalGroup_24longitude, "CFundamentalGroup.longitude(self, int which_cusp=0, as_int_list=False)\n\n        Returns a word representing a conjugate of the current\n        longitude for the given cusp.  Guaranteed to commute with the\n        meridian for the same cusp.  Note: for Klein bottle cusps,\n        the longitude must be defined carefully.\n\n        >>> G = Manifold('m004').fundamental_group()\n        >>> G.longitude(0)\n        'aBAbABab'\n        >>> G.longitude()   # shortcut for the above.\n        'aBAbABab'\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_25longitude = {"longitude", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_25longitude, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_24longitude};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_25longitude(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
) {
  int __pyx_v_which_cusp;
  PyObject *__pyx_v_as_int_list = 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("longitude (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_which_cusp,&__pyx_n_s_as_int_list,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_which_cusp);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 331, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_as_int_list);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 331, __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, "longitude") < 0)) __PYX_ERR(8, 331, __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);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_which_cusp = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_which_cusp == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 331, __pyx_L3_error)
    } else {
      __pyx_v_which_cusp = ((int)0);
    }
    __pyx_v_as_int_list = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("longitude", 0, 0, 2, __pyx_nargs); __PYX_ERR(8, 331, __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("SnapPy.CFundamentalGroup.longitude", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_24longitude(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self), __pyx_v_which_cusp, __pyx_v_as_int_list);

  /* 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_6SnapPy_17CFundamentalGroup_24longitude(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, int __pyx_v_which_cusp, PyObject *__pyx_v_as_int_list) {
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("longitude", 1);

  /* "cython/core/fundamental_group.pyx":344
 *         'aBAbABab'
 *         """
 *         which_cusp = valid_index(             # <<<<<<<<<<<<<<
 *             which_cusp, self.num_cusps,
 *             'The specified cusp (%s) does not exist.')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_valid_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cython/core/fundamental_group.pyx":345
 *         """
 *         which_cusp = valid_index(
 *             which_cusp, self.num_cusps,             # <<<<<<<<<<<<<<
 *             'The specified cusp (%s) does not exist.')
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_which_cusp); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 345, __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_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[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self->num_cusps, __pyx_kp_s_The_specified_cusp_s_does_not_ex};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "cython/core/fundamental_group.pyx":344
 *         'aBAbABab'
 *         """
 *         which_cusp = valid_index(             # <<<<<<<<<<<<<<
 *             which_cusp, self.num_cusps,
 *             'The specified cusp (%s) does not exist.')
 */
  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 344, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_which_cusp = __pyx_t_5;

  /* "cython/core/fundamental_group.pyx":348
 *             'The specified cusp (%s) does not exist.')
 * 
 *         if as_int_list:             # <<<<<<<<<<<<<<
 *             return c_word_as_int_list(
 *                fg_get_longitude(self.c_group_presentation, which_cusp))
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_as_int_list); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(8, 348, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "cython/core/fundamental_group.pyx":349
 * 
 *         if as_int_list:
 *             return c_word_as_int_list(             # <<<<<<<<<<<<<<
 *                fg_get_longitude(self.c_group_presentation, which_cusp))
 *         else:
 */
    __Pyx_XDECREF(__pyx_r);

    /* "cython/core/fundamental_group.pyx":350
 *         if as_int_list:
 *             return c_word_as_int_list(
 *                fg_get_longitude(self.c_group_presentation, which_cusp))             # <<<<<<<<<<<<<<
 *         else:
 *             return c_word_as_string(
 */
    __pyx_t_7 = fg_get_longitude(__pyx_v_self->c_group_presentation, __pyx_v_which_cusp); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 350, __pyx_L1_error)

    /* "cython/core/fundamental_group.pyx":349
 * 
 *         if as_int_list:
 *             return c_word_as_int_list(             # <<<<<<<<<<<<<<
 *                fg_get_longitude(self.c_group_presentation, which_cusp))
 *         else:
 */
    __pyx_t_1 = __pyx_f_6SnapPy_c_word_as_int_list(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 349, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cython/core/fundamental_group.pyx":348
 *             'The specified cusp (%s) does not exist.')
 * 
 *         if as_int_list:             # <<<<<<<<<<<<<<
 *             return c_word_as_int_list(
 *                fg_get_longitude(self.c_group_presentation, which_cusp))
 */
  }

  /* "cython/core/fundamental_group.pyx":352
 *                fg_get_longitude(self.c_group_presentation, which_cusp))
 *         else:
 *             return c_word_as_string(             # <<<<<<<<<<<<<<
 *                fg_get_longitude(self.c_group_presentation, which_cusp),
 *                self.num_generators(),
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);

    /* "cython/core/fundamental_group.pyx":353
 *         else:
 *             return c_word_as_string(
 *                fg_get_longitude(self.c_group_presentation, which_cusp),             # <<<<<<<<<<<<<<
 *                self.num_generators(),
 *                verbose_form = False)
 */
    __pyx_t_7 = fg_get_longitude(__pyx_v_self->c_group_presentation, __pyx_v_which_cusp); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 353, __pyx_L1_error)

    /* "cython/core/fundamental_group.pyx":354
 *             return c_word_as_string(
 *                fg_get_longitude(self.c_group_presentation, which_cusp),
 *                self.num_generators(),             # <<<<<<<<<<<<<<
 *                verbose_form = False)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_generators); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 354, __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[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 354, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(8, 354, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/fundamental_group.pyx":352
 *                fg_get_longitude(self.c_group_presentation, which_cusp))
 *         else:
 *             return c_word_as_string(             # <<<<<<<<<<<<<<
 *                fg_get_longitude(self.c_group_presentation, which_cusp),
 *                self.num_generators(),
 */
    __pyx_t_1 = __pyx_f_6SnapPy_c_word_as_string(__pyx_t_7, __pyx_t_5, Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 352, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
  }

  /* "cython/core/fundamental_group.pyx":331
 *                verbose_form = False)
 * 
 *     def longitude(self, int which_cusp=0, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a word representing a conjugate of the current
 */

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

/* "cython/core/fundamental_group.pyx":357
 *                verbose_form = False)
 * 
 *     def peripheral_curves(self, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of meridian-longitude pairs for all cusps.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_27peripheral_curves(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_6SnapPy_17CFundamentalGroup_26peripheral_curves, "CFundamentalGroup.peripheral_curves(self, as_int_list=False)\n\n        Returns a list of meridian-longitude pairs for all cusps.\n\n        >>> G = Manifold('m125').fundamental_group()\n        >>> G.peripheral_curves()\n        [('aaba', 'abb'), ('baaba', 'Ba')]\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_27peripheral_curves = {"peripheral_curves", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_27peripheral_curves, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_26peripheral_curves};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_27peripheral_curves(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_as_int_list = 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("peripheral_curves (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_as_int_list,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_as_int_list);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 357, __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, "peripheral_curves") < 0)) __PYX_ERR(8, 357, __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_as_int_list = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("peripheral_curves", 0, 0, 1, __pyx_nargs); __PYX_ERR(8, 357, __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("SnapPy.CFundamentalGroup.peripheral_curves", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_26peripheral_curves(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self), __pyx_v_as_int_list);

  /* 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_6SnapPy_17CFundamentalGroup_26peripheral_curves(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, PyObject *__pyx_v_as_int_list) {
  PyObject *__pyx_9genexpr78__pyx_v_n = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("peripheral_curves", 1);

  /* "cython/core/fundamental_group.pyx":365
 *         [('aaba', 'abb'), ('baaba', 'Ba')]
 *         """
 *         return [ (self.meridian(n, as_int_list),             # <<<<<<<<<<<<<<
 *                   self.longitude(n, as_int_list))
 *                  for n in range(self.num_cusps) ]
 */
  __Pyx_XDECREF(__pyx_r);
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 365, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cython/core/fundamental_group.pyx":367
 *         return [ (self.meridian(n, as_int_list),
 *                   self.longitude(n, as_int_list))
 *                  for n in range(self.num_cusps) ]             # <<<<<<<<<<<<<<
 * 
 *     def magma_string(self):
 */
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_self->num_cusps); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 367, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    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_4 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 367, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 367, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_5)) {
        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(8, 367, __pyx_L5_error)
            #endif
            if (__pyx_t_4 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(8, 367, __pyx_L5_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 367, __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(8, 367, __pyx_L5_error)
            #endif
            if (__pyx_t_4 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(8, 367, __pyx_L5_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 367, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_5(__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(8, 367, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr78__pyx_v_n, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "cython/core/fundamental_group.pyx":365
 *         [('aaba', 'abb'), ('baaba', 'Ba')]
 *         """
 *         return [ (self.meridian(n, as_int_list),             # <<<<<<<<<<<<<<
 *                   self.longitude(n, as_int_list))
 *                  for n in range(self.num_cusps) ]
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_meridian); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 365, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_6);
      __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[3] = {__pyx_t_7, __pyx_9genexpr78__pyx_v_n, __pyx_v_as_int_list};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 365, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }

      /* "cython/core/fundamental_group.pyx":366
 *         """
 *         return [ (self.meridian(n, as_int_list),
 *                   self.longitude(n, as_int_list))             # <<<<<<<<<<<<<<
 *                  for n in range(self.num_cusps) ]
 * 
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_longitude); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 366, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = NULL;
      __pyx_t_8 = 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_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_9genexpr78__pyx_v_n, __pyx_v_as_int_list};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 366, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }

      /* "cython/core/fundamental_group.pyx":365
 *         [('aaba', 'abb'), ('baaba', 'Ba')]
 *         """
 *         return [ (self.meridian(n, as_int_list),             # <<<<<<<<<<<<<<
 *                   self.longitude(n, as_int_list))
 *                  for n in range(self.num_cusps) ]
 */
      __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 365, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2)) __PYX_ERR(8, 365, __pyx_L5_error);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6)) __PYX_ERR(8, 365, __pyx_L5_error);
      __pyx_t_2 = 0;
      __pyx_t_6 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(8, 365, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "cython/core/fundamental_group.pyx":367
 *         return [ (self.meridian(n, as_int_list),
 *                   self.longitude(n, as_int_list))
 *                  for n in range(self.num_cusps) ]             # <<<<<<<<<<<<<<
 * 
 *     def magma_string(self):
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr78__pyx_v_n); __pyx_9genexpr78__pyx_v_n = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr78__pyx_v_n); __pyx_9genexpr78__pyx_v_n = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":357
 *                verbose_form = False)
 * 
 *     def peripheral_curves(self, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of meridian-longitude pairs for all cusps.
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("SnapPy.CFundamentalGroup.peripheral_curves", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_9genexpr78__pyx_v_n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":369
 *                  for n in range(self.num_cusps) ]
 * 
 *     def magma_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a string which will define this group within MAGMA.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_29magma_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_6SnapPy_17CFundamentalGroup_28magma_string, "CFundamentalGroup.magma_string(self)\n\n        Returns a string which will define this group within MAGMA.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_29magma_string = {"magma_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_29magma_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_28magma_string};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_29magma_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("magma_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("magma_string", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "magma_string", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_28magma_string(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self));

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

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

  /* "cython/core/fundamental_group.pyx":373
 *         Returns a string which will define this group within MAGMA.
 *         """
 *         return ('Group<' + ','.join(self.generators()) + '|' +             # <<<<<<<<<<<<<<
 *                 ', '.join(self.relators(verbose_form=True)) + '>')
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_generators); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 373, __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(8, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__114, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_kp_s_Group, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_kp_s__116); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/fundamental_group.pyx":374
 *         """
 *         return ('Group<' + ','.join(self.generators()) + '|' +
 *                 ', '.join(self.relators(verbose_form=True)) + '>')             # <<<<<<<<<<<<<<
 * 
 *     def gap_string(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_relators); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_verbose_form, Py_True) < 0) __PYX_ERR(8, 374, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/fundamental_group.pyx":373
 *         Returns a string which will define this group within MAGMA.
 *         """
 *         return ('Group<' + ','.join(self.generators()) + '|' +             # <<<<<<<<<<<<<<
 *                 ', '.join(self.relators(verbose_form=True)) + '>')
 * 
 */
  __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 373, __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;

  /* "cython/core/fundamental_group.pyx":374
 *         """
 *         return ('Group<' + ','.join(self.generators()) + '|' +
 *                 ', '.join(self.relators(verbose_form=True)) + '>')             # <<<<<<<<<<<<<<
 * 
 *     def gap_string(self):
 */
  __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__117); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":369
 *                  for n in range(self.num_cusps) ]
 * 
 *     def magma_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a string which will define this group within MAGMA.
 */

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

/* "cython/core/fundamental_group.pyx":376
 *                 ', '.join(self.relators(verbose_form=True)) + '>')
 * 
 *     def gap_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a string which will define this group within GAP:
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_31gap_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_6SnapPy_17CFundamentalGroup_30gap_string, "CFundamentalGroup.gap_string(self)\n\n        Returns a string which will define this group within GAP:\n\n        >>> M = Manifold('b++LLR')\n        >>> G = M.fundamental_group()\n        >>> G\n        Generators:\n           a,b\n        Relators:\n           aaaaBAbbAB\n        >>> G.gap_string()\n        'CallFuncList(function() local F, a, b; F := FreeGroup(\"a\", \"b\"); a := F.1; b := F.2;   return F/[a*a*a*a*b^-1*a^-1*b*b*a^-1*b^-1]; end,[])'\n        >>> G.magma_string()\n        'Group<a,b|a*a*a*a*b^-1*a^-1*b*b*a^-1*b^-1>'\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_31gap_string = {"gap_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_31gap_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_30gap_string};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_31gap_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("gap_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("gap_string", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "gap_string", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_30gap_string(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_30gap_string(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self) {
  PyObject *__pyx_v_gens = NULL;
  PyObject *__pyx_v_gen_names = NULL;
  PyObject *__pyx_v_relators = NULL;
  PyObject *__pyx_v_assignments = NULL;
  PyObject *__pyx_9genexpr79__pyx_v_x = NULL;
  PyObject *__pyx_9genexpr80__pyx_v_i = NULL;
  PyObject *__pyx_9genexpr80__pyx_v_x = 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;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gap_string", 1);

  /* "cython/core/fundamental_group.pyx":392
 *         'Group<a,b|a*a*a*a*b^-1*a^-1*b*b*a^-1*b^-1>'
 *         """
 *         gens = ', '.join(self.generators())             # <<<<<<<<<<<<<<
 *         gen_names = ', '.join(['"' + x + '"' for x in self.generators()])
 *         relators = ', '.join(self.relators(verbose_form=True))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_generators); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 392, __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(8, 392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_gens = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/fundamental_group.pyx":393
 *         """
 *         gens = ', '.join(self.generators())
 *         gen_names = ', '.join(['"' + x + '"' for x in self.generators()])             # <<<<<<<<<<<<<<
 *         relators = ', '.join(self.relators(verbose_form=True))
 *         assignments = ''.join(
 */
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 393, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_generators); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 393, __pyx_L5_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 393, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_3 = __pyx_t_1; __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_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 393, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 393, __pyx_L5_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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(8, 393, __pyx_L5_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(8, 393, __pyx_L5_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 393, __pyx_L5_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(8, 393, __pyx_L5_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(8, 393, __pyx_L5_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 393, __pyx_L5_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_7(__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(8, 393, __pyx_L5_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr79__pyx_v_x, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_1 = PyNumber_Add(__pyx_kp_s__118, __pyx_9genexpr79__pyx_v_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 393, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_kp_s__118); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 393, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(8, 393, __pyx_L5_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr79__pyx_v_x); __pyx_9genexpr79__pyx_v_x = 0;
    goto __pyx_L9_exit_scope;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_9genexpr79__pyx_v_x); __pyx_9genexpr79__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L9_exit_scope:;
  } /* exit inner scope */
  __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_gen_names = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cython/core/fundamental_group.pyx":394
 *         gens = ', '.join(self.generators())
 *         gen_names = ', '.join(['"' + x + '"' for x in self.generators()])
 *         relators = ', '.join(self.relators(verbose_form=True))             # <<<<<<<<<<<<<<
 *         assignments = ''.join(
 *             ['%s := F.%d; ' % (x, i+1)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_relators); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_verbose_form, Py_True) < 0) __PYX_ERR(8, 394, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_relators = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/fundamental_group.pyx":395
 *         gen_names = ', '.join(['"' + x + '"' for x in self.generators()])
 *         relators = ', '.join(self.relators(verbose_form=True))
 *         assignments = ''.join(             # <<<<<<<<<<<<<<
 *             ['%s := F.%d; ' % (x, i+1)
 *              for (i, x) in enumerate(self.generators())]
 */
  { /* enter inner scope */

    /* "cython/core/fundamental_group.pyx":396
 *         relators = ', '.join(self.relators(verbose_form=True))
 *         assignments = ''.join(
 *             ['%s := F.%d; ' % (x, i+1)             # <<<<<<<<<<<<<<
 *              for (i, x) in enumerate(self.generators())]
 *             )
 */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 396, __pyx_L12_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_5 = __pyx_int_0;

    /* "cython/core/fundamental_group.pyx":397
 *         assignments = ''.join(
 *             ['%s := F.%d; ' % (x, i+1)
 *              for (i, x) in enumerate(self.generators())]             # <<<<<<<<<<<<<<
 *             )
 *         return ('CallFuncList(function() local F, %s; '
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_generators); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 397, __pyx_L12_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 397, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 397, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(8, 397, __pyx_L12_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_7)) {
        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(8, 397, __pyx_L12_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(8, 397, __pyx_L12_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 397, __pyx_L12_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(8, 397, __pyx_L12_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(8, 397, __pyx_L12_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 397, __pyx_L12_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_7(__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(8, 397, __pyx_L12_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr80__pyx_v_x, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_XDECREF_SET(__pyx_9genexpr80__pyx_v_i, __pyx_t_5);
      __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 397, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5);
      __pyx_t_5 = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "cython/core/fundamental_group.pyx":396
 *         relators = ', '.join(self.relators(verbose_form=True))
 *         assignments = ''.join(
 *             ['%s := F.%d; ' % (x, i+1)             # <<<<<<<<<<<<<<
 *              for (i, x) in enumerate(self.generators())]
 *             )
 */
      __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_9genexpr80__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 396, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(8, 396, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_9genexpr80__pyx_v_x);
      __Pyx_GIVEREF(__pyx_9genexpr80__pyx_v_x);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_9genexpr80__pyx_v_x)) __PYX_ERR(8, 396, __pyx_L12_error);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3)) __PYX_ERR(8, 396, __pyx_L12_error);
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_F_d, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 396, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(8, 396, __pyx_L12_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cython/core/fundamental_group.pyx":397
 *         assignments = ''.join(
 *             ['%s := F.%d; ' % (x, i+1)
 *              for (i, x) in enumerate(self.generators())]             # <<<<<<<<<<<<<<
 *             )
 *         return ('CallFuncList(function() local F, %s; '
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_9genexpr80__pyx_v_i); __pyx_9genexpr80__pyx_v_i = 0;
    __Pyx_XDECREF(__pyx_9genexpr80__pyx_v_x); __pyx_9genexpr80__pyx_v_x = 0;
    goto __pyx_L16_exit_scope;
    __pyx_L12_error:;
    __Pyx_XDECREF(__pyx_9genexpr80__pyx_v_i); __pyx_9genexpr80__pyx_v_i = 0;
    __Pyx_XDECREF(__pyx_9genexpr80__pyx_v_x); __pyx_9genexpr80__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L16_exit_scope:;
  } /* exit inner scope */

  /* "cython/core/fundamental_group.pyx":395
 *         gen_names = ', '.join(['"' + x + '"' for x in self.generators()])
 *         relators = ', '.join(self.relators(verbose_form=True))
 *         assignments = ''.join(             # <<<<<<<<<<<<<<
 *             ['%s := F.%d; ' % (x, i+1)
 *              for (i, x) in enumerate(self.generators())]
 */
  __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__9, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 395, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_assignments = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cython/core/fundamental_group.pyx":399
 *              for (i, x) in enumerate(self.generators())]
 *             )
 *         return ('CallFuncList(function() local F, %s; '             # <<<<<<<<<<<<<<
 *                 'F := FreeGroup(%s); %s  return F/[%s]; end,[])'
 *                 % (gens, gen_names, assignments, relators)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "cython/core/fundamental_group.pyx":401
 *         return ('CallFuncList(function() local F, %s; '
 *                 'F := FreeGroup(%s); %s  return F/[%s]; end,[])'
 *                 % (gens, gen_names, assignments, relators)             # <<<<<<<<<<<<<<
 *                 )
 * 
 */
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_v_gens);
  __Pyx_GIVEREF(__pyx_v_gens);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_gens)) __PYX_ERR(8, 401, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_gen_names);
  __Pyx_GIVEREF(__pyx_v_gen_names);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_gen_names)) __PYX_ERR(8, 401, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_assignments);
  __Pyx_GIVEREF(__pyx_v_assignments);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_assignments)) __PYX_ERR(8, 401, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_relators);
  __Pyx_GIVEREF(__pyx_v_relators);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_relators)) __PYX_ERR(8, 401, __pyx_L1_error);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_CallFuncList_function_local_F_s, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":376
 *                 ', '.join(self.relators(verbose_form=True)) + '>')
 * 
 *     def gap_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a string which will define this group within GAP:
 */

  /* 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_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("SnapPy.CFundamentalGroup.gap_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_gens);
  __Pyx_XDECREF(__pyx_v_gen_names);
  __Pyx_XDECREF(__pyx_v_relators);
  __Pyx_XDECREF(__pyx_v_assignments);
  __Pyx_XDECREF(__pyx_9genexpr79__pyx_v_x);
  __Pyx_XDECREF(__pyx_9genexpr80__pyx_v_i);
  __Pyx_XDECREF(__pyx_9genexpr80__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":404
 *                 )
 * 
 *     def _gap_init_(self):             # <<<<<<<<<<<<<<
 *         return self.gap_string()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_33_gap_init_(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_6SnapPy_17CFundamentalGroup_32_gap_init_, "CFundamentalGroup._gap_init_(self)");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_33_gap_init_ = {"_gap_init_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_33_gap_init_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_32_gap_init_};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_33_gap_init_(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("_gap_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);
  if (unlikely(__pyx_nargs > 0)) {
    __Pyx_RaiseArgtupleInvalid("_gap_init_", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_gap_init_", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_32_gap_init_(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_32_gap_init_(struct __pyx_obj_6SnapPy_CFundamentalGroup *__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("_gap_init_", 1);

  /* "cython/core/fundamental_group.pyx":405
 * 
 *     def _gap_init_(self):
 *         return self.gap_string()             # <<<<<<<<<<<<<<
 * 
 *     def _magma_init_(self, magma):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gap_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 405, __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(8, 405, __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;

  /* "cython/core/fundamental_group.pyx":404
 *                 )
 * 
 *     def _gap_init_(self):             # <<<<<<<<<<<<<<
 *         return self.gap_string()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CFundamentalGroup._gap_init_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":407
 *         return self.gap_string()
 * 
 *     def _magma_init_(self, magma):             # <<<<<<<<<<<<<<
 *         return self.magma_string()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_35_magma_init_(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_6SnapPy_17CFundamentalGroup_34_magma_init_, "CFundamentalGroup._magma_init_(self, magma)");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_35_magma_init_ = {"_magma_init_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_35_magma_init_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_34_magma_init_};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_35_magma_init_(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_magma = 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("_magma_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_magma,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_magma)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 407, __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, "_magma_init_") < 0)) __PYX_ERR(8, 407, __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_magma = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_magma_init_", 1, 1, 1, __pyx_nargs); __PYX_ERR(8, 407, __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("SnapPy.CFundamentalGroup._magma_init_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_34_magma_init_(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self), __pyx_v_magma);

  /* 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_6SnapPy_17CFundamentalGroup_34_magma_init_(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_magma) {
  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("_magma_init_", 1);

  /* "cython/core/fundamental_group.pyx":408
 * 
 *     def _magma_init_(self, magma):
 *         return self.magma_string()             # <<<<<<<<<<<<<<
 * 
 *     def sage(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_magma_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 408, __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(8, 408, __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;

  /* "cython/core/fundamental_group.pyx":407
 *         return self.gap_string()
 * 
 *     def _magma_init_(self, magma):             # <<<<<<<<<<<<<<
 *         return self.magma_string()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CFundamentalGroup._magma_init_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":410
 *         return self.magma_string()
 * 
 *     def sage(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the corresponding Sage FinitelyPresentedGroup
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_37sage(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_6SnapPy_17CFundamentalGroup_36sage, "CFundamentalGroup.sage(self)\n\n        Returns the corresponding Sage FinitelyPresentedGroup\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_37sage = {"sage", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_37sage, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_36sage};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_37sage(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("sage (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("sage", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sage", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_36sage(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_36sage(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self) {
  PyObject *__pyx_v_F = NULL;
  PyObject *__pyx_v_rels = NULL;
  PyObject *__pyx_9genexpr81__pyx_v_R = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sage", 1);

  /* "cython/core/fundamental_group.pyx":414
 *         Returns the corresponding Sage FinitelyPresentedGroup
 *         """
 *         if not _within_sage:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Not within Sage")
 *         F = FreeGroup(self.generators())
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_within_sage); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 414, __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(8, 414, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (!__pyx_t_2);
  if (unlikely(__pyx_t_3)) {

    /* "cython/core/fundamental_group.pyx":415
 *         """
 *         if not _within_sage:
 *             raise RuntimeError("Not within Sage")             # <<<<<<<<<<<<<<
 *         F = FreeGroup(self.generators())
 *         rels = [F(R) for R in self.relators(as_int_list=True)]
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__119, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 415, __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(8, 415, __pyx_L1_error)

    /* "cython/core/fundamental_group.pyx":414
 *         Returns the corresponding Sage FinitelyPresentedGroup
 *         """
 *         if not _within_sage:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Not within Sage")
 *         F = FreeGroup(self.generators())
 */
  }

  /* "cython/core/fundamental_group.pyx":416
 *         if not _within_sage:
 *             raise RuntimeError("Not within Sage")
 *         F = FreeGroup(self.generators())             # <<<<<<<<<<<<<<
 *         rels = [F(R) for R in self.relators(as_int_list=True)]
 *         return F/rels
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_FreeGroup); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_generators); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __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, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_F = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/fundamental_group.pyx":417
 *             raise RuntimeError("Not within Sage")
 *         F = FreeGroup(self.generators())
 *         rels = [F(R) for R in self.relators(as_int_list=True)]             # <<<<<<<<<<<<<<
 *         return F/rels
 * 
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 417, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_relators); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 417, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 417, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_as_int_list, Py_True) < 0) __PYX_ERR(8, 417, __pyx_L6_error)
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 417, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_5 = __pyx_t_6; __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_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 417, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(8, 417, __pyx_L6_error)
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 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(8, 417, __pyx_L6_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(8, 417, __pyx_L6_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 417, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
          #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(8, 417, __pyx_L6_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(8, 417, __pyx_L6_error)
          #else
          __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 417, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_6);
          #endif
        }
      } else {
        __pyx_t_6 = __pyx_t_10(__pyx_t_5);
        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(8, 417, __pyx_L6_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr81__pyx_v_R, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_v_F);
      __pyx_t_4 = __pyx_v_F; __pyx_t_7 = NULL;
      __pyx_t_8 = 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_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_9genexpr81__pyx_v_R};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(8, 417, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(8, 417, __pyx_L6_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_9genexpr81__pyx_v_R); __pyx_9genexpr81__pyx_v_R = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_9genexpr81__pyx_v_R); __pyx_9genexpr81__pyx_v_R = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  __pyx_v_rels = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/fundamental_group.pyx":418
 *         F = FreeGroup(self.generators())
 *         rels = [F(R) for R in self.relators(as_int_list=True)]
 *         return F/rels             # <<<<<<<<<<<<<<
 * 
 *     def character_variety_vars_and_polys(self, as_ideal=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v_F, __pyx_v_rels); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":410
 *         return self.magma_string()
 * 
 *     def sage(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the corresponding Sage FinitelyPresentedGroup
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.CFundamentalGroup.sage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_F);
  __Pyx_XDECREF(__pyx_v_rels);
  __Pyx_XDECREF(__pyx_9genexpr81__pyx_v_R);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":420
 *         return F/rels
 * 
 *     def character_variety_vars_and_polys(self, as_ideal=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of variables and a list polynomials where the
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_39character_variety_vars_and_polys(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_6SnapPy_17CFundamentalGroup_38character_variety_vars_and_polys, "CFundamentalGroup.character_variety_vars_and_polys(self, as_ideal=False)\n\n        Returns a list of variables and a list polynomials where the\n        polynomials generate the ideal defining the SL(2, C) character\n        variety of this group.  Each variable is of the form \"Tw\" where\n        \"w\" is a word in the generators and \"Tw\" represents the trace\n        function of that word.\n\n        >>> H = Manifold('dLQacccbjkg')  # Hopf link exterior.\n        >>> G = H.fundamental_group()\n        >>> vars, polys = G.character_variety_vars_and_polys()\n        >>> vars\n        [Ta, Tb, Tab]\n        >>> polys    # doctest: +NORMALIZE_WHITESPACE\n        [Ta^3 - Tab*Tb*Ta^2 + (Tb^2 + (Tab^2 - 4))*Ta,\n         Ta^2 - Tab*Tb*Ta + (Tb^2 + (Tab^2 - 4))]\n\n        When used inside Sage, you can ask for the answer as a proper\n        ideal::\n\n          sage: M = Manifold('m000')  # Gieseking manifold\n          sage: G = M.fundamental_group()\n          sage: I = G.character_variety_vars_and_polys(as_ideal=True)\n          sage: I\n          Ideal (-Ta^3*Tb^2*Tab + Ta^4*Tb + Ta^2*Tb^3 + Ta^2*Tb*Tab^2 + Ta*Tb^2*Tab - 5*Ta^2*Tb - Tb^3 - Tb*Tab^2 + Ta*Tab - Ta + 3*Tb, Tb*Tab - Ta - Tb, -Ta^2*Tb^2*Tab + Ta^3*Tb + Ta*Tb^3 + Ta*Tb*Tab^2 - 4*Ta*Tb + Tab - 2) of Multivariate Polynomial Ring in Ta, Tb, Tab over Rational Field\n          sage: I.dimension()\n          1\n\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_39character_variety_vars_and_polys = {"character_variety_vars_and_polys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_39character_variety_vars_and_polys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_38character_variety_vars_and_polys};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_39character_variety_vars_and_polys(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_as_ideal = 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("character_variety_vars_and_polys (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_as_ideal,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_as_ideal);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 420, __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, "character_variety_vars_and_polys") < 0)) __PYX_ERR(8, 420, __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_as_ideal = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("character_variety_vars_and_polys", 0, 0, 1, __pyx_nargs); __PYX_ERR(8, 420, __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("SnapPy.CFundamentalGroup.character_variety_vars_and_polys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_38character_variety_vars_and_polys(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self), __pyx_v_as_ideal);

  /* 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_6SnapPy_17CFundamentalGroup_38character_variety_vars_and_polys(struct __pyx_obj_6SnapPy_CFundamentalGroup *__pyx_v_self, PyObject *__pyx_v_as_ideal) {
  PyObject *__pyx_v_presentation = NULL;
  PyObject *__pyx_v_ans = 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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("character_variety_vars_and_polys", 1);

  /* "cython/core/fundamental_group.pyx":449
 * 
 *         """
 *         if not as_ideal:             # <<<<<<<<<<<<<<
 *             presentation = snap.character_variety(self)
 *             ans = presentation.gens, presentation.rels
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_as_ideal); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(8, 449, __pyx_L1_error)
  __pyx_t_2 = (!__pyx_t_1);
  if (__pyx_t_2) {

    /* "cython/core/fundamental_group.pyx":450
 *         """
 *         if not as_ideal:
 *             presentation = snap.character_variety(self)             # <<<<<<<<<<<<<<
 *             ans = presentation.gens, presentation.rels
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_snap); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 450, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_character_variety); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 450, __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, ((PyObject *)__pyx_v_self)};
      __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(8, 450, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_v_presentation = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cython/core/fundamental_group.pyx":451
 *         if not as_ideal:
 *             presentation = snap.character_variety(self)
 *             ans = presentation.gens, presentation.rels             # <<<<<<<<<<<<<<
 *         else:
 *             if not _within_sage:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_presentation, __pyx_n_s_gens); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_presentation, __pyx_n_s_rels); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 451, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(8, 451, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5)) __PYX_ERR(8, 451, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_5 = 0;
    __pyx_v_ans = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cython/core/fundamental_group.pyx":449
 * 
 *         """
 *         if not as_ideal:             # <<<<<<<<<<<<<<
 *             presentation = snap.character_variety(self)
 *             ans = presentation.gens, presentation.rels
 */
    goto __pyx_L3;
  }

  /* "cython/core/fundamental_group.pyx":453
 *             ans = presentation.gens, presentation.rels
 *         else:
 *             if not _within_sage:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError("Not within Sage")
 *             ans = snap.character_variety_ideal(self)
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_within_sage); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 453, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(8, 453, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_1 = (!__pyx_t_2);
    if (unlikely(__pyx_t_1)) {

      /* "cython/core/fundamental_group.pyx":454
 *         else:
 *             if not _within_sage:
 *                 raise RuntimeError("Not within Sage")             # <<<<<<<<<<<<<<
 *             ans = snap.character_variety_ideal(self)
 *         return ans
 */
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__119, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 454, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(8, 454, __pyx_L1_error)

      /* "cython/core/fundamental_group.pyx":453
 *             ans = presentation.gens, presentation.rels
 *         else:
 *             if not _within_sage:             # <<<<<<<<<<<<<<
 *                 raise RuntimeError("Not within Sage")
 *             ans = snap.character_variety_ideal(self)
 */
    }

    /* "cython/core/fundamental_group.pyx":455
 *             if not _within_sage:
 *                 raise RuntimeError("Not within Sage")
 *             ans = snap.character_variety_ideal(self)             # <<<<<<<<<<<<<<
 *         return ans
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_snap); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_character_variety_ideal); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 455, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, ((PyObject *)__pyx_v_self)};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 455, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_ans = __pyx_t_4;
    __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "cython/core/fundamental_group.pyx":456
 *                 raise RuntimeError("Not within Sage")
 *             ans = snap.character_variety_ideal(self)
 *         return ans             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ans);
  __pyx_r = __pyx_v_ans;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":420
 *         return F/rels
 * 
 *     def character_variety_vars_and_polys(self, as_ideal=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of variables and a list polynomials where the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("SnapPy.CFundamentalGroup.character_variety_vars_and_polys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_presentation);
  __Pyx_XDECREF(__pyx_v_ans);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":106
 *     cdef c_GroupPresentation *c_group_presentation
 *     cdef c_Triangulation *c_triangulation
 *     cdef readonly num_cusps             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, Triangulation triangulation,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_9num_cusps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_9num_cusps_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_6SnapPy_17CFundamentalGroup_9num_cusps___get__(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self));

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

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

  /* function exit code */
  __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_6SnapPy_17CFundamentalGroup_41__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_6SnapPy_17CFundamentalGroup_40__reduce_cython__, "CFundamentalGroup.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_41__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_41__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_40__reduce_cython__};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_41__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_6SnapPy_17CFundamentalGroup_40__reduce_cython__(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_17CFundamentalGroup_40__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6SnapPy_CFundamentalGroup *__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(7, 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("SnapPy.CFundamentalGroup.__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_6SnapPy_17CFundamentalGroup_43__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_6SnapPy_17CFundamentalGroup_42__setstate_cython__, "CFundamentalGroup.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_6SnapPy_17CFundamentalGroup_43__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_43__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_42__setstate_cython__};
static PyObject *__pyx_pw_6SnapPy_17CFundamentalGroup_43__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(7, 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(7, 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(7, 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("SnapPy.CFundamentalGroup.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CFundamentalGroup_42__setstate_cython__(((struct __pyx_obj_6SnapPy_CFundamentalGroup *)__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_6SnapPy_17CFundamentalGroup_42__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6SnapPy_CFundamentalGroup *__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(7, 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("SnapPy.CFundamentalGroup.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":485
 * # Holonomy Groups
 * cdef class CHolonomyGroup(CFundamentalGroup):
 *     def _matrices(self, word):             # <<<<<<<<<<<<<<
 *         """
 *         Returns (M,O,L) where M = SL2C(word), O = O31(word), and L is
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_14CHolonomyGroup_1_matrices(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_6SnapPy_14CHolonomyGroup__matrices, "CHolonomyGroup._matrices(self, word)\n\n        Returns (M,O,L) where M = SL2C(word), O = O31(word), and L is\n        the complex length.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_14CHolonomyGroup_1_matrices = {"_matrices", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14CHolonomyGroup_1_matrices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14CHolonomyGroup__matrices};
static PyObject *__pyx_pw_6SnapPy_14CHolonomyGroup_1_matrices(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_word = 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("_matrices (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_word,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_word)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 485, __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, "_matrices") < 0)) __PYX_ERR(8, 485, __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_word = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_matrices", 1, 1, 1, __pyx_nargs); __PYX_ERR(8, 485, __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("SnapPy.CHolonomyGroup._matrices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_14CHolonomyGroup__matrices(((struct __pyx_obj_6SnapPy_CHolonomyGroup *)__pyx_v_self), __pyx_v_word);

  /* 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_6SnapPy_14CHolonomyGroup__matrices(struct __pyx_obj_6SnapPy_CHolonomyGroup *__pyx_v_self, PyObject *__pyx_v_word) {
  MoebiusTransformation __pyx_v_M;
  O31Matrix __pyx_v_O;
  int *__pyx_v_c_word;
  FuncResult __pyx_v_result;
  PyObject *__pyx_v_word_list = NULL;
  PyObject *__pyx_v_sl2 = NULL;
  PyObject *__pyx_v_o31 = NULL;
  PyObject *__pyx_v_L = NULL;
  int __pyx_9genexpr82__pyx_v_i;
  int __pyx_9genexpr83__pyx_v_j;
  int __pyx_9genexpr84__pyx_v_i;
  int __pyx_9genexpr85__pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int *__pyx_t_7;
  FuncResult __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  Complex __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_matrices", 1);

  /* "cython/core/fundamental_group.pyx":495
 *         cdef c_FuncResult result
 *         cdef int i, j
 *         word_list = word_as_list(word, self.num_generators())             # <<<<<<<<<<<<<<
 *         c_word = c_word_from_list(word_list)
 *         result = fg_word_to_matrix(self.c_group_presentation, c_word, O, &M)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_word_as_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 495, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_generators); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 495, __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(8, 495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __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_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_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_v_word, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_word_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/fundamental_group.pyx":496
 *         cdef int i, j
 *         word_list = word_as_list(word, self.num_generators())
 *         c_word = c_word_from_list(word_list)             # <<<<<<<<<<<<<<
 *         result = fg_word_to_matrix(self.c_group_presentation, c_word, O, &M)
 *         if result == 0:
 */
  __pyx_t_7 = __pyx_f_6SnapPy_c_word_from_list(__pyx_v_word_list); if (unlikely(__pyx_t_7 == ((int *)NULL) && PyErr_Occurred())) __PYX_ERR(8, 496, __pyx_L1_error)
  __pyx_v_c_word = __pyx_t_7;

  /* "cython/core/fundamental_group.pyx":497
 *         word_list = word_as_list(word, self.num_generators())
 *         c_word = c_word_from_list(word_list)
 *         result = fg_word_to_matrix(self.c_group_presentation, c_word, O, &M)             # <<<<<<<<<<<<<<
 *         if result == 0:
 *             sl2 = matrix(
 */
  __pyx_t_8 = fg_word_to_matrix(__pyx_v_self->__pyx_base.c_group_presentation, __pyx_v_c_word, __pyx_v_O, (&__pyx_v_M)); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 497, __pyx_L1_error)
  __pyx_v_result = __pyx_t_8;

  /* "cython/core/fundamental_group.pyx":498
 *         c_word = c_word_from_list(word_list)
 *         result = fg_word_to_matrix(self.c_group_presentation, c_word, O, &M)
 *         if result == 0:             # <<<<<<<<<<<<<<
 *             sl2 = matrix(
 *                 [[self._number_(Complex2Number(M.matrix[i][j]))
 */
  __pyx_t_9 = (__pyx_v_result == 0);
  if (__pyx_t_9) {

    /* "cython/core/fundamental_group.pyx":499
 *         result = fg_word_to_matrix(self.c_group_presentation, c_word, O, &M)
 *         if result == 0:
 *             sl2 = matrix(             # <<<<<<<<<<<<<<
 *                 [[self._number_(Complex2Number(M.matrix[i][j]))
 *                   for j in range(2)] for i in range(2)] )
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_matrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    { /* enter inner scope */

      /* "cython/core/fundamental_group.pyx":500
 *         if result == 0:
 *             sl2 = matrix(
 *                 [[self._number_(Complex2Number(M.matrix[i][j]))             # <<<<<<<<<<<<<<
 *                   for j in range(2)] for i in range(2)] )
 *             o31 = matrix(
 */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 500, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

      /* "cython/core/fundamental_group.pyx":501
 *             sl2 = matrix(
 *                 [[self._number_(Complex2Number(M.matrix[i][j]))
 *                   for j in range(2)] for i in range(2)] )             # <<<<<<<<<<<<<<
 *             o31 = matrix(
 *                 [[self._number_(Real2Number(<Real>O[i][j]))
 */
      for (__pyx_t_6 = 0; __pyx_t_6 < 2; __pyx_t_6+=1) {
        __pyx_9genexpr82__pyx_v_i = __pyx_t_6;
        { /* enter inner scope */

          /* "cython/core/fundamental_group.pyx":500
 *         if result == 0:
 *             sl2 = matrix(
 *                 [[self._number_(Complex2Number(M.matrix[i][j]))             # <<<<<<<<<<<<<<
 *                   for j in range(2)] for i in range(2)] )
 *             o31 = matrix(
 */
          __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 500, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);

          /* "cython/core/fundamental_group.pyx":501
 *             sl2 = matrix(
 *                 [[self._number_(Complex2Number(M.matrix[i][j]))
 *                   for j in range(2)] for i in range(2)] )             # <<<<<<<<<<<<<<
 *             o31 = matrix(
 *                 [[self._number_(Real2Number(<Real>O[i][j]))
 */
          for (__pyx_t_10 = 0; __pyx_t_10 < 2; __pyx_t_10+=1) {
            __pyx_9genexpr83__pyx_v_j = __pyx_t_10;

            /* "cython/core/fundamental_group.pyx":500
 *         if result == 0:
 *             sl2 = matrix(
 *                 [[self._number_(Complex2Number(M.matrix[i][j]))             # <<<<<<<<<<<<<<
 *                   for j in range(2)] for i in range(2)] )
 *             o31 = matrix(
 */
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 500, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_12 = __pyx_f_6SnapPy_Complex2Number(((__pyx_v_M.matrix[__pyx_9genexpr82__pyx_v_i])[__pyx_9genexpr83__pyx_v_j])); if (unlikely(!__pyx_t_12)) __PYX_ERR(8, 500, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_13 = NULL;
            __pyx_t_14 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_11))) {
              __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11);
              if (likely(__pyx_t_13)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                __Pyx_INCREF(__pyx_t_13);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_11, function);
                __pyx_t_14 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_12};
              __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_14, 1+__pyx_t_14);
              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 500, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            }
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_5))) __PYX_ERR(8, 500, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          }
        } /* exit inner scope */
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(8, 500, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    } /* exit inner scope */
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(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_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 499, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_sl2 = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cython/core/fundamental_group.pyx":502
 *                 [[self._number_(Complex2Number(M.matrix[i][j]))
 *                   for j in range(2)] for i in range(2)] )
 *             o31 = matrix(             # <<<<<<<<<<<<<<
 *                 [[self._number_(Real2Number(<Real>O[i][j]))
 *                   for j in range(4)] for i in range(4)] )
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_matrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    { /* enter inner scope */

      /* "cython/core/fundamental_group.pyx":503
 *                   for j in range(2)] for i in range(2)] )
 *             o31 = matrix(
 *                 [[self._number_(Real2Number(<Real>O[i][j]))             # <<<<<<<<<<<<<<
 *                   for j in range(4)] for i in range(4)] )
 *             L = self._number_(Complex2Number(complex_length_mt(&M)))
 */
      __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 503, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

      /* "cython/core/fundamental_group.pyx":504
 *             o31 = matrix(
 *                 [[self._number_(Real2Number(<Real>O[i][j]))
 *                   for j in range(4)] for i in range(4)] )             # <<<<<<<<<<<<<<
 *             L = self._number_(Complex2Number(complex_length_mt(&M)))
 *             return sl2, o31, L
 */
      for (__pyx_t_6 = 0; __pyx_t_6 < 4; __pyx_t_6+=1) {
        __pyx_9genexpr84__pyx_v_i = __pyx_t_6;
        { /* enter inner scope */

          /* "cython/core/fundamental_group.pyx":503
 *                   for j in range(2)] for i in range(2)] )
 *             o31 = matrix(
 *                 [[self._number_(Real2Number(<Real>O[i][j]))             # <<<<<<<<<<<<<<
 *                   for j in range(4)] for i in range(4)] )
 *             L = self._number_(Complex2Number(complex_length_mt(&M)))
 */
          __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 503, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_4);

          /* "cython/core/fundamental_group.pyx":504
 *             o31 = matrix(
 *                 [[self._number_(Real2Number(<Real>O[i][j]))
 *                   for j in range(4)] for i in range(4)] )             # <<<<<<<<<<<<<<
 *             L = self._number_(Complex2Number(complex_length_mt(&M)))
 *             return sl2, o31, L
 */
          for (__pyx_t_10 = 0; __pyx_t_10 < 4; __pyx_t_10+=1) {
            __pyx_9genexpr85__pyx_v_j = __pyx_t_10;

            /* "cython/core/fundamental_group.pyx":503
 *                   for j in range(2)] for i in range(2)] )
 *             o31 = matrix(
 *                 [[self._number_(Real2Number(<Real>O[i][j]))             # <<<<<<<<<<<<<<
 *                   for j in range(4)] for i in range(4)] )
 *             L = self._number_(Complex2Number(complex_length_mt(&M)))
 */
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 503, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_12 = __pyx_f_6SnapPy_Real2Number(((__pyx_t_6SnapPy_Real)((__pyx_v_O[__pyx_9genexpr84__pyx_v_i])[__pyx_9genexpr85__pyx_v_j]))); if (unlikely(!__pyx_t_12)) __PYX_ERR(8, 503, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_13 = NULL;
            __pyx_t_14 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_11))) {
              __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11);
              if (likely(__pyx_t_13)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                __Pyx_INCREF(__pyx_t_13);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_11, function);
                __pyx_t_14 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_12};
              __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_14, 1+__pyx_t_14);
              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 503, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            }
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_5))) __PYX_ERR(8, 503, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          }
        } /* exit inner scope */
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(8, 503, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
    } /* exit inner scope */
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(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_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 502, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_o31 = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cython/core/fundamental_group.pyx":505
 *                 [[self._number_(Real2Number(<Real>O[i][j]))
 *                   for j in range(4)] for i in range(4)] )
 *             L = self._number_(Complex2Number(complex_length_mt(&M)))             # <<<<<<<<<<<<<<
 *             return sl2, o31, L
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_15 = complex_length_mt((&__pyx_v_M)); if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 505, __pyx_L1_error)
    __pyx_t_3 = __pyx_f_6SnapPy_Complex2Number(__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 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_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 505, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_L = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cython/core/fundamental_group.pyx":506
 *                   for j in range(4)] for i in range(4)] )
 *             L = self._number_(Complex2Number(complex_length_mt(&M)))
 *             return sl2, o31, L             # <<<<<<<<<<<<<<
 *         else:
 *             return None
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 506, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_sl2);
    __Pyx_GIVEREF(__pyx_v_sl2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_sl2)) __PYX_ERR(8, 506, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_o31);
    __Pyx_GIVEREF(__pyx_v_o31);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_o31)) __PYX_ERR(8, 506, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_L);
    __Pyx_GIVEREF(__pyx_v_L);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_L)) __PYX_ERR(8, 506, __pyx_L1_error);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cython/core/fundamental_group.pyx":498
 *         c_word = c_word_from_list(word_list)
 *         result = fg_word_to_matrix(self.c_group_presentation, c_word, O, &M)
 *         if result == 0:             # <<<<<<<<<<<<<<
 *             sl2 = matrix(
 *                 [[self._number_(Complex2Number(M.matrix[i][j]))
 */
  }

  /* "cython/core/fundamental_group.pyx":508
 *             return sl2, o31, L
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     def SL2C(self, word):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;
  }

  /* "cython/core/fundamental_group.pyx":485
 * # Holonomy Groups
 * cdef class CHolonomyGroup(CFundamentalGroup):
 *     def _matrices(self, word):             # <<<<<<<<<<<<<<
 *         """
 *         Returns (M,O,L) where M = SL2C(word), O = O31(word), and L is
 */

  /* 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_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("SnapPy.CHolonomyGroup._matrices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_word_list);
  __Pyx_XDECREF(__pyx_v_sl2);
  __Pyx_XDECREF(__pyx_v_o31);
  __Pyx_XDECREF(__pyx_v_L);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":510
 *             return None
 * 
 *     def SL2C(self, word):             # <<<<<<<<<<<<<<
 *         """
 *         Return the image of the element represented by the input word
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_14CHolonomyGroup_3SL2C(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_6SnapPy_14CHolonomyGroup_2SL2C, "CHolonomyGroup.SL2C(self, word)\n\n        Return the image of the element represented by the input word\n        under some SL(2,C) representation that lifts the holonomy\n        representation.  Note: the choice of lift is not guaranteed to\n        vary continuously when filling coefficients are changed.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_14CHolonomyGroup_3SL2C = {"SL2C", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14CHolonomyGroup_3SL2C, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14CHolonomyGroup_2SL2C};
static PyObject *__pyx_pw_6SnapPy_14CHolonomyGroup_3SL2C(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_word = 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("SL2C (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_word,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_word)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 510, __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, "SL2C") < 0)) __PYX_ERR(8, 510, __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_word = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("SL2C", 1, 1, 1, __pyx_nargs); __PYX_ERR(8, 510, __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("SnapPy.CHolonomyGroup.SL2C", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_14CHolonomyGroup_2SL2C(((struct __pyx_obj_6SnapPy_CHolonomyGroup *)__pyx_v_self), __pyx_v_word);

  /* 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_6SnapPy_14CHolonomyGroup_2SL2C(struct __pyx_obj_6SnapPy_CHolonomyGroup *__pyx_v_self, PyObject *__pyx_v_word) {
  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("SL2C", 1);

  /* "cython/core/fundamental_group.pyx":517
 *         vary continuously when filling coefficients are changed.
 *         """
 *         return self._matrices(word)[0]             # <<<<<<<<<<<<<<
 * 
 *     def O31(self, word):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_matrices); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 517, __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, __pyx_v_word};
    __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(8, 517, __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(8, 517, __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;

  /* "cython/core/fundamental_group.pyx":510
 *             return None
 * 
 *     def SL2C(self, word):             # <<<<<<<<<<<<<<
 *         """
 *         Return the image of the element represented by the input word
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CHolonomyGroup.SL2C", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":519
 *         return self._matrices(word)[0]
 * 
 *     def O31(self, word):             # <<<<<<<<<<<<<<
 *         """
 *         Return the image of the element represented by the input word
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_14CHolonomyGroup_5O31(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_6SnapPy_14CHolonomyGroup_4O31, "CHolonomyGroup.O31(self, word)\n\n        Return the image of the element represented by the input word\n        under the holonomy representation, where Isom(H^3) is\n        identified with SO(3,1).\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_14CHolonomyGroup_5O31 = {"O31", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14CHolonomyGroup_5O31, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14CHolonomyGroup_4O31};
static PyObject *__pyx_pw_6SnapPy_14CHolonomyGroup_5O31(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_word = 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("O31 (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_word,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_word)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 519, __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, "O31") < 0)) __PYX_ERR(8, 519, __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_word = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("O31", 1, 1, 1, __pyx_nargs); __PYX_ERR(8, 519, __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("SnapPy.CHolonomyGroup.O31", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_14CHolonomyGroup_4O31(((struct __pyx_obj_6SnapPy_CHolonomyGroup *)__pyx_v_self), __pyx_v_word);

  /* 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_6SnapPy_14CHolonomyGroup_4O31(struct __pyx_obj_6SnapPy_CHolonomyGroup *__pyx_v_self, PyObject *__pyx_v_word) {
  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("O31", 1);

  /* "cython/core/fundamental_group.pyx":525
 *         identified with SO(3,1).
 *         """
 *         return self._matrices(word)[1]             # <<<<<<<<<<<<<<
 * 
 *     def complex_length(self, word):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_matrices); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 525, __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, __pyx_v_word};
    __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(8, 525, __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, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 525, __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;

  /* "cython/core/fundamental_group.pyx":519
 *         return self._matrices(word)[0]
 * 
 *     def O31(self, word):             # <<<<<<<<<<<<<<
 *         """
 *         Return the image of the element represented by the input word
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CHolonomyGroup.O31", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":527
 *         return self._matrices(word)[1]
 * 
 *     def complex_length(self, word):             # <<<<<<<<<<<<<<
 *         """
 *         Return the complex length of the isometry represented by the
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_14CHolonomyGroup_7complex_length(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_6SnapPy_14CHolonomyGroup_6complex_length, "CHolonomyGroup.complex_length(self, word)\n\n        Return the complex length of the isometry represented by the\n        input word.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_14CHolonomyGroup_7complex_length = {"complex_length", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14CHolonomyGroup_7complex_length, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14CHolonomyGroup_6complex_length};
static PyObject *__pyx_pw_6SnapPy_14CHolonomyGroup_7complex_length(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_word = 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("complex_length (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_word,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_word)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 527, __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, "complex_length") < 0)) __PYX_ERR(8, 527, __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_word = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("complex_length", 1, 1, 1, __pyx_nargs); __PYX_ERR(8, 527, __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("SnapPy.CHolonomyGroup.complex_length", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_14CHolonomyGroup_6complex_length(((struct __pyx_obj_6SnapPy_CHolonomyGroup *)__pyx_v_self), __pyx_v_word);

  /* 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_6SnapPy_14CHolonomyGroup_6complex_length(struct __pyx_obj_6SnapPy_CHolonomyGroup *__pyx_v_self, PyObject *__pyx_v_word) {
  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("complex_length", 1);

  /* "cython/core/fundamental_group.pyx":532
 *         input word.
 *         """
 *         return self._matrices(word)[2]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_matrices); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 532, __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, __pyx_v_word};
    __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(8, 532, __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, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 532, __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;

  /* "cython/core/fundamental_group.pyx":527
 *         return self._matrices(word)[1]
 * 
 *     def complex_length(self, word):             # <<<<<<<<<<<<<<
 *         """
 *         Return the complex length of the isometry represented by the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CHolonomyGroup.complex_length", __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_6SnapPy_14CHolonomyGroup_9__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_6SnapPy_14CHolonomyGroup_8__reduce_cython__, "CHolonomyGroup.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_14CHolonomyGroup_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14CHolonomyGroup_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14CHolonomyGroup_8__reduce_cython__};
static PyObject *__pyx_pw_6SnapPy_14CHolonomyGroup_9__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_6SnapPy_14CHolonomyGroup_8__reduce_cython__(((struct __pyx_obj_6SnapPy_CHolonomyGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_14CHolonomyGroup_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6SnapPy_CHolonomyGroup *__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(7, 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("SnapPy.CHolonomyGroup.__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_6SnapPy_14CHolonomyGroup_11__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_6SnapPy_14CHolonomyGroup_10__setstate_cython__, "CHolonomyGroup.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_6SnapPy_14CHolonomyGroup_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14CHolonomyGroup_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14CHolonomyGroup_10__setstate_cython__};
static PyObject *__pyx_pw_6SnapPy_14CHolonomyGroup_11__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(7, 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(7, 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(7, 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("SnapPy.CHolonomyGroup.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_14CHolonomyGroup_10__setstate_cython__(((struct __pyx_obj_6SnapPy_CHolonomyGroup *)__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_6SnapPy_14CHolonomyGroup_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6SnapPy_CHolonomyGroup *__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(7, 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("SnapPy.CHolonomyGroup.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/fundamental_group.pyx":589
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _number_(n):
 *         return number.number_to_native_number(n)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13HolonomyGroup_1_number_(PyObject *__pyx_self, 
#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_6SnapPy_13HolonomyGroup__number_, "HolonomyGroup._number_(n)");
static PyMethodDef __pyx_mdef_6SnapPy_13HolonomyGroup_1_number_ = {"_number_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13HolonomyGroup_1_number_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13HolonomyGroup__number_};
static PyObject *__pyx_pw_6SnapPy_13HolonomyGroup_1_number_(PyObject *__pyx_self, 
#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_n = 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("_number_ (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_n,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_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(8, 589, __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, "_number_") < 0)) __PYX_ERR(8, 589, __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_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_number_", 1, 1, 1, __pyx_nargs); __PYX_ERR(8, 589, __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("SnapPy.HolonomyGroup._number_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13HolonomyGroup__number_(__pyx_self, __pyx_v_n);

  /* 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_6SnapPy_13HolonomyGroup__number_(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_n) {
  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("_number_", 1);

  /* "cython/core/fundamental_group.pyx":591
 *     @staticmethod
 *     def _number_(n):
 *         return number.number_to_native_number(n)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_number_to_native_number); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 591, __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_v_n};
    __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(8, 591, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/fundamental_group.pyx":589
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _number_(n):
 *         return number.number_to_native_number(n)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.HolonomyGroup._number_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":16
 *     cdef readonly _owns_c_symmetry_group
 * 
 *     def __cinit__(self, is_full_group, owns_c_symmetry_group):             # <<<<<<<<<<<<<<
 *         self.c_symmetry_group = NULL
 *         self._is_full_group = is_full_group
 */

/* Python wrapper */
static int __pyx_pw_6SnapPy_13SymmetryGroup_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6SnapPy_13SymmetryGroup_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_is_full_group = 0;
  PyObject *__pyx_v_owns_c_symmetry_group = 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("__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_is_full_group,&__pyx_n_s_owns_c_symmetry_group,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_is_full_group)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 16, __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_owns_c_symmetry_group)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 16, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(9, 16, __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(9, 16, __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_is_full_group = values[0];
    __pyx_v_owns_c_symmetry_group = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, __pyx_nargs); __PYX_ERR(9, 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_VARARGS(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup___cinit__(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self), __pyx_v_is_full_group, __pyx_v_owns_c_symmetry_group);

  /* 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_6SnapPy_13SymmetryGroup___cinit__(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self, PyObject *__pyx_v_is_full_group, PyObject *__pyx_v_owns_c_symmetry_group) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 1);

  /* "cython/core/symmetry_group.pyx":17
 * 
 *     def __cinit__(self, is_full_group, owns_c_symmetry_group):
 *         self.c_symmetry_group = NULL             # <<<<<<<<<<<<<<
 *         self._is_full_group = is_full_group
 *         self._owns_c_symmetry_group = owns_c_symmetry_group
 */
  __pyx_v_self->c_symmetry_group = NULL;

  /* "cython/core/symmetry_group.pyx":18
 *     def __cinit__(self, is_full_group, owns_c_symmetry_group):
 *         self.c_symmetry_group = NULL
 *         self._is_full_group = is_full_group             # <<<<<<<<<<<<<<
 *         self._owns_c_symmetry_group = owns_c_symmetry_group
 * 
 */
  __Pyx_INCREF(__pyx_v_is_full_group);
  __Pyx_GIVEREF(__pyx_v_is_full_group);
  __Pyx_GOTREF(__pyx_v_self->_is_full_group);
  __Pyx_DECREF(__pyx_v_self->_is_full_group);
  __pyx_v_self->_is_full_group = __pyx_v_is_full_group;

  /* "cython/core/symmetry_group.pyx":19
 *         self.c_symmetry_group = NULL
 *         self._is_full_group = is_full_group
 *         self._owns_c_symmetry_group = owns_c_symmetry_group             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_INCREF(__pyx_v_owns_c_symmetry_group);
  __Pyx_GIVEREF(__pyx_v_owns_c_symmetry_group);
  __Pyx_GOTREF(__pyx_v_self->_owns_c_symmetry_group);
  __Pyx_DECREF(__pyx_v_self->_owns_c_symmetry_group);
  __pyx_v_self->_owns_c_symmetry_group = __pyx_v_owns_c_symmetry_group;

  /* "cython/core/symmetry_group.pyx":16
 *     cdef readonly _owns_c_symmetry_group
 * 
 *     def __cinit__(self, is_full_group, owns_c_symmetry_group):             # <<<<<<<<<<<<<<
 *         self.c_symmetry_group = NULL
 *         self._is_full_group = is_full_group
 */

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

/* "cython/core/symmetry_group.pyx":21
 *         self._owns_c_symmetry_group = owns_c_symmetry_group
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._owns_c_symmetry_group:
 *             free_symmetry_group(self.c_symmetry_group)
 */

/* Python wrapper */
static void __pyx_pw_6SnapPy_13SymmetryGroup_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6SnapPy_13SymmetryGroup_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_6SnapPy_13SymmetryGroup_2__dealloc__(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static void __pyx_pf_6SnapPy_13SymmetryGroup_2__dealloc__(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self) {
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "cython/core/symmetry_group.pyx":22
 * 
 *     def __dealloc__(self):
 *         if self._owns_c_symmetry_group:             # <<<<<<<<<<<<<<
 *             free_symmetry_group(self.c_symmetry_group)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->_owns_c_symmetry_group); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(9, 22, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/symmetry_group.pyx":23
 *     def __dealloc__(self):
 *         if self._owns_c_symmetry_group:
 *             free_symmetry_group(self.c_symmetry_group)             # <<<<<<<<<<<<<<
 * 
 *     cdef _set_c_symmetry_group(self, c_SymmetryGroup * c_symmetry_group):
 */
    free_symmetry_group(__pyx_v_self->c_symmetry_group); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 23, __pyx_L1_error)

    /* "cython/core/symmetry_group.pyx":22
 * 
 *     def __dealloc__(self):
 *         if self._owns_c_symmetry_group:             # <<<<<<<<<<<<<<
 *             free_symmetry_group(self.c_symmetry_group)
 * 
 */
  }

  /* "cython/core/symmetry_group.pyx":21
 *         self._owns_c_symmetry_group = owns_c_symmetry_group
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self._owns_c_symmetry_group:
 *             free_symmetry_group(self.c_symmetry_group)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("SnapPy.SymmetryGroup.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
}

/* "cython/core/symmetry_group.pyx":25
 *             free_symmetry_group(self.c_symmetry_group)
 * 
 *     cdef _set_c_symmetry_group(self, c_SymmetryGroup * c_symmetry_group):             # <<<<<<<<<<<<<<
 *         if c_symmetry_group is NULL:
 *             raise ValueError('You tried to create an *empty* SymmetryGroup.')
 */

static PyObject *__pyx_f_6SnapPy_13SymmetryGroup__set_c_symmetry_group(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self, SymmetryGroup *__pyx_v_c_symmetry_group) {
  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("_set_c_symmetry_group", 1);

  /* "cython/core/symmetry_group.pyx":26
 * 
 *     cdef _set_c_symmetry_group(self, c_SymmetryGroup * c_symmetry_group):
 *         if c_symmetry_group is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('You tried to create an *empty* SymmetryGroup.')
 *         self.c_symmetry_group = c_symmetry_group
 */
  __pyx_t_1 = (__pyx_v_c_symmetry_group == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/symmetry_group.pyx":27
 *     cdef _set_c_symmetry_group(self, c_SymmetryGroup * c_symmetry_group):
 *         if c_symmetry_group is NULL:
 *             raise ValueError('You tried to create an *empty* SymmetryGroup.')             # <<<<<<<<<<<<<<
 *         self.c_symmetry_group = c_symmetry_group
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__120, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 27, __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(9, 27, __pyx_L1_error)

    /* "cython/core/symmetry_group.pyx":26
 * 
 *     cdef _set_c_symmetry_group(self, c_SymmetryGroup * c_symmetry_group):
 *         if c_symmetry_group is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('You tried to create an *empty* SymmetryGroup.')
 *         self.c_symmetry_group = c_symmetry_group
 */
  }

  /* "cython/core/symmetry_group.pyx":28
 *         if c_symmetry_group is NULL:
 *             raise ValueError('You tried to create an *empty* SymmetryGroup.')
 *         self.c_symmetry_group = c_symmetry_group             # <<<<<<<<<<<<<<
 * 
 *     def is_full_group(self):
 */
  __pyx_v_self->c_symmetry_group = __pyx_v_c_symmetry_group;

  /* "cython/core/symmetry_group.pyx":25
 *             free_symmetry_group(self.c_symmetry_group)
 * 
 *     cdef _set_c_symmetry_group(self, c_SymmetryGroup * c_symmetry_group):             # <<<<<<<<<<<<<<
 *         if c_symmetry_group is NULL:
 *             raise ValueError('You tried to create an *empty* SymmetryGroup.')
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup._set_c_symmetry_group", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":30
 *         self.c_symmetry_group = c_symmetry_group
 * 
 *     def is_full_group(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the full symmetry group has been found.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_5is_full_group(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_6SnapPy_13SymmetryGroup_4is_full_group, "SymmetryGroup.is_full_group(self)\n\n        Return whether the full symmetry group has been found.\n\n        >>> S = Manifold('m004').symmetry_group()\n        >>> S.is_full_group()\n        True\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_5is_full_group = {"is_full_group", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_5is_full_group, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_4is_full_group};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_5is_full_group(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("is_full_group (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("is_full_group", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_full_group", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_4is_full_group(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_4is_full_group(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_full_group", 1);

  /* "cython/core/symmetry_group.pyx":38
 *         True
 *         """
 *         return self._is_full_group             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_is_full_group);
  __pyx_r = __pyx_v_self->_is_full_group;
  goto __pyx_L0;

  /* "cython/core/symmetry_group.pyx":30
 *         self.c_symmetry_group = c_symmetry_group
 * 
 *     def is_full_group(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the full symmetry group has been found.
 */

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

/* "cython/core/symmetry_group.pyx":40
 *         return self._is_full_group
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self.is_full_group():
 *             thePretext = ''
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_7__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_6SnapPy_13SymmetryGroup_6__repr__(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

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

  /* "cython/core/symmetry_group.pyx":41
 * 
 *     def __repr__(self):
 *         if self.is_full_group():             # <<<<<<<<<<<<<<
 *             thePretext = ''
 *         elif self.order() == 1:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_full_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 41, __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(9, 41, __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(9, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "cython/core/symmetry_group.pyx":42
 *     def __repr__(self):
 *         if self.is_full_group():
 *             thePretext = ''             # <<<<<<<<<<<<<<
 *         elif self.order() == 1:
 *             return 'unknown'
 */
    __Pyx_INCREF(__pyx_kp_s__9);
    __pyx_v_thePretext = __pyx_kp_s__9;

    /* "cython/core/symmetry_group.pyx":41
 * 
 *     def __repr__(self):
 *         if self.is_full_group():             # <<<<<<<<<<<<<<
 *             thePretext = ''
 *         elif self.order() == 1:
 */
    goto __pyx_L3;
  }

  /* "cython/core/symmetry_group.pyx":43
 *         if self.is_full_group():
 *             thePretext = ''
 *         elif self.order() == 1:             # <<<<<<<<<<<<<<
 *             return 'unknown'
 *         else:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_order); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 43, __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(9, 43, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_5 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_1, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(9, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "cython/core/symmetry_group.pyx":44
 *             thePretext = ''
 *         elif self.order() == 1:
 *             return 'unknown'             # <<<<<<<<<<<<<<
 *         else:
 *             thePretext = 'at least '
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_unknown);
    __pyx_r = __pyx_n_s_unknown;
    goto __pyx_L0;

    /* "cython/core/symmetry_group.pyx":43
 *         if self.is_full_group():
 *             thePretext = ''
 *         elif self.order() == 1:             # <<<<<<<<<<<<<<
 *             return 'unknown'
 *         else:
 */
  }

  /* "cython/core/symmetry_group.pyx":46
 *             return 'unknown'
 *         else:
 *             thePretext = 'at least '             # <<<<<<<<<<<<<<
 *         if self.is_abelian():
 *             theText = repr(self.abelian_description())
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_kp_s_at_least);
    __pyx_v_thePretext = __pyx_kp_s_at_least;
  }
  __pyx_L3:;

  /* "cython/core/symmetry_group.pyx":47
 *         else:
 *             thePretext = 'at least '
 *         if self.is_abelian():             # <<<<<<<<<<<<<<
 *             theText = repr(self.abelian_description())
 *         elif self.is_dihedral():
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_abelian); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 47, __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(9, 47, __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(9, 47, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "cython/core/symmetry_group.pyx":48
 *             thePretext = 'at least '
 *         if self.is_abelian():
 *             theText = repr(self.abelian_description())             # <<<<<<<<<<<<<<
 *         elif self.is_dihedral():
 *             theText = 'D%d' % (self.order()//2)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_abelian_description); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 48, __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(9, 48, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_theText = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/symmetry_group.pyx":47
 *         else:
 *             thePretext = 'at least '
 *         if self.is_abelian():             # <<<<<<<<<<<<<<
 *             theText = repr(self.abelian_description())
 *         elif self.is_dihedral():
 */
    goto __pyx_L4;
  }

  /* "cython/core/symmetry_group.pyx":49
 *         if self.is_abelian():
 *             theText = repr(self.abelian_description())
 *         elif self.is_dihedral():             # <<<<<<<<<<<<<<
 *             theText = 'D%d' % (self.order()//2)
 *         elif self.is_polyhedral():
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_dihedral); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __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, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 49, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(9, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_5) {

    /* "cython/core/symmetry_group.pyx":50
 *             theText = repr(self.abelian_description())
 *         elif self.is_dihedral():
 *             theText = 'D%d' % (self.order()//2)             # <<<<<<<<<<<<<<
 *         elif self.is_polyhedral():
 *             theText = self.polyhedral_description()
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_order); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __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, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 50, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_t_1 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_2, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_kp_s_D_d, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_theText = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/symmetry_group.pyx":49
 *         if self.is_abelian():
 *             theText = repr(self.abelian_description())
 *         elif self.is_dihedral():             # <<<<<<<<<<<<<<
 *             theText = 'D%d' % (self.order()//2)
 *         elif self.is_polyhedral():
 */
    goto __pyx_L4;
  }

  /* "cython/core/symmetry_group.pyx":51
 *         elif self.is_dihedral():
 *             theText = 'D%d' % (self.order()//2)
 *         elif self.is_polyhedral():             # <<<<<<<<<<<<<<
 *             theText = self.polyhedral_description()
 *         elif self.is_S5():
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_polyhedral); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __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, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 51, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(9, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_5) {

    /* "cython/core/symmetry_group.pyx":52
 *             theText = 'D%d' % (self.order()//2)
 *         elif self.is_polyhedral():
 *             theText = self.polyhedral_description()             # <<<<<<<<<<<<<<
 *         elif self.is_S5():
 *             theText = 'S5'
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_polyhedral_description); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __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, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 52, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_v_theText = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/symmetry_group.pyx":51
 *         elif self.is_dihedral():
 *             theText = 'D%d' % (self.order()//2)
 *         elif self.is_polyhedral():             # <<<<<<<<<<<<<<
 *             theText = self.polyhedral_description()
 *         elif self.is_S5():
 */
    goto __pyx_L4;
  }

  /* "cython/core/symmetry_group.pyx":53
 *         elif self.is_polyhedral():
 *             theText = self.polyhedral_description()
 *         elif self.is_S5():             # <<<<<<<<<<<<<<
 *             theText = 'S5'
 *         elif self.is_direct_product():
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_S5); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __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, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 53, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(9, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_5) {

    /* "cython/core/symmetry_group.pyx":54
 *             theText = self.polyhedral_description()
 *         elif self.is_S5():
 *             theText = 'S5'             # <<<<<<<<<<<<<<
 *         elif self.is_direct_product():
 *             theText = '%s x %s' % self.direct_product_description()
 */
    __Pyx_INCREF(__pyx_n_s_S5);
    __pyx_v_theText = __pyx_n_s_S5;

    /* "cython/core/symmetry_group.pyx":53
 *         elif self.is_polyhedral():
 *             theText = self.polyhedral_description()
 *         elif self.is_S5():             # <<<<<<<<<<<<<<
 *             theText = 'S5'
 *         elif self.is_direct_product():
 */
    goto __pyx_L4;
  }

  /* "cython/core/symmetry_group.pyx":55
 *         elif self.is_S5():
 *             theText = 'S5'
 *         elif self.is_direct_product():             # <<<<<<<<<<<<<<
 *             theText = '%s x %s' % self.direct_product_description()
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_direct_product); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __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, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 55, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(9, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_5) {

    /* "cython/core/symmetry_group.pyx":56
 *             theText = 'S5'
 *         elif self.is_direct_product():
 *             theText = '%s x %s' % self.direct_product_description()             # <<<<<<<<<<<<<<
 *         else:
 *             theText = 'nonabelian group of order %d' % self.order()
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_direct_product_description); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 56, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __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, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 56, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_s_x_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 56, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_theText = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cython/core/symmetry_group.pyx":55
 *         elif self.is_S5():
 *             theText = 'S5'
 *         elif self.is_direct_product():             # <<<<<<<<<<<<<<
 *             theText = '%s x %s' % self.direct_product_description()
 *         else:
 */
    goto __pyx_L4;
  }

  /* "cython/core/symmetry_group.pyx":58
 *             theText = '%s x %s' % self.direct_product_description()
 *         else:
 *             theText = 'nonabelian group of order %d' % self.order()             # <<<<<<<<<<<<<<
 * 
 *         return thePretext + theText
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_order); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 58, __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(9, 58, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_kp_s_nonabelian_group_of_order_d, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 58, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_theText = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "cython/core/symmetry_group.pyx":60
 *             theText = 'nonabelian group of order %d' % self.order()
 * 
 *         return thePretext + theText             # <<<<<<<<<<<<<<
 * 
 *     def order(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyNumber_Add(__pyx_v_thePretext, __pyx_v_theText); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/symmetry_group.pyx":40
 *         return self._is_full_group
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self.is_full_group():
 *             thePretext = ''
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_thePretext);
  __Pyx_XDECREF(__pyx_v_theText);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":62
 *         return thePretext + theText
 * 
 *     def order(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the order of the symmetry group
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_9order(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_6SnapPy_13SymmetryGroup_8order, "SymmetryGroup.order(self)\n\n        Return the order of the symmetry group\n\n        >>> S = Manifold('s000').symmetry_group()\n        >>> S.order()\n        4\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_9order = {"order", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_9order, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_8order};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_9order(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("order (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("order", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "order", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_8order(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_8order(struct __pyx_obj_6SnapPy_SymmetryGroup *__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("order", 1);

  /* "cython/core/symmetry_group.pyx":70
 *         4
 *         """
 *         return symmetry_group_order(self.c_symmetry_group)             # <<<<<<<<<<<<<<
 * 
 *     def is_abelian(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = symmetry_group_order(__pyx_v_self->c_symmetry_group); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 70, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/symmetry_group.pyx":62
 *         return thePretext + theText
 * 
 *     def order(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the order of the symmetry group
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.order", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":72
 *         return symmetry_group_order(self.c_symmetry_group)
 * 
 *     def is_abelian(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the symmetry group is abelian.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_11is_abelian(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_6SnapPy_13SymmetryGroup_10is_abelian, "SymmetryGroup.is_abelian(self)\n\n        Return whether the symmetry group is abelian.\n\n        >>> S = Manifold('m004').symmetry_group()\n        >>> S.is_abelian()\n        False\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_11is_abelian = {"is_abelian", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_11is_abelian, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_10is_abelian};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_11is_abelian(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("is_abelian (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("is_abelian", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_abelian", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_10is_abelian(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_10is_abelian(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self) {
  AbelianGroup *__pyx_v_abelian_description;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Boolean __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_abelian", 1);

  /* "cython/core/symmetry_group.pyx":80
 *         False
 *         """
 *         cdef c_AbelianGroup* abelian_description = NULL             # <<<<<<<<<<<<<<
 *         return B2B(symmetry_group_is_abelian(
 *             self.c_symmetry_group, &abelian_description))
 */
  __pyx_v_abelian_description = NULL;

  /* "cython/core/symmetry_group.pyx":81
 *         """
 *         cdef c_AbelianGroup* abelian_description = NULL
 *         return B2B(symmetry_group_is_abelian(             # <<<<<<<<<<<<<<
 *             self.c_symmetry_group, &abelian_description))
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "cython/core/symmetry_group.pyx":82
 *         cdef c_AbelianGroup* abelian_description = NULL
 *         return B2B(symmetry_group_is_abelian(
 *             self.c_symmetry_group, &abelian_description))             # <<<<<<<<<<<<<<
 * 
 *     def abelian_description(self):
 */
  __pyx_t_1 = symmetry_group_is_abelian(__pyx_v_self->c_symmetry_group, (&__pyx_v_abelian_description)); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 81, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":81
 *         """
 *         cdef c_AbelianGroup* abelian_description = NULL
 *         return B2B(symmetry_group_is_abelian(             # <<<<<<<<<<<<<<
 *             self.c_symmetry_group, &abelian_description))
 * 
 */
  __pyx_t_2 = __pyx_f_6SnapPy_B2B(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/symmetry_group.pyx":72
 *         return symmetry_group_order(self.c_symmetry_group)
 * 
 *     def is_abelian(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the symmetry group is abelian.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.is_abelian", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":84
 *             self.c_symmetry_group, &abelian_description))
 * 
 *     def abelian_description(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the symmetry group is abelian, return it as an AbelianGroup
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_13abelian_description(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_6SnapPy_13SymmetryGroup_12abelian_description, "SymmetryGroup.abelian_description(self)\n\n        If the symmetry group is abelian, return it as an AbelianGroup\n\n        >>> S = Manifold('v3379').symmetry_group()\n        >>> S.abelian_description()\n        Z/2 + Z/2 + Z/2\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_13abelian_description = {"abelian_description", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_13abelian_description, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_12abelian_description};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_13abelian_description(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("abelian_description (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("abelian_description", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "abelian_description", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_12abelian_description(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_12abelian_description(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self) {
  AbelianGroup *__pyx_v_A;
  int __pyx_v_n;
  PyObject *__pyx_v_is_abelian = NULL;
  PyObject *__pyx_v_coeffs = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Boolean __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("abelian_description", 1);

  /* "cython/core/symmetry_group.pyx":94
 *         cdef c_AbelianGroup* A
 *         cdef int n
 *         is_abelian = B2B(symmetry_group_is_abelian(self.c_symmetry_group, &A))             # <<<<<<<<<<<<<<
 *         if not is_abelian:
 *             raise ValueError('The symmetry group is not abelian.')
 */
  __pyx_t_1 = symmetry_group_is_abelian(__pyx_v_self->c_symmetry_group, (&__pyx_v_A)); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 94, __pyx_L1_error)
  __pyx_t_2 = __pyx_f_6SnapPy_B2B(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_is_abelian = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/symmetry_group.pyx":95
 *         cdef int n
 *         is_abelian = B2B(symmetry_group_is_abelian(self.c_symmetry_group, &A))
 *         if not is_abelian:             # <<<<<<<<<<<<<<
 *             raise ValueError('The symmetry group is not abelian.')
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_is_abelian); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(9, 95, __pyx_L1_error)
  __pyx_t_4 = (!__pyx_t_3);
  if (unlikely(__pyx_t_4)) {

    /* "cython/core/symmetry_group.pyx":96
 *         is_abelian = B2B(symmetry_group_is_abelian(self.c_symmetry_group, &A))
 *         if not is_abelian:
 *             raise ValueError('The symmetry group is not abelian.')             # <<<<<<<<<<<<<<
 * 
 *         coeffs = []
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__121, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 96, __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(9, 96, __pyx_L1_error)

    /* "cython/core/symmetry_group.pyx":95
 *         cdef int n
 *         is_abelian = B2B(symmetry_group_is_abelian(self.c_symmetry_group, &A))
 *         if not is_abelian:             # <<<<<<<<<<<<<<
 *             raise ValueError('The symmetry group is not abelian.')
 * 
 */
  }

  /* "cython/core/symmetry_group.pyx":98
 *             raise ValueError('The symmetry group is not abelian.')
 * 
 *         coeffs = []             # <<<<<<<<<<<<<<
 *         for n in range(A.num_torsion_coefficients):
 *             coeffs.append(A.torsion_coefficients[n])
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_coeffs = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/symmetry_group.pyx":99
 * 
 *         coeffs = []
 *         for n in range(A.num_torsion_coefficients):             # <<<<<<<<<<<<<<
 *             coeffs.append(A.torsion_coefficients[n])
 * 
 */
  __pyx_t_5 = __pyx_v_A->num_torsion_coefficients;
  __pyx_t_6 = __pyx_t_5;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
    __pyx_v_n = __pyx_t_7;

    /* "cython/core/symmetry_group.pyx":100
 *         coeffs = []
 *         for n in range(A.num_torsion_coefficients):
 *             coeffs.append(A.torsion_coefficients[n])             # <<<<<<<<<<<<<<
 * 
 *         # Don't need to free A as it is attached to the symmetry group object
 */
    __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_A->torsion_coefficients[__pyx_v_n])); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 100, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_coeffs, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(9, 100, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "cython/core/symmetry_group.pyx":103
 * 
 *         # Don't need to free A as it is attached to the symmetry group object
 *         return AbelianGroup(elementary_divisors=coeffs)             # <<<<<<<<<<<<<<
 * 
 *     def is_dihedral(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_elementary_divisors, __pyx_v_coeffs) < 0) __PYX_ERR(9, 103, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6SnapPy_AbelianGroup), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(9, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_9;
  __pyx_t_9 = 0;
  goto __pyx_L0;

  /* "cython/core/symmetry_group.pyx":84
 *             self.c_symmetry_group, &abelian_description))
 * 
 *     def abelian_description(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the symmetry group is abelian, return it as an AbelianGroup
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.abelian_description", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_is_abelian);
  __Pyx_XDECREF(__pyx_v_coeffs);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":105
 *         return AbelianGroup(elementary_divisors=coeffs)
 * 
 *     def is_dihedral(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the symmetry group is dihedral.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_15is_dihedral(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_6SnapPy_13SymmetryGroup_14is_dihedral, "SymmetryGroup.is_dihedral(self)\n\n        Return whether the symmetry group is dihedral.\n\n        >>> S = Manifold('m004').symmetry_group()\n        >>> S.is_dihedral()\n        True\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_15is_dihedral = {"is_dihedral", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_15is_dihedral, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_14is_dihedral};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_15is_dihedral(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("is_dihedral (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("is_dihedral", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_dihedral", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_14is_dihedral(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_14is_dihedral(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Boolean __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_dihedral", 1);

  /* "cython/core/symmetry_group.pyx":113
 *         True
 *         """
 *         return B2B(symmetry_group_is_dihedral(self.c_symmetry_group))             # <<<<<<<<<<<<<<
 * 
 *     def is_polyhedral(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = symmetry_group_is_dihedral(__pyx_v_self->c_symmetry_group); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 113, __pyx_L1_error)
  __pyx_t_2 = __pyx_f_6SnapPy_B2B(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/symmetry_group.pyx":105
 *         return AbelianGroup(elementary_divisors=coeffs)
 * 
 *     def is_dihedral(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the symmetry group is dihedral.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.is_dihedral", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":115
 *         return B2B(symmetry_group_is_dihedral(self.c_symmetry_group))
 * 
 *     def is_polyhedral(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns whether the symmetry group is a (possibly binary)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_17is_polyhedral(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_6SnapPy_13SymmetryGroup_16is_polyhedral, "SymmetryGroup.is_polyhedral(self)\n\n        Returns whether the symmetry group is a (possibly binary)\n        polyhedral group.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_17is_polyhedral = {"is_polyhedral", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_17is_polyhedral, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_16is_polyhedral};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_17is_polyhedral(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("is_polyhedral (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("is_polyhedral", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_polyhedral", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_16is_polyhedral(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_16is_polyhedral(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Boolean __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_polyhedral", 1);

  /* "cython/core/symmetry_group.pyx":120
 *         polyhedral group.
 *         """
 *         return B2B(symmetry_group_is_polyhedral(self.c_symmetry_group,             # <<<<<<<<<<<<<<
 *                                                 NULL, NULL, NULL, NULL))
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "cython/core/symmetry_group.pyx":121
 *         """
 *         return B2B(symmetry_group_is_polyhedral(self.c_symmetry_group,
 *                                                 NULL, NULL, NULL, NULL))             # <<<<<<<<<<<<<<
 * 
 *     def polyhedral_description(self):
 */
  __pyx_t_1 = symmetry_group_is_polyhedral(__pyx_v_self->c_symmetry_group, NULL, NULL, NULL, NULL); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 120, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":120
 *         polyhedral group.
 *         """
 *         return B2B(symmetry_group_is_polyhedral(self.c_symmetry_group,             # <<<<<<<<<<<<<<
 *                                                 NULL, NULL, NULL, NULL))
 * 
 */
  __pyx_t_2 = __pyx_f_6SnapPy_B2B(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/symmetry_group.pyx":115
 *         return B2B(symmetry_group_is_dihedral(self.c_symmetry_group))
 * 
 *     def is_polyhedral(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns whether the symmetry group is a (possibly binary)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.is_polyhedral", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":123
 *                                                 NULL, NULL, NULL, NULL))
 * 
 *     def polyhedral_description(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the symmetry group is a (possibly binary)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_19polyhedral_description(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_6SnapPy_13SymmetryGroup_18polyhedral_description, "SymmetryGroup.polyhedral_description(self)\n\n        If the symmetry group is a (possibly binary)\n        polyhedral group, return a description of it.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_19polyhedral_description = {"polyhedral_description", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_19polyhedral_description, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_18polyhedral_description};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_19polyhedral_description(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("polyhedral_description (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("polyhedral_description", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "polyhedral_description", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_18polyhedral_description(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_18polyhedral_description(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self) {
  Boolean __pyx_v_is_binary_group;
  int __pyx_v_p;
  int __pyx_v_q;
  int __pyx_v_r;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("polyhedral_description", 1);

  /* "cython/core/symmetry_group.pyx":131
 *         cdef int p, q, r
 * 
 *         if not self.is_polyhedral():             # <<<<<<<<<<<<<<
 *             raise ValueError('The symmetry group is not polyhedral.')
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_polyhedral); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 131, __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(9, 131, __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(9, 131, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (!__pyx_t_5);
  if (unlikely(__pyx_t_6)) {

    /* "cython/core/symmetry_group.pyx":132
 * 
 *         if not self.is_polyhedral():
 *             raise ValueError('The symmetry group is not polyhedral.')             # <<<<<<<<<<<<<<
 * 
 *         symmetry_group_is_polyhedral(self.c_symmetry_group,
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__122, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 132, __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(9, 132, __pyx_L1_error)

    /* "cython/core/symmetry_group.pyx":131
 *         cdef int p, q, r
 * 
 *         if not self.is_polyhedral():             # <<<<<<<<<<<<<<
 *             raise ValueError('The symmetry group is not polyhedral.')
 * 
 */
  }

  /* "cython/core/symmetry_group.pyx":134
 *             raise ValueError('The symmetry group is not polyhedral.')
 * 
 *         symmetry_group_is_polyhedral(self.c_symmetry_group,             # <<<<<<<<<<<<<<
 *                                      &is_binary_group, &p, &q, &r)
 * 
 */
  symmetry_group_is_polyhedral(__pyx_v_self->c_symmetry_group, (&__pyx_v_is_binary_group), (&__pyx_v_p), (&__pyx_v_q), (&__pyx_v_r)); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 134, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":137
 *                                      &is_binary_group, &p, &q, &r)
 * 
 *         assert p == 2             # <<<<<<<<<<<<<<
 * 
 *         if q == 2:
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = (__pyx_v_p == 2);
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
      __PYX_ERR(9, 137, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(9, 137, __pyx_L1_error)
  #endif

  /* "cython/core/symmetry_group.pyx":139
 *         assert p == 2
 * 
 *         if q == 2:             # <<<<<<<<<<<<<<
 *             assert(is_binary_group)
 *             name = 'binary dihedral group <2,2,%d>' % r
 */
  switch (__pyx_v_q) {
    case 2:

    /* "cython/core/symmetry_group.pyx":140
 * 
 *         if q == 2:
 *             assert(is_binary_group)             # <<<<<<<<<<<<<<
 *             name = 'binary dihedral group <2,2,%d>' % r
 *         elif q== 3:
 */
    #ifndef CYTHON_WITHOUT_ASSERTIONS
    if (unlikely(__pyx_assertions_enabled())) {
      __pyx_t_6 = (__pyx_v_is_binary_group != 0);
      if (unlikely(!__pyx_t_6)) {
        __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
        __PYX_ERR(9, 140, __pyx_L1_error)
      }
    }
    #else
    if ((1)); else __PYX_ERR(9, 140, __pyx_L1_error)
    #endif

    /* "cython/core/symmetry_group.pyx":141
 *         if q == 2:
 *             assert(is_binary_group)
 *             name = 'binary dihedral group <2,2,%d>' % r             # <<<<<<<<<<<<<<
 *         elif q== 3:
 *             name = 'binary ' if is_binary_group else ''
 */
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_binary_dihedral_group_2_2_d, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_name = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/symmetry_group.pyx":139
 *         assert p == 2
 * 
 *         if q == 2:             # <<<<<<<<<<<<<<
 *             assert(is_binary_group)
 *             name = 'binary dihedral group <2,2,%d>' % r
 */
    break;
    case 3:

    /* "cython/core/symmetry_group.pyx":143
 *             name = 'binary dihedral group <2,2,%d>' % r
 *         elif q== 3:
 *             name = 'binary ' if is_binary_group else ''             # <<<<<<<<<<<<<<
 *             name += {3: 'tetrahedral group',
 *                      4: 'octahedral group',
 */
    __pyx_t_6 = (__pyx_v_is_binary_group != 0);
    if (__pyx_t_6) {
      __Pyx_INCREF(__pyx_kp_s_binary);
      __pyx_t_2 = __pyx_kp_s_binary;
    } else {
      __Pyx_INCREF(__pyx_kp_s__9);
      __pyx_t_2 = __pyx_kp_s__9;
    }
    __pyx_v_name = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/symmetry_group.pyx":144
 *         elif q== 3:
 *             name = 'binary ' if is_binary_group else ''
 *             name += {3: 'tetrahedral group',             # <<<<<<<<<<<<<<
 *                      4: 'octahedral group',
 *                      5: 'icosohedral group'}[r]
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_int_3, __pyx_kp_s_tetrahedral_group) < 0) __PYX_ERR(9, 144, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_int_4, __pyx_kp_s_octahedral_group) < 0) __PYX_ERR(9, 144, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_2, __pyx_int_5, __pyx_kp_s_icosohedral_group) < 0) __PYX_ERR(9, 144, __pyx_L1_error)

    /* "cython/core/symmetry_group.pyx":146
 *             name += {3: 'tetrahedral group',
 *                      4: 'octahedral group',
 *                      5: 'icosohedral group'}[r]             # <<<<<<<<<<<<<<
 * 
 *         return name
 */
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/symmetry_group.pyx":144
 *         elif q== 3:
 *             name = 'binary ' if is_binary_group else ''
 *             name += {3: 'tetrahedral group',             # <<<<<<<<<<<<<<
 *                      4: 'octahedral group',
 *                      5: 'icosohedral group'}[r]
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_name, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cython/core/symmetry_group.pyx":142
 *             assert(is_binary_group)
 *             name = 'binary dihedral group <2,2,%d>' % r
 *         elif q== 3:             # <<<<<<<<<<<<<<
 *             name = 'binary ' if is_binary_group else ''
 *             name += {3: 'tetrahedral group',
 */
    break;
    default: break;
  }

  /* "cython/core/symmetry_group.pyx":148
 *                      5: 'icosohedral group'}[r]
 * 
 *         return name             # <<<<<<<<<<<<<<
 * 
 *     def is_S5(self):
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_v_name)) { __Pyx_RaiseUnboundLocalError("name"); __PYX_ERR(9, 148, __pyx_L1_error) }
  __Pyx_INCREF(__pyx_v_name);
  __pyx_r = __pyx_v_name;
  goto __pyx_L0;

  /* "cython/core/symmetry_group.pyx":123
 *                                                 NULL, NULL, NULL, NULL))
 * 
 *     def polyhedral_description(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the symmetry group is a (possibly binary)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.polyhedral_description", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":150
 *         return name
 * 
 *     def is_S5(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns whether the group is the symmetric group on five things.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_21is_S5(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_6SnapPy_13SymmetryGroup_20is_S5, "SymmetryGroup.is_S5(self)\n\n        Returns whether the group is the symmetric group on five things.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_21is_S5 = {"is_S5", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_21is_S5, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_20is_S5};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_21is_S5(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("is_S5 (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("is_S5", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_S5", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_20is_S5(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_20is_S5(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Boolean __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_S5", 1);

  /* "cython/core/symmetry_group.pyx":154
 *         Returns whether the group is the symmetric group on five things.
 *         """
 *         return B2B(symmetry_group_is_S5(self.c_symmetry_group))             # <<<<<<<<<<<<<<
 * 
 *     def is_direct_product(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = symmetry_group_is_S5(__pyx_v_self->c_symmetry_group); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 154, __pyx_L1_error)
  __pyx_t_2 = __pyx_f_6SnapPy_B2B(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/symmetry_group.pyx":150
 *         return name
 * 
 *     def is_S5(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns whether the group is the symmetric group on five things.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.is_S5", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":156
 *         return B2B(symmetry_group_is_S5(self.c_symmetry_group))
 * 
 *     def is_direct_product(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the SymmetryGroup is a nontrivial direct
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_23is_direct_product(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_6SnapPy_13SymmetryGroup_22is_direct_product, "SymmetryGroup.is_direct_product(self)\n\n        Return whether the SymmetryGroup is a nontrivial direct\n        product with at least one nonabelian factor.\n\n        >>> S = Manifold('s960').symmetry_group()\n        >>> S.is_direct_product()\n        True\n        >>> S\n        Z/4 x D3\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_23is_direct_product = {"is_direct_product", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_23is_direct_product, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_22is_direct_product};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_23is_direct_product(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("is_direct_product (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("is_direct_product", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_direct_product", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_22is_direct_product(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_22is_direct_product(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Boolean __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_direct_product", 1);

  /* "cython/core/symmetry_group.pyx":167
 *         Z/4 x D3
 *         """
 *         return B2B(symmetry_group_is_direct_product(self.c_symmetry_group))             # <<<<<<<<<<<<<<
 * 
 *     def direct_product_description(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = symmetry_group_is_direct_product(__pyx_v_self->c_symmetry_group); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 167, __pyx_L1_error)
  __pyx_t_2 = __pyx_f_6SnapPy_B2B(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/symmetry_group.pyx":156
 *         return B2B(symmetry_group_is_S5(self.c_symmetry_group))
 * 
 *     def is_direct_product(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the SymmetryGroup is a nontrivial direct
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.is_direct_product", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":169
 *         return B2B(symmetry_group_is_direct_product(self.c_symmetry_group))
 * 
 *     def direct_product_description(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the SymmetryGroup is a nontrivial direct product with at
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_25direct_product_description(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_6SnapPy_13SymmetryGroup_24direct_product_description, "SymmetryGroup.direct_product_description(self)\n\n        If the SymmetryGroup is a nontrivial direct product with at\n        least one nonabelian factor, return a pair of SymmetryGroups\n        consisting of the (two) factors.\n\n        >>> S = Manifold('s960').symmetry_group()\n        >>> S.direct_product_description()\n        (Z/4, D3)\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_25direct_product_description = {"direct_product_description", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_25direct_product_description, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_24direct_product_description};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_25direct_product_description(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("direct_product_description (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("direct_product_description", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "direct_product_description", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_24direct_product_description(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_24direct_product_description(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self) {
  SymmetryGroup *__pyx_v_c_factor_0;
  SymmetryGroup *__pyx_v_c_factor_1;
  struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_factor_0 = 0;
  struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_factor_1 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  SymmetryGroup *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("direct_product_description", 1);

  /* "cython/core/symmetry_group.pyx":179
 *         (Z/4, D3)
 *         """
 *         if not self.is_direct_product():             # <<<<<<<<<<<<<<
 *             raise ValueError('The symmetry group is not a nontrivial, '
 *                              'nonabelian direct product.')
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_direct_product); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 179, __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(9, 179, __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(9, 179, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (!__pyx_t_5);
  if (unlikely(__pyx_t_6)) {

    /* "cython/core/symmetry_group.pyx":180
 *         """
 *         if not self.is_direct_product():
 *             raise ValueError('The symmetry group is not a nontrivial, '             # <<<<<<<<<<<<<<
 *                              'nonabelian direct product.')
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__123, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 180, __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(9, 180, __pyx_L1_error)

    /* "cython/core/symmetry_group.pyx":179
 *         (Z/4, D3)
 *         """
 *         if not self.is_direct_product():             # <<<<<<<<<<<<<<
 *             raise ValueError('The symmetry group is not a nontrivial, '
 *                              'nonabelian direct product.')
 */
  }

  /* "cython/core/symmetry_group.pyx":188
 *         cdef SymmetryGroup factor_1
 * 
 *         c_factor_0 = get_symmetry_group_factor(self.c_symmetry_group, 0)             # <<<<<<<<<<<<<<
 *         c_factor_1 = get_symmetry_group_factor(self.c_symmetry_group, 1)
 * 
 */
  __pyx_t_7 = get_symmetry_group_factor(__pyx_v_self->c_symmetry_group, 0); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 188, __pyx_L1_error)
  __pyx_v_c_factor_0 = __pyx_t_7;

  /* "cython/core/symmetry_group.pyx":189
 * 
 *         c_factor_0 = get_symmetry_group_factor(self.c_symmetry_group, 0)
 *         c_factor_1 = get_symmetry_group_factor(self.c_symmetry_group, 1)             # <<<<<<<<<<<<<<
 * 
 *         factor_0 = SymmetryGroup(True, False)
 */
  __pyx_t_7 = get_symmetry_group_factor(__pyx_v_self->c_symmetry_group, 1); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 189, __pyx_L1_error)
  __pyx_v_c_factor_1 = __pyx_t_7;

  /* "cython/core/symmetry_group.pyx":191
 *         c_factor_1 = get_symmetry_group_factor(self.c_symmetry_group, 1)
 * 
 *         factor_0 = SymmetryGroup(True, False)             # <<<<<<<<<<<<<<
 *         factor_1 = SymmetryGroup(True, False)
 *         factor_0._set_c_symmetry_group(c_factor_0)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup), __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_factor_0 = ((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/symmetry_group.pyx":192
 * 
 *         factor_0 = SymmetryGroup(True, False)
 *         factor_1 = SymmetryGroup(True, False)             # <<<<<<<<<<<<<<
 *         factor_0._set_c_symmetry_group(c_factor_0)
 *         factor_1._set_c_symmetry_group(c_factor_1)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup), __pyx_tuple__124, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_factor_1 = ((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/symmetry_group.pyx":193
 *         factor_0 = SymmetryGroup(True, False)
 *         factor_1 = SymmetryGroup(True, False)
 *         factor_0._set_c_symmetry_group(c_factor_0)             # <<<<<<<<<<<<<<
 *         factor_1._set_c_symmetry_group(c_factor_1)
 *         return (factor_0, factor_1)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6SnapPy_SymmetryGroup *)__pyx_v_factor_0->__pyx_vtab)->_set_c_symmetry_group(__pyx_v_factor_0, __pyx_v_c_factor_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/symmetry_group.pyx":194
 *         factor_1 = SymmetryGroup(True, False)
 *         factor_0._set_c_symmetry_group(c_factor_0)
 *         factor_1._set_c_symmetry_group(c_factor_1)             # <<<<<<<<<<<<<<
 *         return (factor_0, factor_1)
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6SnapPy_SymmetryGroup *)__pyx_v_factor_1->__pyx_vtab)->_set_c_symmetry_group(__pyx_v_factor_1, __pyx_v_c_factor_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/symmetry_group.pyx":195
 *         factor_0._set_c_symmetry_group(c_factor_0)
 *         factor_1._set_c_symmetry_group(c_factor_1)
 *         return (factor_0, factor_1)             # <<<<<<<<<<<<<<
 * 
 *     def is_amphicheiral(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF((PyObject *)__pyx_v_factor_0);
  __Pyx_GIVEREF((PyObject *)__pyx_v_factor_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_factor_0))) __PYX_ERR(9, 195, __pyx_L1_error);
  __Pyx_INCREF((PyObject *)__pyx_v_factor_1);
  __Pyx_GIVEREF((PyObject *)__pyx_v_factor_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_factor_1))) __PYX_ERR(9, 195, __pyx_L1_error);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/symmetry_group.pyx":169
 *         return B2B(symmetry_group_is_direct_product(self.c_symmetry_group))
 * 
 *     def direct_product_description(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the SymmetryGroup is a nontrivial direct product with at
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.direct_product_description", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_factor_0);
  __Pyx_XDECREF((PyObject *)__pyx_v_factor_1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":197
 *         return (factor_0, factor_1)
 * 
 *     def is_amphicheiral(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the manifold has an orientation reversing symmetry.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_27is_amphicheiral(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_6SnapPy_13SymmetryGroup_26is_amphicheiral, "SymmetryGroup.is_amphicheiral(self)\n\n        Return whether the manifold has an orientation reversing symmetry.\n\n        >>> S = Manifold('m004').symmetry_group()\n        >>> S.is_amphicheiral()\n        True\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_27is_amphicheiral = {"is_amphicheiral", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_27is_amphicheiral, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_26is_amphicheiral};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_27is_amphicheiral(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("is_amphicheiral (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("is_amphicheiral", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_amphicheiral", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_26is_amphicheiral(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_26is_amphicheiral(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Boolean __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_amphicheiral", 1);

  /* "cython/core/symmetry_group.pyx":205
 *         True
 *         """
 *         return B2B(symmetry_group_is_amphicheiral(self.c_symmetry_group))             # <<<<<<<<<<<<<<
 * 
 *     def is_invertible_knot(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = symmetry_group_is_amphicheiral(__pyx_v_self->c_symmetry_group); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 205, __pyx_L1_error)
  __pyx_t_2 = __pyx_f_6SnapPy_B2B(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/symmetry_group.pyx":197
 *         return (factor_0, factor_1)
 * 
 *     def is_amphicheiral(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the manifold has an orientation reversing symmetry.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.is_amphicheiral", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":207
 *         return B2B(symmetry_group_is_amphicheiral(self.c_symmetry_group))
 * 
 *     def is_invertible_knot(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether a one-cusped has a symmetry that acts on the
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_29is_invertible_knot(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_6SnapPy_13SymmetryGroup_28is_invertible_knot, "SymmetryGroup.is_invertible_knot(self)\n\n        Return whether a one-cusped has a symmetry that acts on the\n        cusp via the matrix -I.\n\n        >>> S = Manifold('m015').symmetry_group()\n        >>> S.is_invertible_knot()\n        True\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_29is_invertible_knot = {"is_invertible_knot", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_29is_invertible_knot, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_28is_invertible_knot};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_29is_invertible_knot(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("is_invertible_knot (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("is_invertible_knot", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_invertible_knot", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_28is_invertible_knot(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_28is_invertible_knot(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Boolean __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_invertible_knot", 1);

  /* "cython/core/symmetry_group.pyx":216
 *         True
 *         """
 *         return B2B(symmetry_group_invertible_knot(self.c_symmetry_group))             # <<<<<<<<<<<<<<
 * 
 *     def commutator_subgroup(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = symmetry_group_invertible_knot(__pyx_v_self->c_symmetry_group); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 216, __pyx_L1_error)
  __pyx_t_2 = __pyx_f_6SnapPy_B2B(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/symmetry_group.pyx":207
 *         return B2B(symmetry_group_is_amphicheiral(self.c_symmetry_group))
 * 
 *     def is_invertible_knot(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether a one-cusped has a symmetry that acts on the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.is_invertible_knot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":218
 *         return B2B(symmetry_group_invertible_knot(self.c_symmetry_group))
 * 
 *     def commutator_subgroup(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the commutator subgroup of the SymmetryGroup
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_31commutator_subgroup(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_6SnapPy_13SymmetryGroup_30commutator_subgroup, "SymmetryGroup.commutator_subgroup(self)\n\n        Return the commutator subgroup of the SymmetryGroup\n\n        >>> S = Manifold('m004').symmetry_group()\n        >>> S\n        D4\n        >>> S.commutator_subgroup()\n        Z/2\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_31commutator_subgroup = {"commutator_subgroup", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_31commutator_subgroup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_30commutator_subgroup};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_31commutator_subgroup(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("commutator_subgroup (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("commutator_subgroup", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "commutator_subgroup", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_30commutator_subgroup(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_30commutator_subgroup(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self) {
  SymmetryGroup *__pyx_v_c_comm_subgroup;
  struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_comm_subgroup = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  SymmetryGroup *__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("commutator_subgroup", 1);

  /* "cython/core/symmetry_group.pyx":231
 *         cdef SymmetryGroup comm_subgroup
 * 
 *         c_comm_subgroup = get_commutator_subgroup(self.c_symmetry_group)             # <<<<<<<<<<<<<<
 *         comm_subgroup = SymmetryGroup(self.is_full_group(), True)
 *         comm_subgroup._set_c_symmetry_group(c_comm_subgroup)
 */
  __pyx_t_1 = get_commutator_subgroup(__pyx_v_self->c_symmetry_group); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 231, __pyx_L1_error)
  __pyx_v_c_comm_subgroup = __pyx_t_1;

  /* "cython/core/symmetry_group.pyx":232
 * 
 *         c_comm_subgroup = get_commutator_subgroup(self.c_symmetry_group)
 *         comm_subgroup = SymmetryGroup(self.is_full_group(), True)             # <<<<<<<<<<<<<<
 *         comm_subgroup._set_c_symmetry_group(c_comm_subgroup)
 *         return comm_subgroup
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_full_group); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 232, __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(9, 232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(9, 232, __pyx_L1_error);
  __Pyx_INCREF(Py_True);
  __Pyx_GIVEREF(Py_True);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, Py_True)) __PYX_ERR(9, 232, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_comm_subgroup = ((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/symmetry_group.pyx":233
 *         c_comm_subgroup = get_commutator_subgroup(self.c_symmetry_group)
 *         comm_subgroup = SymmetryGroup(self.is_full_group(), True)
 *         comm_subgroup._set_c_symmetry_group(c_comm_subgroup)             # <<<<<<<<<<<<<<
 *         return comm_subgroup
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_SymmetryGroup *)__pyx_v_comm_subgroup->__pyx_vtab)->_set_c_symmetry_group(__pyx_v_comm_subgroup, __pyx_v_c_comm_subgroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/symmetry_group.pyx":234
 *         comm_subgroup = SymmetryGroup(self.is_full_group(), True)
 *         comm_subgroup._set_c_symmetry_group(c_comm_subgroup)
 *         return comm_subgroup             # <<<<<<<<<<<<<<
 * 
 *     def abelianization(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_comm_subgroup);
  __pyx_r = ((PyObject *)__pyx_v_comm_subgroup);
  goto __pyx_L0;

  /* "cython/core/symmetry_group.pyx":218
 *         return B2B(symmetry_group_invertible_knot(self.c_symmetry_group))
 * 
 *     def commutator_subgroup(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the commutator subgroup of the SymmetryGroup
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.commutator_subgroup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_comm_subgroup);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":236
 *         return comm_subgroup
 * 
 *     def abelianization(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the abelianization of the symmetry group
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_33abelianization(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_6SnapPy_13SymmetryGroup_32abelianization, "SymmetryGroup.abelianization(self)\n\n        Return the abelianization of the symmetry group\n\n        >>> S = Manifold('m004').symmetry_group()\n        >>> S.abelianization()\n        Z/2 + Z/2\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_33abelianization = {"abelianization", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_33abelianization, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_32abelianization};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_33abelianization(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("abelianization (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("abelianization", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "abelianization", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_32abelianization(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_32abelianization(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self) {
  SymmetryGroup *__pyx_v_c_abelianization;
  struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_abelianization = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  SymmetryGroup *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("abelianization", 1);

  /* "cython/core/symmetry_group.pyx":245
 *         """
 * 
 *         if not self.is_full_group():             # <<<<<<<<<<<<<<
 *             raise ValueError('The full symmetry group is not known.')
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_full_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 245, __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(9, 245, __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(9, 245, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (!__pyx_t_5);
  if (unlikely(__pyx_t_6)) {

    /* "cython/core/symmetry_group.pyx":246
 * 
 *         if not self.is_full_group():
 *             raise ValueError('The full symmetry group is not known.')             # <<<<<<<<<<<<<<
 * 
 *         cdef c_SymmetryGroup* c_abelianization
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__125, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 246, __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(9, 246, __pyx_L1_error)

    /* "cython/core/symmetry_group.pyx":245
 *         """
 * 
 *         if not self.is_full_group():             # <<<<<<<<<<<<<<
 *             raise ValueError('The full symmetry group is not known.')
 * 
 */
  }

  /* "cython/core/symmetry_group.pyx":251
 *         cdef SymmetryGroup abelianization
 * 
 *         c_abelianization = get_abelianization(self.c_symmetry_group)             # <<<<<<<<<<<<<<
 *         abelianization = SymmetryGroup(self.is_full_group(), True)
 *         abelianization._set_c_symmetry_group(c_abelianization)
 */
  __pyx_t_7 = get_abelianization(__pyx_v_self->c_symmetry_group); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 251, __pyx_L1_error)
  __pyx_v_c_abelianization = __pyx_t_7;

  /* "cython/core/symmetry_group.pyx":252
 * 
 *         c_abelianization = get_abelianization(self.c_symmetry_group)
 *         abelianization = SymmetryGroup(self.is_full_group(), True)             # <<<<<<<<<<<<<<
 *         abelianization._set_c_symmetry_group(c_abelianization)
 *         return abelianization.abelian_description()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_full_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 252, __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(9, 252, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(9, 252, __pyx_L1_error);
  __Pyx_INCREF(Py_True);
  __Pyx_GIVEREF(Py_True);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_True)) __PYX_ERR(9, 252, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_abelianization = ((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/symmetry_group.pyx":253
 *         c_abelianization = get_abelianization(self.c_symmetry_group)
 *         abelianization = SymmetryGroup(self.is_full_group(), True)
 *         abelianization._set_c_symmetry_group(c_abelianization)             # <<<<<<<<<<<<<<
 *         return abelianization.abelian_description()
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6SnapPy_SymmetryGroup *)__pyx_v_abelianization->__pyx_vtab)->_set_c_symmetry_group(__pyx_v_abelianization, __pyx_v_c_abelianization); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/symmetry_group.pyx":254
 *         abelianization = SymmetryGroup(self.is_full_group(), True)
 *         abelianization._set_c_symmetry_group(c_abelianization)
 *         return abelianization.abelian_description()             # <<<<<<<<<<<<<<
 * 
 *     def center(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_abelianization), __pyx_n_s_abelian_description); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 254, __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(9, 254, __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;

  /* "cython/core/symmetry_group.pyx":236
 *         return comm_subgroup
 * 
 *     def abelianization(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the abelianization of the symmetry group
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.abelianization", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_abelianization);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":256
 *         return abelianization.abelian_description()
 * 
 *     def center(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the center of the symmetry group
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_35center(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_6SnapPy_13SymmetryGroup_34center, "SymmetryGroup.center(self)\n\n        Return the center of the symmetry group\n\n        >>> S = Manifold('m004').symmetry_group()\n        >>> S.center()\n        Z/2\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_35center = {"center", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_35center, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_34center};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_35center(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("center (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("center", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "center", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_34center(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_34center(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self) {
  SymmetryGroup *__pyx_v_c_center;
  struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_center = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  SymmetryGroup *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("center", 1);

  /* "cython/core/symmetry_group.pyx":265
 *         """
 * 
 *         if not self.is_full_group():             # <<<<<<<<<<<<<<
 *             raise ValueError('The full symmetry group not known.')
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_full_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 265, __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(9, 265, __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(9, 265, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (!__pyx_t_5);
  if (unlikely(__pyx_t_6)) {

    /* "cython/core/symmetry_group.pyx":266
 * 
 *         if not self.is_full_group():
 *             raise ValueError('The full symmetry group not known.')             # <<<<<<<<<<<<<<
 * 
 *         cdef c_SymmetryGroup* c_center
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__126, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 266, __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(9, 266, __pyx_L1_error)

    /* "cython/core/symmetry_group.pyx":265
 *         """
 * 
 *         if not self.is_full_group():             # <<<<<<<<<<<<<<
 *             raise ValueError('The full symmetry group not known.')
 * 
 */
  }

  /* "cython/core/symmetry_group.pyx":271
 *         cdef SymmetryGroup center
 * 
 *         c_center = get_center(self.c_symmetry_group)             # <<<<<<<<<<<<<<
 *         center = SymmetryGroup(self.is_full_group(), True)
 *         center._set_c_symmetry_group(c_center)
 */
  __pyx_t_7 = get_center(__pyx_v_self->c_symmetry_group); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 271, __pyx_L1_error)
  __pyx_v_c_center = __pyx_t_7;

  /* "cython/core/symmetry_group.pyx":272
 * 
 *         c_center = get_center(self.c_symmetry_group)
 *         center = SymmetryGroup(self.is_full_group(), True)             # <<<<<<<<<<<<<<
 *         center._set_c_symmetry_group(c_center)
 *         return center.abelian_description()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_full_group); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 272, __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(9, 272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(9, 272, __pyx_L1_error);
  __Pyx_INCREF(Py_True);
  __Pyx_GIVEREF(Py_True);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_True)) __PYX_ERR(9, 272, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_center = ((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/symmetry_group.pyx":273
 *         c_center = get_center(self.c_symmetry_group)
 *         center = SymmetryGroup(self.is_full_group(), True)
 *         center._set_c_symmetry_group(c_center)             # <<<<<<<<<<<<<<
 *         return center.abelian_description()
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6SnapPy_SymmetryGroup *)__pyx_v_center->__pyx_vtab)->_set_c_symmetry_group(__pyx_v_center, __pyx_v_c_center); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/symmetry_group.pyx":274
 *         center = SymmetryGroup(self.is_full_group(), True)
 *         center._set_c_symmetry_group(c_center)
 *         return center.abelian_description()             # <<<<<<<<<<<<<<
 * 
 *     def multiply_elements(self, i, j):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_center), __pyx_n_s_abelian_description); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 274, __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(9, 274, __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;

  /* "cython/core/symmetry_group.pyx":256
 *         return abelianization.abelian_description()
 * 
 *     def center(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the center of the symmetry group
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.center", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_center);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":276
 *         return center.abelian_description()
 * 
 *     def multiply_elements(self, i, j):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the product of group elements i and j.  The convention
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_37multiply_elements(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_6SnapPy_13SymmetryGroup_36multiply_elements, "SymmetryGroup.multiply_elements(self, i, j)\n\n        Returns the product of group elements i and j.  The convention\n        is that products of symmetries read right to left.  That is,\n        the composition (symmetry[i] o symmetry[j]) acts by first\n        doing symmetry[j], then symmetry[i].\n\n        >>> S = Manifold('m004').symmetry_group()\n        >>> S.multiply_elements(2, 3)\n        1\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_37multiply_elements = {"multiply_elements", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_37multiply_elements, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_36multiply_elements};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_37multiply_elements(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_i = 0;
  PyObject *__pyx_v_j = 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("multiply_elements (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_i,&__pyx_n_s_j,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_i)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 276, __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_j)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 276, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("multiply_elements", 1, 2, 2, 1); __PYX_ERR(9, 276, __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, "multiply_elements") < 0)) __PYX_ERR(9, 276, __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_i = values[0];
    __pyx_v_j = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("multiply_elements", 1, 2, 2, __pyx_nargs); __PYX_ERR(9, 276, __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("SnapPy.SymmetryGroup.multiply_elements", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_36multiply_elements(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self), __pyx_v_i, __pyx_v_j);

  /* 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_6SnapPy_13SymmetryGroup_36multiply_elements(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j) {
  PyObject *__pyx_v_order = NULL;
  PyObject *__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("multiply_elements", 1);

  /* "cython/core/symmetry_group.pyx":287
 *         1
 *         """
 *         order = self.order()             # <<<<<<<<<<<<<<
 *         for x in [i, j]:
 *             if not (0 <= x < order):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_order); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 287, __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(9, 287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_order = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/symmetry_group.pyx":288
 *         """
 *         order = self.order()
 *         for x in [i, j]:             # <<<<<<<<<<<<<<
 *             if not (0 <= x < order):
 *                 raise ValueError('The symmetry group has only %d '
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_i);
  __Pyx_GIVEREF(__pyx_v_i);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_i)) __PYX_ERR(9, 288, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_j);
  __Pyx_GIVEREF(__pyx_v_j);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_j)) __PYX_ERR(9, 288, __pyx_L1_error);
  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (__pyx_t_5 >= 2) 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(9, 288, __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(9, 288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cython/core/symmetry_group.pyx":289
 *         order = self.order()
 *         for x in [i, j]:
 *             if not (0 <= x < order):             # <<<<<<<<<<<<<<
 *                 raise ValueError('The symmetry group has only %d '
 *                                  'elements.' % order)
 */
    __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_x, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 289, __pyx_L1_error)
    if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
      __Pyx_DECREF(__pyx_t_1);
      __pyx_t_1 = PyObject_RichCompare(__pyx_v_x, __pyx_v_order, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 289, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(9, 289, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = (!__pyx_t_6);
    if (unlikely(__pyx_t_7)) {

      /* "cython/core/symmetry_group.pyx":291
 *             if not (0 <= x < order):
 *                 raise ValueError('The symmetry group has only %d '
 *                                  'elements.' % order)             # <<<<<<<<<<<<<<
 * 
 *         return symmetry_group_product(self.c_symmetry_group, i, j)
 */
      __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_The_symmetry_group_has_only_d_el, __pyx_v_order); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 291, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cython/core/symmetry_group.pyx":290
 *         for x in [i, j]:
 *             if not (0 <= x < order):
 *                 raise ValueError('The symmetry group has only %d '             # <<<<<<<<<<<<<<
 *                                  'elements.' % order)
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 290, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(9, 290, __pyx_L1_error)

      /* "cython/core/symmetry_group.pyx":289
 *         order = self.order()
 *         for x in [i, j]:
 *             if not (0 <= x < order):             # <<<<<<<<<<<<<<
 *                 raise ValueError('The symmetry group has only %d '
 *                                  'elements.' % order)
 */
    }

    /* "cython/core/symmetry_group.pyx":288
 *         """
 *         order = self.order()
 *         for x in [i, j]:             # <<<<<<<<<<<<<<
 *             if not (0 <= x < order):
 *                 raise ValueError('The symmetry group has only %d '
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/symmetry_group.pyx":293
 *                                  'elements.' % order)
 * 
 *         return symmetry_group_product(self.c_symmetry_group, i, j)             # <<<<<<<<<<<<<<
 * 
 *     def isometries(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(9, 293, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_j); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(9, 293, __pyx_L1_error)
  __pyx_t_9 = symmetry_group_product(__pyx_v_self->c_symmetry_group, __pyx_t_4, __pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 293, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/symmetry_group.pyx":276
 *         return center.abelian_description()
 * 
 *     def multiply_elements(self, i, j):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the product of group elements i and j.  The convention
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.multiply_elements", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_order);
  __Pyx_XDECREF(__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":295
 *         return symmetry_group_product(self.c_symmetry_group, i, j)
 * 
 *     def isometries(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a detailed list of all the isometries in the symmetry group.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_39isometries(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_6SnapPy_13SymmetryGroup_38isometries, "SymmetryGroup.isometries(self)\n\n        Return a detailed list of all the isometries in the symmetry group.\n\n        >>> S = Manifold('s959').symmetry_group()\n        >>> isoms = S.isometries()\n        >>> isoms[8]\n        0 -> 1   1 -> 0\n        [-1 -1]  [ 0  1]\n        [ 1  0]  [-1 -1]\n        Does not extend to link\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_39isometries = {"isometries", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_39isometries, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_38isometries};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_39isometries(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("isometries (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("isometries", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "isometries", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_38isometries(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_38isometries(struct __pyx_obj_6SnapPy_SymmetryGroup *__pyx_v_self) {
  IsometryList *__pyx_v_isometries;
  PyObject *__pyx_v_ans = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  IsometryList *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("isometries", 1);

  /* "cython/core/symmetry_group.pyx":309
 *         cdef IsometryList *isometries
 * 
 *         isometries = get_symmetry_list(self.c_symmetry_group)             # <<<<<<<<<<<<<<
 *         ans = IsometryListToIsometries(isometries)
 *         return ans
 */
  __pyx_t_1 = get_symmetry_list(__pyx_v_self->c_symmetry_group); if (unlikely(PyErr_Occurred())) __PYX_ERR(9, 309, __pyx_L1_error)
  __pyx_v_isometries = __pyx_t_1;

  /* "cython/core/symmetry_group.pyx":310
 * 
 *         isometries = get_symmetry_list(self.c_symmetry_group)
 *         ans = IsometryListToIsometries(isometries)             # <<<<<<<<<<<<<<
 *         return ans
 */
  __pyx_t_2 = __pyx_f_6SnapPy_IsometryListToIsometries(__pyx_v_isometries); if (unlikely(!__pyx_t_2)) __PYX_ERR(9, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_ans = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/symmetry_group.pyx":311
 *         isometries = get_symmetry_list(self.c_symmetry_group)
 *         ans = IsometryListToIsometries(isometries)
 *         return ans             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ans);
  __pyx_r = __pyx_v_ans;
  goto __pyx_L0;

  /* "cython/core/symmetry_group.pyx":295
 *         return symmetry_group_product(self.c_symmetry_group, i, j)
 * 
 *     def isometries(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a detailed list of all the isometries in the symmetry group.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.SymmetryGroup.isometries", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ans);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/symmetry_group.pyx":13
 *     """
 *     cdef c_SymmetryGroup *c_symmetry_group
 *     cdef readonly _is_full_group             # <<<<<<<<<<<<<<
 *     cdef readonly _owns_c_symmetry_group
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_14_is_full_group_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_14_is_full_group_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_6SnapPy_13SymmetryGroup_14_is_full_group___get__(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

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

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

/* "cython/core/symmetry_group.pyx":14
 *     cdef c_SymmetryGroup *c_symmetry_group
 *     cdef readonly _is_full_group
 *     cdef readonly _owns_c_symmetry_group             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, is_full_group, owns_c_symmetry_group):
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_22_owns_c_symmetry_group_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_22_owns_c_symmetry_group_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_6SnapPy_13SymmetryGroup_22_owns_c_symmetry_group___get__(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

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

  /* function exit code */
  __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_6SnapPy_13SymmetryGroup_41__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_6SnapPy_13SymmetryGroup_40__reduce_cython__, "SymmetryGroup.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_41__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_41__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_40__reduce_cython__};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_41__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_6SnapPy_13SymmetryGroup_40__reduce_cython__(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_13SymmetryGroup_40__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6SnapPy_SymmetryGroup *__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(7, 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("SnapPy.SymmetryGroup.__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_6SnapPy_13SymmetryGroup_43__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_6SnapPy_13SymmetryGroup_42__setstate_cython__, "SymmetryGroup.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_6SnapPy_13SymmetryGroup_43__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_43__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_42__setstate_cython__};
static PyObject *__pyx_pw_6SnapPy_13SymmetryGroup_43__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(7, 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(7, 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(7, 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("SnapPy.SymmetryGroup.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13SymmetryGroup_42__setstate_cython__(((struct __pyx_obj_6SnapPy_SymmetryGroup *)__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_6SnapPy_13SymmetryGroup_42__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6SnapPy_SymmetryGroup *__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(7, 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("SnapPy.SymmetryGroup.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":3
 * # Dirichlet Domains
 * 
 * cdef (WEPolyhedron*, int) get_generators_from_bytes(data_bytes,             # <<<<<<<<<<<<<<
 *                                                     double vertex_epsilon,
 *                                                     displacement,
 */

static __pyx_ctuple_WEPolyhedron__ptr__and_int __pyx_f_6SnapPy_get_generators_from_bytes(PyObject *__pyx_v_data_bytes, double __pyx_v_vertex_epsilon, PyObject *__pyx_v_displacement, CYTHON_UNUSED PyObject *__pyx_v_centroid_at_origin, PyObject *__pyx_v_maximize_injectivity_radius, PyObject *__pyx_v_include_words) {
  int __pyx_v_num_gens;
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_v_nums = NULL;
  PyObject *__pyx_v_line = NULL;
  O31Matrix *__pyx_v_generators;
  MoebiusTransformation *__pyx_v_temp_gens;
  int __pyx_v_i;
  long __pyx_v_j;
  long __pyx_v_k;
  PyObject *__pyx_v_num_string = NULL;
  WEPolyhedron *__pyx_v_dirichlet_domain;
  double __pyx_v_c_displacement[3];
  long __pyx_v_n;
  __pyx_ctuple_WEPolyhedron__ptr__and_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;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  long __pyx_t_11;
  long __pyx_t_12;
  char *__pyx_t_13;
  Boolean __pyx_t_14;
  double __pyx_t_15;
  Boolean __pyx_t_16;
  WEPolyhedron *__pyx_t_17;
  __pyx_ctuple_WEPolyhedron__ptr__and_int __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_generators_from_bytes", 1);

  /* "cython/core/dirichlet.pyx":12
 *     cdef int num_gens
 * 
 *     data = data_bytes.split(b'\n')             # <<<<<<<<<<<<<<
 *     if data[0].strip() != b'% Generators':
 *         raise ValueError('The generator data does not start with '
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_bytes, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 12, __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, __pyx_kp_b_};
    __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(10, 12, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_data = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/dirichlet.pyx":13
 * 
 *     data = data_bytes.split(b'\n')
 *     if data[0].strip() != b'% Generators':             # <<<<<<<<<<<<<<
 *         raise ValueError('The generator data does not start with '
 *                          '"% Generators"')
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_data, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 13, __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 (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(10, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_5 = (__Pyx_PyBytes_Equals(__pyx_t_1, __pyx_kp_b_Generators, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(10, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_5)) {

    /* "cython/core/dirichlet.pyx":14
 *     data = data_bytes.split(b'\n')
 *     if data[0].strip() != b'% Generators':
 *         raise ValueError('The generator data does not start with '             # <<<<<<<<<<<<<<
 *                          '"% Generators"')
 *     nums = []
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__127, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 14, __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(10, 14, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":13
 * 
 *     data = data_bytes.split(b'\n')
 *     if data[0].strip() != b'% Generators':             # <<<<<<<<<<<<<<
 *         raise ValueError('The generator data does not start with '
 *                          '"% Generators"')
 */
  }

  /* "cython/core/dirichlet.pyx":16
 *         raise ValueError('The generator data does not start with '
 *                          '"% Generators"')
 *     nums = []             # <<<<<<<<<<<<<<
 *     for line in data[1:]:
 *         nums += line.split()
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_nums = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/dirichlet.pyx":17
 *                          '"% Generators"')
 *     nums = []
 *     for line in data[1:]:             # <<<<<<<<<<<<<<
 *         nums += line.split()
 *     num_gens = int(nums[0])
 */
  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_data, 1, 0, NULL, NULL, &__pyx_slice__128, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_3 = __pyx_t_1; __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_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 17, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 17, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 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(10, 17, __pyx_L1_error)
          #endif
          if (__pyx_t_6 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(10, 17, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 17, __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(10, 17, __pyx_L1_error)
          #endif
          if (__pyx_t_6 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(10, 17, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 17, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_7(__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(10, 17, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":18
 *     nums = []
 *     for line in data[1:]:
 *         nums += line.split()             # <<<<<<<<<<<<<<
 *     num_gens = int(nums[0])
 *     nums.pop(0)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 18, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 18, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_nums, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 18, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_nums, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/dirichlet.pyx":17
 *                          '"% Generators"')
 *     nums = []
 *     for line in data[1:]:             # <<<<<<<<<<<<<<
 *         nums += line.split()
 *     num_gens = int(nums[0])
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/dirichlet.pyx":19
 *     for line in data[1:]:
 *         nums += line.split()
 *     num_gens = int(nums[0])             # <<<<<<<<<<<<<<
 *     nums.pop(0)
 * 
 */
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_nums, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(10, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_num_gens = __pyx_t_4;

  /* "cython/core/dirichlet.pyx":20
 *         nums += line.split()
 *     num_gens = int(nums[0])
 *     nums.pop(0)             # <<<<<<<<<<<<<<
 * 
 *     cdef O31Matrix *generators
 */
  __pyx_t_2 = __Pyx_PyObject_PopIndex(__pyx_v_nums, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/dirichlet.pyx":24
 *     cdef O31Matrix *generators
 *     cdef MoebiusTransformation *temp_gens
 *     if len(nums) == 16 * num_gens:             # <<<<<<<<<<<<<<
 *         generators = <O31Matrix *>malloc(num_gens*sizeof(O31Matrix))
 *         for i in range(num_gens):
 */
  __pyx_t_6 = PyObject_Length(__pyx_v_nums); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(10, 24, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_6 == (16 * __pyx_v_num_gens));
  if (__pyx_t_5) {

    /* "cython/core/dirichlet.pyx":25
 *     cdef MoebiusTransformation *temp_gens
 *     if len(nums) == 16 * num_gens:
 *         generators = <O31Matrix *>malloc(num_gens*sizeof(O31Matrix))             # <<<<<<<<<<<<<<
 *         for i in range(num_gens):
 *             for j in range(4):
 */
    __pyx_v_generators = ((O31Matrix *)malloc((__pyx_v_num_gens * (sizeof(O31Matrix)))));

    /* "cython/core/dirichlet.pyx":26
 *     if len(nums) == 16 * num_gens:
 *         generators = <O31Matrix *>malloc(num_gens*sizeof(O31Matrix))
 *         for i in range(num_gens):             # <<<<<<<<<<<<<<
 *             for j in range(4):
 *                 for k in range(4):
 */
    __pyx_t_4 = __pyx_v_num_gens;
    __pyx_t_9 = __pyx_t_4;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "cython/core/dirichlet.pyx":27
 *         generators = <O31Matrix *>malloc(num_gens*sizeof(O31Matrix))
 *         for i in range(num_gens):
 *             for j in range(4):             # <<<<<<<<<<<<<<
 *                 for k in range(4):
 *                     num_string = nums.pop(0)  # save a reference
 */
      for (__pyx_t_11 = 0; __pyx_t_11 < 4; __pyx_t_11+=1) {
        __pyx_v_j = __pyx_t_11;

        /* "cython/core/dirichlet.pyx":28
 *         for i in range(num_gens):
 *             for j in range(4):
 *                 for k in range(4):             # <<<<<<<<<<<<<<
 *                     num_string = nums.pop(0)  # save a reference
 *                     generators[i][j][k] = <Real_struct>Real_from_string(
 */
        for (__pyx_t_12 = 0; __pyx_t_12 < 4; __pyx_t_12+=1) {
          __pyx_v_k = __pyx_t_12;

          /* "cython/core/dirichlet.pyx":29
 *             for j in range(4):
 *                 for k in range(4):
 *                     num_string = nums.pop(0)  # save a reference             # <<<<<<<<<<<<<<
 *                     generators[i][j][k] = <Real_struct>Real_from_string(
 *                         <char*>num_string)
 */
          __pyx_t_2 = __Pyx_PyObject_PopIndex(__pyx_v_nums, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 29, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_XDECREF_SET(__pyx_v_num_string, __pyx_t_2);
          __pyx_t_2 = 0;

          /* "cython/core/dirichlet.pyx":31
 *                     num_string = nums.pop(0)  # save a reference
 *                     generators[i][j][k] = <Real_struct>Real_from_string(
 *                         <char*>num_string)             # <<<<<<<<<<<<<<
 *     elif len(nums) == 8*num_gens:
 *         temp_gens = <MoebiusTransformation *>malloc(
 */
          __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_num_string); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(10, 31, __pyx_L1_error)

          /* "cython/core/dirichlet.pyx":30
 *                 for k in range(4):
 *                     num_string = nums.pop(0)  # save a reference
 *                     generators[i][j][k] = <Real_struct>Real_from_string(             # <<<<<<<<<<<<<<
 *                         <char*>num_string)
 *     elif len(nums) == 8*num_gens:
 */
          (((__pyx_v_generators[__pyx_v_i])[__pyx_v_j])[__pyx_v_k]) = Real_from_string(((char *)__pyx_t_13));
        }
      }
    }

    /* "cython/core/dirichlet.pyx":24
 *     cdef O31Matrix *generators
 *     cdef MoebiusTransformation *temp_gens
 *     if len(nums) == 16 * num_gens:             # <<<<<<<<<<<<<<
 *         generators = <O31Matrix *>malloc(num_gens*sizeof(O31Matrix))
 *         for i in range(num_gens):
 */
    goto __pyx_L7;
  }

  /* "cython/core/dirichlet.pyx":32
 *                     generators[i][j][k] = <Real_struct>Real_from_string(
 *                         <char*>num_string)
 *     elif len(nums) == 8*num_gens:             # <<<<<<<<<<<<<<
 *         temp_gens = <MoebiusTransformation *>malloc(
 *             num_gens*sizeof(MoebiusTransformation))
 */
  __pyx_t_6 = PyObject_Length(__pyx_v_nums); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(10, 32, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_6 == (8 * __pyx_v_num_gens));
  if (likely(__pyx_t_5)) {

    /* "cython/core/dirichlet.pyx":33
 *                         <char*>num_string)
 *     elif len(nums) == 8*num_gens:
 *         temp_gens = <MoebiusTransformation *>malloc(             # <<<<<<<<<<<<<<
 *             num_gens*sizeof(MoebiusTransformation))
 *         generators = <O31Matrix *>malloc(num_gens*sizeof(O31Matrix))
 */
    __pyx_v_temp_gens = ((MoebiusTransformation *)malloc((__pyx_v_num_gens * (sizeof(MoebiusTransformation)))));

    /* "cython/core/dirichlet.pyx":35
 *         temp_gens = <MoebiusTransformation *>malloc(
 *             num_gens*sizeof(MoebiusTransformation))
 *         generators = <O31Matrix *>malloc(num_gens*sizeof(O31Matrix))             # <<<<<<<<<<<<<<
 *         for i in range(num_gens):
 *             temp_gens[i].parity = orientation_preserving
 */
    __pyx_v_generators = ((O31Matrix *)malloc((__pyx_v_num_gens * (sizeof(O31Matrix)))));

    /* "cython/core/dirichlet.pyx":36
 *             num_gens*sizeof(MoebiusTransformation))
 *         generators = <O31Matrix *>malloc(num_gens*sizeof(O31Matrix))
 *         for i in range(num_gens):             # <<<<<<<<<<<<<<
 *             temp_gens[i].parity = orientation_preserving
 *             for j in range(2):
 */
    __pyx_t_4 = __pyx_v_num_gens;
    __pyx_t_9 = __pyx_t_4;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "cython/core/dirichlet.pyx":37
 *         generators = <O31Matrix *>malloc(num_gens*sizeof(O31Matrix))
 *         for i in range(num_gens):
 *             temp_gens[i].parity = orientation_preserving             # <<<<<<<<<<<<<<
 *             for j in range(2):
 *                 for k in range(2):
 */
      (__pyx_v_temp_gens[__pyx_v_i]).parity = orientation_preserving;

      /* "cython/core/dirichlet.pyx":38
 *         for i in range(num_gens):
 *             temp_gens[i].parity = orientation_preserving
 *             for j in range(2):             # <<<<<<<<<<<<<<
 *                 for k in range(2):
 *                     num_string = nums.pop(0)  # save a reference
 */
      for (__pyx_t_11 = 0; __pyx_t_11 < 2; __pyx_t_11+=1) {
        __pyx_v_j = __pyx_t_11;

        /* "cython/core/dirichlet.pyx":39
 *             temp_gens[i].parity = orientation_preserving
 *             for j in range(2):
 *                 for k in range(2):             # <<<<<<<<<<<<<<
 *                     num_string = nums.pop(0)  # save a reference
 *                     temp_gens[i].matrix[j][k].real = Real_from_string(
 */
        for (__pyx_t_12 = 0; __pyx_t_12 < 2; __pyx_t_12+=1) {
          __pyx_v_k = __pyx_t_12;

          /* "cython/core/dirichlet.pyx":40
 *             for j in range(2):
 *                 for k in range(2):
 *                     num_string = nums.pop(0)  # save a reference             # <<<<<<<<<<<<<<
 *                     temp_gens[i].matrix[j][k].real = Real_from_string(
 *                         <char*>num_string)
 */
          __pyx_t_2 = __Pyx_PyObject_PopIndex(__pyx_v_nums, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 40, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_XDECREF_SET(__pyx_v_num_string, __pyx_t_2);
          __pyx_t_2 = 0;

          /* "cython/core/dirichlet.pyx":42
 *                     num_string = nums.pop(0)  # save a reference
 *                     temp_gens[i].matrix[j][k].real = Real_from_string(
 *                         <char*>num_string)             # <<<<<<<<<<<<<<
 *                     num_string = nums.pop(0)  # save a reference
 *                     temp_gens[i].matrix[j][k].imag = Real_from_string(
 */
          __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_num_string); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(10, 42, __pyx_L1_error)

          /* "cython/core/dirichlet.pyx":41
 *                 for k in range(2):
 *                     num_string = nums.pop(0)  # save a reference
 *                     temp_gens[i].matrix[j][k].real = Real_from_string(             # <<<<<<<<<<<<<<
 *                         <char*>num_string)
 *                     num_string = nums.pop(0)  # save a reference
 */
          (((__pyx_v_temp_gens[__pyx_v_i]).matrix[__pyx_v_j])[__pyx_v_k]).real = Real_from_string(((char *)__pyx_t_13));

          /* "cython/core/dirichlet.pyx":43
 *                     temp_gens[i].matrix[j][k].real = Real_from_string(
 *                         <char*>num_string)
 *                     num_string = nums.pop(0)  # save a reference             # <<<<<<<<<<<<<<
 *                     temp_gens[i].matrix[j][k].imag = Real_from_string(
 *                         <char*>num_string)
 */
          __pyx_t_2 = __Pyx_PyObject_PopIndex(__pyx_v_nums, __pyx_int_0, 0, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 43, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF_SET(__pyx_v_num_string, __pyx_t_2);
          __pyx_t_2 = 0;

          /* "cython/core/dirichlet.pyx":45
 *                     num_string = nums.pop(0)  # save a reference
 *                     temp_gens[i].matrix[j][k].imag = Real_from_string(
 *                         <char*>num_string)             # <<<<<<<<<<<<<<
 *         Moebius_array_to_O31_array(temp_gens, generators, num_gens)
 *         free(temp_gens)
 */
          __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_num_string); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(10, 45, __pyx_L1_error)

          /* "cython/core/dirichlet.pyx":44
 *                         <char*>num_string)
 *                     num_string = nums.pop(0)  # save a reference
 *                     temp_gens[i].matrix[j][k].imag = Real_from_string(             # <<<<<<<<<<<<<<
 *                         <char*>num_string)
 *         Moebius_array_to_O31_array(temp_gens, generators, num_gens)
 */
          (((__pyx_v_temp_gens[__pyx_v_i]).matrix[__pyx_v_j])[__pyx_v_k]).imag = Real_from_string(((char *)__pyx_t_13));
        }
      }
    }

    /* "cython/core/dirichlet.pyx":46
 *                     temp_gens[i].matrix[j][k].imag = Real_from_string(
 *                         <char*>num_string)
 *         Moebius_array_to_O31_array(temp_gens, generators, num_gens)             # <<<<<<<<<<<<<<
 *         free(temp_gens)
 *     else:
 */
    Moebius_array_to_O31_array(__pyx_v_temp_gens, __pyx_v_generators, __pyx_v_num_gens); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 46, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":47
 *                         <char*>num_string)
 *         Moebius_array_to_O31_array(temp_gens, generators, num_gens)
 *         free(temp_gens)             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError('The amount of data given is not consistent '
 */
    free(__pyx_v_temp_gens);

    /* "cython/core/dirichlet.pyx":32
 *                     generators[i][j][k] = <Real_struct>Real_from_string(
 *                         <char*>num_string)
 *     elif len(nums) == 8*num_gens:             # <<<<<<<<<<<<<<
 *         temp_gens = <MoebiusTransformation *>malloc(
 *             num_gens*sizeof(MoebiusTransformation))
 */
    goto __pyx_L7;
  }

  /* "cython/core/dirichlet.pyx":49
 *         free(temp_gens)
 *     else:
 *         raise ValueError('The amount of data given is not consistent '             # <<<<<<<<<<<<<<
 *                          'with %d O31 or SL2C matrices.' % num_gens)
 * 
 */
  /*else*/ {

    /* "cython/core/dirichlet.pyx":50
 *     else:
 *         raise ValueError('The amount of data given is not consistent '
 *                          'with %d O31 or SL2C matrices.' % num_gens)             # <<<<<<<<<<<<<<
 * 
 *     if not O31_determinants_OK(generators, num_gens, det_error_epsilon):
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_num_gens); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_The_amount_of_data_given_is_not, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 50, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/dirichlet.pyx":49
 *         free(temp_gens)
 *     else:
 *         raise ValueError('The amount of data given is not consistent '             # <<<<<<<<<<<<<<
 *                          'with %d O31 or SL2C matrices.' % num_gens)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 49, __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(10, 49, __pyx_L1_error)
  }
  __pyx_L7:;

  /* "cython/core/dirichlet.pyx":52
 *                          'with %d O31 or SL2C matrices.' % num_gens)
 * 
 *     if not O31_determinants_OK(generators, num_gens, det_error_epsilon):             # <<<<<<<<<<<<<<
 *         raise ValueError('The data given do not have the '
 *                          'right determinants.')
 */
  __pyx_t_14 = O31_determinants_OK(__pyx_v_generators, __pyx_v_num_gens, det_error_epsilon); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 52, __pyx_L1_error)
  __pyx_t_5 = (!(__pyx_t_14 != 0));
  if (unlikely(__pyx_t_5)) {

    /* "cython/core/dirichlet.pyx":53
 * 
 *     if not O31_determinants_OK(generators, num_gens, det_error_epsilon):
 *         raise ValueError('The data given do not have the '             # <<<<<<<<<<<<<<
 *                          'right determinants.')
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__129, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 53, __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(10, 53, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":52
 *                          'with %d O31 or SL2C matrices.' % num_gens)
 * 
 *     if not O31_determinants_OK(generators, num_gens, det_error_epsilon):             # <<<<<<<<<<<<<<
 *         raise ValueError('The data given do not have the '
 *                          'right determinants.')
 */
  }

  /* "cython/core/dirichlet.pyx":58
 *     cdef WEPolyhedron *dirichlet_domain
 *     cdef double c_displacement[3]
 *     for n from 0 <= n < 3:             # <<<<<<<<<<<<<<
 *         c_displacement[n] = <double>displacement[n]
 *     dirichlet_domain = Dirichlet_from_generators_with_displacement(
 */
  for (__pyx_v_n = 0; __pyx_v_n < 3; __pyx_v_n++) {

    /* "cython/core/dirichlet.pyx":59
 *     cdef double c_displacement[3]
 *     for n from 0 <= n < 3:
 *         c_displacement[n] = <double>displacement[n]             # <<<<<<<<<<<<<<
 *     dirichlet_domain = Dirichlet_from_generators_with_displacement(
 *         generators, num_gens, c_displacement, vertex_epsilon,
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_displacement, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 59, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) __PYX_ERR(10, 59, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    (__pyx_v_c_displacement[__pyx_v_n]) = ((double)__pyx_t_15);
  }

  /* "cython/core/dirichlet.pyx":62
 *     dirichlet_domain = Dirichlet_from_generators_with_displacement(
 *         generators, num_gens, c_displacement, vertex_epsilon,
 *         Dirichlet_keep_going, maximize_injectivity_radius,             # <<<<<<<<<<<<<<
 *         include_words)
 *     free(generators)
 */
  __pyx_t_14 = __Pyx_PyInt_As_Boolean(__pyx_v_maximize_injectivity_radius); if (unlikely((__pyx_t_14 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(10, 62, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":63
 *         generators, num_gens, c_displacement, vertex_epsilon,
 *         Dirichlet_keep_going, maximize_injectivity_radius,
 *         include_words)             # <<<<<<<<<<<<<<
 *     free(generators)
 *     return dirichlet_domain, num_gens
 */
  __pyx_t_16 = __Pyx_PyInt_As_Boolean(__pyx_v_include_words); if (unlikely((__pyx_t_16 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(10, 63, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":60
 *     for n from 0 <= n < 3:
 *         c_displacement[n] = <double>displacement[n]
 *     dirichlet_domain = Dirichlet_from_generators_with_displacement(             # <<<<<<<<<<<<<<
 *         generators, num_gens, c_displacement, vertex_epsilon,
 *         Dirichlet_keep_going, maximize_injectivity_radius,
 */
  __pyx_t_17 = Dirichlet_from_generators_with_displacement(__pyx_v_generators, __pyx_v_num_gens, __pyx_v_c_displacement, __pyx_v_vertex_epsilon, Dirichlet_keep_going, __pyx_t_14, __pyx_t_16); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 60, __pyx_L1_error)
  __pyx_v_dirichlet_domain = __pyx_t_17;

  /* "cython/core/dirichlet.pyx":64
 *         Dirichlet_keep_going, maximize_injectivity_radius,
 *         include_words)
 *     free(generators)             # <<<<<<<<<<<<<<
 *     return dirichlet_domain, num_gens
 * 
 */
  free(__pyx_v_generators);

  /* "cython/core/dirichlet.pyx":65
 *         include_words)
 *     free(generators)
 *     return dirichlet_domain, num_gens             # <<<<<<<<<<<<<<
 * 
 * cdef WEPolyhedron* dirichlet_from_O31_matrix_list(matrices,
 */
  __pyx_t_18.f0 = __pyx_v_dirichlet_domain;
  __pyx_t_18.f1 = __pyx_v_num_gens;
  __pyx_r = __pyx_t_18;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":3
 * # Dirichlet Domains
 * 
 * cdef (WEPolyhedron*, int) get_generators_from_bytes(data_bytes,             # <<<<<<<<<<<<<<
 *                                                     double vertex_epsilon,
 *                                                     displacement,
 */

  /* 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_AddTraceback("SnapPy.get_generators_from_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XDECREF(__pyx_v_nums);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_num_string);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":67
 *     return dirichlet_domain, num_gens
 * 
 * cdef WEPolyhedron* dirichlet_from_O31_matrix_list(matrices,             # <<<<<<<<<<<<<<
 *                                                   double vertex_epsilon,
 *                                                   displacement,
 */

static WEPolyhedron *__pyx_f_6SnapPy_dirichlet_from_O31_matrix_list(PyObject *__pyx_v_matrices, double __pyx_v_vertex_epsilon, PyObject *__pyx_v_displacement, CYTHON_UNUSED PyObject *__pyx_v_centroid_at_origin, PyObject *__pyx_v_maximize_injectivity_radius, PyObject *__pyx_v_include_words) {
  WEPolyhedron *__pyx_v_c_dirichlet_domain;
  O31Matrix *__pyx_v_generators;
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_k;
  int __pyx_v_num_gens;
  PyObject *__pyx_v_A = NULL;
  double __pyx_v_c_displacement[3];
  long __pyx_v_n;
  WEPolyhedron *__pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  __pyx_t_6SnapPy_Real __pyx_t_10;
  Boolean __pyx_t_11;
  int __pyx_t_12;
  double __pyx_t_13;
  Boolean __pyx_t_14;
  WEPolyhedron *__pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dirichlet_from_O31_matrix_list", 1);

  /* "cython/core/dirichlet.pyx":77
 *     cdef O31Matrix* generators
 *     cdef int i, j, k, num_gens
 *     num_gens = <int>len(matrices)             # <<<<<<<<<<<<<<
 *     generators = <O31Matrix*>malloc(num_gens*sizeof(O31Matrix))
 *     for i, A in enumerate(matrices):
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_matrices); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(10, 77, __pyx_L1_error)
  __pyx_v_num_gens = ((int)__pyx_t_1);

  /* "cython/core/dirichlet.pyx":78
 *     cdef int i, j, k, num_gens
 *     num_gens = <int>len(matrices)
 *     generators = <O31Matrix*>malloc(num_gens*sizeof(O31Matrix))             # <<<<<<<<<<<<<<
 *     for i, A in enumerate(matrices):
 *         for j in range(4):
 */
  __pyx_v_generators = ((O31Matrix *)malloc((__pyx_v_num_gens * (sizeof(O31Matrix)))));

  /* "cython/core/dirichlet.pyx":79
 *     num_gens = <int>len(matrices)
 *     generators = <O31Matrix*>malloc(num_gens*sizeof(O31Matrix))
 *     for i, A in enumerate(matrices):             # <<<<<<<<<<<<<<
 *         for j in range(4):
 *             for k in range(4):
 */
  __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_v_matrices)) || PyTuple_CheckExact(__pyx_v_matrices)) {
    __pyx_t_3 = __pyx_v_matrices; __Pyx_INCREF(__pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_matrices); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 79, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 79, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_4)) {
      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(10, 79, __pyx_L1_error)
          #endif
          if (__pyx_t_1 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(10, 79, __pyx_L1_error)
        #else
        __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 79, __pyx_L1_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(10, 79, __pyx_L1_error)
          #endif
          if (__pyx_t_1 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(10, 79, __pyx_L1_error)
        #else
        __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 79, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
      }
    } else {
      __pyx_t_5 = __pyx_t_4(__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(10, 79, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_5);
    }
    __Pyx_XDECREF_SET(__pyx_v_A, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_v_i = __pyx_t_2;
    __pyx_t_2 = (__pyx_t_2 + 1);

    /* "cython/core/dirichlet.pyx":80
 *     generators = <O31Matrix*>malloc(num_gens*sizeof(O31Matrix))
 *     for i, A in enumerate(matrices):
 *         for j in range(4):             # <<<<<<<<<<<<<<
 *             for k in range(4):
 *                 generators[i][j][k] = <Real_struct>Object2Real(A[j,k])
 */
    for (__pyx_t_6 = 0; __pyx_t_6 < 4; __pyx_t_6+=1) {
      __pyx_v_j = __pyx_t_6;

      /* "cython/core/dirichlet.pyx":81
 *     for i, A in enumerate(matrices):
 *         for j in range(4):
 *             for k in range(4):             # <<<<<<<<<<<<<<
 *                 generators[i][j][k] = <Real_struct>Object2Real(A[j,k])
 *     if not O31_determinants_OK(generators, num_gens, det_error_epsilon):
 */
      for (__pyx_t_7 = 0; __pyx_t_7 < 4; __pyx_t_7+=1) {
        __pyx_v_k = __pyx_t_7;

        /* "cython/core/dirichlet.pyx":82
 *         for j in range(4):
 *             for k in range(4):
 *                 generators[i][j][k] = <Real_struct>Object2Real(A[j,k])             # <<<<<<<<<<<<<<
 *     if not O31_determinants_OK(generators, num_gens, det_error_epsilon):
 *         raise ValueError('The data given do not have the '
 */
        __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 82, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 82, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 82, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_GIVEREF(__pyx_t_5);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5)) __PYX_ERR(10, 82, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_8);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8)) __PYX_ERR(10, 82, __pyx_L1_error);
        __pyx_t_5 = 0;
        __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_A, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 82, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_10 = __pyx_f_6SnapPy_Object2Real(__pyx_t_8); if (unlikely(__pyx_t_10 == ((__pyx_t_6SnapPy_Real)-1) && PyErr_Occurred())) __PYX_ERR(10, 82, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        (((__pyx_v_generators[__pyx_v_i])[__pyx_v_j])[__pyx_v_k]) = __pyx_t_10;
      }
    }

    /* "cython/core/dirichlet.pyx":79
 *     num_gens = <int>len(matrices)
 *     generators = <O31Matrix*>malloc(num_gens*sizeof(O31Matrix))
 *     for i, A in enumerate(matrices):             # <<<<<<<<<<<<<<
 *         for j in range(4):
 *             for k in range(4):
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/dirichlet.pyx":83
 *             for k in range(4):
 *                 generators[i][j][k] = <Real_struct>Object2Real(A[j,k])
 *     if not O31_determinants_OK(generators, num_gens, det_error_epsilon):             # <<<<<<<<<<<<<<
 *         raise ValueError('The data given do not have the '
 *                          'right determinants.')
 */
  __pyx_t_11 = O31_determinants_OK(__pyx_v_generators, __pyx_v_num_gens, det_error_epsilon); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 83, __pyx_L1_error)
  __pyx_t_12 = (!(__pyx_t_11 != 0));
  if (unlikely(__pyx_t_12)) {

    /* "cython/core/dirichlet.pyx":84
 *                 generators[i][j][k] = <Real_struct>Object2Real(A[j,k])
 *     if not O31_determinants_OK(generators, num_gens, det_error_epsilon):
 *         raise ValueError('The data given do not have the '             # <<<<<<<<<<<<<<
 *                          'right determinants.')
 *     cdef double c_displacement[3]
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__129, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 84, __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(10, 84, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":83
 *             for k in range(4):
 *                 generators[i][j][k] = <Real_struct>Object2Real(A[j,k])
 *     if not O31_determinants_OK(generators, num_gens, det_error_epsilon):             # <<<<<<<<<<<<<<
 *         raise ValueError('The data given do not have the '
 *                          'right determinants.')
 */
  }

  /* "cython/core/dirichlet.pyx":87
 *                          'right determinants.')
 *     cdef double c_displacement[3]
 *     for n from 0 <= n < 3:             # <<<<<<<<<<<<<<
 *         c_displacement[n] = <double>displacement[n]
 *     c_dirichlet_domain = Dirichlet_from_generators_with_displacement(
 */
  for (__pyx_v_n = 0; __pyx_v_n < 3; __pyx_v_n++) {

    /* "cython/core/dirichlet.pyx":88
 *     cdef double c_displacement[3]
 *     for n from 0 <= n < 3:
 *         c_displacement[n] = <double>displacement[n]             # <<<<<<<<<<<<<<
 *     c_dirichlet_domain = Dirichlet_from_generators_with_displacement(
 *         generators, num_gens, c_displacement, vertex_epsilon,
 */
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_displacement, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 88, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(10, 88, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_c_displacement[__pyx_v_n]) = ((double)__pyx_t_13);
  }

  /* "cython/core/dirichlet.pyx":91
 *     c_dirichlet_domain = Dirichlet_from_generators_with_displacement(
 *         generators, num_gens, c_displacement, vertex_epsilon,
 *         Dirichlet_keep_going, maximize_injectivity_radius,             # <<<<<<<<<<<<<<
 *         include_words)
 *     free(generators)
 */
  __pyx_t_11 = __Pyx_PyInt_As_Boolean(__pyx_v_maximize_injectivity_radius); if (unlikely((__pyx_t_11 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(10, 91, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":92
 *         generators, num_gens, c_displacement, vertex_epsilon,
 *         Dirichlet_keep_going, maximize_injectivity_radius,
 *         include_words)             # <<<<<<<<<<<<<<
 *     free(generators)
 *     return c_dirichlet_domain
 */
  __pyx_t_14 = __Pyx_PyInt_As_Boolean(__pyx_v_include_words); if (unlikely((__pyx_t_14 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(10, 92, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":89
 *     for n from 0 <= n < 3:
 *         c_displacement[n] = <double>displacement[n]
 *     c_dirichlet_domain = Dirichlet_from_generators_with_displacement(             # <<<<<<<<<<<<<<
 *         generators, num_gens, c_displacement, vertex_epsilon,
 *         Dirichlet_keep_going, maximize_injectivity_radius,
 */
  __pyx_t_15 = Dirichlet_from_generators_with_displacement(__pyx_v_generators, __pyx_v_num_gens, __pyx_v_c_displacement, __pyx_v_vertex_epsilon, Dirichlet_keep_going, __pyx_t_11, __pyx_t_14); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 89, __pyx_L1_error)
  __pyx_v_c_dirichlet_domain = __pyx_t_15;

  /* "cython/core/dirichlet.pyx":93
 *         Dirichlet_keep_going, maximize_injectivity_radius,
 *         include_words)
 *     free(generators)             # <<<<<<<<<<<<<<
 *     return c_dirichlet_domain
 * 
 */
  free(__pyx_v_generators);

  /* "cython/core/dirichlet.pyx":94
 *         include_words)
 *     free(generators)
 *     return c_dirichlet_domain             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_c_dirichlet_domain;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":67
 *     return dirichlet_domain, num_gens
 * 
 * cdef WEPolyhedron* dirichlet_from_O31_matrix_list(matrices,             # <<<<<<<<<<<<<<
 *                                                   double vertex_epsilon,
 *                                                   displacement,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("SnapPy.dirichlet_from_O31_matrix_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_A);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":102
 *     cdef int c_num_generators
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _number_(n):
 *         return number.number_to_native_number(n)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_1_number_(CYTHON_UNUSED PyObject *__pyx_self, 
#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_6SnapPy_16CDirichletDomain__number_, "CDirichletDomain._number_(n)");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_1_number_ = {"_number_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_1_number_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain__number_};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_1_number_(CYTHON_UNUSED PyObject *__pyx_self, 
#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_n = 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("_number_ (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_n,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_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 102, __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, "_number_") < 0)) __PYX_ERR(10, 102, __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_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_number_", 1, 1, 1, __pyx_nargs); __PYX_ERR(10, 102, __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("SnapPy.CDirichletDomain._number_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain__number_(__pyx_v_n);

  /* 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_6SnapPy_16CDirichletDomain__number_(PyObject *__pyx_v_n) {
  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("_number_", 1);

  /* "cython/core/dirichlet.pyx":104
 *     @staticmethod
 *     def _number_(n):
 *         return number.number_to_native_number(n)             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self,
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_number_to_native_number); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 104, __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_v_n};
    __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(10, 104, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":102
 *     cdef int c_num_generators
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _number_(n):
 *         return number.number_to_native_number(n)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain._number_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":106
 *         return number.number_to_native_number(n)
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   Manifold manifold=None,
 *                   vertex_epsilon=default_vertex_epsilon,
 */

/* Python wrapper */
static int __pyx_pw_6SnapPy_16CDirichletDomain_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6SnapPy_16CDirichletDomain_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_6SnapPy_Manifold *__pyx_v_manifold = 0;
  PyObject *__pyx_v_vertex_epsilon = 0;
  PyObject *__pyx_v_displacement = 0;
  PyObject *__pyx_v_centroid_at_origin = 0;
  PyObject *__pyx_v_maximize_injectivity_radius = 0;
  PyObject *__pyx_v_include_words = 0;
  PyObject *__pyx_v_generator_file = 0;
  PyObject *__pyx_v_generator_bytes = 0;
  PyObject *__pyx_v_O31_generators = 0;
  PyObject *__pyx_v_manifold_name = 0;
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  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_manifold,&__pyx_n_s_vertex_epsilon,&__pyx_n_s_displacement,&__pyx_n_s_centroid_at_origin,&__pyx_n_s_maximize_injectivity_radius,&__pyx_n_s_include_words,&__pyx_n_s_generator_file,&__pyx_n_s_generator_bytes,&__pyx_n_s_O31_generators,&__pyx_n_s_manifold_name,0};

    /* "cython/core/dirichlet.pyx":107
 * 
 *     def __cinit__(self,
 *                   Manifold manifold=None,             # <<<<<<<<<<<<<<
 *                   vertex_epsilon=default_vertex_epsilon,
 *                   displacement=None,
 */
    values[0] = __Pyx_Arg_NewRef_VARARGS((PyObject *)((struct __pyx_obj_6SnapPy_Manifold *)Py_None));
    values[1] = __Pyx_Arg_NewRef_VARARGS(__pyx_k__130);

    /* "cython/core/dirichlet.pyx":109
 *                   Manifold manifold=None,
 *                   vertex_epsilon=default_vertex_epsilon,
 *                   displacement=None,             # <<<<<<<<<<<<<<
 *                   centroid_at_origin=True,
 *                   maximize_injectivity_radius=True,
 */
    values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));

    /* "cython/core/dirichlet.pyx":110
 *                   vertex_epsilon=default_vertex_epsilon,
 *                   displacement=None,
 *                   centroid_at_origin=True,             # <<<<<<<<<<<<<<
 *                   maximize_injectivity_radius=True,
 *                   include_words = False,
 */
    values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));

    /* "cython/core/dirichlet.pyx":111
 *                   displacement=None,
 *                   centroid_at_origin=True,
 *                   maximize_injectivity_radius=True,             # <<<<<<<<<<<<<<
 *                   include_words = False,
 *                   str generator_file='',
 */
    values[4] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_True));

    /* "cython/core/dirichlet.pyx":112
 *                   centroid_at_origin=True,
 *                   maximize_injectivity_radius=True,
 *                   include_words = False,             # <<<<<<<<<<<<<<
 *                   str generator_file='',
 *                   bytes generator_bytes=b'',
 */
    values[5] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_False));
    values[6] = __Pyx_Arg_NewRef_VARARGS(((PyObject*)__pyx_kp_s__9));
    values[7] = __Pyx_Arg_NewRef_VARARGS(((PyObject*)__pyx_kp_b__9));

    /* "cython/core/dirichlet.pyx":115
 *                   str generator_file='',
 *                   bytes generator_bytes=b'',
 *                   O31_generators=None,             # <<<<<<<<<<<<<<
 *                   str manifold_name='unnamed'):
 *         cdef double c_displacement[3]
 */
    values[8] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
    values[9] = __Pyx_Arg_NewRef_VARARGS(((PyObject*)__pyx_n_s_unnamed));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case 10: values[9] = __Pyx_Arg_VARARGS(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = __Pyx_Arg_VARARGS(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_manifold);
          if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 106, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_vertex_epsilon);
          if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 106, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_displacement);
          if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 106, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_centroid_at_origin);
          if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 106, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_maximize_injectivity_radius);
          if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 106, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_include_words);
          if (value) { values[5] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 106, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_generator_file);
          if (value) { values[6] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 106, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_generator_bytes);
          if (value) { values[7] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 106, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_O31_generators);
          if (value) { values[8] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 106, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  9:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_manifold_name);
          if (value) { values[9] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 106, __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(10, 106, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case 10: values[9] = __Pyx_Arg_VARARGS(__pyx_args, 9);
        CYTHON_FALLTHROUGH;
        case  9: values[8] = __Pyx_Arg_VARARGS(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = __Pyx_Arg_VARARGS(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = __Pyx_Arg_VARARGS(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        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;
      }
    }
    __pyx_v_manifold = ((struct __pyx_obj_6SnapPy_Manifold *)values[0]);
    __pyx_v_vertex_epsilon = values[1];
    __pyx_v_displacement = values[2];
    __pyx_v_centroid_at_origin = values[3];
    __pyx_v_maximize_injectivity_radius = values[4];
    __pyx_v_include_words = values[5];
    __pyx_v_generator_file = ((PyObject*)values[6]);
    __pyx_v_generator_bytes = ((PyObject*)values[7]);
    __pyx_v_O31_generators = values[8];
    __pyx_v_manifold_name = ((PyObject*)values[9]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 10, __pyx_nargs); __PYX_ERR(10, 106, __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("SnapPy.CDirichletDomain.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_manifold), __pyx_ptype_6SnapPy_Manifold, 1, "manifold", 0))) __PYX_ERR(10, 107, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_generator_file), (&PyString_Type), 1, "generator_file", 1))) __PYX_ERR(10, 113, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_generator_bytes), (&PyBytes_Type), 1, "generator_bytes", 1))) __PYX_ERR(10, 114, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_manifold_name), (&PyString_Type), 1, "manifold_name", 1))) __PYX_ERR(10, 116, __pyx_L1_error)
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_2__cinit__(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self), __pyx_v_manifold, __pyx_v_vertex_epsilon, __pyx_v_displacement, __pyx_v_centroid_at_origin, __pyx_v_maximize_injectivity_radius, __pyx_v_include_words, __pyx_v_generator_file, __pyx_v_generator_bytes, __pyx_v_O31_generators, __pyx_v_manifold_name);

  /* "cython/core/dirichlet.pyx":106
 *         return number.number_to_native_number(n)
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   Manifold manifold=None,
 *                   vertex_epsilon=default_vertex_epsilon,
 */

  /* 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_6SnapPy_16CDirichletDomain_2__cinit__(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self, struct __pyx_obj_6SnapPy_Manifold *__pyx_v_manifold, PyObject *__pyx_v_vertex_epsilon, PyObject *__pyx_v_displacement, PyObject *__pyx_v_centroid_at_origin, PyObject *__pyx_v_maximize_injectivity_radius, PyObject *__pyx_v_include_words, PyObject *__pyx_v_generator_file, PyObject *__pyx_v_generator_bytes, PyObject *__pyx_v_O31_generators, PyObject *__pyx_v_manifold_name) {
  double __pyx_v_c_displacement[3];
  PyObject *__pyx_v_input_file = NULL;
  PyObject *__pyx_v_data = NULL;
  long __pyx_v_n;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  double __pyx_t_13;
  __pyx_ctuple_WEPolyhedron__ptr__and_int __pyx_t_14;
  WEPolyhedron *__pyx_t_15;
  Py_ssize_t __pyx_t_16;
  Boolean __pyx_t_17;
  Boolean __pyx_t_18;
  Boolean __pyx_t_19;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);
  __Pyx_INCREF(__pyx_v_displacement);

  /* "cython/core/dirichlet.pyx":118
 *                   str manifold_name='unnamed'):
 *         cdef double c_displacement[3]
 *         if displacement is None:             # <<<<<<<<<<<<<<
 *             displacement = [0.0, 0.0, 0.0]
 *         self.c_dirichlet_domain = NULL
 */
  __pyx_t_1 = (__pyx_v_displacement == Py_None);
  if (__pyx_t_1) {

    /* "cython/core/dirichlet.pyx":119
 *         cdef double c_displacement[3]
 *         if displacement is None:
 *             displacement = [0.0, 0.0, 0.0]             # <<<<<<<<<<<<<<
 *         self.c_dirichlet_domain = NULL
 *         if generator_file != '':
 */
    __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 119, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_float_0_0);
    __Pyx_GIVEREF(__pyx_float_0_0);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_float_0_0)) __PYX_ERR(10, 119, __pyx_L1_error);
    __Pyx_INCREF(__pyx_float_0_0);
    __Pyx_GIVEREF(__pyx_float_0_0);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_float_0_0)) __PYX_ERR(10, 119, __pyx_L1_error);
    __Pyx_INCREF(__pyx_float_0_0);
    __Pyx_GIVEREF(__pyx_float_0_0);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_float_0_0)) __PYX_ERR(10, 119, __pyx_L1_error);
    __Pyx_DECREF_SET(__pyx_v_displacement, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/dirichlet.pyx":118
 *                   str manifold_name='unnamed'):
 *         cdef double c_displacement[3]
 *         if displacement is None:             # <<<<<<<<<<<<<<
 *             displacement = [0.0, 0.0, 0.0]
 *         self.c_dirichlet_domain = NULL
 */
  }

  /* "cython/core/dirichlet.pyx":120
 *         if displacement is None:
 *             displacement = [0.0, 0.0, 0.0]
 *         self.c_dirichlet_domain = NULL             # <<<<<<<<<<<<<<
 *         if generator_file != '':
 *             with open(generator_file, mode='rb') as input_file:
 */
  __pyx_v_self->c_dirichlet_domain = NULL;

  /* "cython/core/dirichlet.pyx":121
 *             displacement = [0.0, 0.0, 0.0]
 *         self.c_dirichlet_domain = NULL
 *         if generator_file != '':             # <<<<<<<<<<<<<<
 *             with open(generator_file, mode='rb') as input_file:
 *                 data = input_file.read()
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_generator_file, __pyx_kp_s__9, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(10, 121, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/dirichlet.pyx":122
 *         self.c_dirichlet_domain = NULL
 *         if generator_file != '':
 *             with open(generator_file, mode='rb') as input_file:             # <<<<<<<<<<<<<<
 *                 data = input_file.read()
 *             self.c_dirichlet_domain, self.c_num_generators = (
 */
    /*with:*/ {
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_generator_file);
      __Pyx_GIVEREF(__pyx_v_generator_file);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_generator_file)) __PYX_ERR(10, 122, __pyx_L1_error);
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_mode, __pyx_n_s_rb) < 0) __PYX_ERR(10, 122, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 122, __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_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_exit_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 122, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_4, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 122, __pyx_L5_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 122, __pyx_L5_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_2 = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
          __Pyx_XGOTREF(__pyx_t_8);
          __Pyx_XGOTREF(__pyx_t_9);
          __Pyx_XGOTREF(__pyx_t_10);
          /*try:*/ {
            __pyx_v_input_file = __pyx_t_2;
            __pyx_t_2 = 0;

            /* "cython/core/dirichlet.pyx":123
 *         if generator_file != '':
 *             with open(generator_file, mode='rb') as input_file:
 *                 data = input_file.read()             # <<<<<<<<<<<<<<
 *             self.c_dirichlet_domain, self.c_num_generators = (
 *                 get_generators_from_bytes(
 */
            __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_file, __pyx_n_s_read); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 123, __pyx_L9_error)
            __Pyx_GOTREF(__pyx_t_4);
            __pyx_t_3 = NULL;
            __pyx_t_7 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(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_7 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 123, __pyx_L9_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
            }
            __pyx_v_data = __pyx_t_2;
            __pyx_t_2 = 0;

            /* "cython/core/dirichlet.pyx":122
 *         self.c_dirichlet_domain = NULL
 *         if generator_file != '':
 *             with open(generator_file, mode='rb') as input_file:             # <<<<<<<<<<<<<<
 *                 data = input_file.read()
 *             self.c_dirichlet_domain, self.c_num_generators = (
 */
          }
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          goto __pyx_L14_try_end;
          __pyx_L9_error:;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("SnapPy.CDirichletDomain.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(10, 122, __pyx_L11_except_error)
            __Pyx_XGOTREF(__pyx_t_2);
            __Pyx_XGOTREF(__pyx_t_4);
            __Pyx_XGOTREF(__pyx_t_3);
            __pyx_t_6 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 122, __pyx_L11_except_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_11)) __PYX_ERR(10, 122, __pyx_L11_except_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (__pyx_t_1 < 0) __PYX_ERR(10, 122, __pyx_L11_except_error)
            __pyx_t_12 = (!__pyx_t_1);
            if (unlikely(__pyx_t_12)) {
              __Pyx_GIVEREF(__pyx_t_2);
              __Pyx_GIVEREF(__pyx_t_4);
              __Pyx_XGIVEREF(__pyx_t_3);
              __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_4, __pyx_t_3);
              __pyx_t_2 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; 
              __PYX_ERR(10, 122, __pyx_L11_except_error)
            }
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            goto __pyx_L10_exception_handled;
          }
          __pyx_L11_except_error:;
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
          goto __pyx_L1_error;
          __pyx_L10_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_8);
          __Pyx_XGIVEREF(__pyx_t_9);
          __Pyx_XGIVEREF(__pyx_t_10);
          __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
          __pyx_L14_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_5) {
            __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__131, NULL);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_10)) __PYX_ERR(10, 122, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          }
          goto __pyx_L8;
        }
        __pyx_L8:;
      }
      goto __pyx_L18;
      __pyx_L5_error:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L1_error;
      __pyx_L18:;
    }

    /* "cython/core/dirichlet.pyx":126
 *             self.c_dirichlet_domain, self.c_num_generators = (
 *                 get_generators_from_bytes(
 *                     data, vertex_epsilon, displacement,             # <<<<<<<<<<<<<<
 *                     centroid_at_origin, maximize_injectivity_radius,
 *                     include_words))
 */
    if (unlikely(!__pyx_v_data)) { __Pyx_RaiseUnboundLocalError("data"); __PYX_ERR(10, 126, __pyx_L1_error) }
    __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_v_vertex_epsilon); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(10, 126, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":125
 *                 data = input_file.read()
 *             self.c_dirichlet_domain, self.c_num_generators = (
 *                 get_generators_from_bytes(             # <<<<<<<<<<<<<<
 *                     data, vertex_epsilon, displacement,
 *                     centroid_at_origin, maximize_injectivity_radius,
 */
    __pyx_t_14 = __pyx_f_6SnapPy_get_generators_from_bytes(__pyx_v_data, __pyx_t_13, __pyx_v_displacement, __pyx_v_centroid_at_origin, __pyx_v_maximize_injectivity_radius, __pyx_v_include_words); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 125, __pyx_L1_error)
    __pyx_t_15 = __pyx_t_14.f0;
    __pyx_t_7 = __pyx_t_14.f1;

    /* "cython/core/dirichlet.pyx":124
 *             with open(generator_file, mode='rb') as input_file:
 *                 data = input_file.read()
 *             self.c_dirichlet_domain, self.c_num_generators = (             # <<<<<<<<<<<<<<
 *                 get_generators_from_bytes(
 *                     data, vertex_epsilon, displacement,
 */
    __pyx_v_self->c_dirichlet_domain = __pyx_t_15;
    __pyx_v_self->c_num_generators = __pyx_t_7;

    /* "cython/core/dirichlet.pyx":129
 *                     centroid_at_origin, maximize_injectivity_radius,
 *                     include_words))
 *             self.manifold_name = generator_file             # <<<<<<<<<<<<<<
 *         elif generator_bytes != b'':
 *             self.c_dirichlet_domain, self.c_num_generators = (
 */
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_manifold_name, __pyx_v_generator_file) < 0) __PYX_ERR(10, 129, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":121
 *             displacement = [0.0, 0.0, 0.0]
 *         self.c_dirichlet_domain = NULL
 *         if generator_file != '':             # <<<<<<<<<<<<<<
 *             with open(generator_file, mode='rb') as input_file:
 *                 data = input_file.read()
 */
    goto __pyx_L4;
  }

  /* "cython/core/dirichlet.pyx":130
 *                     include_words))
 *             self.manifold_name = generator_file
 *         elif generator_bytes != b'':             # <<<<<<<<<<<<<<
 *             self.c_dirichlet_domain, self.c_num_generators = (
 *                 get_generators_from_bytes(
 */
  __pyx_t_12 = (__Pyx_PyBytes_Equals(__pyx_v_generator_bytes, __pyx_kp_b__9, Py_NE)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(10, 130, __pyx_L1_error)
  if (__pyx_t_12) {

    /* "cython/core/dirichlet.pyx":133
 *             self.c_dirichlet_domain, self.c_num_generators = (
 *                 get_generators_from_bytes(
 *                     generator_bytes, vertex_epsilon, displacement,             # <<<<<<<<<<<<<<
 *                     centroid_at_origin, maximize_injectivity_radius,
 *                     include_words))
 */
    __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_v_vertex_epsilon); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(10, 133, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":132
 *         elif generator_bytes != b'':
 *             self.c_dirichlet_domain, self.c_num_generators = (
 *                 get_generators_from_bytes(             # <<<<<<<<<<<<<<
 *                     generator_bytes, vertex_epsilon, displacement,
 *                     centroid_at_origin, maximize_injectivity_radius,
 */
    __pyx_t_14 = __pyx_f_6SnapPy_get_generators_from_bytes(__pyx_v_generator_bytes, __pyx_t_13, __pyx_v_displacement, __pyx_v_centroid_at_origin, __pyx_v_maximize_injectivity_radius, __pyx_v_include_words); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 132, __pyx_L1_error)
    __pyx_t_15 = __pyx_t_14.f0;
    __pyx_t_7 = __pyx_t_14.f1;

    /* "cython/core/dirichlet.pyx":131
 *             self.manifold_name = generator_file
 *         elif generator_bytes != b'':
 *             self.c_dirichlet_domain, self.c_num_generators = (             # <<<<<<<<<<<<<<
 *                 get_generators_from_bytes(
 *                     generator_bytes, vertex_epsilon, displacement,
 */
    __pyx_v_self->c_dirichlet_domain = __pyx_t_15;
    __pyx_v_self->c_num_generators = __pyx_t_7;

    /* "cython/core/dirichlet.pyx":136
 *                     centroid_at_origin, maximize_injectivity_radius,
 *                     include_words))
 *             self.manifold_name = manifold_name             # <<<<<<<<<<<<<<
 *         elif O31_generators is not None:
 *             self.c_num_generators = len(O31_generators)
 */
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_manifold_name, __pyx_v_manifold_name) < 0) __PYX_ERR(10, 136, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":130
 *                     include_words))
 *             self.manifold_name = generator_file
 *         elif generator_bytes != b'':             # <<<<<<<<<<<<<<
 *             self.c_dirichlet_domain, self.c_num_generators = (
 *                 get_generators_from_bytes(
 */
    goto __pyx_L4;
  }

  /* "cython/core/dirichlet.pyx":137
 *                     include_words))
 *             self.manifold_name = manifold_name
 *         elif O31_generators is not None:             # <<<<<<<<<<<<<<
 *             self.c_num_generators = len(O31_generators)
 *             self.c_dirichlet_domain = dirichlet_from_O31_matrix_list(
 */
  __pyx_t_12 = (__pyx_v_O31_generators != Py_None);
  if (__pyx_t_12) {

    /* "cython/core/dirichlet.pyx":138
 *             self.manifold_name = manifold_name
 *         elif O31_generators is not None:
 *             self.c_num_generators = len(O31_generators)             # <<<<<<<<<<<<<<
 *             self.c_dirichlet_domain = dirichlet_from_O31_matrix_list(
 *                 O31_generators, vertex_epsilon, displacement,
 */
    __pyx_t_16 = PyObject_Length(__pyx_v_O31_generators); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(10, 138, __pyx_L1_error)
    __pyx_v_self->c_num_generators = __pyx_t_16;

    /* "cython/core/dirichlet.pyx":140
 *             self.c_num_generators = len(O31_generators)
 *             self.c_dirichlet_domain = dirichlet_from_O31_matrix_list(
 *                 O31_generators, vertex_epsilon, displacement,             # <<<<<<<<<<<<<<
 *                 centroid_at_origin, maximize_injectivity_radius,
 *                 include_words)
 */
    __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_v_vertex_epsilon); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(10, 140, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":139
 *         elif O31_generators is not None:
 *             self.c_num_generators = len(O31_generators)
 *             self.c_dirichlet_domain = dirichlet_from_O31_matrix_list(             # <<<<<<<<<<<<<<
 *                 O31_generators, vertex_epsilon, displacement,
 *                 centroid_at_origin, maximize_injectivity_radius,
 */
    __pyx_t_15 = __pyx_f_6SnapPy_dirichlet_from_O31_matrix_list(__pyx_v_O31_generators, __pyx_t_13, __pyx_v_displacement, __pyx_v_centroid_at_origin, __pyx_v_maximize_injectivity_radius, __pyx_v_include_words); if (unlikely(__pyx_t_15 == ((WEPolyhedron *)NULL) && PyErr_Occurred())) __PYX_ERR(10, 139, __pyx_L1_error)
    __pyx_v_self->c_dirichlet_domain = __pyx_t_15;

    /* "cython/core/dirichlet.pyx":143
 *                 centroid_at_origin, maximize_injectivity_radius,
 *                 include_words)
 *             self.manifold_name = manifold_name             # <<<<<<<<<<<<<<
 *         else:
 *             if manifold is None:
 */
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_manifold_name, __pyx_v_manifold_name) < 0) __PYX_ERR(10, 143, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":137
 *                     include_words))
 *             self.manifold_name = manifold_name
 *         elif O31_generators is not None:             # <<<<<<<<<<<<<<
 *             self.c_num_generators = len(O31_generators)
 *             self.c_dirichlet_domain = dirichlet_from_O31_matrix_list(
 */
    goto __pyx_L4;
  }

  /* "cython/core/dirichlet.pyx":145
 *             self.manifold_name = manifold_name
 *         else:
 *             if manifold is None:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Supply a manifold, or generators.')
 *             if manifold.c_triangulation is NULL:
 */
  /*else*/ {
    __pyx_t_12 = (((PyObject *)__pyx_v_manifold) == Py_None);
    if (unlikely(__pyx_t_12)) {

      /* "cython/core/dirichlet.pyx":146
 *         else:
 *             if manifold is None:
 *                 raise ValueError('Supply a manifold, or generators.')             # <<<<<<<<<<<<<<
 *             if manifold.c_triangulation is NULL:
 *                 raise ValueError('The Triangulation is empty.')
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__132, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 146, __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(10, 146, __pyx_L1_error)

      /* "cython/core/dirichlet.pyx":145
 *             self.manifold_name = manifold_name
 *         else:
 *             if manifold is None:             # <<<<<<<<<<<<<<
 *                 raise ValueError('Supply a manifold, or generators.')
 *             if manifold.c_triangulation is NULL:
 */
    }

    /* "cython/core/dirichlet.pyx":147
 *             if manifold is None:
 *                 raise ValueError('Supply a manifold, or generators.')
 *             if manifold.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *                 raise ValueError('The Triangulation is empty.')
 *             for n from 0 <= n < 3:
 */
    __pyx_t_12 = (__pyx_v_manifold->__pyx_base.c_triangulation == NULL);
    if (unlikely(__pyx_t_12)) {

      /* "cython/core/dirichlet.pyx":148
 *                 raise ValueError('Supply a manifold, or generators.')
 *             if manifold.c_triangulation is NULL:
 *                 raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *             for n from 0 <= n < 3:
 *                 c_displacement[n] = <double>displacement[n]
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 148, __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(10, 148, __pyx_L1_error)

      /* "cython/core/dirichlet.pyx":147
 *             if manifold is None:
 *                 raise ValueError('Supply a manifold, or generators.')
 *             if manifold.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *                 raise ValueError('The Triangulation is empty.')
 *             for n from 0 <= n < 3:
 */
    }

    /* "cython/core/dirichlet.pyx":149
 *             if manifold.c_triangulation is NULL:
 *                 raise ValueError('The Triangulation is empty.')
 *             for n from 0 <= n < 3:             # <<<<<<<<<<<<<<
 *                 c_displacement[n] = <double>displacement[n]
 *             copy_triangulation(manifold.c_triangulation,
 */
    for (__pyx_v_n = 0; __pyx_v_n < 3; __pyx_v_n++) {

      /* "cython/core/dirichlet.pyx":150
 *                 raise ValueError('The Triangulation is empty.')
 *             for n from 0 <= n < 3:
 *                 c_displacement[n] = <double>displacement[n]             # <<<<<<<<<<<<<<
 *             copy_triangulation(manifold.c_triangulation,
 *                                &self.c_triangulation)
 */
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_displacement, __pyx_v_n, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 150, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(10, 150, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      (__pyx_v_c_displacement[__pyx_v_n]) = ((double)__pyx_t_13);
    }

    /* "cython/core/dirichlet.pyx":151
 *             for n from 0 <= n < 3:
 *                 c_displacement[n] = <double>displacement[n]
 *             copy_triangulation(manifold.c_triangulation,             # <<<<<<<<<<<<<<
 *                                &self.c_triangulation)
 *             self.c_dirichlet_domain = Dirichlet_with_displacement(
 */
    copy_triangulation(__pyx_v_manifold->__pyx_base.c_triangulation, (&__pyx_v_self->c_triangulation)); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 151, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":156
 *                 self.c_triangulation,
 *                 c_displacement,
 *                 vertex_epsilon,             # <<<<<<<<<<<<<<
 *                 centroid_at_origin,
 *                 Dirichlet_keep_going,
 */
    __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_v_vertex_epsilon); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(10, 156, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":157
 *                 c_displacement,
 *                 vertex_epsilon,
 *                 centroid_at_origin,             # <<<<<<<<<<<<<<
 *                 Dirichlet_keep_going,
 *                 maximize_injectivity_radius,
 */
    __pyx_t_17 = __Pyx_PyInt_As_Boolean(__pyx_v_centroid_at_origin); if (unlikely((__pyx_t_17 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(10, 157, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":159
 *                 centroid_at_origin,
 *                 Dirichlet_keep_going,
 *                 maximize_injectivity_radius,             # <<<<<<<<<<<<<<
 *                 include_words)
 *             # num_generators computed implicitly by
 */
    __pyx_t_18 = __Pyx_PyInt_As_Boolean(__pyx_v_maximize_injectivity_radius); if (unlikely((__pyx_t_18 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(10, 159, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":160
 *                 Dirichlet_keep_going,
 *                 maximize_injectivity_radius,
 *                 include_words)             # <<<<<<<<<<<<<<
 *             # num_generators computed implicitly by
 *             # Dirichlet_with_displacement.
 */
    __pyx_t_19 = __Pyx_PyInt_As_Boolean(__pyx_v_include_words); if (unlikely((__pyx_t_19 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(10, 160, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":153
 *             copy_triangulation(manifold.c_triangulation,
 *                                &self.c_triangulation)
 *             self.c_dirichlet_domain = Dirichlet_with_displacement(             # <<<<<<<<<<<<<<
 *                 self.c_triangulation,
 *                 c_displacement,
 */
    __pyx_t_15 = Dirichlet_with_displacement(__pyx_v_self->c_triangulation, __pyx_v_c_displacement, __pyx_t_13, __pyx_t_17, Dirichlet_keep_going, __pyx_t_18, __pyx_t_19); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 153, __pyx_L1_error)
    __pyx_v_self->c_dirichlet_domain = __pyx_t_15;

    /* "cython/core/dirichlet.pyx":163
 *             # num_generators computed implicitly by
 *             # Dirichlet_with_displacement.
 *             self.c_num_generators = self.c_triangulation.num_generators             # <<<<<<<<<<<<<<
 *             self.manifold_name = manifold.name()
 *         if self.c_dirichlet_domain == NULL:
 */
    __pyx_t_7 = __pyx_v_self->c_triangulation->num_generators;
    __pyx_v_self->c_num_generators = __pyx_t_7;

    /* "cython/core/dirichlet.pyx":164
 *             # Dirichlet_with_displacement.
 *             self.c_num_generators = self.c_triangulation.num_generators
 *             self.manifold_name = manifold.name()             # <<<<<<<<<<<<<<
 *         if self.c_dirichlet_domain == NULL:
 *             raise RuntimeError('The Dirichlet construction failed.')
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_manifold), __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 164, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_manifold_name, __pyx_t_3) < 0) __PYX_ERR(10, 164, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L4:;

  /* "cython/core/dirichlet.pyx":165
 *             self.c_num_generators = self.c_triangulation.num_generators
 *             self.manifold_name = manifold.name()
 *         if self.c_dirichlet_domain == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('The Dirichlet construction failed.')
 *         if manifold:
 */
  __pyx_t_12 = (__pyx_v_self->c_dirichlet_domain == NULL);
  if (unlikely(__pyx_t_12)) {

    /* "cython/core/dirichlet.pyx":166
 *             self.manifold_name = manifold.name()
 *         if self.c_dirichlet_domain == NULL:
 *             raise RuntimeError('The Dirichlet construction failed.')             # <<<<<<<<<<<<<<
 *         if manifold:
 *             self._number_ = manifold._number_
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__133, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 166, __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(10, 166, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":165
 *             self.c_num_generators = self.c_triangulation.num_generators
 *             self.manifold_name = manifold.name()
 *         if self.c_dirichlet_domain == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('The Dirichlet construction failed.')
 *         if manifold:
 */
  }

  /* "cython/core/dirichlet.pyx":167
 *         if self.c_dirichlet_domain == NULL:
 *             raise RuntimeError('The Dirichlet construction failed.')
 *         if manifold:             # <<<<<<<<<<<<<<
 *             self._number_ = manifold._number_
 * 
 */
  __pyx_t_12 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_manifold)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(10, 167, __pyx_L1_error)
  if (__pyx_t_12) {

    /* "cython/core/dirichlet.pyx":168
 *             raise RuntimeError('The Dirichlet construction failed.')
 *         if manifold:
 *             self._number_ = manifold._number_             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_manifold), __pyx_n_s_number_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2, __pyx_t_3) < 0) __PYX_ERR(10, 168, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/dirichlet.pyx":167
 *         if self.c_dirichlet_domain == NULL:
 *             raise RuntimeError('The Dirichlet construction failed.')
 *         if manifold:             # <<<<<<<<<<<<<<
 *             self._number_ = manifold._number_
 * 
 */
  }

  /* "cython/core/dirichlet.pyx":106
 *         return number.number_to_native_number(n)
 * 
 *     def __cinit__(self,             # <<<<<<<<<<<<<<
 *                   Manifold manifold=None,
 *                   vertex_epsilon=default_vertex_epsilon,
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_input_file);
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XDECREF(__pyx_v_displacement);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":170
 *             self._number_ = manifold._number_
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.c_triangulation != NULL:
 *             free_triangulation(self.c_triangulation)
 */

/* Python wrapper */
static void __pyx_pw_6SnapPy_16CDirichletDomain_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6SnapPy_16CDirichletDomain_5__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_6SnapPy_16CDirichletDomain_4__dealloc__(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static void __pyx_pf_6SnapPy_16CDirichletDomain_4__dealloc__(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self) {
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "cython/core/dirichlet.pyx":171
 * 
 *     def __dealloc__(self):
 *         if self.c_triangulation != NULL:             # <<<<<<<<<<<<<<
 *             free_triangulation(self.c_triangulation)
 *         if self.c_dirichlet_domain != NULL:
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation != NULL);
  if (__pyx_t_1) {

    /* "cython/core/dirichlet.pyx":172
 *     def __dealloc__(self):
 *         if self.c_triangulation != NULL:
 *             free_triangulation(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         if self.c_dirichlet_domain != NULL:
 *             free_Dirichlet_domain(self.c_dirichlet_domain)
 */
    free_triangulation(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 172, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":171
 * 
 *     def __dealloc__(self):
 *         if self.c_triangulation != NULL:             # <<<<<<<<<<<<<<
 *             free_triangulation(self.c_triangulation)
 *         if self.c_dirichlet_domain != NULL:
 */
  }

  /* "cython/core/dirichlet.pyx":173
 *         if self.c_triangulation != NULL:
 *             free_triangulation(self.c_triangulation)
 *         if self.c_dirichlet_domain != NULL:             # <<<<<<<<<<<<<<
 *             free_Dirichlet_domain(self.c_dirichlet_domain)
 * 
 */
  __pyx_t_1 = (__pyx_v_self->c_dirichlet_domain != NULL);
  if (__pyx_t_1) {

    /* "cython/core/dirichlet.pyx":174
 *             free_triangulation(self.c_triangulation)
 *         if self.c_dirichlet_domain != NULL:
 *             free_Dirichlet_domain(self.c_dirichlet_domain)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
    free_Dirichlet_domain(__pyx_v_self->c_dirichlet_domain); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 174, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":173
 *         if self.c_triangulation != NULL:
 *             free_triangulation(self.c_triangulation)
 *         if self.c_dirichlet_domain != NULL:             # <<<<<<<<<<<<<<
 *             free_Dirichlet_domain(self.c_dirichlet_domain)
 * 
 */
  }

  /* "cython/core/dirichlet.pyx":170
 *             self._number_ = manifold._number_
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.c_triangulation != NULL:
 *             free_triangulation(self.c_triangulation)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("SnapPy.CDirichletDomain.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
}

/* "cython/core/dirichlet.pyx":176
 *             free_Dirichlet_domain(self.c_dirichlet_domain)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '%d finite vertices, %d ideal vertices; %d edges; %d faces' % (
 *             self.num_finite_vertices(),
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_7__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_6SnapPy_16CDirichletDomain_6__repr__(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

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

  /* "cython/core/dirichlet.pyx":177
 * 
 *     def __repr__(self):
 *         return '%d finite vertices, %d ideal vertices; %d edges; %d faces' % (             # <<<<<<<<<<<<<<
 *             self.num_finite_vertices(),
 *             self.num_ideal_vertices(),
 */
  __Pyx_XDECREF(__pyx_r);

  /* "cython/core/dirichlet.pyx":178
 *     def __repr__(self):
 *         return '%d finite vertices, %d ideal vertices; %d edges; %d faces' % (
 *             self.num_finite_vertices(),             # <<<<<<<<<<<<<<
 *             self.num_ideal_vertices(),
 *             self.num_edges(),
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_finite_vertices); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 178, __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(10, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "cython/core/dirichlet.pyx":179
 *         return '%d finite vertices, %d ideal vertices; %d edges; %d faces' % (
 *             self.num_finite_vertices(),
 *             self.num_ideal_vertices(),             # <<<<<<<<<<<<<<
 *             self.num_edges(),
 *             self.num_faces(),
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_ideal_vertices); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }

  /* "cython/core/dirichlet.pyx":180
 *             self.num_finite_vertices(),
 *             self.num_ideal_vertices(),
 *             self.num_edges(),             # <<<<<<<<<<<<<<
 *             self.num_faces(),
 *             )
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_edges); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }

  /* "cython/core/dirichlet.pyx":181
 *             self.num_ideal_vertices(),
 *             self.num_edges(),
 *             self.num_faces(),             # <<<<<<<<<<<<<<
 *             )
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_faces); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_4 = 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_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }

  /* "cython/core/dirichlet.pyx":178
 *     def __repr__(self):
 *         return '%d finite vertices, %d ideal vertices; %d edges; %d faces' % (
 *             self.num_finite_vertices(),             # <<<<<<<<<<<<<<
 *             self.num_ideal_vertices(),
 *             self.num_edges(),
 */
  __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 178, __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(10, 178, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2)) __PYX_ERR(10, 178, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3)) __PYX_ERR(10, 178, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5)) __PYX_ERR(10, 178, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;

  /* "cython/core/dirichlet.pyx":177
 * 
 *     def __repr__(self):
 *         return '%d finite vertices, %d ideal vertices; %d edges; %d faces' % (             # <<<<<<<<<<<<<<
 *             self.num_finite_vertices(),
 *             self.num_ideal_vertices(),
 */
  __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_d_finite_vertices_d_ideal_verti, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":176
 *             free_Dirichlet_domain(self.c_dirichlet_domain)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '%d finite vertices, %d ideal vertices; %d edges; %d faces' % (
 *             self.num_finite_vertices(),
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":184
 *             )
 * 
 *     def num_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of vertices.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_9num_vertices(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_6SnapPy_16CDirichletDomain_8num_vertices, "CDirichletDomain.num_vertices(self)\n\n        Return the number of vertices.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_9num_vertices = {"num_vertices", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_9num_vertices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_8num_vertices};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_9num_vertices(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("num_vertices (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("num_vertices", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "num_vertices", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_8num_vertices(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_8num_vertices(struct __pyx_obj_6SnapPy_CDirichletDomain *__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("num_vertices", 1);

  /* "cython/core/dirichlet.pyx":188
 *         Return the number of vertices.
 *         """
 *         return self.c_dirichlet_domain.num_vertices             # <<<<<<<<<<<<<<
 * 
 *     def num_finite_vertices(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_dirichlet_domain->num_vertices); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":184
 *             )
 * 
 *     def num_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of vertices.
 */

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

/* "cython/core/dirichlet.pyx":190
 *         return self.c_dirichlet_domain.num_vertices
 * 
 *     def num_finite_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of finite (non-ideal) vertices.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_11num_finite_vertices(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_6SnapPy_16CDirichletDomain_10num_finite_vertices, "CDirichletDomain.num_finite_vertices(self)\n\n        Return the number of finite (non-ideal) vertices.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_11num_finite_vertices = {"num_finite_vertices", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_11num_finite_vertices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_10num_finite_vertices};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_11num_finite_vertices(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("num_finite_vertices (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("num_finite_vertices", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "num_finite_vertices", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_10num_finite_vertices(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_10num_finite_vertices(struct __pyx_obj_6SnapPy_CDirichletDomain *__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("num_finite_vertices", 1);

  /* "cython/core/dirichlet.pyx":194
 *         Return the number of finite (non-ideal) vertices.
 *         """
 *         return self.c_dirichlet_domain.num_finite_vertices             # <<<<<<<<<<<<<<
 * 
 *     def num_ideal_vertices(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_dirichlet_domain->num_finite_vertices); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":190
 *         return self.c_dirichlet_domain.num_vertices
 * 
 *     def num_finite_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of finite (non-ideal) vertices.
 */

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

/* "cython/core/dirichlet.pyx":196
 *         return self.c_dirichlet_domain.num_finite_vertices
 * 
 *     def num_ideal_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of ideal vertices.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_13num_ideal_vertices(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_6SnapPy_16CDirichletDomain_12num_ideal_vertices, "CDirichletDomain.num_ideal_vertices(self)\n\n        Return the number of ideal vertices.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_13num_ideal_vertices = {"num_ideal_vertices", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_13num_ideal_vertices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_12num_ideal_vertices};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_13num_ideal_vertices(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("num_ideal_vertices (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("num_ideal_vertices", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "num_ideal_vertices", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_12num_ideal_vertices(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_12num_ideal_vertices(struct __pyx_obj_6SnapPy_CDirichletDomain *__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("num_ideal_vertices", 1);

  /* "cython/core/dirichlet.pyx":200
 *         Return the number of ideal vertices.
 *         """
 *         return self.c_dirichlet_domain.num_ideal_vertices             # <<<<<<<<<<<<<<
 * 
 *     def num_edges(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_dirichlet_domain->num_ideal_vertices); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":196
 *         return self.c_dirichlet_domain.num_finite_vertices
 * 
 *     def num_ideal_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of ideal vertices.
 */

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

/* "cython/core/dirichlet.pyx":202
 *         return self.c_dirichlet_domain.num_ideal_vertices
 * 
 *     def num_edges(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of edges.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_15num_edges(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_6SnapPy_16CDirichletDomain_14num_edges, "CDirichletDomain.num_edges(self)\n\n        Return the number of edges.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_15num_edges = {"num_edges", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_15num_edges, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_14num_edges};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_15num_edges(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("num_edges (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("num_edges", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "num_edges", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_14num_edges(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_14num_edges(struct __pyx_obj_6SnapPy_CDirichletDomain *__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("num_edges", 1);

  /* "cython/core/dirichlet.pyx":206
 *         Return the number of edges.
 *         """
 *         return self.c_dirichlet_domain.num_edges             # <<<<<<<<<<<<<<
 * 
 *     def num_faces(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_dirichlet_domain->num_edges); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":202
 *         return self.c_dirichlet_domain.num_ideal_vertices
 * 
 *     def num_edges(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of edges.
 */

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

/* "cython/core/dirichlet.pyx":208
 *         return self.c_dirichlet_domain.num_edges
 * 
 *     def num_faces(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of faces.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_17num_faces(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_6SnapPy_16CDirichletDomain_16num_faces, "CDirichletDomain.num_faces(self)\n\n        Return the number of faces.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_17num_faces = {"num_faces", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_17num_faces, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_16num_faces};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_17num_faces(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("num_faces (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("num_faces", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "num_faces", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_16num_faces(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_16num_faces(struct __pyx_obj_6SnapPy_CDirichletDomain *__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("num_faces", 1);

  /* "cython/core/dirichlet.pyx":212
 *         Return the number of faces.
 *         """
 *         return self.c_dirichlet_domain.num_faces             # <<<<<<<<<<<<<<
 * 
 *     def in_radius(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->c_dirichlet_domain->num_faces); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":208
 *         return self.c_dirichlet_domain.num_edges
 * 
 *     def num_faces(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of faces.
 */

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

/* "cython/core/dirichlet.pyx":214
 *         return self.c_dirichlet_domain.num_faces
 * 
 *     def in_radius(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the radius of the largest inscribed sphere.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_19in_radius(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_6SnapPy_16CDirichletDomain_18in_radius, "CDirichletDomain.in_radius(self)\n\n        Return the radius of the largest inscribed sphere.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_19in_radius = {"in_radius", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_19in_radius, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_18in_radius};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_19in_radius(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("in_radius (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("in_radius", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "in_radius", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_18in_radius(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_18in_radius(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self) {
  PyObject *__pyx_v_radius = 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("in_radius", 1);

  /* "cython/core/dirichlet.pyx":218
 *         Return the radius of the largest inscribed sphere.
 *         """
 *         radius = Real2Number(self.c_dirichlet_domain.inradius)             # <<<<<<<<<<<<<<
 *         return self._number_(radius)
 * 
 */
  __pyx_t_1 = __pyx_f_6SnapPy_Real2Number(__pyx_v_self->c_dirichlet_domain->inradius); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_radius = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/dirichlet.pyx":219
 *         """
 *         radius = Real2Number(self.c_dirichlet_domain.inradius)
 *         return self._number_(radius)             # <<<<<<<<<<<<<<
 * 
 *     def out_radius(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 219, __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, __pyx_v_radius};
    __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(10, 219, __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;

  /* "cython/core/dirichlet.pyx":214
 *         return self.c_dirichlet_domain.num_faces
 * 
 *     def in_radius(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the radius of the largest inscribed sphere.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain.in_radius", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_radius);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":221
 *         return self._number_(radius)
 * 
 *     def out_radius(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the radius of the smallest circubscribed sphere.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_21out_radius(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_6SnapPy_16CDirichletDomain_20out_radius, "CDirichletDomain.out_radius(self)\n\n        Return the radius of the smallest circubscribed sphere.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_21out_radius = {"out_radius", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_21out_radius, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_20out_radius};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_21out_radius(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("out_radius (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("out_radius", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "out_radius", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_20out_radius(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_20out_radius(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self) {
  PyObject *__pyx_v_radius = 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("out_radius", 1);

  /* "cython/core/dirichlet.pyx":225
 *         Return the radius of the smallest circubscribed sphere.
 *         """
 *         radius = Real2Number(self.c_dirichlet_domain.outradius)             # <<<<<<<<<<<<<<
 *         return self._number_(radius)
 * 
 */
  __pyx_t_1 = __pyx_f_6SnapPy_Real2Number(__pyx_v_self->c_dirichlet_domain->outradius); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_radius = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/dirichlet.pyx":226
 *         """
 *         radius = Real2Number(self.c_dirichlet_domain.outradius)
 *         return self._number_(radius)             # <<<<<<<<<<<<<<
 * 
 *     def spine_radius(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 226, __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, __pyx_v_radius};
    __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(10, 226, __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;

  /* "cython/core/dirichlet.pyx":221
 *         return self._number_(radius)
 * 
 *     def out_radius(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the radius of the smallest circubscribed sphere.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain.out_radius", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_radius);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":228
 *         return self._number_(radius)
 * 
 *     def spine_radius(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the infimum of the radii (measured from the origin) of all
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_23spine_radius(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_6SnapPy_16CDirichletDomain_22spine_radius, "CDirichletDomain.spine_radius(self)\n\n        Return the infimum of the radii (measured from the origin) of all\n        spines dual to the Dirichlet domain.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_23spine_radius = {"spine_radius", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_23spine_radius, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_22spine_radius};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_23spine_radius(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("spine_radius (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("spine_radius", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "spine_radius", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_22spine_radius(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_22spine_radius(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self) {
  PyObject *__pyx_v_radius = 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("spine_radius", 1);

  /* "cython/core/dirichlet.pyx":233
 *         spines dual to the Dirichlet domain.
 *         """
 *         radius = Real2Number(self.c_dirichlet_domain.spine_radius)             # <<<<<<<<<<<<<<
 *         return self._number_(radius)
 * 
 */
  __pyx_t_1 = __pyx_f_6SnapPy_Real2Number(__pyx_v_self->c_dirichlet_domain->spine_radius); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_radius = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/dirichlet.pyx":234
 *         """
 *         radius = Real2Number(self.c_dirichlet_domain.spine_radius)
 *         return self._number_(radius)             # <<<<<<<<<<<<<<
 * 
 *     def length_spectrum_dicts(self, cutoff_length=1.0,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 234, __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, __pyx_v_radius};
    __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(10, 234, __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;

  /* "cython/core/dirichlet.pyx":228
 *         return self._number_(radius)
 * 
 *     def spine_radius(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the infimum of the radii (measured from the origin) of all
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain.spine_radius", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_radius);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":236
 *         return self._number_(radius)
 * 
 *     def length_spectrum_dicts(self, cutoff_length=1.0,             # <<<<<<<<<<<<<<
 *                               full_rigor=True,
 *                               multiplicities=True,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_25length_spectrum_dicts(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_6SnapPy_16CDirichletDomain_24length_spectrum_dicts, "CDirichletDomain.length_spectrum_dicts(self, cutoff_length=1.0, full_rigor=True, multiplicities=True, user_radius=0.0, grouped=True)\n\n        Return a list of info objects describing the short\n        geodesics up to the specified cutoff length.  The keys are\n        'length', 'parity', 'topology', and 'multiplicity'.  The\n        length is the complex length; the parity specifies whether\n        orientation is preserved; and topology distinguishes between\n        circles and mirrored intervals.  Finally, the key 'matrix'\n        in the fundamental group realizing this element.\n\n        >>> M = Manifold('m004(1,2)')\n        >>> D = M.dirichlet_domain(maximize_injectivity_radius=False)\n        >>> lengths = D.length_spectrum_dicts()\n        >>> len(lengths)\n        2\n        >>> lengths[0].matrix in D.pairing_matrices()\n        True\n\n        If the flag 'grouped' is False, then each geodesic is returned as\n        a separate item rather than collating by (length, parity, topology).\n        If the flag 'multiplicities' is False, then the geodesics *are*\n        collated but the multiplicity of each item is set to 0.\n\n        >>> M = Manifold('m003(-3, 1)')\n        >>> D = M.dirichlet_domain()\n        >>> [g.multiplicity for g in D.length_spectrum_dicts()]\n        [3, 3]\n        >>> [g.multiplicity for g in D.length_spectrum_dicts(grouped=False)]\n        [1, 1, 1, 1, 1, 1]\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_25length_spectrum_dicts = {"length_spectrum_dicts", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_25length_spectrum_dicts, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_24length_spectrum_dicts};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_25length_spectrum_dicts(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_cutoff_length = 0;
  PyObject *__pyx_v_full_rigor = 0;
  PyObject *__pyx_v_multiplicities = 0;
  PyObject *__pyx_v_user_radius = 0;
  PyObject *__pyx_v_grouped = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("length_spectrum_dicts (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_cutoff_length,&__pyx_n_s_full_rigor,&__pyx_n_s_multiplicities,&__pyx_n_s_user_radius,&__pyx_n_s_grouped,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_float_1_0));

    /* "cython/core/dirichlet.pyx":237
 * 
 *     def length_spectrum_dicts(self, cutoff_length=1.0,
 *                               full_rigor=True,             # <<<<<<<<<<<<<<
 *                               multiplicities=True,
 *                               user_radius=0.0,
 */
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));

    /* "cython/core/dirichlet.pyx":238
 *     def length_spectrum_dicts(self, cutoff_length=1.0,
 *                               full_rigor=True,
 *                               multiplicities=True,             # <<<<<<<<<<<<<<
 *                               user_radius=0.0,
 *                               grouped=True):
 */
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_float_0_0));

    /* "cython/core/dirichlet.pyx":240
 *                               multiplicities=True,
 *                               user_radius=0.0,
 *                               grouped=True):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of info objects describing the short
 */
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cutoff_length);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 236, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_full_rigor);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 236, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multiplicities);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 236, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_user_radius);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 236, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_grouped);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 236, __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, "length_spectrum_dicts") < 0)) __PYX_ERR(10, 236, __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);
        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;
      }
    }
    __pyx_v_cutoff_length = values[0];
    __pyx_v_full_rigor = values[1];
    __pyx_v_multiplicities = values[2];
    __pyx_v_user_radius = values[3];
    __pyx_v_grouped = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("length_spectrum_dicts", 0, 0, 5, __pyx_nargs); __PYX_ERR(10, 236, __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("SnapPy.CDirichletDomain.length_spectrum_dicts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_24length_spectrum_dicts(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self), __pyx_v_cutoff_length, __pyx_v_full_rigor, __pyx_v_multiplicities, __pyx_v_user_radius, __pyx_v_grouped);

  /* "cython/core/dirichlet.pyx":236
 *         return self._number_(radius)
 * 
 *     def length_spectrum_dicts(self, cutoff_length=1.0,             # <<<<<<<<<<<<<<
 *                               full_rigor=True,
 *                               multiplicities=True,
 */

  /* 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_6SnapPy_16CDirichletDomain_24length_spectrum_dicts(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self, PyObject *__pyx_v_cutoff_length, PyObject *__pyx_v_full_rigor, PyObject *__pyx_v_multiplicities, PyObject *__pyx_v_user_radius, PyObject *__pyx_v_grouped) {
  int __pyx_v_num_lengths;
  MultiLength *__pyx_v_geodesics;
  int *__pyx_v_c_word;
  PyObject *__pyx_v_spectrum = NULL;
  long __pyx_v_n;
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_v_its_matrix = NULL;
  PyObject *__pyx_v_d = NULL;
  PyObject *__pyx_9genexpr86__pyx_v_i = NULL;
  long __pyx_9genexpr87__pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __pyx_t_6SnapPy_Real __pyx_t_1;
  Boolean __pyx_t_2;
  Boolean __pyx_t_3;
  Boolean __pyx_t_4;
  __pyx_t_6SnapPy_Real __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  long __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  long __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  Py_ssize_t __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_t_18;
  int *__pyx_t_19;
  int __pyx_t_20;
  int __pyx_t_21;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("length_spectrum_dicts", 1);

  /* "cython/core/dirichlet.pyx":275
 * 
 *         length_spectrum(self.c_dirichlet_domain,
 *                         Object2Real(cutoff_length),             # <<<<<<<<<<<<<<
 *                         full_rigor,
 *                         multiplicities,
 */
  __pyx_t_1 = __pyx_f_6SnapPy_Object2Real(__pyx_v_cutoff_length); if (unlikely(__pyx_t_1 == ((__pyx_t_6SnapPy_Real)-1) && PyErr_Occurred())) __PYX_ERR(10, 275, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":276
 *         length_spectrum(self.c_dirichlet_domain,
 *                         Object2Real(cutoff_length),
 *                         full_rigor,             # <<<<<<<<<<<<<<
 *                         multiplicities,
 *                         grouped,
 */
  __pyx_t_2 = __Pyx_PyInt_As_Boolean(__pyx_v_full_rigor); if (unlikely((__pyx_t_2 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(10, 276, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":277
 *                         Object2Real(cutoff_length),
 *                         full_rigor,
 *                         multiplicities,             # <<<<<<<<<<<<<<
 *                         grouped,
 *                         Object2Real(user_radius),
 */
  __pyx_t_3 = __Pyx_PyInt_As_Boolean(__pyx_v_multiplicities); if (unlikely((__pyx_t_3 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(10, 277, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":278
 *                         full_rigor,
 *                         multiplicities,
 *                         grouped,             # <<<<<<<<<<<<<<
 *                         Object2Real(user_radius),
 *                         &geodesics,
 */
  __pyx_t_4 = __Pyx_PyInt_As_Boolean(__pyx_v_grouped); if (unlikely((__pyx_t_4 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(10, 278, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":279
 *                         multiplicities,
 *                         grouped,
 *                         Object2Real(user_radius),             # <<<<<<<<<<<<<<
 *                         &geodesics,
 *                         &num_lengths)
 */
  __pyx_t_5 = __pyx_f_6SnapPy_Object2Real(__pyx_v_user_radius); if (unlikely(__pyx_t_5 == ((__pyx_t_6SnapPy_Real)-1) && PyErr_Occurred())) __PYX_ERR(10, 279, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":274
 *         cdef int* c_word
 * 
 *         length_spectrum(self.c_dirichlet_domain,             # <<<<<<<<<<<<<<
 *                         Object2Real(cutoff_length),
 *                         full_rigor,
 */
  length_spectrum(__pyx_v_self->c_dirichlet_domain, __pyx_t_1, __pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5, (&__pyx_v_geodesics), (&__pyx_v_num_lengths)); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 274, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":282
 *                         &geodesics,
 *                         &num_lengths)
 *         spectrum = []             # <<<<<<<<<<<<<<
 *         for n from 0 <= n < num_lengths:
 *             length = Complex2Number(geodesics[n].length)
 */
  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_v_spectrum = ((PyObject*)__pyx_t_6);
  __pyx_t_6 = 0;

  /* "cython/core/dirichlet.pyx":283
 *                         &num_lengths)
 *         spectrum = []
 *         for n from 0 <= n < num_lengths:             # <<<<<<<<<<<<<<
 *             length = Complex2Number(geodesics[n].length)
 *             its_matrix = matrix([[self._number_(Real2Number(<Real>geodesics[n].matrix[i][j]))
 */
  __pyx_t_7 = __pyx_v_num_lengths;
  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_7; __pyx_v_n++) {

    /* "cython/core/dirichlet.pyx":284
 *         spectrum = []
 *         for n from 0 <= n < num_lengths:
 *             length = Complex2Number(geodesics[n].length)             # <<<<<<<<<<<<<<
 *             its_matrix = matrix([[self._number_(Real2Number(<Real>geodesics[n].matrix[i][j]))
 *                                   for j in range(4)] for i in range(4)] )
 */
    __pyx_t_6 = __pyx_f_6SnapPy_Complex2Number((__pyx_v_geodesics[__pyx_v_n]).length); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "cython/core/dirichlet.pyx":285
 *         for n from 0 <= n < num_lengths:
 *             length = Complex2Number(geodesics[n].length)
 *             its_matrix = matrix([[self._number_(Real2Number(<Real>geodesics[n].matrix[i][j]))             # <<<<<<<<<<<<<<
 *                                   for j in range(4)] for i in range(4)] )
 *             d = {
 */
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_matrix); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    { /* enter inner scope */
      __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 285, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_9);

      /* "cython/core/dirichlet.pyx":286
 *             length = Complex2Number(geodesics[n].length)
 *             its_matrix = matrix([[self._number_(Real2Number(<Real>geodesics[n].matrix[i][j]))
 *                                   for j in range(4)] for i in range(4)] )             # <<<<<<<<<<<<<<
 *             d = {
 *                 "length" : self._number_(length),
 */
      for (__pyx_t_10 = 0; __pyx_t_10 < 4; __pyx_t_10+=1) {
        __pyx_t_11 = __Pyx_PyInt_From_long(__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(10, 286, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_XDECREF_SET(__pyx_9genexpr86__pyx_v_i, __pyx_t_11);
        __pyx_t_11 = 0;
        { /* enter inner scope */

          /* "cython/core/dirichlet.pyx":285
 *         for n from 0 <= n < num_lengths:
 *             length = Complex2Number(geodesics[n].length)
 *             its_matrix = matrix([[self._number_(Real2Number(<Real>geodesics[n].matrix[i][j]))             # <<<<<<<<<<<<<<
 *                                   for j in range(4)] for i in range(4)] )
 *             d = {
 */
          __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(10, 285, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_11);

          /* "cython/core/dirichlet.pyx":286
 *             length = Complex2Number(geodesics[n].length)
 *             its_matrix = matrix([[self._number_(Real2Number(<Real>geodesics[n].matrix[i][j]))
 *                                   for j in range(4)] for i in range(4)] )             # <<<<<<<<<<<<<<
 *             d = {
 *                 "length" : self._number_(length),
 */
          for (__pyx_t_12 = 0; __pyx_t_12 < 4; __pyx_t_12+=1) {
            __pyx_9genexpr87__pyx_v_j = __pyx_t_12;

            /* "cython/core/dirichlet.pyx":285
 *         for n from 0 <= n < num_lengths:
 *             length = Complex2Number(geodesics[n].length)
 *             its_matrix = matrix([[self._number_(Real2Number(<Real>geodesics[n].matrix[i][j]))             # <<<<<<<<<<<<<<
 *                                   for j in range(4)] for i in range(4)] )
 *             d = {
 */
            __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_14)) __PYX_ERR(10, 285, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_14);
            __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_9genexpr86__pyx_v_i); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(10, 285, __pyx_L7_error)
            __pyx_t_16 = __pyx_f_6SnapPy_Real2Number(((__pyx_t_6SnapPy_Real)(((__pyx_v_geodesics[__pyx_v_n]).matrix[__pyx_t_15])[__pyx_9genexpr87__pyx_v_j]))); if (unlikely(!__pyx_t_16)) __PYX_ERR(10, 285, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_16);
            __pyx_t_17 = NULL;
            __pyx_t_18 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_14))) {
              __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_14);
              if (likely(__pyx_t_17)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
                __Pyx_INCREF(__pyx_t_17);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_14, function);
                __pyx_t_18 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_t_16};
              __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18);
              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
              if (unlikely(!__pyx_t_13)) __PYX_ERR(10, 285, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_13);
              __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            }
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_11, (PyObject*)__pyx_t_13))) __PYX_ERR(10, 285, __pyx_L7_error)
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          }
        } /* exit inner scope */
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_11))) __PYX_ERR(10, 285, __pyx_L7_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      }
      __Pyx_XDECREF(__pyx_9genexpr86__pyx_v_i); __pyx_9genexpr86__pyx_v_i = 0;
      goto __pyx_L12_exit_scope;
      __pyx_L7_error:;
      __Pyx_XDECREF(__pyx_9genexpr86__pyx_v_i); __pyx_9genexpr86__pyx_v_i = 0;
      goto __pyx_L1_error;
      __pyx_L12_exit_scope:;
    } /* exit inner scope */
    __pyx_t_11 = NULL;
    __pyx_t_18 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_18 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_9};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 285, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_its_matrix, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "cython/core/dirichlet.pyx":288
 *                                   for j in range(4)] for i in range(4)] )
 *             d = {
 *                 "length" : self._number_(length),             # <<<<<<<<<<<<<<
 *                 "parity" : MatrixParity[geodesics[n].parity],
 *                 "topology" : Orbifold1[geodesics[n].topology],
 */
    __pyx_t_6 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_11 = NULL;
    __pyx_t_18 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_18 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_length};
      __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_18, 1+__pyx_t_18);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 288, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_length, __pyx_t_8) < 0) __PYX_ERR(10, 288, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cython/core/dirichlet.pyx":289
 *             d = {
 *                 "length" : self._number_(length),
 *                 "parity" : MatrixParity[geodesics[n].parity],             # <<<<<<<<<<<<<<
 *                 "topology" : Orbifold1[geodesics[n].topology],
 *                 "multiplicity" :  geodesics[n].multiplicity,
 */
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_MatrixParity); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyInt_From_MatrixParity((__pyx_v_geodesics[__pyx_v_n]).parity); if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(10, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_parity, __pyx_t_11) < 0) __PYX_ERR(10, 288, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "cython/core/dirichlet.pyx":290
 *                 "length" : self._number_(length),
 *                 "parity" : MatrixParity[geodesics[n].parity],
 *                 "topology" : Orbifold1[geodesics[n].topology],             # <<<<<<<<<<<<<<
 *                 "multiplicity" :  geodesics[n].multiplicity,
 *                 "matrix" : its_matrix }
 */
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Orbifold1); if (unlikely(!__pyx_t_11)) __PYX_ERR(10, 290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_9 = __Pyx_PyInt_From_Orbifold1((__pyx_v_geodesics[__pyx_v_n]).topology); if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 290, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_topology, __pyx_t_8) < 0) __PYX_ERR(10, 288, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cython/core/dirichlet.pyx":291
 *                 "parity" : MatrixParity[geodesics[n].parity],
 *                 "topology" : Orbifold1[geodesics[n].topology],
 *                 "multiplicity" :  geodesics[n].multiplicity,             # <<<<<<<<<<<<<<
 *                 "matrix" : its_matrix }
 * 
 */
    __pyx_t_8 = __Pyx_PyInt_From_int((__pyx_v_geodesics[__pyx_v_n]).multiplicity); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_multiplicity, __pyx_t_8) < 0) __PYX_ERR(10, 288, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cython/core/dirichlet.pyx":292
 *                 "topology" : Orbifold1[geodesics[n].topology],
 *                 "multiplicity" :  geodesics[n].multiplicity,
 *                 "matrix" : its_matrix }             # <<<<<<<<<<<<<<
 * 
 *             c_word = geodesics[n].word
 */
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_matrix, __pyx_v_its_matrix) < 0) __PYX_ERR(10, 288, __pyx_L1_error)
    __Pyx_XDECREF_SET(__pyx_v_d, ((PyObject*)__pyx_t_6));
    __pyx_t_6 = 0;

    /* "cython/core/dirichlet.pyx":294
 *                 "matrix" : its_matrix }
 * 
 *             c_word = geodesics[n].word             # <<<<<<<<<<<<<<
 *             if c_word:
 *                 d['word'] = c_word_as_string(
 */
    __pyx_t_19 = (__pyx_v_geodesics[__pyx_v_n]).word;
    __pyx_v_c_word = __pyx_t_19;

    /* "cython/core/dirichlet.pyx":295
 * 
 *             c_word = geodesics[n].word
 *             if c_word:             # <<<<<<<<<<<<<<
 *                 d['word'] = c_word_as_string(
 *                     c_word, self.c_num_generators, verbose_form = False)
 */
    __pyx_t_20 = (__pyx_v_c_word != 0);
    if (__pyx_t_20) {

      /* "cython/core/dirichlet.pyx":296
 *             c_word = geodesics[n].word
 *             if c_word:
 *                 d['word'] = c_word_as_string(             # <<<<<<<<<<<<<<
 *                     c_word, self.c_num_generators, verbose_form = False)
 * 
 */
      __pyx_t_6 = __pyx_f_6SnapPy_c_word_as_string(__pyx_v_c_word, __pyx_v_self->c_num_generators, Py_False); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 296, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely((PyDict_SetItem(__pyx_v_d, __pyx_n_s_word, __pyx_t_6) < 0))) __PYX_ERR(10, 296, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "cython/core/dirichlet.pyx":295
 * 
 *             c_word = geodesics[n].word
 *             if c_word:             # <<<<<<<<<<<<<<
 *                 d['word'] = c_word_as_string(
 *                     c_word, self.c_num_generators, verbose_form = False)
 */
    }

    /* "cython/core/dirichlet.pyx":299
 *                     c_word, self.c_num_generators, verbose_form = False)
 * 
 *             spectrum.append(LengthSpectrumInfo(**d))             # <<<<<<<<<<<<<<
 *         free_length_spectrum(geodesics, num_lengths)
 *         return LengthSpectrum(spectrum)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_LengthSpectrumInfo); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = PyDict_Copy(__pyx_v_d); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_21 = __Pyx_PyList_Append(__pyx_v_spectrum, __pyx_t_9); if (unlikely(__pyx_t_21 == ((int)-1))) __PYX_ERR(10, 299, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }

  /* "cython/core/dirichlet.pyx":300
 * 
 *             spectrum.append(LengthSpectrumInfo(**d))
 *         free_length_spectrum(geodesics, num_lengths)             # <<<<<<<<<<<<<<
 *         return LengthSpectrum(spectrum)
 * 
 */
  free_length_spectrum(__pyx_v_geodesics, __pyx_v_num_lengths); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 300, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":301
 *             spectrum.append(LengthSpectrumInfo(**d))
 *         free_length_spectrum(geodesics, num_lengths)
 *         return LengthSpectrum(spectrum)             # <<<<<<<<<<<<<<
 * 
 *     def vertex_list(self, details = False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_LengthSpectrum); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_spectrum};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __pyx_r = __pyx_t_9;
  __pyx_t_9 = 0;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":236
 *         return self._number_(radius)
 * 
 *     def length_spectrum_dicts(self, cutoff_length=1.0,             # <<<<<<<<<<<<<<
 *                               full_rigor=True,
 *                               multiplicities=True,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain.length_spectrum_dicts", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_spectrum);
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XDECREF(__pyx_v_its_matrix);
  __Pyx_XDECREF(__pyx_v_d);
  __Pyx_XDECREF(__pyx_9genexpr86__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":303
 *         return LengthSpectrum(spectrum)
 * 
 *     def vertex_list(self, details = False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of the coordinates of the vertices.  These are
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_27vertex_list(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_6SnapPy_16CDirichletDomain_26vertex_list, "CDirichletDomain.vertex_list(self, details=False)\n\n        Return a list of the coordinates of the vertices.  These are\n        the three space coordinates of a point in the time=1 slice of\n        Minkowski space.  That is to say, these are the coordinates of\n        the image of the point under projection into the Klein model.\n\n        If `details = True` is passed, returns a list of vertices,\n        each represented by a dictionary with keys 'position',\n        'ideal', 'vertex_class'. The coordinates are the value for\n        'position'. The index of the vertex class this vertex belongs\n        to is the value for 'vertex_class'. The value for 'ideal'\n        is True if the vertex is an ideal point.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_27vertex_list = {"vertex_list", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_27vertex_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_26vertex_list};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_27vertex_list(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_details = 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("vertex_list (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_details,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_details);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 303, __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, "vertex_list") < 0)) __PYX_ERR(10, 303, __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_details = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("vertex_list", 0, 0, 1, __pyx_nargs); __PYX_ERR(10, 303, __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("SnapPy.CDirichletDomain.vertex_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_26vertex_list(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self), __pyx_v_details);

  /* 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_6SnapPy_16CDirichletDomain_26vertex_list(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self, PyObject *__pyx_v_details) {
  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("vertex_list", 1);

  /* "cython/core/dirichlet.pyx":318
 *         """
 * 
 *         if details:             # <<<<<<<<<<<<<<
 *             return self._vertex_data_list()
 *         else:
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_details); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(10, 318, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/dirichlet.pyx":319
 * 
 *         if details:
 *             return self._vertex_data_list()             # <<<<<<<<<<<<<<
 *         else:
 *             return self._vertex_list()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vertex_data_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 319, __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(10, 319, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/dirichlet.pyx":318
 *         """
 * 
 *         if details:             # <<<<<<<<<<<<<<
 *             return self._vertex_data_list()
 *         else:
 */
  }

  /* "cython/core/dirichlet.pyx":321
 *             return self._vertex_data_list()
 *         else:
 *             return self._vertex_list()             # <<<<<<<<<<<<<<
 * 
 *     def _vertex_list(self):
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vertex_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 321, __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(10, 321, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "cython/core/dirichlet.pyx":303
 *         return LengthSpectrum(spectrum)
 * 
 *     def vertex_list(self, details = False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of the coordinates of the vertices.  These are
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain.vertex_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":323
 *             return self._vertex_list()
 * 
 *     def _vertex_list(self):             # <<<<<<<<<<<<<<
 *         cdef WEVertex *vertex = &self.c_dirichlet_domain.vertex_list_begin
 *         vertices = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_29_vertex_list(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_6SnapPy_16CDirichletDomain_28_vertex_list, "CDirichletDomain._vertex_list(self)");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_29_vertex_list = {"_vertex_list", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_29_vertex_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_28_vertex_list};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_29_vertex_list(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("_vertex_list (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("_vertex_list", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_vertex_list", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_28_vertex_list(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_28_vertex_list(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self) {
  WEVertex *__pyx_v_vertex;
  PyObject *__pyx_v_vertices = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  WEVertex *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  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("_vertex_list", 1);

  /* "cython/core/dirichlet.pyx":324
 * 
 *     def _vertex_list(self):
 *         cdef WEVertex *vertex = &self.c_dirichlet_domain.vertex_list_begin             # <<<<<<<<<<<<<<
 *         vertices = []
 *         vertex = vertex.next
 */
  __pyx_v_vertex = (&__pyx_v_self->c_dirichlet_domain->vertex_list_begin);

  /* "cython/core/dirichlet.pyx":325
 *     def _vertex_list(self):
 *         cdef WEVertex *vertex = &self.c_dirichlet_domain.vertex_list_begin
 *         vertices = []             # <<<<<<<<<<<<<<
 *         vertex = vertex.next
 *         while vertex != &self.c_dirichlet_domain.vertex_list_end:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_vertices = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/dirichlet.pyx":326
 *         cdef WEVertex *vertex = &self.c_dirichlet_domain.vertex_list_begin
 *         vertices = []
 *         vertex = vertex.next             # <<<<<<<<<<<<<<
 *         while vertex != &self.c_dirichlet_domain.vertex_list_end:
 *             vertices.append(
 */
  __pyx_t_2 = __pyx_v_vertex->next;
  __pyx_v_vertex = __pyx_t_2;

  /* "cython/core/dirichlet.pyx":327
 *         vertices = []
 *         vertex = vertex.next
 *         while vertex != &self.c_dirichlet_domain.vertex_list_end:             # <<<<<<<<<<<<<<
 *             vertices.append(
 *                 (self._number_(Real2Number(<Real>vertex.x[1])),
 */
  while (1) {
    __pyx_t_3 = (__pyx_v_vertex != (&__pyx_v_self->c_dirichlet_domain->vertex_list_end));
    if (!__pyx_t_3) break;

    /* "cython/core/dirichlet.pyx":329
 *         while vertex != &self.c_dirichlet_domain.vertex_list_end:
 *             vertices.append(
 *                 (self._number_(Real2Number(<Real>vertex.x[1])),             # <<<<<<<<<<<<<<
 *                  self._number_(Real2Number(<Real>vertex.x[2])),
 *                  self._number_(Real2Number(<Real>vertex.x[3]))) )
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __pyx_f_6SnapPy_Real2Number(((__pyx_t_6SnapPy_Real)(__pyx_v_vertex->x[1]))); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 329, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }

    /* "cython/core/dirichlet.pyx":330
 *             vertices.append(
 *                 (self._number_(Real2Number(<Real>vertex.x[1])),
 *                  self._number_(Real2Number(<Real>vertex.x[2])),             # <<<<<<<<<<<<<<
 *                  self._number_(Real2Number(<Real>vertex.x[3]))) )
 *             vertex = vertex.next
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __pyx_f_6SnapPy_Real2Number(((__pyx_t_6SnapPy_Real)(__pyx_v_vertex->x[2]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 330, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 330, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }

    /* "cython/core/dirichlet.pyx":331
 *                 (self._number_(Real2Number(<Real>vertex.x[1])),
 *                  self._number_(Real2Number(<Real>vertex.x[2])),
 *                  self._number_(Real2Number(<Real>vertex.x[3]))) )             # <<<<<<<<<<<<<<
 *             vertex = vertex.next
 *         return vertices
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = __pyx_f_6SnapPy_Real2Number(((__pyx_t_6SnapPy_Real)(__pyx_v_vertex->x[3]))); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 331, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_8};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 331, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }

    /* "cython/core/dirichlet.pyx":329
 *         while vertex != &self.c_dirichlet_domain.vertex_list_end:
 *             vertices.append(
 *                 (self._number_(Real2Number(<Real>vertex.x[1])),             # <<<<<<<<<<<<<<
 *                  self._number_(Real2Number(<Real>vertex.x[2])),
 *                  self._number_(Real2Number(<Real>vertex.x[3]))) )
 */
    __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 329, __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(10, 329, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4)) __PYX_ERR(10, 329, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5)) __PYX_ERR(10, 329, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;

    /* "cython/core/dirichlet.pyx":328
 *         vertex = vertex.next
 *         while vertex != &self.c_dirichlet_domain.vertex_list_end:
 *             vertices.append(             # <<<<<<<<<<<<<<
 *                 (self._number_(Real2Number(<Real>vertex.x[1])),
 *                  self._number_(Real2Number(<Real>vertex.x[2])),
 */
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_vertices, __pyx_t_6); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(10, 328, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "cython/core/dirichlet.pyx":332
 *                  self._number_(Real2Number(<Real>vertex.x[2])),
 *                  self._number_(Real2Number(<Real>vertex.x[3]))) )
 *             vertex = vertex.next             # <<<<<<<<<<<<<<
 *         return vertices
 * 
 */
    __pyx_t_2 = __pyx_v_vertex->next;
    __pyx_v_vertex = __pyx_t_2;
  }

  /* "cython/core/dirichlet.pyx":333
 *                  self._number_(Real2Number(<Real>vertex.x[3]))) )
 *             vertex = vertex.next
 *         return vertices             # <<<<<<<<<<<<<<
 * 
 *     def _vertex_data_list(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_vertices);
  __pyx_r = __pyx_v_vertices;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":323
 *             return self._vertex_list()
 * 
 *     def _vertex_list(self):             # <<<<<<<<<<<<<<
 *         cdef WEVertex *vertex = &self.c_dirichlet_domain.vertex_list_begin
 *         vertices = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain._vertex_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_vertices);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":335
 *         return vertices
 * 
 *     def _vertex_data_list(self):             # <<<<<<<<<<<<<<
 *         cdef WEVertex *vertex = &self.c_dirichlet_domain.vertex_list_begin
 *         vertices = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_31_vertex_data_list(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_6SnapPy_16CDirichletDomain_30_vertex_data_list, "CDirichletDomain._vertex_data_list(self)");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_31_vertex_data_list = {"_vertex_data_list", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_31_vertex_data_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_30_vertex_data_list};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_31_vertex_data_list(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("_vertex_data_list (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("_vertex_data_list", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_vertex_data_list", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_30_vertex_data_list(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_30_vertex_data_list(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self) {
  WEVertex *__pyx_v_vertex;
  PyObject *__pyx_v_vertices = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  WEVertex *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_vertex_data_list", 1);

  /* "cython/core/dirichlet.pyx":336
 * 
 *     def _vertex_data_list(self):
 *         cdef WEVertex *vertex = &self.c_dirichlet_domain.vertex_list_begin             # <<<<<<<<<<<<<<
 *         vertices = []
 *         vertex = vertex.next
 */
  __pyx_v_vertex = (&__pyx_v_self->c_dirichlet_domain->vertex_list_begin);

  /* "cython/core/dirichlet.pyx":337
 *     def _vertex_data_list(self):
 *         cdef WEVertex *vertex = &self.c_dirichlet_domain.vertex_list_begin
 *         vertices = []             # <<<<<<<<<<<<<<
 *         vertex = vertex.next
 *         while vertex != &self.c_dirichlet_domain.vertex_list_end:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_vertices = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/dirichlet.pyx":338
 *         cdef WEVertex *vertex = &self.c_dirichlet_domain.vertex_list_begin
 *         vertices = []
 *         vertex = vertex.next             # <<<<<<<<<<<<<<
 *         while vertex != &self.c_dirichlet_domain.vertex_list_end:
 *             vertices.append(
 */
  __pyx_t_2 = __pyx_v_vertex->next;
  __pyx_v_vertex = __pyx_t_2;

  /* "cython/core/dirichlet.pyx":339
 *         vertices = []
 *         vertex = vertex.next
 *         while vertex != &self.c_dirichlet_domain.vertex_list_end:             # <<<<<<<<<<<<<<
 *             vertices.append(
 *                 {'position': ( self._number_(Real2Number(<Real>vertex.x[1])),
 */
  while (1) {
    __pyx_t_3 = (__pyx_v_vertex != (&__pyx_v_self->c_dirichlet_domain->vertex_list_end));
    if (!__pyx_t_3) break;

    /* "cython/core/dirichlet.pyx":341
 *         while vertex != &self.c_dirichlet_domain.vertex_list_end:
 *             vertices.append(
 *                 {'position': ( self._number_(Real2Number(<Real>vertex.x[1])),             # <<<<<<<<<<<<<<
 *                                self._number_(Real2Number(<Real>vertex.x[2])),
 *                                self._number_(Real2Number(<Real>vertex.x[3])) ),
 */
    __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __pyx_f_6SnapPy_Real2Number(((__pyx_t_6SnapPy_Real)(__pyx_v_vertex->x[1]))); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 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_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 341, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }

    /* "cython/core/dirichlet.pyx":342
 *             vertices.append(
 *                 {'position': ( self._number_(Real2Number(<Real>vertex.x[1])),
 *                                self._number_(Real2Number(<Real>vertex.x[2])),             # <<<<<<<<<<<<<<
 *                                self._number_(Real2Number(<Real>vertex.x[3])) ),
 *                  'ideal': bool(vertex.ideal),
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __pyx_f_6SnapPy_Real2Number(((__pyx_t_6SnapPy_Real)(__pyx_v_vertex->x[2]))); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 342, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }

    /* "cython/core/dirichlet.pyx":343
 *                 {'position': ( self._number_(Real2Number(<Real>vertex.x[1])),
 *                                self._number_(Real2Number(<Real>vertex.x[2])),
 *                                self._number_(Real2Number(<Real>vertex.x[3])) ),             # <<<<<<<<<<<<<<
 *                  'ideal': bool(vertex.ideal),
 *                  'vertex_class' : vertex.v_class.index
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __pyx_f_6SnapPy_Real2Number(((__pyx_t_6SnapPy_Real)(__pyx_v_vertex->x[3]))); if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 343, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = NULL;
    __pyx_t_8 = 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_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_9};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 343, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }

    /* "cython/core/dirichlet.pyx":341
 *         while vertex != &self.c_dirichlet_domain.vertex_list_end:
 *             vertices.append(
 *                 {'position': ( self._number_(Real2Number(<Real>vertex.x[1])),             # <<<<<<<<<<<<<<
 *                                self._number_(Real2Number(<Real>vertex.x[2])),
 *                                self._number_(Real2Number(<Real>vertex.x[3])) ),
 */
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_4);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4)) __PYX_ERR(10, 341, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_5);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5)) __PYX_ERR(10, 341, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6)) __PYX_ERR(10, 341, __pyx_L1_error);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_position, __pyx_t_7) < 0) __PYX_ERR(10, 341, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cython/core/dirichlet.pyx":344
 *                                self._number_(Real2Number(<Real>vertex.x[2])),
 *                                self._number_(Real2Number(<Real>vertex.x[3])) ),
 *                  'ideal': bool(vertex.ideal),             # <<<<<<<<<<<<<<
 *                  'vertex_class' : vertex.v_class.index
 *                  })
 */
    __pyx_t_7 = __Pyx_PyInt_From_Boolean(__pyx_v_vertex->ideal); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(10, 344, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyBool_FromLong((!(!__pyx_t_3))); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ideal, __pyx_t_7) < 0) __PYX_ERR(10, 341, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cython/core/dirichlet.pyx":345
 *                                self._number_(Real2Number(<Real>vertex.x[3])) ),
 *                  'ideal': bool(vertex.ideal),
 *                  'vertex_class' : vertex.v_class.index             # <<<<<<<<<<<<<<
 *                  })
 *             vertex = vertex.next
 */
    __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_vertex->v_class->index); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_vertex_class, __pyx_t_7) < 0) __PYX_ERR(10, 341, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cython/core/dirichlet.pyx":340
 *         vertex = vertex.next
 *         while vertex != &self.c_dirichlet_domain.vertex_list_end:
 *             vertices.append(             # <<<<<<<<<<<<<<
 *                 {'position': ( self._number_(Real2Number(<Real>vertex.x[1])),
 *                                self._number_(Real2Number(<Real>vertex.x[2])),
 */
    __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_vertices, __pyx_t_1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(10, 340, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":347
 *                  'vertex_class' : vertex.v_class.index
 *                  })
 *             vertex = vertex.next             # <<<<<<<<<<<<<<
 *         return vertices
 * 
 */
    __pyx_t_2 = __pyx_v_vertex->next;
    __pyx_v_vertex = __pyx_t_2;
  }

  /* "cython/core/dirichlet.pyx":348
 *                  })
 *             vertex = vertex.next
 *         return vertices             # <<<<<<<<<<<<<<
 * 
 *     def _vertex_to_index_dict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_vertices);
  __pyx_r = __pyx_v_vertices;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":335
 *         return vertices
 * 
 *     def _vertex_data_list(self):             # <<<<<<<<<<<<<<
 *         cdef WEVertex *vertex = &self.c_dirichlet_domain.vertex_list_begin
 *         vertices = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain._vertex_data_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_vertices);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":350
 *         return vertices
 * 
 *     def _vertex_to_index_dict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns dictionary from WEVertex pointer to index of vertex.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_33_vertex_to_index_dict(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_6SnapPy_16CDirichletDomain_32_vertex_to_index_dict, "CDirichletDomain._vertex_to_index_dict(self)\n\n        Returns dictionary from WEVertex pointer to index of vertex.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_33_vertex_to_index_dict = {"_vertex_to_index_dict", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_33_vertex_to_index_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_32_vertex_to_index_dict};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_33_vertex_to_index_dict(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("_vertex_to_index_dict (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("_vertex_to_index_dict", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_vertex_to_index_dict", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_32_vertex_to_index_dict(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_32_vertex_to_index_dict(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self) {
  WEVertex *__pyx_v_vertex;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  WEVertex *__pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_vertex_to_index_dict", 1);

  /* "cython/core/dirichlet.pyx":354
 *         Returns dictionary from WEVertex pointer to index of vertex.
 *         """
 *         cdef WEVertex *vertex = &self.c_dirichlet_domain.vertex_list_begin             # <<<<<<<<<<<<<<
 * 
 *         result = {}
 */
  __pyx_v_vertex = (&__pyx_v_self->c_dirichlet_domain->vertex_list_begin);

  /* "cython/core/dirichlet.pyx":356
 *         cdef WEVertex *vertex = &self.c_dirichlet_domain.vertex_list_begin
 * 
 *         result = {}             # <<<<<<<<<<<<<<
 *         index = 0
 *         vertex = vertex.next
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 356, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/dirichlet.pyx":357
 * 
 *         result = {}
 *         index = 0             # <<<<<<<<<<<<<<
 *         vertex = vertex.next
 *         while vertex != &self.c_dirichlet_domain.vertex_list_end:
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_index = __pyx_int_0;

  /* "cython/core/dirichlet.pyx":358
 *         result = {}
 *         index = 0
 *         vertex = vertex.next             # <<<<<<<<<<<<<<
 *         while vertex != &self.c_dirichlet_domain.vertex_list_end:
 *             result[<size_t>(vertex)] = index
 */
  __pyx_t_2 = __pyx_v_vertex->next;
  __pyx_v_vertex = __pyx_t_2;

  /* "cython/core/dirichlet.pyx":359
 *         index = 0
 *         vertex = vertex.next
 *         while vertex != &self.c_dirichlet_domain.vertex_list_end:             # <<<<<<<<<<<<<<
 *             result[<size_t>(vertex)] = index
 *             index += 1
 */
  while (1) {
    __pyx_t_3 = (__pyx_v_vertex != (&__pyx_v_self->c_dirichlet_domain->vertex_list_end));
    if (!__pyx_t_3) break;

    /* "cython/core/dirichlet.pyx":360
 *         vertex = vertex.next
 *         while vertex != &self.c_dirichlet_domain.vertex_list_end:
 *             result[<size_t>(vertex)] = index             # <<<<<<<<<<<<<<
 *             index += 1
 *             vertex = vertex.next
 */
    __pyx_t_1 = __Pyx_PyInt_FromSize_t(((size_t)__pyx_v_vertex)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 360, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely((PyDict_SetItem(__pyx_v_result, __pyx_t_1, __pyx_v_index) < 0))) __PYX_ERR(10, 360, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":361
 *         while vertex != &self.c_dirichlet_domain.vertex_list_end:
 *             result[<size_t>(vertex)] = index
 *             index += 1             # <<<<<<<<<<<<<<
 *             vertex = vertex.next
 *         return result
 */
    __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":362
 *             result[<size_t>(vertex)] = index
 *             index += 1
 *             vertex = vertex.next             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_t_2 = __pyx_v_vertex->next;
    __pyx_v_vertex = __pyx_t_2;
  }

  /* "cython/core/dirichlet.pyx":363
 *             index += 1
 *             vertex = vertex.next
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def _edge_to_index_dict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":350
 *         return vertices
 * 
 *     def _vertex_to_index_dict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns dictionary from WEVertex pointer to index of vertex.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain._vertex_to_index_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":365
 *         return result
 * 
 *     def _edge_to_index_dict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns dictionary from WEEdge pointer to index of edge.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_35_edge_to_index_dict(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_6SnapPy_16CDirichletDomain_34_edge_to_index_dict, "CDirichletDomain._edge_to_index_dict(self)\n\n        Returns dictionary from WEEdge pointer to index of edge.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_35_edge_to_index_dict = {"_edge_to_index_dict", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_35_edge_to_index_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_34_edge_to_index_dict};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_35_edge_to_index_dict(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("_edge_to_index_dict (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("_edge_to_index_dict", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_edge_to_index_dict", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_34_edge_to_index_dict(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_34_edge_to_index_dict(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self) {
  WEEdge *__pyx_v_edge;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  WEEdge *__pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_edge_to_index_dict", 1);

  /* "cython/core/dirichlet.pyx":369
 *         Returns dictionary from WEEdge pointer to index of edge.
 *         """
 *         cdef WEEdge *edge = &self.c_dirichlet_domain.edge_list_begin             # <<<<<<<<<<<<<<
 * 
 *         result = { }
 */
  __pyx_v_edge = (&__pyx_v_self->c_dirichlet_domain->edge_list_begin);

  /* "cython/core/dirichlet.pyx":371
 *         cdef WEEdge *edge = &self.c_dirichlet_domain.edge_list_begin
 * 
 *         result = { }             # <<<<<<<<<<<<<<
 *         index = 0
 *         edge = edge.next
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/dirichlet.pyx":372
 * 
 *         result = { }
 *         index = 0             # <<<<<<<<<<<<<<
 *         edge = edge.next
 *         while edge != &self.c_dirichlet_domain.edge_list_end:
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_index = __pyx_int_0;

  /* "cython/core/dirichlet.pyx":373
 *         result = { }
 *         index = 0
 *         edge = edge.next             # <<<<<<<<<<<<<<
 *         while edge != &self.c_dirichlet_domain.edge_list_end:
 *             result[<size_t>(edge)] = index
 */
  __pyx_t_2 = __pyx_v_edge->next;
  __pyx_v_edge = __pyx_t_2;

  /* "cython/core/dirichlet.pyx":374
 *         index = 0
 *         edge = edge.next
 *         while edge != &self.c_dirichlet_domain.edge_list_end:             # <<<<<<<<<<<<<<
 *             result[<size_t>(edge)] = index
 *             index += 1
 */
  while (1) {
    __pyx_t_3 = (__pyx_v_edge != (&__pyx_v_self->c_dirichlet_domain->edge_list_end));
    if (!__pyx_t_3) break;

    /* "cython/core/dirichlet.pyx":375
 *         edge = edge.next
 *         while edge != &self.c_dirichlet_domain.edge_list_end:
 *             result[<size_t>(edge)] = index             # <<<<<<<<<<<<<<
 *             index += 1
 *             edge = edge.next
 */
    __pyx_t_1 = __Pyx_PyInt_FromSize_t(((size_t)__pyx_v_edge)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 375, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely((PyDict_SetItem(__pyx_v_result, __pyx_t_1, __pyx_v_index) < 0))) __PYX_ERR(10, 375, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":376
 *         while edge != &self.c_dirichlet_domain.edge_list_end:
 *             result[<size_t>(edge)] = index
 *             index += 1             # <<<<<<<<<<<<<<
 *             edge = edge.next
 *         return result
 */
    __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_index, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":377
 *             result[<size_t>(edge)] = index
 *             index += 1
 *             edge = edge.next             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_t_2 = __pyx_v_edge->next;
    __pyx_v_edge = __pyx_t_2;
  }

  /* "cython/core/dirichlet.pyx":378
 *             index += 1
 *             edge = edge.next
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def face_list(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":365
 *         return result
 * 
 *     def _edge_to_index_dict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns dictionary from WEEdge pointer to index of edge.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain._edge_to_index_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":380
 *         return result
 * 
 *     def face_list(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of faces, each represented as a dictionary with
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_37face_list(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_6SnapPy_16CDirichletDomain_36face_list, "CDirichletDomain.face_list(self)\n\n        Return a list of faces, each represented as a dictionary with\n        keys 'vertices', 'distance', 'closest', 'hue', 'vertex_indices',\n        'edge_indices', 'vertex_image_indices', 'edge_image_indices',\n        'edge_orientations'.\n\n        The distance from the origin is the value for 'distance', and\n        the value for 'closest' is the orthogonal projection of the\n        origin to the plane containing the face.  The vertices of each\n        face are listed in clockwise order, as viewed from outside the\n        polyhedron.\n\n        The coordinates of vertices are stored in 'vertices' and the\n        corresponding index into vertex_data_list() is stored in\n        'vertex_index'. The indices (in edge_list()) to the edges of\n        the face (also in clockwise order) are stored in\n        'edge_indices' such that the first edge is adjacent to the\n        first and second vertex.  The respective value in\n        'edge_orientations' is +/-1 to indicate whether the\n        orientation of the edge induced from the orientation of the face\n        is the same or opposite than the edges orientation.\n\n        To find the image of a vertex or edge adjacent to a face under\n        the pairing matrix for this face, lookup the index in\n        'vertex_image_indices', respectively, 'edge_image_indices' at\n        the respective position.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_37face_list = {"face_list", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_37face_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_36face_list};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_37face_list(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("face_list (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("face_list", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "face_list", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_36face_list(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6SnapPy_16CDirichletDomain_9face_list_2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cython/core/dirichlet.pyx":434
 *                 vertex = edge.v[end]
 *                 vertices.append(tuple(
 *                     self._number_(Real2Number(<Real>vertex.x[i]))             # <<<<<<<<<<<<<<
 *                     for i in range(1,4) ))
 *                 vertex_indices.append(
 */

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_9face_list_genexpr(PyObject *__pyx_self) {
  struct __pyx_obj_6SnapPy___pyx_scope_struct_7_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_6SnapPy___pyx_scope_struct_7_genexpr *)__pyx_tp_new_6SnapPy___pyx_scope_struct_7_genexpr(__pyx_ptype_6SnapPy___pyx_scope_struct_7_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_7_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(10, 434, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list *) __pyx_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_6SnapPy_16CDirichletDomain_9face_list_2generator4, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_face_list_locals_genexpr, __pyx_n_s_SnapPy); if (unlikely(!gen)) __PYX_ERR(10, 434, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("SnapPy.CDirichletDomain.face_list.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_6SnapPy_16CDirichletDomain_9face_list_2generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6SnapPy___pyx_scope_struct_7_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_7_genexpr *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  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;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(10, 434, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":435
 *                 vertices.append(tuple(
 *                     self._number_(Real2Number(<Real>vertex.x[i]))
 *                     for i in range(1,4) ))             # <<<<<<<<<<<<<<
 *                 vertex_indices.append(
 *                     vertex_to_index[<size_t>(vertex)])
 */
  for (__pyx_t_1 = 1; __pyx_t_1 < 4; __pyx_t_1+=1) {
    __pyx_cur_scope->__pyx_v_i = __pyx_t_1;

    /* "cython/core/dirichlet.pyx":434
 *                 vertex = edge.v[end]
 *                 vertices.append(tuple(
 *                     self._number_(Real2Number(<Real>vertex.x[i]))             # <<<<<<<<<<<<<<
 *                     for i in range(1,4) ))
 *                 vertex_indices.append(
 */
    if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(10, 434, __pyx_L1_error) }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 434, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __pyx_f_6SnapPy_Real2Number(((__pyx_t_6SnapPy_Real)(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_vertex->x[__pyx_cur_scope->__pyx_v_i]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 434, __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_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 434, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(10, 434, __pyx_L1_error)
  }
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_Generator_Replace_StopIteration(0);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  #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;
}

/* "cython/core/dirichlet.pyx":380
 *         return result
 * 
 *     def face_list(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of faces, each represented as a dictionary with
 */

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_36face_list(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self) {
  struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list *__pyx_cur_scope;
  WEFace *__pyx_v_face;
  WEEdge *__pyx_v_edge;
  WEEdge *__pyx_v_neighbor;
  PyObject *__pyx_v_vertex_to_index = NULL;
  PyObject *__pyx_v_edge_to_index = NULL;
  long __pyx_v_left;
  long __pyx_v_right;
  long __pyx_v_tail;
  long __pyx_v_tip;
  PyObject *__pyx_v_faces = NULL;
  PyObject *__pyx_v_vertices = NULL;
  PyObject *__pyx_v_vertex_indices = NULL;
  PyObject *__pyx_v_vertex_image_indices = NULL;
  PyObject *__pyx_v_edge_indices = NULL;
  PyObject *__pyx_v_edge_image_indices = NULL;
  PyObject *__pyx_v_edge_orientations = NULL;
  long __pyx_v_side;
  long __pyx_v_end;
  long __pyx_v_neighbor_end;
  PyObject *__pyx_gb_6SnapPy_16CDirichletDomain_9face_list_2generator4 = 0;
  PyObject *__pyx_9genexpr89__pyx_v_i = 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;
  long __pyx_t_5;
  long __pyx_t_6;
  long __pyx_t_7;
  long __pyx_t_8;
  WEFace *__pyx_t_9;
  int __pyx_t_10;
  WEEdge *__pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  Py_ssize_t __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  double __pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("face_list", 0);
  __pyx_cur_scope = (struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list *)__pyx_tp_new_6SnapPy___pyx_scope_struct_6_face_list(__pyx_ptype_6SnapPy___pyx_scope_struct_6_face_list, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(10, 380, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);

  /* "cython/core/dirichlet.pyx":408
 *         the respective position.
 *         """
 *         cdef WEFace *face = &self.c_dirichlet_domain.face_list_begin             # <<<<<<<<<<<<<<
 *         cdef WEEdge *edge
 *         cdef WEEdge *neighbor
 */
  __pyx_v_face = (&__pyx_cur_scope->__pyx_v_self->c_dirichlet_domain->face_list_begin);

  /* "cython/core/dirichlet.pyx":413
 *         cdef WEVertex *vertex
 * 
 *         vertex_to_index = self._vertex_to_index_dict()             # <<<<<<<<<<<<<<
 *         edge_to_index = self._edge_to_index_dict()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_vertex_to_index_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 413, __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(10, 413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_vertex_to_index = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/dirichlet.pyx":414
 * 
 *         vertex_to_index = self._vertex_to_index_dict()
 *         edge_to_index = self._edge_to_index_dict()             # <<<<<<<<<<<<<<
 * 
 *         # WE enums -- see winged_edge.h
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_edge_to_index_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 414, __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(10, 414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_edge_to_index = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/dirichlet.pyx":417
 * 
 *         # WE enums -- see winged_edge.h
 *         left, right, tail, tip = 0, 1, 0, 1             # <<<<<<<<<<<<<<
 *         faces = []
 *         face = face.next
 */
  __pyx_t_5 = 0;
  __pyx_t_6 = 1;
  __pyx_t_7 = 0;
  __pyx_t_8 = 1;
  __pyx_v_left = __pyx_t_5;
  __pyx_v_right = __pyx_t_6;
  __pyx_v_tail = __pyx_t_7;
  __pyx_v_tip = __pyx_t_8;

  /* "cython/core/dirichlet.pyx":418
 *         # WE enums -- see winged_edge.h
 *         left, right, tail, tip = 0, 1, 0, 1
 *         faces = []             # <<<<<<<<<<<<<<
 *         face = face.next
 *         while face != &self.c_dirichlet_domain.face_list_end:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_faces = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/dirichlet.pyx":419
 *         left, right, tail, tip = 0, 1, 0, 1
 *         faces = []
 *         face = face.next             # <<<<<<<<<<<<<<
 *         while face != &self.c_dirichlet_domain.face_list_end:
 *             vertices = []
 */
  __pyx_t_9 = __pyx_v_face->next;
  __pyx_v_face = __pyx_t_9;

  /* "cython/core/dirichlet.pyx":420
 *         faces = []
 *         face = face.next
 *         while face != &self.c_dirichlet_domain.face_list_end:             # <<<<<<<<<<<<<<
 *             vertices = []
 *             vertex_indices = []
 */
  while (1) {
    __pyx_t_10 = (__pyx_v_face != (&__pyx_cur_scope->__pyx_v_self->c_dirichlet_domain->face_list_end));
    if (!__pyx_t_10) break;

    /* "cython/core/dirichlet.pyx":421
 *         face = face.next
 *         while face != &self.c_dirichlet_domain.face_list_end:
 *             vertices = []             # <<<<<<<<<<<<<<
 *             vertex_indices = []
 *             vertex_image_indices = []
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 421, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_vertices, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":422
 *         while face != &self.c_dirichlet_domain.face_list_end:
 *             vertices = []
 *             vertex_indices = []             # <<<<<<<<<<<<<<
 *             vertex_image_indices = []
 *             edge_indices = []
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 422, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_vertex_indices, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":423
 *             vertices = []
 *             vertex_indices = []
 *             vertex_image_indices = []             # <<<<<<<<<<<<<<
 *             edge_indices = []
 *             edge_image_indices = []
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_vertex_image_indices, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":424
 *             vertex_indices = []
 *             vertex_image_indices = []
 *             edge_indices = []             # <<<<<<<<<<<<<<
 *             edge_image_indices = []
 *             edge_orientations = []
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_edge_indices, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":425
 *             vertex_image_indices = []
 *             edge_indices = []
 *             edge_image_indices = []             # <<<<<<<<<<<<<<
 *             edge_orientations = []
 *             edge = face.some_edge
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 425, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_edge_image_indices, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":426
 *             edge_indices = []
 *             edge_image_indices = []
 *             edge_orientations = []             # <<<<<<<<<<<<<<
 *             edge = face.some_edge
 *             while True:
 */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_edge_orientations, ((PyObject*)__pyx_t_1));
    __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":427
 *             edge_image_indices = []
 *             edge_orientations = []
 *             edge = face.some_edge             # <<<<<<<<<<<<<<
 *             while True:
 *                 # find the vertex at the counter-clockwise end
 */
    __pyx_t_11 = __pyx_v_face->some_edge;
    __pyx_v_edge = __pyx_t_11;

    /* "cython/core/dirichlet.pyx":428
 *             edge_orientations = []
 *             edge = face.some_edge
 *             while True:             # <<<<<<<<<<<<<<
 *                 # find the vertex at the counter-clockwise end
 *                 side = left if edge.f[left] == face else right
 */
    while (1) {

      /* "cython/core/dirichlet.pyx":430
 *             while True:
 *                 # find the vertex at the counter-clockwise end
 *                 side = left if edge.f[left] == face else right             # <<<<<<<<<<<<<<
 *                 end = tip if side == left else tail
 *                 vertex = edge.v[end]
 */
      __pyx_t_10 = ((__pyx_v_edge->f[__pyx_v_left]) == __pyx_v_face);
      if (__pyx_t_10) {
        __pyx_t_8 = __pyx_v_left;
      } else {
        __pyx_t_8 = __pyx_v_right;
      }
      __pyx_v_side = __pyx_t_8;

      /* "cython/core/dirichlet.pyx":431
 *                 # find the vertex at the counter-clockwise end
 *                 side = left if edge.f[left] == face else right
 *                 end = tip if side == left else tail             # <<<<<<<<<<<<<<
 *                 vertex = edge.v[end]
 *                 vertices.append(tuple(
 */
      __pyx_t_10 = (__pyx_v_side == __pyx_v_left);
      if (__pyx_t_10) {
        __pyx_t_8 = __pyx_v_tip;
      } else {
        __pyx_t_8 = __pyx_v_tail;
      }
      __pyx_v_end = __pyx_t_8;

      /* "cython/core/dirichlet.pyx":432
 *                 side = left if edge.f[left] == face else right
 *                 end = tip if side == left else tail
 *                 vertex = edge.v[end]             # <<<<<<<<<<<<<<
 *                 vertices.append(tuple(
 *                     self._number_(Real2Number(<Real>vertex.x[i]))
 */
      __pyx_cur_scope->__pyx_v_vertex = (__pyx_v_edge->v[__pyx_v_end]);

      /* "cython/core/dirichlet.pyx":434
 *                 vertex = edge.v[end]
 *                 vertices.append(tuple(
 *                     self._number_(Real2Number(<Real>vertex.x[i]))             # <<<<<<<<<<<<<<
 *                     for i in range(1,4) ))
 *                 vertex_indices.append(
 */
      __pyx_t_1 = __pyx_pf_6SnapPy_16CDirichletDomain_9face_list_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 434, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cython/core/dirichlet.pyx":433
 *                 end = tip if side == left else tail
 *                 vertex = edge.v[end]
 *                 vertices.append(tuple(             # <<<<<<<<<<<<<<
 *                     self._number_(Real2Number(<Real>vertex.x[i]))
 *                     for i in range(1,4) ))
 */
      __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 433, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_vertices, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(10, 433, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/dirichlet.pyx":437
 *                     for i in range(1,4) ))
 *                 vertex_indices.append(
 *                     vertex_to_index[<size_t>(vertex)])             # <<<<<<<<<<<<<<
 *                 edge_indices.append(
 *                     edge_to_index[<size_t>(edge)])
 */
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_vertex_to_index, ((size_t)__pyx_cur_scope->__pyx_v_vertex), size_t, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 437, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cython/core/dirichlet.pyx":436
 *                     self._number_(Real2Number(<Real>vertex.x[i]))
 *                     for i in range(1,4) ))
 *                 vertex_indices.append(             # <<<<<<<<<<<<<<
 *                     vertex_to_index[<size_t>(vertex)])
 *                 edge_indices.append(
 */
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_vertex_indices, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(10, 436, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/dirichlet.pyx":439
 *                     vertex_to_index[<size_t>(vertex)])
 *                 edge_indices.append(
 *                     edge_to_index[<size_t>(edge)])             # <<<<<<<<<<<<<<
 *                 edge_orientations.append(
 *                     +1 if side == left else -1)
 */
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_edge_to_index, ((size_t)__pyx_v_edge), size_t, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 439, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cython/core/dirichlet.pyx":438
 *                 vertex_indices.append(
 *                     vertex_to_index[<size_t>(vertex)])
 *                 edge_indices.append(             # <<<<<<<<<<<<<<
 *                     edge_to_index[<size_t>(edge)])
 *                 edge_orientations.append(
 */
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_edge_indices, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(10, 438, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/dirichlet.pyx":441
 *                     edge_to_index[<size_t>(edge)])
 *                 edge_orientations.append(
 *                     +1 if side == left else -1)             # <<<<<<<<<<<<<<
 * 
 *                 neighbor = edge.neighbor[side]
 */
      __pyx_t_10 = (__pyx_v_side == __pyx_v_left);
      if (__pyx_t_10) {
        __Pyx_INCREF(__pyx_int_1);
        __pyx_t_2 = __pyx_int_1;
      } else {
        __Pyx_INCREF(__pyx_int_neg_1);
        __pyx_t_2 = __pyx_int_neg_1;
      }

      /* "cython/core/dirichlet.pyx":440
 *                 edge_indices.append(
 *                     edge_to_index[<size_t>(edge)])
 *                 edge_orientations.append(             # <<<<<<<<<<<<<<
 *                     +1 if side == left else -1)
 * 
 */
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_edge_orientations, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(10, 440, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/dirichlet.pyx":443
 *                     +1 if side == left else -1)
 * 
 *                 neighbor = edge.neighbor[side]             # <<<<<<<<<<<<<<
 *                 edge_image_indices.append(
 *                     edge_to_index[<size_t>neighbor])
 */
      __pyx_v_neighbor = (__pyx_v_edge->neighbor[__pyx_v_side]);

      /* "cython/core/dirichlet.pyx":445
 *                 neighbor = edge.neighbor[side]
 *                 edge_image_indices.append(
 *                     edge_to_index[<size_t>neighbor])             # <<<<<<<<<<<<<<
 * 
 *                 neighbor_end = end
 */
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_edge_to_index, ((size_t)__pyx_v_neighbor), size_t, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 445, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cython/core/dirichlet.pyx":444
 * 
 *                 neighbor = edge.neighbor[side]
 *                 edge_image_indices.append(             # <<<<<<<<<<<<<<
 *                     edge_to_index[<size_t>neighbor])
 * 
 */
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_edge_image_indices, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(10, 444, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/dirichlet.pyx":447
 *                     edge_to_index[<size_t>neighbor])
 * 
 *                 neighbor_end = end             # <<<<<<<<<<<<<<
 *                 if not edge.preserves_direction[side]:
 *                     neighbor_end = tail if end == tip else tip
 */
      __pyx_v_neighbor_end = __pyx_v_end;

      /* "cython/core/dirichlet.pyx":448
 * 
 *                 neighbor_end = end
 *                 if not edge.preserves_direction[side]:             # <<<<<<<<<<<<<<
 *                     neighbor_end = tail if end == tip else tip
 * 
 */
      __pyx_t_10 = (!((__pyx_v_edge->preserves_direction[__pyx_v_side]) != 0));
      if (__pyx_t_10) {

        /* "cython/core/dirichlet.pyx":449
 *                 neighbor_end = end
 *                 if not edge.preserves_direction[side]:
 *                     neighbor_end = tail if end == tip else tip             # <<<<<<<<<<<<<<
 * 
 *                 vertex_image_indices.append(
 */
        __pyx_t_10 = (__pyx_v_end == __pyx_v_tip);
        if (__pyx_t_10) {
          __pyx_t_8 = __pyx_v_tail;
        } else {
          __pyx_t_8 = __pyx_v_tip;
        }
        __pyx_v_neighbor_end = __pyx_t_8;

        /* "cython/core/dirichlet.pyx":448
 * 
 *                 neighbor_end = end
 *                 if not edge.preserves_direction[side]:             # <<<<<<<<<<<<<<
 *                     neighbor_end = tail if end == tip else tip
 * 
 */
      }

      /* "cython/core/dirichlet.pyx":452
 * 
 *                 vertex_image_indices.append(
 *                     vertex_to_index[<size_t>(neighbor.v[neighbor_end])])             # <<<<<<<<<<<<<<
 * 
 *                 # get the next edge
 */
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_vertex_to_index, ((size_t)(__pyx_v_neighbor->v[__pyx_v_neighbor_end])), size_t, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 452, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cython/core/dirichlet.pyx":451
 *                     neighbor_end = tail if end == tip else tip
 * 
 *                 vertex_image_indices.append(             # <<<<<<<<<<<<<<
 *                     vertex_to_index[<size_t>(neighbor.v[neighbor_end])])
 * 
 */
      __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_vertex_image_indices, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(10, 451, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/dirichlet.pyx":455
 * 
 *                 # get the next edge
 *                 edge = edge.e[end][side]             # <<<<<<<<<<<<<<
 *                 if edge == face.some_edge:
 *                     break
 */
      __pyx_v_edge = ((__pyx_v_edge->e[__pyx_v_end])[__pyx_v_side]);

      /* "cython/core/dirichlet.pyx":456
 *                 # get the next edge
 *                 edge = edge.e[end][side]
 *                 if edge == face.some_edge:             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
      __pyx_t_10 = (__pyx_v_edge == __pyx_v_face->some_edge);
      if (__pyx_t_10) {

        /* "cython/core/dirichlet.pyx":457
 *                 edge = edge.e[end][side]
 *                 if edge == face.some_edge:
 *                     break             # <<<<<<<<<<<<<<
 * 
 *             faces.append(
 */
        goto __pyx_L6_break;

        /* "cython/core/dirichlet.pyx":456
 *                 # get the next edge
 *                 edge = edge.e[end][side]
 *                 if edge == face.some_edge:             # <<<<<<<<<<<<<<
 *                     break
 * 
 */
      }
    }
    __pyx_L6_break:;

    /* "cython/core/dirichlet.pyx":460
 * 
 *             faces.append(
 *                 {'vertices' : vertices,             # <<<<<<<<<<<<<<
 *                  'vertex_indices' : vertex_indices,
 *                  'edge_indices' : edge_indices,
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 460, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_vertices, __pyx_v_vertices) < 0) __PYX_ERR(10, 460, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":461
 *             faces.append(
 *                 {'vertices' : vertices,
 *                  'vertex_indices' : vertex_indices,             # <<<<<<<<<<<<<<
 *                  'edge_indices' : edge_indices,
 *                  'vertex_image_indices' : vertex_image_indices,
 */
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_vertex_indices, __pyx_v_vertex_indices) < 0) __PYX_ERR(10, 460, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":462
 *                 {'vertices' : vertices,
 *                  'vertex_indices' : vertex_indices,
 *                  'edge_indices' : edge_indices,             # <<<<<<<<<<<<<<
 *                  'vertex_image_indices' : vertex_image_indices,
 *                  'edge_image_indices' : edge_image_indices,
 */
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_edge_indices, __pyx_v_edge_indices) < 0) __PYX_ERR(10, 460, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":463
 *                  'vertex_indices' : vertex_indices,
 *                  'edge_indices' : edge_indices,
 *                  'vertex_image_indices' : vertex_image_indices,             # <<<<<<<<<<<<<<
 *                  'edge_image_indices' : edge_image_indices,
 *                  'distance' : self._number_(Real2Number(<Real>face.dist)),
 */
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_vertex_image_indices, __pyx_v_vertex_image_indices) < 0) __PYX_ERR(10, 460, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":464
 *                  'edge_indices' : edge_indices,
 *                  'vertex_image_indices' : vertex_image_indices,
 *                  'edge_image_indices' : edge_image_indices,             # <<<<<<<<<<<<<<
 *                  'distance' : self._number_(Real2Number(<Real>face.dist)),
 *                  'closest'  : [
 */
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_edge_image_indices, __pyx_v_edge_image_indices) < 0) __PYX_ERR(10, 460, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":465
 *                  'vertex_image_indices' : vertex_image_indices,
 *                  'edge_image_indices' : edge_image_indices,
 *                  'distance' : self._number_(Real2Number(<Real>face.dist)),             # <<<<<<<<<<<<<<
 *                  'closest'  : [
 *                      self._number_(Real2Number(<Real>face.closest_point[i]))
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_13 = __pyx_f_6SnapPy_Real2Number(((__pyx_t_6SnapPy_Real)__pyx_v_face->dist)); if (unlikely(!__pyx_t_13)) __PYX_ERR(10, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_14 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_14)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_14);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_13};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 465, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_distance, __pyx_t_1) < 0) __PYX_ERR(10, 460, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    { /* enter inner scope */

      /* "cython/core/dirichlet.pyx":466
 *                  'edge_image_indices' : edge_image_indices,
 *                  'distance' : self._number_(Real2Number(<Real>face.dist)),
 *                  'closest'  : [             # <<<<<<<<<<<<<<
 *                      self._number_(Real2Number(<Real>face.closest_point[i]))
 *                      for i in range(1,4) ],
 */
      __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 466, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_1);

      /* "cython/core/dirichlet.pyx":468
 *                  'closest'  : [
 *                      self._number_(Real2Number(<Real>face.closest_point[i]))
 *                      for i in range(1,4) ],             # <<<<<<<<<<<<<<
 *                  'hue'      : Real2double(face.f_class.hue),
 *                  'edge_orientations' : edge_orientations})
 */
      for (__pyx_t_8 = 1; __pyx_t_8 < 4; __pyx_t_8+=1) {
        __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 468, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_XDECREF_SET(__pyx_9genexpr89__pyx_v_i, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "cython/core/dirichlet.pyx":467
 *                  'distance' : self._number_(Real2Number(<Real>face.dist)),
 *                  'closest'  : [
 *                      self._number_(Real2Number(<Real>face.closest_point[i]))             # <<<<<<<<<<<<<<
 *                      for i in range(1,4) ],
 *                  'hue'      : Real2double(face.f_class.hue),
 */
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(10, 467, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_9genexpr89__pyx_v_i); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(10, 467, __pyx_L11_error)
        __pyx_t_14 = __pyx_f_6SnapPy_Real2Number(((__pyx_t_6SnapPy_Real)(__pyx_v_face->closest_point[__pyx_t_15]))); if (unlikely(!__pyx_t_14)) __PYX_ERR(10, 467, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_16 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_16)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_16);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_t_14};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 467, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(10, 466, __pyx_L11_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_XDECREF(__pyx_9genexpr89__pyx_v_i); __pyx_9genexpr89__pyx_v_i = 0;
      goto __pyx_L14_exit_scope;
      __pyx_L11_error:;
      __Pyx_XDECREF(__pyx_9genexpr89__pyx_v_i); __pyx_9genexpr89__pyx_v_i = 0;
      goto __pyx_L1_error;
      __pyx_L14_exit_scope:;
    } /* exit inner scope */
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_closest, __pyx_t_1) < 0) __PYX_ERR(10, 460, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":469
 *                      self._number_(Real2Number(<Real>face.closest_point[i]))
 *                      for i in range(1,4) ],
 *                  'hue'      : Real2double(face.f_class.hue),             # <<<<<<<<<<<<<<
 *                  'edge_orientations' : edge_orientations})
 *             face = face.next
 */
    __pyx_t_17 = __pyx_f_6SnapPy_Real2double(__pyx_v_face->f_class->hue); if (unlikely(__pyx_t_17 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(10, 469, __pyx_L1_error)
    __pyx_t_1 = PyFloat_FromDouble(__pyx_t_17); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_hue, __pyx_t_1) < 0) __PYX_ERR(10, 460, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":470
 *                      for i in range(1,4) ],
 *                  'hue'      : Real2double(face.f_class.hue),
 *                  'edge_orientations' : edge_orientations})             # <<<<<<<<<<<<<<
 *             face = face.next
 *         return faces
 */
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_edge_orientations, __pyx_v_edge_orientations) < 0) __PYX_ERR(10, 460, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":459
 *                     break
 * 
 *             faces.append(             # <<<<<<<<<<<<<<
 *                 {'vertices' : vertices,
 *                  'vertex_indices' : vertex_indices,
 */
    __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_faces, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(10, 459, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/dirichlet.pyx":471
 *                  'hue'      : Real2double(face.f_class.hue),
 *                  'edge_orientations' : edge_orientations})
 *             face = face.next             # <<<<<<<<<<<<<<
 *         return faces
 * 
 */
    __pyx_t_9 = __pyx_v_face->next;
    __pyx_v_face = __pyx_t_9;
  }

  /* "cython/core/dirichlet.pyx":472
 *                  'edge_orientations' : edge_orientations})
 *             face = face.next
 *         return faces             # <<<<<<<<<<<<<<
 * 
 *     def edge_list(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_faces);
  __pyx_r = __pyx_v_faces;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":380
 *         return result
 * 
 *     def face_list(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of faces, each represented as a dictionary with
 */

  /* 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_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain.face_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_vertex_to_index);
  __Pyx_XDECREF(__pyx_v_edge_to_index);
  __Pyx_XDECREF(__pyx_v_faces);
  __Pyx_XDECREF(__pyx_v_vertices);
  __Pyx_XDECREF(__pyx_v_vertex_indices);
  __Pyx_XDECREF(__pyx_v_vertex_image_indices);
  __Pyx_XDECREF(__pyx_v_edge_indices);
  __Pyx_XDECREF(__pyx_v_edge_image_indices);
  __Pyx_XDECREF(__pyx_v_edge_orientations);
  __Pyx_XDECREF(__pyx_gb_6SnapPy_16CDirichletDomain_9face_list_2generator4);
  __Pyx_XDECREF(__pyx_9genexpr89__pyx_v_i);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":474
 *         return faces
 * 
 *     def edge_list(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of edges, each represented as a dictionar with keys
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_39edge_list(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_6SnapPy_16CDirichletDomain_38edge_list, "CDirichletDomain.edge_list(self)\n\n        Return a list of edges, each represented as a dictionar with keys\n        'tail_vertex_index', 'tip_vertex_index', 'edge_class'.\n\n        The index (into vertex_data_list()) to the two vertices at the\n        end of the edge are stored in 'tail_vertex_index' and\n        'tip_vertex_index'. The index of the edge class this edge\n        belongs to is stored in 'edge_class'.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_39edge_list = {"edge_list", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_39edge_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_38edge_list};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_39edge_list(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("edge_list (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("edge_list", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "edge_list", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_38edge_list(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_38edge_list(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self) {
  WEEdge *__pyx_v_edge;
  PyObject *__pyx_v_edges = 0;
  PyObject *__pyx_v_vertex_to_index = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  WEEdge *__pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("edge_list", 1);

  /* "cython/core/dirichlet.pyx":485
 *         """
 * 
 *         cdef WEEdge *edge = &self.c_dirichlet_domain.edge_list_begin             # <<<<<<<<<<<<<<
 *         cdef list edges = []
 * 
 */
  __pyx_v_edge = (&__pyx_v_self->c_dirichlet_domain->edge_list_begin);

  /* "cython/core/dirichlet.pyx":486
 * 
 *         cdef WEEdge *edge = &self.c_dirichlet_domain.edge_list_begin
 *         cdef list edges = []             # <<<<<<<<<<<<<<
 * 
 *         vertex_to_index = self._vertex_to_index_dict()
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_edges = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/dirichlet.pyx":488
 *         cdef list edges = []
 * 
 *         vertex_to_index = self._vertex_to_index_dict()             # <<<<<<<<<<<<<<
 * 
 *         edge = edge.next
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vertex_to_index_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 488, __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(10, 488, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_vertex_to_index = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/dirichlet.pyx":490
 *         vertex_to_index = self._vertex_to_index_dict()
 * 
 *         edge = edge.next             # <<<<<<<<<<<<<<
 *         while edge != &self.c_dirichlet_domain.edge_list_end:
 * 
 */
  __pyx_t_5 = __pyx_v_edge->next;
  __pyx_v_edge = __pyx_t_5;

  /* "cython/core/dirichlet.pyx":491
 * 
 *         edge = edge.next
 *         while edge != &self.c_dirichlet_domain.edge_list_end:             # <<<<<<<<<<<<<<
 * 
 *             edges.append(
 */
  while (1) {
    __pyx_t_6 = (__pyx_v_edge != (&__pyx_v_self->c_dirichlet_domain->edge_list_end));
    if (!__pyx_t_6) break;

    /* "cython/core/dirichlet.pyx":494
 * 
 *             edges.append(
 *                 {'tail_vertex_index': vertex_to_index[<size_t>(edge.v[0])],             # <<<<<<<<<<<<<<
 *                  'tip_vertex_index': vertex_to_index[<size_t>(edge.v[1])],
 *                  'edge_class': edge.e_class.index})
 */
    __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_vertex_to_index, ((size_t)(__pyx_v_edge->v[0])), size_t, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_tail_vertex_index, __pyx_t_2) < 0) __PYX_ERR(10, 494, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/dirichlet.pyx":495
 *             edges.append(
 *                 {'tail_vertex_index': vertex_to_index[<size_t>(edge.v[0])],
 *                  'tip_vertex_index': vertex_to_index[<size_t>(edge.v[1])],             # <<<<<<<<<<<<<<
 *                  'edge_class': edge.e_class.index})
 * 
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_vertex_to_index, ((size_t)(__pyx_v_edge->v[1])), size_t, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 495, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_tip_vertex_index, __pyx_t_2) < 0) __PYX_ERR(10, 494, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/dirichlet.pyx":496
 *                 {'tail_vertex_index': vertex_to_index[<size_t>(edge.v[0])],
 *                  'tip_vertex_index': vertex_to_index[<size_t>(edge.v[1])],
 *                  'edge_class': edge.e_class.index})             # <<<<<<<<<<<<<<
 * 
 *             edge = edge.next
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_edge->e_class->index); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 496, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_edge_class, __pyx_t_2) < 0) __PYX_ERR(10, 494, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/dirichlet.pyx":493
 *         while edge != &self.c_dirichlet_domain.edge_list_end:
 * 
 *             edges.append(             # <<<<<<<<<<<<<<
 *                 {'tail_vertex_index': vertex_to_index[<size_t>(edge.v[0])],
 *                  'tip_vertex_index': vertex_to_index[<size_t>(edge.v[1])],
 */
    __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_edges, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(10, 493, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":498
 *                  'edge_class': edge.e_class.index})
 * 
 *             edge = edge.next             # <<<<<<<<<<<<<<
 * 
 *         return edges
 */
    __pyx_t_5 = __pyx_v_edge->next;
    __pyx_v_edge = __pyx_t_5;
  }

  /* "cython/core/dirichlet.pyx":500
 *             edge = edge.next
 * 
 *         return edges             # <<<<<<<<<<<<<<
 * 
 *     def view(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_edges);
  __pyx_r = __pyx_v_edges;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":474
 *         return faces
 * 
 *     def edge_list(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of edges, each represented as a dictionar with keys
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain.edge_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_edges);
  __Pyx_XDECREF(__pyx_v_vertex_to_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":502
 *         return edges
 * 
 *     def view(self):             # <<<<<<<<<<<<<<
 *         if PolyhedronViewer:
 *             return ViewerWindow(PolyhedronViewer, facedicts=self.face_list(),
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_41view(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_6SnapPy_16CDirichletDomain_40view, "CDirichletDomain.view(self)");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_41view = {"view", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_41view, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_40view};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_41view(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("view (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("view", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "view", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_40view(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_40view(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("view", 1);

  /* "cython/core/dirichlet.pyx":503
 * 
 *     def view(self):
 *         if PolyhedronViewer:             # <<<<<<<<<<<<<<
 *             return ViewerWindow(PolyhedronViewer, facedicts=self.face_list(),
 *                                 title=f'Dirichlet Domain of {self.manifold_name}')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PolyhedronViewer); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 503, __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(10, 503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cython/core/dirichlet.pyx":504
 *     def view(self):
 *         if PolyhedronViewer:
 *             return ViewerWindow(PolyhedronViewer, facedicts=self.face_list(),             # <<<<<<<<<<<<<<
 *                                 title=f'Dirichlet Domain of {self.manifold_name}')
 *         raise RuntimeError('The PolyhedronViewer class '
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ViewerWindow); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PolyhedronViewer); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(10, 504, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_face_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __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, NULL};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 504, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_facedicts, __pyx_t_5) < 0) __PYX_ERR(10, 504, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/dirichlet.pyx":505
 *         if PolyhedronViewer:
 *             return ViewerWindow(PolyhedronViewer, facedicts=self.face_list(),
 *                                 title=f'Dirichlet Domain of {self.manifold_name}')             # <<<<<<<<<<<<<<
 *         raise RuntimeError('The PolyhedronViewer class '
 *                            'was not imported.')
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_manifold_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Dirichlet_Domain_of, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 505, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_title, __pyx_t_5) < 0) __PYX_ERR(10, 504, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/dirichlet.pyx":504
 *     def view(self):
 *         if PolyhedronViewer:
 *             return ViewerWindow(PolyhedronViewer, facedicts=self.face_list(),             # <<<<<<<<<<<<<<
 *                                 title=f'Dirichlet Domain of {self.manifold_name}')
 *         raise RuntimeError('The PolyhedronViewer class '
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "cython/core/dirichlet.pyx":503
 * 
 *     def view(self):
 *         if PolyhedronViewer:             # <<<<<<<<<<<<<<
 *             return ViewerWindow(PolyhedronViewer, facedicts=self.face_list(),
 *                                 title=f'Dirichlet Domain of {self.manifold_name}')
 */
  }

  /* "cython/core/dirichlet.pyx":506
 *             return ViewerWindow(PolyhedronViewer, facedicts=self.face_list(),
 *                                 title=f'Dirichlet Domain of {self.manifold_name}')
 *         raise RuntimeError('The PolyhedronViewer class '             # <<<<<<<<<<<<<<
 *                            'was not imported.')
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__134, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __PYX_ERR(10, 506, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":502
 *         return edges
 * 
 *     def view(self):             # <<<<<<<<<<<<<<
 *         if PolyhedronViewer:
 *             return ViewerWindow(PolyhedronViewer, facedicts=self.face_list(),
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":509
 *                            'was not imported.')
 * 
 *     def manifold(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Manifold computed directly from the Dirichlet
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_43manifold(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_6SnapPy_16CDirichletDomain_42manifold, "CDirichletDomain.manifold(self)\n\n        Returns a Manifold computed directly from the Dirichlet\n        domain, regarded as polyhedron with faces identified in pairs.\n        Only works if this gives a manifold not an orbifold.\n\n        >>> M = Manifold('7_3')\n        >>> D = M.dirichlet_domain()\n        >>> A = D.manifold()\n        >>> M.is_isometric_to(A)\n        True\n\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_43manifold = {"manifold", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_43manifold, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_42manifold};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_43manifold(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("manifold (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("manifold", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "manifold", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_42manifold(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_42manifold(struct __pyx_obj_6SnapPy_CDirichletDomain *__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("manifold", 1);

  /* "cython/core/dirichlet.pyx":522
 * 
 *         """
 *         return self.triangulate(_manifold_class)             # <<<<<<<<<<<<<<
 * 
 *     def triangulation(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_manifold_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_CDirichletDomain *)__pyx_v_self->__pyx_vtab)->triangulate(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 522, __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;

  /* "cython/core/dirichlet.pyx":509
 *                            'was not imported.')
 * 
 *     def manifold(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Manifold computed directly from the Dirichlet
 */

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

/* "cython/core/dirichlet.pyx":524
 *         return self.triangulate(_manifold_class)
 * 
 *     def triangulation(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Triangulation computed directly from the Dirichlet
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_45triangulation(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_6SnapPy_16CDirichletDomain_44triangulation, "CDirichletDomain.triangulation(self)\n\n        Returns a Triangulation computed directly from the Dirichlet\n        domain, regarded as polyhedron with faces identified in pairs.\n        Only works if this gives a manifold not an orbifold.\n\n        >>> M = Manifold('7_3')\n        >>> D = M.dirichlet_domain()\n        >>> B = D.triangulation()\n        >>> M.is_isometric_to(B.with_hyperbolic_structure())\n        True\n\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_45triangulation = {"triangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_45triangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_44triangulation};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_45triangulation(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("triangulation (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("triangulation", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "triangulation", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_44triangulation(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_44triangulation(struct __pyx_obj_6SnapPy_CDirichletDomain *__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("triangulation", 1);

  /* "cython/core/dirichlet.pyx":537
 * 
 *         """
 *         return self.triangulate(_triangulation_class)             # <<<<<<<<<<<<<<
 * 
 *     cdef triangulate(self, return_class):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_triangulation_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_CDirichletDomain *)__pyx_v_self->__pyx_vtab)->triangulate(__pyx_v_self, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 537, __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;

  /* "cython/core/dirichlet.pyx":524
 *         return self.triangulate(_manifold_class)
 * 
 *     def triangulation(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Triangulation computed directly from the Dirichlet
 */

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

/* "cython/core/dirichlet.pyx":539
 *         return self.triangulate(_triangulation_class)
 * 
 *     cdef triangulate(self, return_class):             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation *c_triangulation
 *         cdef Triangulation M
 */

static PyObject *__pyx_f_6SnapPy_16CDirichletDomain_triangulate(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self, PyObject *__pyx_v_return_class) {
  Triangulation *__pyx_v_c_triangulation;
  struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_M = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Triangulation *__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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("triangulate", 1);

  /* "cython/core/dirichlet.pyx":542
 *         cdef c_Triangulation *c_triangulation
 *         cdef Triangulation M
 *         c_triangulation = Dirichlet_to_triangulation(self.c_dirichlet_domain)             # <<<<<<<<<<<<<<
 *         if c_triangulation is NULL:
 *             raise ValueError('The Dirichlet domain could not be '
 */
  __pyx_t_1 = Dirichlet_to_triangulation(__pyx_v_self->c_dirichlet_domain); if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 542, __pyx_L1_error)
  __pyx_v_c_triangulation = __pyx_t_1;

  /* "cython/core/dirichlet.pyx":543
 *         cdef Triangulation M
 *         c_triangulation = Dirichlet_to_triangulation(self.c_dirichlet_domain)
 *         if c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Dirichlet domain could not be '
 *                              'triangulated; perhaps this is an '
 */
  __pyx_t_2 = (__pyx_v_c_triangulation == NULL);
  if (unlikely(__pyx_t_2)) {

    /* "cython/core/dirichlet.pyx":544
 *         c_triangulation = Dirichlet_to_triangulation(self.c_dirichlet_domain)
 *         if c_triangulation is NULL:
 *             raise ValueError('The Dirichlet domain could not be '             # <<<<<<<<<<<<<<
 *                              'triangulated; perhaps this is an '
 *                              'orbifold group?')
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__135, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 544, __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(10, 544, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":543
 *         cdef Triangulation M
 *         c_triangulation = Dirichlet_to_triangulation(self.c_dirichlet_domain)
 *         if c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Dirichlet domain could not be '
 *                              'triangulated; perhaps this is an '
 */
  }

  /* "cython/core/dirichlet.pyx":547
 *                              'triangulated; perhaps this is an '
 *                              'orbifold group?')
 *         M = return_class('empty')             # <<<<<<<<<<<<<<
 *         M.set_c_triangulation(c_triangulation)
 *         M.set_name(self.manifold_name)
 */
  __Pyx_INCREF(__pyx_v_return_class);
  __pyx_t_4 = __pyx_v_return_class; __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_n_s_empty};
    __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(10, 547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_6SnapPy_Triangulation))))) __PYX_ERR(10, 547, __pyx_L1_error)
  __pyx_v_M = ((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cython/core/dirichlet.pyx":548
 *                              'orbifold group?')
 *         M = return_class('empty')
 *         M.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 *         M.set_name(self.manifold_name)
 *         return M
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_M->__pyx_vtab)->set_c_triangulation(__pyx_v_M, __pyx_v_c_triangulation); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 548, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/dirichlet.pyx":549
 *         M = return_class('empty')
 *         M.set_c_triangulation(c_triangulation)
 *         M.set_name(self.manifold_name)             # <<<<<<<<<<<<<<
 *         return M
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_M), __pyx_n_s_set_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_manifold_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_7 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(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_5};
    __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_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 549, __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;

  /* "cython/core/dirichlet.pyx":550
 *         M.set_c_triangulation(c_triangulation)
 *         M.set_name(self.manifold_name)
 *         return M             # <<<<<<<<<<<<<<
 * 
 *     def volume(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_M);
  __pyx_r = ((PyObject *)__pyx_v_M);
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":539
 *         return self.triangulate(_triangulation_class)
 * 
 *     cdef triangulate(self, return_class):             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation *c_triangulation
 *         cdef Triangulation M
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain.triangulate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_M);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":552
 *         return M
 * 
 *     def volume(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the approximate volume of the DirichletDomain.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_47volume(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_6SnapPy_16CDirichletDomain_46volume, "CDirichletDomain.volume(self)\n\n        Returns the approximate volume of the DirichletDomain.\n        Because matrices in O(3,1) tend to accumulate roundoff error,\n        it's hard to get a good bound on the accuracy of the computed\n        volume.  Nevertheless, the kernel computes the best value it\n        can, with the hope that it will aid the user in recognizing\n        manifolds defined by a set of generators.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_47volume = {"volume", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_47volume, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_46volume};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_47volume(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("volume (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("volume", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "volume", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_46volume(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_46volume(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self) {
  PyObject *__pyx_v_volume = 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("volume", 1);

  /* "cython/core/dirichlet.pyx":561
 *         manifolds defined by a set of generators.
 *         """
 *         volume = Real2Number(self.c_dirichlet_domain.approximate_volume)             # <<<<<<<<<<<<<<
 *         return self._number_(volume)
 * 
 */
  __pyx_t_1 = __pyx_f_6SnapPy_Real2Number(__pyx_v_self->c_dirichlet_domain->approximate_volume); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_volume = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/dirichlet.pyx":562
 *         """
 *         volume = Real2Number(self.c_dirichlet_domain.approximate_volume)
 *         return self._number_(volume)             # <<<<<<<<<<<<<<
 * 
 *     def pairing_matrices(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 562, __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, __pyx_v_volume};
    __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(10, 562, __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;

  /* "cython/core/dirichlet.pyx":552
 *         return M
 * 
 *     def volume(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the approximate volume of the DirichletDomain.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain.volume", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_volume);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":564
 *         return self._number_(volume)
 * 
 *     def pairing_matrices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of the O31Matrices which pair the faces of
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_49pairing_matrices(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_6SnapPy_16CDirichletDomain_48pairing_matrices, "CDirichletDomain.pairing_matrices(self)\n\n        Returns a list of the O31Matrices which pair the faces of\n        this DirichletDomain.\n\n        >>> M = Manifold('s345')\n        >>> D = M.dirichlet_domain()\n        >>> matrices = D.pairing_matrices()\n        >>> D1 = DirichletDomain(O31_generators=matrices)\n        >>> N = D1.manifold()\n        >>> M.is_isometric_to(N)\n        True\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_49pairing_matrices = {"pairing_matrices", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_49pairing_matrices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_48pairing_matrices};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_49pairing_matrices(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("pairing_matrices (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("pairing_matrices", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "pairing_matrices", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_48pairing_matrices(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_48pairing_matrices(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self) {
  O31Matrix *__pyx_v_M;
  WEFace *__pyx_v_face;
  PyObject *__pyx_v_matrices = NULL;
  int __pyx_9genexpr90__pyx_v_i;
  int __pyx_9genexpr91__pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  WEFace *__pyx_t_3;
  O31Matrix *__pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pairing_matrices", 1);

  /* "cython/core/dirichlet.pyx":581
 *         cdef WEFace* face
 * 
 *         if self.c_dirichlet_domain == NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Dirichlet Domain was not computed.')
 *         matrices = []
 */
  __pyx_t_1 = (__pyx_v_self->c_dirichlet_domain == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/dirichlet.pyx":582
 * 
 *         if self.c_dirichlet_domain == NULL:
 *             raise ValueError('The Dirichlet Domain was not computed.')             # <<<<<<<<<<<<<<
 *         matrices = []
 *         face = self.c_dirichlet_domain.face_list_begin.next
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__136, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 582, __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(10, 582, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":581
 *         cdef WEFace* face
 * 
 *         if self.c_dirichlet_domain == NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Dirichlet Domain was not computed.')
 *         matrices = []
 */
  }

  /* "cython/core/dirichlet.pyx":583
 *         if self.c_dirichlet_domain == NULL:
 *             raise ValueError('The Dirichlet Domain was not computed.')
 *         matrices = []             # <<<<<<<<<<<<<<
 *         face = self.c_dirichlet_domain.face_list_begin.next
 *         while face != &self.c_dirichlet_domain.face_list_end:
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_matrices = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/dirichlet.pyx":584
 *             raise ValueError('The Dirichlet Domain was not computed.')
 *         matrices = []
 *         face = self.c_dirichlet_domain.face_list_begin.next             # <<<<<<<<<<<<<<
 *         while face != &self.c_dirichlet_domain.face_list_end:
 *             M = face.group_element
 */
  __pyx_t_3 = __pyx_v_self->c_dirichlet_domain->face_list_begin.next;
  __pyx_v_face = __pyx_t_3;

  /* "cython/core/dirichlet.pyx":585
 *         matrices = []
 *         face = self.c_dirichlet_domain.face_list_begin.next
 *         while face != &self.c_dirichlet_domain.face_list_end:             # <<<<<<<<<<<<<<
 *             M = face.group_element
 *             matrices.append(matrix(
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_face != (&__pyx_v_self->c_dirichlet_domain->face_list_end));
    if (!__pyx_t_1) break;

    /* "cython/core/dirichlet.pyx":586
 *         face = self.c_dirichlet_domain.face_list_begin.next
 *         while face != &self.c_dirichlet_domain.face_list_end:
 *             M = face.group_element             # <<<<<<<<<<<<<<
 *             matrices.append(matrix(
 *                 [[self._number_(Real2Number(<Real>M[0][i][j]))
 */
    __pyx_t_4 = __pyx_v_face->group_element;
    __pyx_v_M = __pyx_t_4;

    /* "cython/core/dirichlet.pyx":587
 *         while face != &self.c_dirichlet_domain.face_list_end:
 *             M = face.group_element
 *             matrices.append(matrix(             # <<<<<<<<<<<<<<
 *                 [[self._number_(Real2Number(<Real>M[0][i][j]))
 *                   for j in range(4)] for i in range(4)] ))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_matrix); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    { /* enter inner scope */

      /* "cython/core/dirichlet.pyx":588
 *             M = face.group_element
 *             matrices.append(matrix(
 *                 [[self._number_(Real2Number(<Real>M[0][i][j]))             # <<<<<<<<<<<<<<
 *                   for j in range(4)] for i in range(4)] ))
 *             face = face.next
 */
      __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 588, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);

      /* "cython/core/dirichlet.pyx":589
 *             matrices.append(matrix(
 *                 [[self._number_(Real2Number(<Real>M[0][i][j]))
 *                   for j in range(4)] for i in range(4)] ))             # <<<<<<<<<<<<<<
 *             face = face.next
 *         return matrices
 */
      for (__pyx_t_7 = 0; __pyx_t_7 < 4; __pyx_t_7+=1) {
        __pyx_9genexpr90__pyx_v_i = __pyx_t_7;
        { /* enter inner scope */

          /* "cython/core/dirichlet.pyx":588
 *             M = face.group_element
 *             matrices.append(matrix(
 *                 [[self._number_(Real2Number(<Real>M[0][i][j]))             # <<<<<<<<<<<<<<
 *                   for j in range(4)] for i in range(4)] ))
 *             face = face.next
 */
          __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 588, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);

          /* "cython/core/dirichlet.pyx":589
 *             matrices.append(matrix(
 *                 [[self._number_(Real2Number(<Real>M[0][i][j]))
 *                   for j in range(4)] for i in range(4)] ))             # <<<<<<<<<<<<<<
 *             face = face.next
 *         return matrices
 */
          for (__pyx_t_9 = 0; __pyx_t_9 < 4; __pyx_t_9+=1) {
            __pyx_9genexpr91__pyx_v_j = __pyx_t_9;

            /* "cython/core/dirichlet.pyx":588
 *             M = face.group_element
 *             matrices.append(matrix(
 *                 [[self._number_(Real2Number(<Real>M[0][i][j]))             # <<<<<<<<<<<<<<
 *                   for j in range(4)] for i in range(4)] ))
 *             face = face.next
 */
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(10, 588, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_12 = __pyx_f_6SnapPy_Real2Number(((__pyx_t_6SnapPy_Real)(((__pyx_v_M[0])[__pyx_9genexpr90__pyx_v_i])[__pyx_9genexpr91__pyx_v_j]))); if (unlikely(!__pyx_t_12)) __PYX_ERR(10, 588, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_13 = NULL;
            __pyx_t_14 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_11))) {
              __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11);
              if (likely(__pyx_t_13)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
                __Pyx_INCREF(__pyx_t_13);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_11, function);
                __pyx_t_14 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_12};
              __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_14, 1+__pyx_t_14);
              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
              if (unlikely(!__pyx_t_10)) __PYX_ERR(10, 588, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            }
            if (unlikely(__Pyx_ListComp_Append(__pyx_t_8, (PyObject*)__pyx_t_10))) __PYX_ERR(10, 588, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          }
        } /* exit inner scope */
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_8))) __PYX_ERR(10, 588, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
    } /* exit inner scope */
    __pyx_t_8 = NULL;
    __pyx_t_7 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 587, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }

    /* "cython/core/dirichlet.pyx":587
 *         while face != &self.c_dirichlet_domain.face_list_end:
 *             M = face.group_element
 *             matrices.append(matrix(             # <<<<<<<<<<<<<<
 *                 [[self._number_(Real2Number(<Real>M[0][i][j]))
 *                   for j in range(4)] for i in range(4)] ))
 */
    __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_matrices, __pyx_t_2); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(10, 587, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/dirichlet.pyx":590
 *                 [[self._number_(Real2Number(<Real>M[0][i][j]))
 *                   for j in range(4)] for i in range(4)] ))
 *             face = face.next             # <<<<<<<<<<<<<<
 *         return matrices
 * 
 */
    __pyx_t_3 = __pyx_v_face->next;
    __pyx_v_face = __pyx_t_3;
  }

  /* "cython/core/dirichlet.pyx":591
 *                   for j in range(4)] for i in range(4)] ))
 *             face = face.next
 *         return matrices             # <<<<<<<<<<<<<<
 * 
 *     def pairing_words(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_matrices);
  __pyx_r = __pyx_v_matrices;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":564
 *         return self._number_(volume)
 * 
 *     def pairing_matrices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of the O31Matrices which pair the faces of
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain.pairing_matrices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_matrices);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":593
 *         return matrices
 * 
 *     def pairing_words(self):             # <<<<<<<<<<<<<<
 *         """
 *         Group elements which pair the faces of this DirichletDomain
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_51pairing_words(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_6SnapPy_16CDirichletDomain_50pairing_words, "CDirichletDomain.pairing_words(self)\n\n        Group elements which pair the faces of this DirichletDomain\n        as words in the original generators:\n\n        >>> M = Manifold('m004')\n        >>> D = M.dirichlet_domain(include_words = True)\n        >>> sorted(D.pairing_words()) #doctest: +ELLIPSIS\n        ['A', ...]\n\n        Requires that DirichletDomain was computed with\n        include_words = True.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_51pairing_words = {"pairing_words", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_51pairing_words, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_50pairing_words};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_51pairing_words(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("pairing_words (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("pairing_words", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "pairing_words", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_50pairing_words(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_50pairing_words(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self) {
  WEFace *__pyx_v_face;
  int *__pyx_v_c_word;
  PyObject *__pyx_v_words = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  WEFace *__pyx_t_3;
  int *__pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pairing_words", 1);

  /* "cython/core/dirichlet.pyx":610
 *         cdef int* c_word
 * 
 *         if self.c_dirichlet_domain == NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Dirichlet Domain was not computed.')
 * 
 */
  __pyx_t_1 = (__pyx_v_self->c_dirichlet_domain == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/dirichlet.pyx":611
 * 
 *         if self.c_dirichlet_domain == NULL:
 *             raise ValueError('The Dirichlet Domain was not computed.')             # <<<<<<<<<<<<<<
 * 
 *         words = []
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__136, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 611, __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(10, 611, __pyx_L1_error)

    /* "cython/core/dirichlet.pyx":610
 *         cdef int* c_word
 * 
 *         if self.c_dirichlet_domain == NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Dirichlet Domain was not computed.')
 * 
 */
  }

  /* "cython/core/dirichlet.pyx":613
 *             raise ValueError('The Dirichlet Domain was not computed.')
 * 
 *         words = []             # <<<<<<<<<<<<<<
 * 
 *         face = self.c_dirichlet_domain.face_list_begin.next
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_words = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/dirichlet.pyx":615
 *         words = []
 * 
 *         face = self.c_dirichlet_domain.face_list_begin.next             # <<<<<<<<<<<<<<
 *         while face != &self.c_dirichlet_domain.face_list_end:
 *             c_word = face.group_element_word
 */
  __pyx_t_3 = __pyx_v_self->c_dirichlet_domain->face_list_begin.next;
  __pyx_v_face = __pyx_t_3;

  /* "cython/core/dirichlet.pyx":616
 * 
 *         face = self.c_dirichlet_domain.face_list_begin.next
 *         while face != &self.c_dirichlet_domain.face_list_end:             # <<<<<<<<<<<<<<
 *             c_word = face.group_element_word
 * 
 */
  while (1) {
    __pyx_t_1 = (__pyx_v_face != (&__pyx_v_self->c_dirichlet_domain->face_list_end));
    if (!__pyx_t_1) break;

    /* "cython/core/dirichlet.pyx":617
 *         face = self.c_dirichlet_domain.face_list_begin.next
 *         while face != &self.c_dirichlet_domain.face_list_end:
 *             c_word = face.group_element_word             # <<<<<<<<<<<<<<
 * 
 *             if c_word == NULL:
 */
    __pyx_t_4 = __pyx_v_face->group_element_word;
    __pyx_v_c_word = __pyx_t_4;

    /* "cython/core/dirichlet.pyx":619
 *             c_word = face.group_element_word
 * 
 *             if c_word == NULL:             # <<<<<<<<<<<<<<
 *                 raise ValueError('The Dirichlet Domain was computed without '
 *                                  'include_words = True.')
 */
    __pyx_t_1 = (__pyx_v_c_word == NULL);
    if (unlikely(__pyx_t_1)) {

      /* "cython/core/dirichlet.pyx":620
 * 
 *             if c_word == NULL:
 *                 raise ValueError('The Dirichlet Domain was computed without '             # <<<<<<<<<<<<<<
 *                                  'include_words = True.')
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__137, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 620, __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(10, 620, __pyx_L1_error)

      /* "cython/core/dirichlet.pyx":619
 *             c_word = face.group_element_word
 * 
 *             if c_word == NULL:             # <<<<<<<<<<<<<<
 *                 raise ValueError('The Dirichlet Domain was computed without '
 *                                  'include_words = True.')
 */
    }

    /* "cython/core/dirichlet.pyx":624
 * 
 *             words.append(
 *                 c_word_as_string(             # <<<<<<<<<<<<<<
 *                     c_word, self.c_num_generators, verbose_form = False))
 * 
 */
    __pyx_t_2 = __pyx_f_6SnapPy_c_word_as_string(__pyx_v_c_word, __pyx_v_self->c_num_generators, Py_False); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cython/core/dirichlet.pyx":623
 *                                  'include_words = True.')
 * 
 *             words.append(             # <<<<<<<<<<<<<<
 *                 c_word_as_string(
 *                     c_word, self.c_num_generators, verbose_form = False))
 */
    __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_words, __pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(10, 623, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/dirichlet.pyx":627
 *                     c_word, self.c_num_generators, verbose_form = False))
 * 
 *             face = face.next             # <<<<<<<<<<<<<<
 * 
 *         return words
 */
    __pyx_t_3 = __pyx_v_face->next;
    __pyx_v_face = __pyx_t_3;
  }

  /* "cython/core/dirichlet.pyx":629
 *             face = face.next
 * 
 *         return words             # <<<<<<<<<<<<<<
 * 
 *     def _to_string(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_words);
  __pyx_r = __pyx_v_words;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":593
 *         return matrices
 * 
 *     def pairing_words(self):             # <<<<<<<<<<<<<<
 *         """
 *         Group elements which pair the faces of this DirichletDomain
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain.pairing_words", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_words);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":631
 *         return words
 * 
 *     def _to_string(self):             # <<<<<<<<<<<<<<
 *         matrices = self.pairing_matrices()
 *         result = '%% Generators\n%s\n' % len(matrices)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_53_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_6SnapPy_16CDirichletDomain_52_to_string, "CDirichletDomain._to_string(self)");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_53_to_string = {"_to_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_53_to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_52_to_string};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_53_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("_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("_to_string", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_to_string", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_52_to_string(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_6SnapPy_16CDirichletDomain_10_to_string_2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */

/* "cython/core/dirichlet.pyx":636
 *         for matrix in matrices:
 *             for row in matrix:
 *                 result += ' %s\n' % ' '.join(str(x) for x in row)             # <<<<<<<<<<<<<<
 *             result += '\n'
 *         return result
 */

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_10_to_string_genexpr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) {
  struct __pyx_obj_6SnapPy___pyx_scope_struct_8_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_6SnapPy___pyx_scope_struct_8_genexpr *)__pyx_tp_new_6SnapPy___pyx_scope_struct_8_genexpr(__pyx_ptype_6SnapPy___pyx_scope_struct_8_genexpr, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_8_genexpr *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(10, 636, __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_6SnapPy_16CDirichletDomain_10_to_string_2generator5, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_to_string_locals_genexpr, __pyx_n_s_SnapPy); if (unlikely(!gen)) __PYX_ERR(10, 636, __pyx_L1_error)
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("SnapPy.CDirichletDomain._to_string.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_6SnapPy_16CDirichletDomain_10_to_string_2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_6SnapPy___pyx_scope_struct_8_genexpr *__pyx_cur_scope = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_8_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;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) __PYX_ERR(10, 636, __pyx_L1_error)
  if (unlikely(!__pyx_cur_scope->__pyx_genexpr_arg_0)) { __Pyx_RaiseUnboundLocalError(".0"); __PYX_ERR(10, 636, __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(10, 636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 636, __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(10, 636, __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(10, 636, __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(10, 636, __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(10, 636, __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(10, 636, __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(10, 636, __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(10, 636, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x);
    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_x, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Str(__pyx_cur_scope->__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    __Pyx_XGIVEREF(__pyx_t_1);
    __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
    __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
    __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
    __pyx_cur_scope->__pyx_t_0 = 0;
    __Pyx_XGOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
    __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
    if (unlikely(!__pyx_sent_value)) __PYX_ERR(10, 636, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  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_XDECREF(__pyx_r); __pyx_r = 0;
  #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;
}

/* "cython/core/dirichlet.pyx":631
 *         return words
 * 
 *     def _to_string(self):             # <<<<<<<<<<<<<<
 *         matrices = self.pairing_matrices()
 *         result = '%% Generators\n%s\n' % len(matrices)
 */

static PyObject *__pyx_pf_6SnapPy_16CDirichletDomain_52_to_string(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self) {
  PyObject *__pyx_v_matrices = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_matrix = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_gb_6SnapPy_16CDirichletDomain_10_to_string_2generator5 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  Py_ssize_t __pyx_t_7;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_to_string", 1);

  /* "cython/core/dirichlet.pyx":632
 * 
 *     def _to_string(self):
 *         matrices = self.pairing_matrices()             # <<<<<<<<<<<<<<
 *         result = '%% Generators\n%s\n' % len(matrices)
 *         for matrix in matrices:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pairing_matrices); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 632, __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(10, 632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_matrices = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/dirichlet.pyx":633
 *     def _to_string(self):
 *         matrices = self.pairing_matrices()
 *         result = '%% Generators\n%s\n' % len(matrices)             # <<<<<<<<<<<<<<
 *         for matrix in matrices:
 *             for row in matrix:
 */
  __pyx_t_5 = PyObject_Length(__pyx_v_matrices); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(10, 633, __pyx_L1_error)
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Generators_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/dirichlet.pyx":634
 *         matrices = self.pairing_matrices()
 *         result = '%% Generators\n%s\n' % len(matrices)
 *         for matrix in matrices:             # <<<<<<<<<<<<<<
 *             for row in matrix:
 *                 result += ' %s\n' % ' '.join(str(x) for x in row)
 */
  if (likely(PyList_CheckExact(__pyx_v_matrices)) || PyTuple_CheckExact(__pyx_v_matrices)) {
    __pyx_t_2 = __pyx_v_matrices; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_matrices); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 634, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(10, 634, __pyx_L1_error)
  }
  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(10, 634, __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(10, 634, __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(10, 634, __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(10, 634, __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(10, 634, __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(10, 634, __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(10, 634, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_matrix, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":635
 *         result = '%% Generators\n%s\n' % len(matrices)
 *         for matrix in matrices:
 *             for row in matrix:             # <<<<<<<<<<<<<<
 *                 result += ' %s\n' % ' '.join(str(x) for x in row)
 *             result += '\n'
 */
    if (likely(PyList_CheckExact(__pyx_v_matrix)) || PyTuple_CheckExact(__pyx_v_matrix)) {
      __pyx_t_1 = __pyx_v_matrix; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_matrix); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 635, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(10, 635, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_8)) {
        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(10, 635, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(10, 635, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 635, __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(10, 635, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(10, 635, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 635, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_8(__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(10, 635, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cython/core/dirichlet.pyx":636
 *         for matrix in matrices:
 *             for row in matrix:
 *                 result += ' %s\n' % ' '.join(str(x) for x in row)             # <<<<<<<<<<<<<<
 *             result += '\n'
 *         return result
 */
      __pyx_t_3 = __pyx_pf_6SnapPy_16CDirichletDomain_10_to_string_genexpr(NULL, __pyx_v_row); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 636, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = __Pyx_PyString_Join(__pyx_kp_s__8, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 636, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_2, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 636, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 636, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "cython/core/dirichlet.pyx":635
 *         result = '%% Generators\n%s\n' % len(matrices)
 *         for matrix in matrices:
 *             for row in matrix:             # <<<<<<<<<<<<<<
 *                 result += ' %s\n' % ' '.join(str(x) for x in row)
 *             result += '\n'
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":637
 *             for row in matrix:
 *                 result += ' %s\n' % ' '.join(str(x) for x in row)
 *             result += '\n'             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s_); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 637, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cython/core/dirichlet.pyx":634
 *         matrices = self.pairing_matrices()
 *         result = '%% Generators\n%s\n' % len(matrices)
 *         for matrix in matrices:             # <<<<<<<<<<<<<<
 *             for row in matrix:
 *                 result += ' %s\n' % ' '.join(str(x) for x in row)
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/dirichlet.pyx":638
 *                 result += ' %s\n' % ' '.join(str(x) for x in row)
 *             result += '\n'
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def __reduce_ex__(self, protocol):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":631
 *         return words
 * 
 *     def _to_string(self):             # <<<<<<<<<<<<<<
 *         matrices = self.pairing_matrices()
 *         result = '%% Generators\n%s\n' % len(matrices)
 */

  /* 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_9);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_matrices);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_matrix);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_gb_6SnapPy_16CDirichletDomain_10_to_string_2generator5);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":640
 *         return result
 * 
 *     def __reduce_ex__(self, protocol):             # <<<<<<<<<<<<<<
 *         return (_unpickle_dirichlet_domain, (self._to_string(), self.manifold_name))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_55__reduce_ex__(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_6SnapPy_16CDirichletDomain_54__reduce_ex__, "CDirichletDomain.__reduce_ex__(self, protocol)");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_55__reduce_ex__ = {"__reduce_ex__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_55__reduce_ex__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_54__reduce_ex__};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_55__reduce_ex__(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_protocol = 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("__reduce_ex__ (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_protocol,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_protocol)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 640, __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, "__reduce_ex__") < 0)) __PYX_ERR(10, 640, __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_protocol = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__reduce_ex__", 1, 1, 1, __pyx_nargs); __PYX_ERR(10, 640, __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("SnapPy.CDirichletDomain.__reduce_ex__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_54__reduce_ex__(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self), __pyx_v_protocol);

  /* 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_6SnapPy_16CDirichletDomain_54__reduce_ex__(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_protocol) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_ex__", 1);

  /* "cython/core/dirichlet.pyx":641
 * 
 *     def __reduce_ex__(self, protocol):
 *         return (_unpickle_dirichlet_domain, (self._to_string(), self.manifold_name))             # <<<<<<<<<<<<<<
 * 
 *     def save(self, filename):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_unpickle_dirichlet_domain); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 641, __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(10, 641, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_manifold_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 641, __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(10, 641, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(10, 641, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 641, __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(10, 641, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4)) __PYX_ERR(10, 641, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cython/core/dirichlet.pyx":640
 *         return result
 * 
 *     def __reduce_ex__(self, protocol):             # <<<<<<<<<<<<<<
 *         return (_unpickle_dirichlet_domain, (self._to_string(), self.manifold_name))
 * 
 */

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

/* "cython/core/dirichlet.pyx":643
 *         return (_unpickle_dirichlet_domain, (self._to_string(), self.manifold_name))
 * 
 *     def save(self, filename):             # <<<<<<<<<<<<<<
 *         """
 *         Save the Dirichlet domain as a text file in "% Generators" format.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_57save(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_6SnapPy_16CDirichletDomain_56save, "CDirichletDomain.save(self, filename)\n\n        Save the Dirichlet domain as a text file in \"% Generators\" format.\n\n        >>> from snappy.number import Number\n        >>> acc, Number._accuracy_for_testing = Number._accuracy_for_testing, None\n        >>> M = Manifold('m125')\n        >>> D = M.dirichlet_domain()\n        >>> from tempfile import NamedTemporaryFile\n        >>> f = NamedTemporaryFile(delete=False)\n        >>> f.close()\n        >>> D.save(f.name)\n        >>> E = DirichletDomain(generator_file=f.name); E\n        30 finite vertices, 2 ideal vertices; 50 edges; 20 faces\n        >>> os.unlink(f.name)\n        >>> from pickle import dumps, loads\n        >>> E = loads(dumps(D)); E\n        30 finite vertices, 2 ideal vertices; 50 edges; 20 faces\n        >>> Number._accuracy_for_testing = acc\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_57save = {"save", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_57save, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_56save};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_57save(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_filename = 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("save (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_filename,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_filename)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 643, __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, "save") < 0)) __PYX_ERR(10, 643, __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_filename = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("save", 1, 1, 1, __pyx_nargs); __PYX_ERR(10, 643, __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("SnapPy.CDirichletDomain.save", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_56save(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self), __pyx_v_filename);

  /* 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_6SnapPy_16CDirichletDomain_56save(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self, PyObject *__pyx_v_filename) {
  PyObject *__pyx_v_output = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  int __pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("save", 1);

  /* "cython/core/dirichlet.pyx":663
 *         >>> Number._accuracy_for_testing = acc
 *         """
 *         with open(filename, mode='wb') as output:             # <<<<<<<<<<<<<<
 *             output.write(self._to_string().encode('ascii'))
 * 
 */
  /*with:*/ {
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename)) __PYX_ERR(10, 663, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_mode, __pyx_n_s_wb) < 0) __PYX_ERR(10, 663, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 663, __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_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 663, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 663, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_t_1 = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    /*try:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_7);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        /*try:*/ {
          __pyx_v_output = __pyx_t_1;
          __pyx_t_1 = 0;

          /* "cython/core/dirichlet.pyx":664
 *         """
 *         with open(filename, mode='wb') as output:
 *             output.write(self._to_string().encode('ascii'))             # <<<<<<<<<<<<<<
 * 
 *     def export_stl(self, filename, model='klein', cutout=False, num_subdivisions=3,
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 664, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_to_string); if (unlikely(!__pyx_t_10)) __PYX_ERR(10, 664, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_11 = NULL;
          __pyx_t_6 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_10))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_10, function);
              __pyx_t_6 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
            __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 664, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          }
          __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_encode); if (unlikely(!__pyx_t_10)) __PYX_ERR(10, 664, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = NULL;
          __pyx_t_6 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_10))) {
            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10);
            if (likely(__pyx_t_5)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_10, function);
              __pyx_t_6 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_n_s_ascii};
            __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 664, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          }
          __pyx_t_10 = NULL;
          __pyx_t_6 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
              __pyx_t_6 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_2};
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 664, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "cython/core/dirichlet.pyx":663
 *         >>> Number._accuracy_for_testing = acc
 *         """
 *         with open(filename, mode='wb') as output:             # <<<<<<<<<<<<<<
 *             output.write(self._to_string().encode('ascii'))
 * 
 */
        }
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("SnapPy.CDirichletDomain.save", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(10, 663, __pyx_L9_except_error)
          __Pyx_XGOTREF(__pyx_t_1);
          __Pyx_XGOTREF(__pyx_t_3);
          __Pyx_XGOTREF(__pyx_t_2);
          __pyx_t_10 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(10, 663, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_12)) __PYX_ERR(10, 663, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (__pyx_t_13 < 0) __PYX_ERR(10, 663, __pyx_L9_except_error)
          __pyx_t_14 = (!__pyx_t_13);
          if (unlikely(__pyx_t_14)) {
            __Pyx_GIVEREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_XGIVEREF(__pyx_t_2);
            __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_2);
            __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; 
            __PYX_ERR(10, 663, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_7);
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_4) {
          __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__131, NULL);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(10, 663, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L16;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L1_error;
    __pyx_L16:;
  }

  /* "cython/core/dirichlet.pyx":643
 *         return (_unpickle_dirichlet_domain, (self._to_string(), self.manifold_name))
 * 
 *     def save(self, filename):             # <<<<<<<<<<<<<<
 *         """
 *         Save the Dirichlet domain as a text file in "% Generators" format.
 */

  /* 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_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain.save", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_output);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":666
 *             output.write(self._to_string().encode('ascii'))
 * 
 *     def export_stl(self, filename, model='klein', cutout=False, num_subdivisions=3,             # <<<<<<<<<<<<<<
 *                    shrink_factor=0.9, cutoff_radius=0.9, callback=None):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_59export_stl(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_6SnapPy_16CDirichletDomain_58export_stl, "CDirichletDomain.export_stl(self, filename, model='klein', cutout=False, num_subdivisions=3, shrink_factor=0.9, cutoff_radius=0.9, callback=None)\n\n        Export the Dirichlet domain as an stl file suitable for 3d printing.\n\n        Arguments can be given to modify the model produced:\n\n        * model='klein' - (alt. 'poincare') the model of HH^3 to use.\n\n        * cutout=False - remove the interior of each face\n\n        * shrink_factor=0.9 - the fraction to cut out of each face\n\n        * cuttoff_radius=0.9 - maximum rescaling for projection into Poincare model\n\n        * num_subdivision=3 - number of times to subdivide for the Poincare model\n\n        For printing domains in the Poincare model, cutoff_radius is critical for avoiding\n        infinitely thin cusps, which cannot be printed.\n\n        This can take a long time for finely subdivided domains. So we call UI_callback\n        every so often if it is not None.\n\n        >>> D = Manifold('m004').dirichlet_domain()\n        >>> D.export_stl('fig-eight-klein.stl')     #doctest: +SKIP\n        >>> D.export_stl('fig-eight-poincare.stl', model='poincare')     #doctest: +SKIP\n        >>> D.export_stl('fig-eight-klein-wireframe.stl', cutout=True)     #doctest: +SKIP\n        >>> D.export_stl('fig-eight-poincare-wireframe.stl', model='poincare', cutout=True)     #doctest: +SKIP\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_16CDirichletDomain_59export_stl = {"export_stl", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_59export_stl, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_58export_stl};
static PyObject *__pyx_pw_6SnapPy_16CDirichletDomain_59export_stl(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_filename = 0;
  PyObject *__pyx_v_model = 0;
  PyObject *__pyx_v_cutout = 0;
  PyObject *__pyx_v_num_subdivisions = 0;
  PyObject *__pyx_v_shrink_factor = 0;
  PyObject *__pyx_v_cutoff_radius = 0;
  CYTHON_UNUSED PyObject *__pyx_v_callback = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[7] = {0,0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("export_stl (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_filename,&__pyx_n_s_model,&__pyx_n_s_cutout,&__pyx_n_s_num_subdivisions,&__pyx_n_s_shrink_factor,&__pyx_n_s_cutoff_radius,&__pyx_n_s_callback,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_s_klein));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_3));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_float_0_9));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_float_0_9));

    /* "cython/core/dirichlet.pyx":667
 * 
 *     def export_stl(self, filename, model='klein', cutout=False, num_subdivisions=3,
 *                    shrink_factor=0.9, cutoff_radius=0.9, callback=None):             # <<<<<<<<<<<<<<
 *         """
 *         Export the Dirichlet domain as an stl file suitable for 3d printing.
 */
    values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        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_filename)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 666, __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_model);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 666, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cutout);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 666, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_subdivisions);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 666, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_shrink_factor);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 666, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cutoff_radius);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 666, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_callback);
          if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 666, __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, "export_stl") < 0)) __PYX_ERR(10, 666, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        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);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_filename = values[0];
    __pyx_v_model = values[1];
    __pyx_v_cutout = values[2];
    __pyx_v_num_subdivisions = values[3];
    __pyx_v_shrink_factor = values[4];
    __pyx_v_cutoff_radius = values[5];
    __pyx_v_callback = values[6];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("export_stl", 0, 1, 7, __pyx_nargs); __PYX_ERR(10, 666, __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("SnapPy.CDirichletDomain.export_stl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_16CDirichletDomain_58export_stl(((struct __pyx_obj_6SnapPy_CDirichletDomain *)__pyx_v_self), __pyx_v_filename, __pyx_v_model, __pyx_v_cutout, __pyx_v_num_subdivisions, __pyx_v_shrink_factor, __pyx_v_cutoff_radius, __pyx_v_callback);

  /* "cython/core/dirichlet.pyx":666
 *             output.write(self._to_string().encode('ascii'))
 * 
 *     def export_stl(self, filename, model='klein', cutout=False, num_subdivisions=3,             # <<<<<<<<<<<<<<
 *                    shrink_factor=0.9, cutoff_radius=0.9, callback=None):
 *         """
 */

  /* 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_6SnapPy_16CDirichletDomain_58export_stl(struct __pyx_obj_6SnapPy_CDirichletDomain *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_model, PyObject *__pyx_v_cutout, PyObject *__pyx_v_num_subdivisions, PyObject *__pyx_v_shrink_factor, PyObject *__pyx_v_cutoff_radius, CYTHON_UNUSED PyObject *__pyx_v_callback) {
  PyObject *__pyx_v_output = NULL;
  PyObject *__pyx_v_output_file = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("export_stl", 1);

  /* "cython/core/dirichlet.pyx":695
 *         >>> D.export_stl('fig-eight-poincare-wireframe.stl', model='poincare', cutout=True)     #doctest: +SKIP
 *         """
 *         output = stl(self.face_list(), model, cutout, num_subdivisions, shrink_factor, cutoff_radius)             # <<<<<<<<<<<<<<
 *         with open(filename, 'w') as output_file:
 *             for line in output:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_stl); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 695, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_face_list); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 695, __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(10, 695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __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_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_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[7] = {__pyx_t_4, __pyx_t_3, __pyx_v_model, __pyx_v_cutout, __pyx_v_num_subdivisions, __pyx_v_shrink_factor, __pyx_v_cutoff_radius};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 6+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_output = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/dirichlet.pyx":696
 *         """
 *         output = stl(self.face_list(), model, cutout, num_subdivisions, shrink_factor, cutoff_radius)
 *         with open(filename, 'w') as output_file:             # <<<<<<<<<<<<<<
 *             for line in output:
 *                 if UI_callback is not None:
 */
  /*with:*/ {
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_filename);
    __Pyx_GIVEREF(__pyx_v_filename);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filename)) __PYX_ERR(10, 696, __pyx_L1_error);
    __Pyx_INCREF(__pyx_n_s_w);
    __Pyx_GIVEREF(__pyx_n_s_w);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_w)) __PYX_ERR(10, 696, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(10, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 696, __pyx_L3_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 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_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __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(10, 696, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_3 = __pyx_t_1;
    __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    /*try:*/ {
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_10);
        /*try:*/ {
          __pyx_v_output_file = __pyx_t_3;
          __pyx_t_3 = 0;

          /* "cython/core/dirichlet.pyx":697
 *         output = stl(self.face_list(), model, cutout, num_subdivisions, shrink_factor, cutoff_radius)
 *         with open(filename, 'w') as output_file:
 *             for line in output:             # <<<<<<<<<<<<<<
 *                 if UI_callback is not None:
 *                     UI_callback()
 */
          if (likely(PyList_CheckExact(__pyx_v_output)) || PyTuple_CheckExact(__pyx_v_output)) {
            __pyx_t_3 = __pyx_v_output; __Pyx_INCREF(__pyx_t_3);
            __pyx_t_11 = 0;
            __pyx_t_12 = NULL;
          } else {
            __pyx_t_11 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_output); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 697, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(10, 697, __pyx_L7_error)
          }
          for (;;) {
            if (likely(!__pyx_t_12)) {
              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(10, 697, __pyx_L7_error)
                  #endif
                  if (__pyx_t_11 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(10, 697, __pyx_L7_error)
                #else
                __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 697, __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(10, 697, __pyx_L7_error)
                  #endif
                  if (__pyx_t_11 >= __pyx_temp) break;
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(10, 697, __pyx_L7_error)
                #else
                __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 697, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_2);
                #endif
              }
            } else {
              __pyx_t_2 = __pyx_t_12(__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(10, 697, __pyx_L7_error)
                }
                break;
              }
              __Pyx_GOTREF(__pyx_t_2);
            }
            __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2);
            __pyx_t_2 = 0;

            /* "cython/core/dirichlet.pyx":698
 *         with open(filename, 'w') as output_file:
 *             for line in output:
 *                 if UI_callback is not None:             # <<<<<<<<<<<<<<
 *                     UI_callback()
 *                 output_file.write(line)
 */
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UI_callback); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 698, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_13 = (__pyx_t_2 != Py_None);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (__pyx_t_13) {

              /* "cython/core/dirichlet.pyx":699
 *             for line in output:
 *                 if UI_callback is not None:
 *                     UI_callback()             # <<<<<<<<<<<<<<
 *                 output_file.write(line)
 * 
 */
              __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_UI_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 699, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_4 = NULL;
              __pyx_t_6 = 0;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_4)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_4);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                  __pyx_t_6 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
                __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 699, __pyx_L7_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

              /* "cython/core/dirichlet.pyx":698
 *         with open(filename, 'w') as output_file:
 *             for line in output:
 *                 if UI_callback is not None:             # <<<<<<<<<<<<<<
 *                     UI_callback()
 *                 output_file.write(line)
 */
            }

            /* "cython/core/dirichlet.pyx":700
 *                 if UI_callback is not None:
 *                     UI_callback()
 *                 output_file.write(line)             # <<<<<<<<<<<<<<
 * 
 * 
 */
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_output_file, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 700, __pyx_L7_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_4 = NULL;
            __pyx_t_6 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_1))) {
              __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
              if (likely(__pyx_t_4)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                __Pyx_INCREF(__pyx_t_4);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_1, function);
                __pyx_t_6 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_line};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
              __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 700, __pyx_L7_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "cython/core/dirichlet.pyx":697
 *         output = stl(self.face_list(), model, cutout, num_subdivisions, shrink_factor, cutoff_radius)
 *         with open(filename, 'w') as output_file:
 *             for line in output:             # <<<<<<<<<<<<<<
 *                 if UI_callback is not None:
 *                     UI_callback()
 */
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "cython/core/dirichlet.pyx":696
 *         """
 *         output = stl(self.face_list(), model, cutout, num_subdivisions, shrink_factor, cutoff_radius)
 *         with open(filename, 'w') as output_file:             # <<<<<<<<<<<<<<
 *             for line in output:
 *                 if UI_callback is not None:
 */
        }
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L12_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        /*except:*/ {
          __Pyx_AddTraceback("SnapPy.CDirichletDomain.export_stl", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(10, 696, __pyx_L9_except_error)
          __Pyx_XGOTREF(__pyx_t_3);
          __Pyx_XGOTREF(__pyx_t_2);
          __Pyx_XGOTREF(__pyx_t_1);
          __pyx_t_4 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 696, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_14)) __PYX_ERR(10, 696, __pyx_L9_except_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (__pyx_t_13 < 0) __PYX_ERR(10, 696, __pyx_L9_except_error)
          __pyx_t_15 = (!__pyx_t_13);
          if (unlikely(__pyx_t_15)) {
            __Pyx_GIVEREF(__pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_2);
            __Pyx_XGIVEREF(__pyx_t_1);
            __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_2, __pyx_t_1);
            __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; 
            __PYX_ERR(10, 696, __pyx_L9_except_error)
          }
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          goto __pyx_L8_exception_handled;
        }
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
        goto __pyx_L1_error;
        __pyx_L8_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
        __pyx_L12_try_end:;
      }
    }
    /*finally:*/ {
      /*normal exit:*/{
        if (__pyx_t_7) {
          __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__131, NULL);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(10, 696, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        goto __pyx_L6;
      }
      __pyx_L6:;
    }
    goto __pyx_L20;
    __pyx_L3_error:;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L1_error;
    __pyx_L20:;
  }

  /* "cython/core/dirichlet.pyx":666
 *             output.write(self._to_string().encode('ascii'))
 * 
 *     def export_stl(self, filename, model='klein', cutout=False, num_subdivisions=3,             # <<<<<<<<<<<<<<
 *                    shrink_factor=0.9, cutoff_radius=0.9, callback=None):
 *         """
 */

  /* 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_5);
  __Pyx_AddTraceback("SnapPy.CDirichletDomain.export_stl", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_output);
  __Pyx_XDECREF(__pyx_v_output_file);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/dirichlet.pyx":741
 * 
 * 
 * def _unpickle_dirichlet_domain(string, name):             # <<<<<<<<<<<<<<
 *     return DirichletDomain(generator_bytes=string.encode('ascii'), manifold_name=name)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_45_unpickle_dirichlet_domain(PyObject *__pyx_self, 
#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_6SnapPy_44_unpickle_dirichlet_domain, "_unpickle_dirichlet_domain(string, name)");
static PyMethodDef __pyx_mdef_6SnapPy_45_unpickle_dirichlet_domain = {"_unpickle_dirichlet_domain", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_45_unpickle_dirichlet_domain, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_44_unpickle_dirichlet_domain};
static PyObject *__pyx_pw_6SnapPy_45_unpickle_dirichlet_domain(PyObject *__pyx_self, 
#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_string = 0;
  PyObject *__pyx_v_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_unpickle_dirichlet_domain (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_string,&__pyx_n_s_name,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_string)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 741, __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_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(10, 741, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("_unpickle_dirichlet_domain", 1, 2, 2, 1); __PYX_ERR(10, 741, __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, "_unpickle_dirichlet_domain") < 0)) __PYX_ERR(10, 741, __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_string = values[0];
    __pyx_v_name = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_unpickle_dirichlet_domain", 1, 2, 2, __pyx_nargs); __PYX_ERR(10, 741, __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("SnapPy._unpickle_dirichlet_domain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_44_unpickle_dirichlet_domain(__pyx_self, __pyx_v_string, __pyx_v_name);

  /* 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_6SnapPy_44_unpickle_dirichlet_domain(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_string, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_unpickle_dirichlet_domain", 1);

  /* "cython/core/dirichlet.pyx":742
 * 
 * def _unpickle_dirichlet_domain(string, name):
 *     return DirichletDomain(generator_bytes=string.encode('ascii'), manifold_name=name)             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_DirichletDomain); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(10, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_string, __pyx_n_s_encode); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 742, __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, __pyx_n_s_ascii};
    __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(10, 742, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_generator_bytes, __pyx_t_3) < 0) __PYX_ERR(10, 742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_manifold_name, __pyx_v_name) < 0) __PYX_ERR(10, 742, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 742, __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;

  /* "cython/core/dirichlet.pyx":741
 * 
 * 
 * def _unpickle_dirichlet_domain(string, name):             # <<<<<<<<<<<<<<
 *     return DirichletDomain(generator_bytes=string.encode('ascii'), manifold_name=name)
 */

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

/* "cython/core/cusp_neighborhoods.pyx":9
 *     cdef original_indices
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _number_(n):
 *         return number.number_to_native_number(n)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_1_number_(CYTHON_UNUSED PyObject *__pyx_self, 
#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_6SnapPy_17CCuspNeighborhood__number_, "CCuspNeighborhood._number_(n)");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_1_number_ = {"_number_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_1_number_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood__number_};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_1_number_(CYTHON_UNUSED PyObject *__pyx_self, 
#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_n = 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("_number_ (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_n,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_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 9, __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, "_number_") < 0)) __PYX_ERR(11, 9, __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_n = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_number_", 1, 1, 1, __pyx_nargs); __PYX_ERR(11, 9, __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("SnapPy.CCuspNeighborhood._number_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood__number_(__pyx_v_n);

  /* 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_6SnapPy_17CCuspNeighborhood__number_(PyObject *__pyx_v_n) {
  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("_number_", 1);

  /* "cython/core/cusp_neighborhoods.pyx":11
 *     @staticmethod
 *     def _number_(n):
 *         return number.number_to_native_number(n)             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, Manifold manifold):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_number_to_native_number); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 11, __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_v_n};
    __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(11, 11, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/cusp_neighborhoods.pyx":9
 *     cdef original_indices
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _number_(n):
 *         return number.number_to_native_number(n)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CCuspNeighborhood._number_", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":13
 *         return number.number_to_native_number(n)
 * 
 *     def __cinit__(self, Manifold manifold):             # <<<<<<<<<<<<<<
 *         if manifold.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 */

/* Python wrapper */
static int __pyx_pw_6SnapPy_17CCuspNeighborhood_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_6SnapPy_17CCuspNeighborhood_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_6SnapPy_Manifold *__pyx_v_manifold = 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_manifold,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_manifold)) != 0)) {
          (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 13, __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(11, 13, __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_manifold = ((struct __pyx_obj_6SnapPy_Manifold *)values[0]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, __pyx_nargs); __PYX_ERR(11, 13, __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("SnapPy.CCuspNeighborhood.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_manifold), __pyx_ptype_6SnapPy_Manifold, 1, "manifold", 0))) __PYX_ERR(11, 13, __pyx_L1_error)
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_2__cinit__(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self), __pyx_v_manifold);

  /* 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_6SnapPy_17CCuspNeighborhood_2__cinit__(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, struct __pyx_obj_6SnapPy_Manifold *__pyx_v_manifold) {
  PyObject *__pyx_v_is_complete = NULL;
  PyObject *__pyx_9genexpr93__pyx_v_n = NULL;
  PyObject *__pyx_9genexpr93__pyx_v_c = NULL;
  int __pyx_r;
  __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;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  struct CuspNeighborhoods *__pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 1);

  /* "cython/core/cusp_neighborhoods.pyx":14
 * 
 *     def __cinit__(self, Manifold manifold):
 *         if manifold.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         is_complete = manifold.cusp_info('is_complete')
 */
  __pyx_t_1 = (__pyx_v_manifold->__pyx_base.c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/cusp_neighborhoods.pyx":15
 *     def __cinit__(self, Manifold manifold):
 *         if manifold.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         is_complete = manifold.cusp_info('is_complete')
 *         self.original_indices = [n for n, c in enumerate(is_complete) if c]
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 15, __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(11, 15, __pyx_L1_error)

    /* "cython/core/cusp_neighborhoods.pyx":14
 * 
 *     def __cinit__(self, Manifold manifold):
 *         if manifold.c_triangulation is NULL:             # <<<<<<<<<<<<<<
 *             raise ValueError('The Triangulation is empty.')
 *         is_complete = manifold.cusp_info('is_complete')
 */
  }

  /* "cython/core/cusp_neighborhoods.pyx":16
 *         if manifold.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 *         is_complete = manifold.cusp_info('is_complete')             # <<<<<<<<<<<<<<
 *         self.original_indices = [n for n, c in enumerate(is_complete) if c]
 *         copy_triangulation(manifold.c_triangulation,
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_manifold), __pyx_n_s_cusp_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 16, __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_is_complete};
    __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(11, 16, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_is_complete = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":17
 *             raise ValueError('The Triangulation is empty.')
 *         is_complete = manifold.cusp_info('is_complete')
 *         self.original_indices = [n for n, c in enumerate(is_complete) if c]             # <<<<<<<<<<<<<<
 *         copy_triangulation(manifold.c_triangulation,
 *                            &self.c_triangulation)
 */
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 17, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_int_0);
    __pyx_t_3 = __pyx_int_0;
    if (likely(PyList_CheckExact(__pyx_v_is_complete)) || PyTuple_CheckExact(__pyx_v_is_complete)) {
      __pyx_t_4 = __pyx_v_is_complete; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_is_complete); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 17, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 17, __pyx_L6_error)
    }
    for (;;) {
      if (likely(!__pyx_t_7)) {
        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(11, 17, __pyx_L6_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(11, 17, __pyx_L6_error)
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 17, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_8);
          #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(11, 17, __pyx_L6_error)
            #endif
            if (__pyx_t_6 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(11, 17, __pyx_L6_error)
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 17, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        }
      } else {
        __pyx_t_8 = __pyx_t_7(__pyx_t_4);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(11, 17, __pyx_L6_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr93__pyx_v_c, __pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_9genexpr93__pyx_v_n, __pyx_t_3);
      __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 17, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3);
      __pyx_t_3 = __pyx_t_8;
      __pyx_t_8 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_9genexpr93__pyx_v_c); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(11, 17, __pyx_L6_error)
      if (__pyx_t_1) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_9genexpr93__pyx_v_n))) __PYX_ERR(11, 17, __pyx_L6_error)
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr93__pyx_v_c); __pyx_9genexpr93__pyx_v_c = 0;
    __Pyx_XDECREF(__pyx_9genexpr93__pyx_v_n); __pyx_9genexpr93__pyx_v_n = 0;
    goto __pyx_L11_exit_scope;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_9genexpr93__pyx_v_c); __pyx_9genexpr93__pyx_v_c = 0;
    __Pyx_XDECREF(__pyx_9genexpr93__pyx_v_n); __pyx_9genexpr93__pyx_v_n = 0;
    goto __pyx_L1_error;
    __pyx_L11_exit_scope:;
  } /* exit inner scope */
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->original_indices);
  __Pyx_DECREF(__pyx_v_self->original_indices);
  __pyx_v_self->original_indices = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":18
 *         is_complete = manifold.cusp_info('is_complete')
 *         self.original_indices = [n for n, c in enumerate(is_complete) if c]
 *         copy_triangulation(manifold.c_triangulation,             # <<<<<<<<<<<<<<
 *                            &self.c_triangulation)
 *         self.c_cusp_neighborhood = initialize_cusp_neighborhoods(
 */
  copy_triangulation(__pyx_v_manifold->__pyx_base.c_triangulation, (&__pyx_v_self->c_triangulation)); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 18, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":20
 *         copy_triangulation(manifold.c_triangulation,
 *                            &self.c_triangulation)
 *         self.c_cusp_neighborhood = initialize_cusp_neighborhoods(             # <<<<<<<<<<<<<<
 *             self.c_triangulation)
 *         if self.c_cusp_neighborhood == NULL:
 */
  __pyx_t_9 = initialize_cusp_neighborhoods(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 20, __pyx_L1_error)
  __pyx_v_self->c_cusp_neighborhood = __pyx_t_9;

  /* "cython/core/cusp_neighborhoods.pyx":22
 *         self.c_cusp_neighborhood = initialize_cusp_neighborhoods(
 *             self.c_triangulation)
 *         if self.c_cusp_neighborhood == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('The cusp neighborhood construction failed.')
 *         self.manifold_name = manifold.name()
 */
  __pyx_t_1 = (__pyx_v_self->c_cusp_neighborhood == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/cusp_neighborhoods.pyx":23
 *             self.c_triangulation)
 *         if self.c_cusp_neighborhood == NULL:
 *             raise RuntimeError('The cusp neighborhood construction failed.')             # <<<<<<<<<<<<<<
 *         self.manifold_name = manifold.name()
 *         self._num_cusps = get_num_cusp_neighborhoods(self.c_cusp_neighborhood)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__138, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 23, __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(11, 23, __pyx_L1_error)

    /* "cython/core/cusp_neighborhoods.pyx":22
 *         self.c_cusp_neighborhood = initialize_cusp_neighborhoods(
 *             self.c_triangulation)
 *         if self.c_cusp_neighborhood == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('The cusp neighborhood construction failed.')
 *         self.manifold_name = manifold.name()
 */
  }

  /* "cython/core/cusp_neighborhoods.pyx":24
 *         if self.c_cusp_neighborhood == NULL:
 *             raise RuntimeError('The cusp neighborhood construction failed.')
 *         self.manifold_name = manifold.name()             # <<<<<<<<<<<<<<
 *         self._num_cusps = get_num_cusp_neighborhoods(self.c_cusp_neighborhood)
 *         self._number_ = manifold._number_
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_manifold), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 24, __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(11, 24, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_manifold_name, __pyx_t_2) < 0) __PYX_ERR(11, 24, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":25
 *             raise RuntimeError('The cusp neighborhood construction failed.')
 *         self.manifold_name = manifold.name()
 *         self._num_cusps = get_num_cusp_neighborhoods(self.c_cusp_neighborhood)             # <<<<<<<<<<<<<<
 *         self._number_ = manifold._number_
 * 
 */
  __pyx_t_5 = get_num_cusp_neighborhoods(__pyx_v_self->c_cusp_neighborhood); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 25, __pyx_L1_error)
  __pyx_v_self->_num_cusps = __pyx_t_5;

  /* "cython/core/cusp_neighborhoods.pyx":26
 *         self.manifold_name = manifold.name()
 *         self._num_cusps = get_num_cusp_neighborhoods(self.c_cusp_neighborhood)
 *         self._number_ = manifold._number_             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_manifold), __pyx_n_s_number_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2, __pyx_t_2) < 0) __PYX_ERR(11, 26, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":13
 *         return number.number_to_native_number(n)
 * 
 *     def __cinit__(self, Manifold manifold):             # <<<<<<<<<<<<<<
 *         if manifold.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("SnapPy.CCuspNeighborhood.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_is_complete);
  __Pyx_XDECREF(__pyx_9genexpr93__pyx_v_n);
  __Pyx_XDECREF(__pyx_9genexpr93__pyx_v_c);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":28
 *         self._number_ = manifold._number_
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.c_triangulation != NULL:
 *             free_triangulation(self.c_triangulation)
 */

/* Python wrapper */
static void __pyx_pw_6SnapPy_17CCuspNeighborhood_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_6SnapPy_17CCuspNeighborhood_5__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_6SnapPy_17CCuspNeighborhood_4__dealloc__(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self));

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

static void __pyx_pf_6SnapPy_17CCuspNeighborhood_4__dealloc__(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self) {
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;

  /* "cython/core/cusp_neighborhoods.pyx":29
 * 
 *     def __dealloc__(self):
 *         if self.c_triangulation != NULL:             # <<<<<<<<<<<<<<
 *             free_triangulation(self.c_triangulation)
 *         if self.c_cusp_neighborhood != NULL:
 */
  __pyx_t_1 = (__pyx_v_self->c_triangulation != NULL);
  if (__pyx_t_1) {

    /* "cython/core/cusp_neighborhoods.pyx":30
 *     def __dealloc__(self):
 *         if self.c_triangulation != NULL:
 *             free_triangulation(self.c_triangulation)             # <<<<<<<<<<<<<<
 *         if self.c_cusp_neighborhood != NULL:
 *             free_cusp_neighborhoods(self.c_cusp_neighborhood)
 */
    free_triangulation(__pyx_v_self->c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 30, __pyx_L1_error)

    /* "cython/core/cusp_neighborhoods.pyx":29
 * 
 *     def __dealloc__(self):
 *         if self.c_triangulation != NULL:             # <<<<<<<<<<<<<<
 *             free_triangulation(self.c_triangulation)
 *         if self.c_cusp_neighborhood != NULL:
 */
  }

  /* "cython/core/cusp_neighborhoods.pyx":31
 *         if self.c_triangulation != NULL:
 *             free_triangulation(self.c_triangulation)
 *         if self.c_cusp_neighborhood != NULL:             # <<<<<<<<<<<<<<
 *             free_cusp_neighborhoods(self.c_cusp_neighborhood)
 * 
 */
  __pyx_t_1 = (__pyx_v_self->c_cusp_neighborhood != NULL);
  if (__pyx_t_1) {

    /* "cython/core/cusp_neighborhoods.pyx":32
 *             free_triangulation(self.c_triangulation)
 *         if self.c_cusp_neighborhood != NULL:
 *             free_cusp_neighborhoods(self.c_cusp_neighborhood)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
    free_cusp_neighborhoods(__pyx_v_self->c_cusp_neighborhood); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 32, __pyx_L1_error)

    /* "cython/core/cusp_neighborhoods.pyx":31
 *         if self.c_triangulation != NULL:
 *             free_triangulation(self.c_triangulation)
 *         if self.c_cusp_neighborhood != NULL:             # <<<<<<<<<<<<<<
 *             free_cusp_neighborhoods(self.c_cusp_neighborhood)
 * 
 */
  }

  /* "cython/core/cusp_neighborhoods.pyx":28
 *         self._number_ = manifold._number_
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if self.c_triangulation != NULL:
 *             free_triangulation(self.c_triangulation)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("SnapPy.CCuspNeighborhood.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
}

/* "cython/core/cusp_neighborhoods.pyx":34
 *             free_cusp_neighborhoods(self.c_cusp_neighborhood)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         N = self._num_cusps
 *         return 'Cusp Neighborhood with %d cusp%s' % (
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_7__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_6SnapPy_17CCuspNeighborhood_6__repr__(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_6__repr__(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self) {
  int __pyx_v_N;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  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("__repr__", 1);

  /* "cython/core/cusp_neighborhoods.pyx":35
 * 
 *     def __repr__(self):
 *         N = self._num_cusps             # <<<<<<<<<<<<<<
 *         return 'Cusp Neighborhood with %d cusp%s' % (
 *             N, N != 1 and 's' or '')
 */
  __pyx_t_1 = __pyx_v_self->_num_cusps;
  __pyx_v_N = __pyx_t_1;

  /* "cython/core/cusp_neighborhoods.pyx":36
 *     def __repr__(self):
 *         N = self._num_cusps
 *         return 'Cusp Neighborhood with %d cusp%s' % (             # <<<<<<<<<<<<<<
 *             N, N != 1 and 's' or '')
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "cython/core/cusp_neighborhoods.pyx":37
 *         N = self._num_cusps
 *         return 'Cusp Neighborhood with %d cusp%s' % (
 *             N, N != 1 and 's' or '')             # <<<<<<<<<<<<<<
 * 
 *     def manifold(self):
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_N); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = (__pyx_v_N != 1);
  if (!__pyx_t_4) {
    goto __pyx_L4_next_or;
  } else {
  }
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_n_s_s); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(11, 37, __pyx_L1_error)
  if (!__pyx_t_4) {
  } else {
    __Pyx_INCREF(__pyx_n_s_s);
    __pyx_t_3 = __pyx_n_s_s;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_L4_next_or:;
  __Pyx_INCREF(__pyx_kp_s__9);
  __pyx_t_3 = __pyx_kp_s__9;
  __pyx_L3_bool_binop_done:;
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2)) __PYX_ERR(11, 37, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3)) __PYX_ERR(11, 37, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":36
 *     def __repr__(self):
 *         N = self._num_cusps
 *         return 'Cusp Neighborhood with %d cusp%s' % (             # <<<<<<<<<<<<<<
 *             N, N != 1 and 's' or '')
 * 
 */
  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Cusp_Neighborhood_with_d_cusp_s, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cython/core/cusp_neighborhoods.pyx":34
 *             free_cusp_neighborhoods(self.c_cusp_neighborhood)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         N = self._num_cusps
 *         return 'Cusp Neighborhood with %d cusp%s' % (
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("SnapPy.CCuspNeighborhood.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":39
 *             N, N != 1 and 's' or '')
 * 
 *     def manifold(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a Manifold built from the current canonical triangulation.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_9manifold(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_6SnapPy_17CCuspNeighborhood_8manifold, "CCuspNeighborhood.manifold(self)\n\n        Return a Manifold built from the current canonical triangulation.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_9manifold = {"manifold", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_9manifold, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_8manifold};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_9manifold(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("manifold (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("manifold", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "manifold", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_8manifold(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_8manifold(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self) {
  Triangulation *__pyx_v_c_triangulation;
  struct __pyx_obj_6SnapPy_Manifold *__pyx_v_M = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("manifold", 1);

  /* "cython/core/cusp_neighborhoods.pyx":46
 *         cdef Manifold M
 * 
 *         copy_triangulation(self.c_cusp_neighborhood.its_triangulation,             # <<<<<<<<<<<<<<
 *                            &c_triangulation)
 *         M = _manifold_class('empty')
 */
  copy_triangulation(__pyx_v_self->c_cusp_neighborhood->its_triangulation, (&__pyx_v_c_triangulation)); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 46, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":48
 *         copy_triangulation(self.c_cusp_neighborhood.its_triangulation,
 *                            &c_triangulation)
 *         M = _manifold_class('empty')             # <<<<<<<<<<<<<<
 *         M.set_c_triangulation(c_triangulation)
 *         M.set_name(self.manifold_name + '_canonical')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_manifold_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 48, __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, __pyx_n_s_empty};
    __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(11, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_6SnapPy_Manifold))))) __PYX_ERR(11, 48, __pyx_L1_error)
  __pyx_v_M = ((struct __pyx_obj_6SnapPy_Manifold *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":49
 *                            &c_triangulation)
 *         M = _manifold_class('empty')
 *         M.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 *         M.set_name(self.manifold_name + '_canonical')
 *         return M
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_6SnapPy_Manifold *)__pyx_v_M->__pyx_base.__pyx_vtab)->__pyx_base.set_c_triangulation(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_M), __pyx_v_c_triangulation); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":50
 *         M = _manifold_class('empty')
 *         M.set_c_triangulation(c_triangulation)
 *         M.set_name(self.manifold_name + '_canonical')             # <<<<<<<<<<<<<<
 *         return M
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_M), __pyx_n_s_set_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_manifold_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_n_s_canonical); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __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_t_5};
    __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_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 50, __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;

  /* "cython/core/cusp_neighborhoods.pyx":51
 *         M.set_c_triangulation(c_triangulation)
 *         M.set_name(self.manifold_name + '_canonical')
 *         return M             # <<<<<<<<<<<<<<
 * 
 *     def original_index(self, which_cusp):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_M);
  __pyx_r = ((PyObject *)__pyx_v_M);
  goto __pyx_L0;

  /* "cython/core/cusp_neighborhoods.pyx":39
 *             N, N != 1 and 's' or '')
 * 
 *     def manifold(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a Manifold built from the current canonical triangulation.
 */

  /* 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("SnapPy.CCuspNeighborhood.manifold", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_M);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":53
 *         return M
 * 
 *     def original_index(self, which_cusp):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the index by which the Manifold identifies this cusp.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_11original_index(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_6SnapPy_17CCuspNeighborhood_10original_index, "CCuspNeighborhood.original_index(self, which_cusp)\n\n        Returns the index by which the Manifold identifies this cusp.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_11original_index = {"original_index", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_11original_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_10original_index};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_11original_index(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_which_cusp = 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("original_index (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_which_cusp,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_which_cusp)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 53, __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, "original_index") < 0)) __PYX_ERR(11, 53, __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_which_cusp = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("original_index", 1, 1, 1, __pyx_nargs); __PYX_ERR(11, 53, __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("SnapPy.CCuspNeighborhood.original_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_10original_index(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self), __pyx_v_which_cusp);

  /* 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_6SnapPy_17CCuspNeighborhood_10original_index(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp) {
  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("original_index", 1);

  /* "cython/core/cusp_neighborhoods.pyx":57
 *         Returns the index by which the Manifold identifies this cusp.
 *         """
 *         return self.original_indices[which_cusp]             # <<<<<<<<<<<<<<
 * 
 *     def check_index(self, which_cusp):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->original_indices, __pyx_v_which_cusp); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/cusp_neighborhoods.pyx":53
 *         return M
 * 
 *     def original_index(self, which_cusp):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the index by which the Manifold identifies this cusp.
 */

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

/* "cython/core/cusp_neighborhoods.pyx":59
 *         return self.original_indices[which_cusp]
 * 
 *     def check_index(self, which_cusp):             # <<<<<<<<<<<<<<
 *         """
 *         Raises an IndexError if the cusp index is invalid.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_13check_index(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_6SnapPy_17CCuspNeighborhood_12check_index, "CCuspNeighborhood.check_index(self, which_cusp)\n\n        Raises an IndexError if the cusp index is invalid.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_13check_index = {"check_index", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_13check_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_12check_index};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_13check_index(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_which_cusp = 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("check_index (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_which_cusp,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_which_cusp)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 59, __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, "check_index") < 0)) __PYX_ERR(11, 59, __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_which_cusp = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("check_index", 1, 1, 1, __pyx_nargs); __PYX_ERR(11, 59, __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("SnapPy.CCuspNeighborhood.check_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_12check_index(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self), __pyx_v_which_cusp);

  /* 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_6SnapPy_17CCuspNeighborhood_12check_index(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp) {
  PyObject *__pyx_v_N = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("check_index", 1);

  /* "cython/core/cusp_neighborhoods.pyx":63
 *         Raises an IndexError if the cusp index is invalid.
 *         """
 *         N = int(which_cusp)             # <<<<<<<<<<<<<<
 *         if 0 <= N < self._num_cusps:
 *             return N
 */
  __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_which_cusp); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_N = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":64
 *         """
 *         N = int(which_cusp)
 *         if 0 <= N < self._num_cusps:             # <<<<<<<<<<<<<<
 *             return N
 *         else:
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_N, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 64, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
    __Pyx_DECREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_num_cusps); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 64, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_N, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 64, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(11, 64, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_3)) {

    /* "cython/core/cusp_neighborhoods.pyx":65
 *         N = int(which_cusp)
 *         if 0 <= N < self._num_cusps:
 *             return N             # <<<<<<<<<<<<<<
 *         else:
 *             raise IndexError('The specified cusp (%s) does not '
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_N);
    __pyx_r = __pyx_v_N;
    goto __pyx_L0;

    /* "cython/core/cusp_neighborhoods.pyx":64
 *         """
 *         N = int(which_cusp)
 *         if 0 <= N < self._num_cusps:             # <<<<<<<<<<<<<<
 *             return N
 *         else:
 */
  }

  /* "cython/core/cusp_neighborhoods.pyx":67
 *             return N
 *         else:
 *             raise IndexError('The specified cusp (%s) does not '             # <<<<<<<<<<<<<<
 *                              'exist.' % which_cusp)
 * 
 */
  /*else*/ {

    /* "cython/core/cusp_neighborhoods.pyx":68
 *         else:
 *             raise IndexError('The specified cusp (%s) does not '
 *                              'exist.' % which_cusp)             # <<<<<<<<<<<<<<
 * 
 *     def num_cusps(self):
 */
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_The_specified_cusp_s_does_not_ex, __pyx_v_which_cusp); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cython/core/cusp_neighborhoods.pyx":67
 *             return N
 *         else:
 *             raise IndexError('The specified cusp (%s) does not '             # <<<<<<<<<<<<<<
 *                              'exist.' % which_cusp)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 67, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(11, 67, __pyx_L1_error)
  }

  /* "cython/core/cusp_neighborhoods.pyx":59
 *         return self.original_indices[which_cusp]
 * 
 *     def check_index(self, which_cusp):             # <<<<<<<<<<<<<<
 *         """
 *         Raises an IndexError if the cusp index is invalid.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("SnapPy.CCuspNeighborhood.check_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":70
 *                              'exist.' % which_cusp)
 * 
 *     def num_cusps(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of cusps.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_15num_cusps(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_6SnapPy_17CCuspNeighborhood_14num_cusps, "CCuspNeighborhood.num_cusps(self)\n\n        Return the number of cusps.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_15num_cusps = {"num_cusps", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_15num_cusps, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_14num_cusps};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_15num_cusps(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("num_cusps (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("num_cusps", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "num_cusps", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_14num_cusps(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_14num_cusps(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__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("num_cusps", 1);

  /* "cython/core/cusp_neighborhoods.pyx":74
 *         Return the number of cusps.
 *         """
 *         return self._num_cusps             # <<<<<<<<<<<<<<
 * 
 *     def topology(self, which_cusp = 0):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_num_cusps); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 74, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/cusp_neighborhoods.pyx":70
 *                              'exist.' % which_cusp)
 * 
 *     def num_cusps(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of cusps.
 */

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

/* "cython/core/cusp_neighborhoods.pyx":76
 *         return self._num_cusps
 * 
 *     def topology(self, which_cusp = 0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the topological type of the specified cusp.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_17topology(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_6SnapPy_17CCuspNeighborhood_16topology, "CCuspNeighborhood.topology(self, which_cusp=0)\n\n        Return the topological type of the specified cusp.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_17topology = {"topology", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_17topology, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_16topology};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_17topology(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_which_cusp = 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("topology (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_which_cusp,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_which_cusp);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 76, __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, "topology") < 0)) __PYX_ERR(11, 76, __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_which_cusp = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("topology", 0, 0, 1, __pyx_nargs); __PYX_ERR(11, 76, __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("SnapPy.CCuspNeighborhood.topology", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_16topology(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self), __pyx_v_which_cusp);

  /* 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_6SnapPy_17CCuspNeighborhood_16topology(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp) {
  PyObject *__pyx_v_N = NULL;
  CuspTopology __pyx_v_topology;
  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;
  CuspTopology __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("topology", 1);

  /* "cython/core/cusp_neighborhoods.pyx":80
 *         Return the topological type of the specified cusp.
 *         """
 *         N = self.check_index(which_cusp)             # <<<<<<<<<<<<<<
 *         topology = get_cusp_neighborhood_topology(self.c_cusp_neighborhood, N)
 *         return CuspTopology[topology]
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 80, __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, __pyx_v_which_cusp};
    __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(11, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_N = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":81
 *         """
 *         N = self.check_index(which_cusp)
 *         topology = get_cusp_neighborhood_topology(self.c_cusp_neighborhood, N)             # <<<<<<<<<<<<<<
 *         return CuspTopology[topology]
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_N); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(11, 81, __pyx_L1_error)
  __pyx_t_5 = get_cusp_neighborhood_topology(__pyx_v_self->c_cusp_neighborhood, __pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 81, __pyx_L1_error)
  __pyx_v_topology = __pyx_t_5;

  /* "cython/core/cusp_neighborhoods.pyx":82
 *         N = self.check_index(which_cusp)
 *         topology = get_cusp_neighborhood_topology(self.c_cusp_neighborhood, N)
 *         return CuspTopology[topology]             # <<<<<<<<<<<<<<
 * 
 *     def get_displacement(self, which_cusp = 0):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_CuspTopology); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_CuspTopology(__pyx_v_topology); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 82, __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;

  /* "cython/core/cusp_neighborhoods.pyx":76
 *         return self._num_cusps
 * 
 *     def topology(self, which_cusp = 0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the topological type of the specified cusp.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CCuspNeighborhood.topology", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":84
 *         return CuspTopology[topology]
 * 
 *     def get_displacement(self, which_cusp = 0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the displacement of the horospherical boundary of the
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_19get_displacement(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_6SnapPy_17CCuspNeighborhood_18get_displacement, "CCuspNeighborhood.get_displacement(self, which_cusp=0)\n\n        Return the displacement of the horospherical boundary of the\n        specified cusp. The displacement is the hyperbolic distance\n        that the horospherical boundary has been displaced from its\n        \"home\" position, at which the area of the boundary is\n        3sqrt(3)/8.  (The translates of all of the horospheres are\n        guaranteed to be pairwise disjoint when each cusp has\n        displacement 0.)\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_19get_displacement = {"get_displacement", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_19get_displacement, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_18get_displacement};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_19get_displacement(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_which_cusp = 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_displacement (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_which_cusp,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_which_cusp);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 84, __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_displacement") < 0)) __PYX_ERR(11, 84, __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_which_cusp = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_displacement", 0, 0, 1, __pyx_nargs); __PYX_ERR(11, 84, __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("SnapPy.CCuspNeighborhood.get_displacement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_18get_displacement(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self), __pyx_v_which_cusp);

  /* 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_6SnapPy_17CCuspNeighborhood_18get_displacement(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp) {
  PyObject *__pyx_v_N = NULL;
  PyObject *__pyx_v_disp = 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;
  __pyx_t_6SnapPy_Real __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_displacement", 1);

  /* "cython/core/cusp_neighborhoods.pyx":94
 *         displacement 0.)
 *         """
 *         N = self.check_index(which_cusp)             # <<<<<<<<<<<<<<
 *         disp = Number(Real2gen(get_cusp_neighborhood_displacement(
 *             self.c_cusp_neighborhood, N)))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 94, __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, __pyx_v_which_cusp};
    __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(11, 94, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_N = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":95
 *         """
 *         N = self.check_index(which_cusp)
 *         disp = Number(Real2gen(get_cusp_neighborhood_displacement(             # <<<<<<<<<<<<<<
 *             self.c_cusp_neighborhood, N)))
 *         return self._number_(disp)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Number); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cython/core/cusp_neighborhoods.pyx":96
 *         N = self.check_index(which_cusp)
 *         disp = Number(Real2gen(get_cusp_neighborhood_displacement(
 *             self.c_cusp_neighborhood, N)))             # <<<<<<<<<<<<<<
 *         return self._number_(disp)
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_N); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(11, 96, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":95
 *         """
 *         N = self.check_index(which_cusp)
 *         disp = Number(Real2gen(get_cusp_neighborhood_displacement(             # <<<<<<<<<<<<<<
 *             self.c_cusp_neighborhood, N)))
 *         return self._number_(disp)
 */
  __pyx_t_5 = get_cusp_neighborhood_displacement(__pyx_v_self->c_cusp_neighborhood, __pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 95, __pyx_L1_error)
  __pyx_t_3 = __pyx_v_6SnapPy_Real2gen(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __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_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_disp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":97
 *         disp = Number(Real2gen(get_cusp_neighborhood_displacement(
 *             self.c_cusp_neighborhood, N)))
 *         return self._number_(disp)             # <<<<<<<<<<<<<<
 * 
 *     def set_displacement(self, new_displacement, which_cusp=0):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 97, __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, __pyx_v_disp};
    __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(11, 97, __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;

  /* "cython/core/cusp_neighborhoods.pyx":84
 *         return CuspTopology[topology]
 * 
 *     def get_displacement(self, which_cusp = 0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the displacement of the horospherical boundary of the
 */

  /* 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_6);
  __Pyx_AddTraceback("SnapPy.CCuspNeighborhood.get_displacement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XDECREF(__pyx_v_disp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":99
 *         return self._number_(disp)
 * 
 *     def set_displacement(self, new_displacement, which_cusp=0):             # <<<<<<<<<<<<<<
 *         """
 *         Set the displacement of the specified cusp.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_21set_displacement(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_6SnapPy_17CCuspNeighborhood_20set_displacement, "CCuspNeighborhood.set_displacement(self, new_displacement, which_cusp=0)\n\n        Set the displacement of the specified cusp.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_21set_displacement = {"set_displacement", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_21set_displacement, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_20set_displacement};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_21set_displacement(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_new_displacement = 0;
  PyObject *__pyx_v_which_cusp = 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("set_displacement (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_new_displacement,&__pyx_n_s_which_cusp,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_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_new_displacement)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 99, __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_which_cusp);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 99, __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, "set_displacement") < 0)) __PYX_ERR(11, 99, __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_new_displacement = values[0];
    __pyx_v_which_cusp = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_displacement", 0, 1, 2, __pyx_nargs); __PYX_ERR(11, 99, __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("SnapPy.CCuspNeighborhood.set_displacement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_20set_displacement(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self), __pyx_v_new_displacement, __pyx_v_which_cusp);

  /* 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_6SnapPy_17CCuspNeighborhood_20set_displacement(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_new_displacement, PyObject *__pyx_v_which_cusp) {
  PyObject *__pyx_v_N = 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;
  __pyx_t_6SnapPy_Real __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_displacement", 1);

  /* "cython/core/cusp_neighborhoods.pyx":103
 *         Set the displacement of the specified cusp.
 *         """
 *         N = self.check_index(which_cusp)             # <<<<<<<<<<<<<<
 *         set_cusp_neighborhood_displacement(self.c_cusp_neighborhood,
 *                                            N, Object2Real(new_displacement))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 103, __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, __pyx_v_which_cusp};
    __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(11, 103, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_N = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":105
 *         N = self.check_index(which_cusp)
 *         set_cusp_neighborhood_displacement(self.c_cusp_neighborhood,
 *                                            N, Object2Real(new_displacement))             # <<<<<<<<<<<<<<
 * 
 *     def stopping_displacement(self, which_cusp=0):
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_N); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(11, 105, __pyx_L1_error)
  __pyx_t_5 = __pyx_f_6SnapPy_Object2Real(__pyx_v_new_displacement); if (unlikely(__pyx_t_5 == ((__pyx_t_6SnapPy_Real)-1) && PyErr_Occurred())) __PYX_ERR(11, 105, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":104
 *         """
 *         N = self.check_index(which_cusp)
 *         set_cusp_neighborhood_displacement(self.c_cusp_neighborhood,             # <<<<<<<<<<<<<<
 *                                            N, Object2Real(new_displacement))
 * 
 */
  set_cusp_neighborhood_displacement(__pyx_v_self->c_cusp_neighborhood, __pyx_t_4, __pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 104, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":99
 *         return self._number_(disp)
 * 
 *     def set_displacement(self, new_displacement, which_cusp=0):             # <<<<<<<<<<<<<<
 *         """
 *         Set the displacement of the specified cusp.
 */

  /* 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("SnapPy.CCuspNeighborhood.set_displacement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":107
 *                                            N, Object2Real(new_displacement))
 * 
 *     def stopping_displacement(self, which_cusp=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the displacement at which the specified cusp
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_23stopping_displacement(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_6SnapPy_17CCuspNeighborhood_22stopping_displacement, "CCuspNeighborhood.stopping_displacement(self, which_cusp=0)\n\n        Return the displacement at which the specified cusp\n        neighborhood bumps into itself or another cusp neighborhood.\n        (Assumes the other displacements are fixed.)\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_23stopping_displacement = {"stopping_displacement", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_23stopping_displacement, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_22stopping_displacement};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_23stopping_displacement(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_which_cusp = 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("stopping_displacement (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_which_cusp,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_which_cusp);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 107, __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, "stopping_displacement") < 0)) __PYX_ERR(11, 107, __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_which_cusp = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("stopping_displacement", 0, 0, 1, __pyx_nargs); __PYX_ERR(11, 107, __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("SnapPy.CCuspNeighborhood.stopping_displacement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_22stopping_displacement(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self), __pyx_v_which_cusp);

  /* 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_6SnapPy_17CCuspNeighborhood_22stopping_displacement(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp) {
  PyObject *__pyx_v_N = NULL;
  PyObject *__pyx_v_disp = 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;
  __pyx_t_6SnapPy_Real __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("stopping_displacement", 1);

  /* "cython/core/cusp_neighborhoods.pyx":113
 *         (Assumes the other displacements are fixed.)
 *         """
 *         N = self.check_index(which_cusp)             # <<<<<<<<<<<<<<
 *         disp = Number(Real2gen(get_cusp_neighborhood_stopping_displacement(
 *             self.c_cusp_neighborhood, N)))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 113, __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, __pyx_v_which_cusp};
    __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(11, 113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_N = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":114
 *         """
 *         N = self.check_index(which_cusp)
 *         disp = Number(Real2gen(get_cusp_neighborhood_stopping_displacement(             # <<<<<<<<<<<<<<
 *             self.c_cusp_neighborhood, N)))
 *         return self._number_(disp)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Number); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cython/core/cusp_neighborhoods.pyx":115
 *         N = self.check_index(which_cusp)
 *         disp = Number(Real2gen(get_cusp_neighborhood_stopping_displacement(
 *             self.c_cusp_neighborhood, N)))             # <<<<<<<<<<<<<<
 *         return self._number_(disp)
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_N); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(11, 115, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":114
 *         """
 *         N = self.check_index(which_cusp)
 *         disp = Number(Real2gen(get_cusp_neighborhood_stopping_displacement(             # <<<<<<<<<<<<<<
 *             self.c_cusp_neighborhood, N)))
 *         return self._number_(disp)
 */
  __pyx_t_5 = get_cusp_neighborhood_stopping_displacement(__pyx_v_self->c_cusp_neighborhood, __pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 114, __pyx_L1_error)
  __pyx_t_3 = __pyx_v_6SnapPy_Real2gen(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __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_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_disp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":116
 *         disp = Number(Real2gen(get_cusp_neighborhood_stopping_displacement(
 *             self.c_cusp_neighborhood, N)))
 *         return self._number_(disp)             # <<<<<<<<<<<<<<
 * 
 *     def stopper(self, which_cusp):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 116, __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, __pyx_v_disp};
    __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(11, 116, __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;

  /* "cython/core/cusp_neighborhoods.pyx":107
 *                                            N, Object2Real(new_displacement))
 * 
 *     def stopping_displacement(self, which_cusp=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the displacement at which the specified cusp
 */

  /* 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_6);
  __Pyx_AddTraceback("SnapPy.CCuspNeighborhood.stopping_displacement", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XDECREF(__pyx_v_disp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":118
 *         return self._number_(disp)
 * 
 *     def stopper(self, which_cusp):             # <<<<<<<<<<<<<<
 *         """
 *         Return the index of the cusp which will be the first one that
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_25stopper(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_6SnapPy_17CCuspNeighborhood_24stopper, "CCuspNeighborhood.stopper(self, which_cusp)\n\n        Return the index of the cusp which will be the first one that\n        the specified cusp neighborhood bumps into.\n        (Assumes the other displacements are fixed.)\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_25stopper = {"stopper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_25stopper, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_24stopper};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_25stopper(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_which_cusp = 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("stopper (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_which_cusp,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_which_cusp)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 118, __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, "stopper") < 0)) __PYX_ERR(11, 118, __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_which_cusp = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("stopper", 1, 1, 1, __pyx_nargs); __PYX_ERR(11, 118, __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("SnapPy.CCuspNeighborhood.stopper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_24stopper(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self), __pyx_v_which_cusp);

  /* 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_6SnapPy_17CCuspNeighborhood_24stopper(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp) {
  PyObject *__pyx_v_N = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("stopper", 1);

  /* "cython/core/cusp_neighborhoods.pyx":124
 *         (Assumes the other displacements are fixed.)
 *         """
 *         N = self.check_index(which_cusp)             # <<<<<<<<<<<<<<
 *         return get_cusp_neighborhood_stopper_cusp_index(
 *             self.c_cusp_neighborhood, N)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 124, __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, __pyx_v_which_cusp};
    __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(11, 124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_N = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":125
 *         """
 *         N = self.check_index(which_cusp)
 *         return get_cusp_neighborhood_stopper_cusp_index(             # <<<<<<<<<<<<<<
 *             self.c_cusp_neighborhood, N)
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "cython/core/cusp_neighborhoods.pyx":126
 *         N = self.check_index(which_cusp)
 *         return get_cusp_neighborhood_stopper_cusp_index(
 *             self.c_cusp_neighborhood, N)             # <<<<<<<<<<<<<<
 * 
 *     def reach(self, which_cusp=0):
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_N); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(11, 126, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":125
 *         """
 *         N = self.check_index(which_cusp)
 *         return get_cusp_neighborhood_stopper_cusp_index(             # <<<<<<<<<<<<<<
 *             self.c_cusp_neighborhood, N)
 * 
 */
  __pyx_t_5 = get_cusp_neighborhood_stopper_cusp_index(__pyx_v_self->c_cusp_neighborhood, __pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 125, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/cusp_neighborhoods.pyx":118
 *         return self._number_(disp)
 * 
 *     def stopper(self, which_cusp):             # <<<<<<<<<<<<<<
 *         """
 *         Return the index of the cusp which will be the first one that
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CCuspNeighborhood.stopper", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":128
 *             self.c_cusp_neighborhood, N)
 * 
 *     def reach(self, which_cusp=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the displacement at which the specified cusp
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_27reach(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_6SnapPy_17CCuspNeighborhood_26reach, "CCuspNeighborhood.reach(self, which_cusp=0)\n\n        Return the displacement at which the specified cusp\n        neighborhood bumps into itself.  (This is twice the\n        distance between nearest horoball lifts.)\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_27reach = {"reach", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_27reach, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_26reach};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_27reach(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_which_cusp = 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("reach (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_which_cusp,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_which_cusp);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 128, __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, "reach") < 0)) __PYX_ERR(11, 128, __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_which_cusp = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("reach", 0, 0, 1, __pyx_nargs); __PYX_ERR(11, 128, __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("SnapPy.CCuspNeighborhood.reach", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_26reach(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self), __pyx_v_which_cusp);

  /* 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_6SnapPy_17CCuspNeighborhood_26reach(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp) {
  PyObject *__pyx_v_N = NULL;
  PyObject *__pyx_v_reach = 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;
  __pyx_t_6SnapPy_Real __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reach", 1);

  /* "cython/core/cusp_neighborhoods.pyx":134
 *         distance between nearest horoball lifts.)
 *         """
 *         N = self.check_index(which_cusp)             # <<<<<<<<<<<<<<
 *         reach = Number(Real2gen(get_cusp_neighborhood_reach(
 *             self.c_cusp_neighborhood, N)))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 134, __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, __pyx_v_which_cusp};
    __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(11, 134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_N = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":135
 *         """
 *         N = self.check_index(which_cusp)
 *         reach = Number(Real2gen(get_cusp_neighborhood_reach(             # <<<<<<<<<<<<<<
 *             self.c_cusp_neighborhood, N)))
 *         return self._number_(reach)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Number); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cython/core/cusp_neighborhoods.pyx":136
 *         N = self.check_index(which_cusp)
 *         reach = Number(Real2gen(get_cusp_neighborhood_reach(
 *             self.c_cusp_neighborhood, N)))             # <<<<<<<<<<<<<<
 *         return self._number_(reach)
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_N); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(11, 136, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":135
 *         """
 *         N = self.check_index(which_cusp)
 *         reach = Number(Real2gen(get_cusp_neighborhood_reach(             # <<<<<<<<<<<<<<
 *             self.c_cusp_neighborhood, N)))
 *         return self._number_(reach)
 */
  __pyx_t_5 = get_cusp_neighborhood_reach(__pyx_v_self->c_cusp_neighborhood, __pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 135, __pyx_L1_error)
  __pyx_t_3 = __pyx_v_6SnapPy_Real2gen(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __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_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 135, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_reach = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":137
 *         reach = Number(Real2gen(get_cusp_neighborhood_reach(
 *             self.c_cusp_neighborhood, N)))
 *         return self._number_(reach)             # <<<<<<<<<<<<<<
 * 
 *     def max_reach(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 137, __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, __pyx_v_reach};
    __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(11, 137, __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;

  /* "cython/core/cusp_neighborhoods.pyx":128
 *             self.c_cusp_neighborhood, N)
 * 
 *     def reach(self, which_cusp=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the displacement at which the specified cusp
 */

  /* 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_6);
  __Pyx_AddTraceback("SnapPy.CCuspNeighborhood.reach", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XDECREF(__pyx_v_reach);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":139
 *         return self._number_(reach)
 * 
 *     def max_reach(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the maximum reach over all cusps.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_29max_reach(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_6SnapPy_17CCuspNeighborhood_28max_reach, "CCuspNeighborhood.max_reach(self)\n\n        Return the maximum reach over all cusps.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_29max_reach = {"max_reach", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_29max_reach, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_28max_reach};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_29max_reach(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("max_reach (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("max_reach", 1, 0, 0, __pyx_nargs); return NULL;}
  if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "max_reach", 0))) return NULL;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_28max_reach(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_28max_reach(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self) {
  PyObject *__pyx_v_reach = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  __pyx_t_6SnapPy_Real __pyx_t_3;
  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("max_reach", 1);

  /* "cython/core/cusp_neighborhoods.pyx":143
 *         Return the maximum reach over all cusps.
 *         """
 *         reach = Number(Real2gen(get_cusp_neighborhood_max_reach(             # <<<<<<<<<<<<<<
 *             self.c_cusp_neighborhood)))
 *         return self._number_(reach)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Number); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cython/core/cusp_neighborhoods.pyx":144
 *         """
 *         reach = Number(Real2gen(get_cusp_neighborhood_max_reach(
 *             self.c_cusp_neighborhood)))             # <<<<<<<<<<<<<<
 *         return self._number_(reach)
 * 
 */
  __pyx_t_3 = get_cusp_neighborhood_max_reach(__pyx_v_self->c_cusp_neighborhood); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 143, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":143
 *         Return the maximum reach over all cusps.
 *         """
 *         reach = Number(Real2gen(get_cusp_neighborhood_max_reach(             # <<<<<<<<<<<<<<
 *             self.c_cusp_neighborhood)))
 *         return self._number_(reach)
 */
  __pyx_t_4 = __pyx_v_6SnapPy_Real2gen(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 143, __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_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_reach = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":145
 *         reach = Number(Real2gen(get_cusp_neighborhood_max_reach(
 *             self.c_cusp_neighborhood)))
 *         return self._number_(reach)             # <<<<<<<<<<<<<<
 * 
 *     def get_tie(self, which_cusp):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = NULL;
  __pyx_t_6 = 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_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_reach};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 145, __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;

  /* "cython/core/cusp_neighborhoods.pyx":139
 *         return self._number_(reach)
 * 
 *     def max_reach(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the maximum reach over all cusps.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("SnapPy.CCuspNeighborhood.max_reach", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_reach);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":147
 *         return self._number_(reach)
 * 
 *     def get_tie(self, which_cusp):             # <<<<<<<<<<<<<<
 *         """
 *         Return True if the specified cusp is a member of the tied group.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_31get_tie(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_6SnapPy_17CCuspNeighborhood_30get_tie, "CCuspNeighborhood.get_tie(self, which_cusp)\n\n        Return True if the specified cusp is a member of the tied group.\n        The displacements of the tied cusps are all the same.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_31get_tie = {"get_tie", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_31get_tie, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_30get_tie};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_31get_tie(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_which_cusp = 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_tie (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_which_cusp,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_which_cusp)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 147, __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, "get_tie") < 0)) __PYX_ERR(11, 147, __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_which_cusp = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_tie", 1, 1, 1, __pyx_nargs); __PYX_ERR(11, 147, __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("SnapPy.CCuspNeighborhood.get_tie", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_30get_tie(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self), __pyx_v_which_cusp);

  /* 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_6SnapPy_17CCuspNeighborhood_30get_tie(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp) {
  PyObject *__pyx_v_N = 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;
  Boolean __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_tie", 1);

  /* "cython/core/cusp_neighborhoods.pyx":152
 *         The displacements of the tied cusps are all the same.
 *         """
 *         N = self.check_index(which_cusp)             # <<<<<<<<<<<<<<
 *         return get_cusp_neighborhood_tie(self.c_cusp_neighborhood, N)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 152, __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, __pyx_v_which_cusp};
    __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(11, 152, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_N = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":153
 *         """
 *         N = self.check_index(which_cusp)
 *         return get_cusp_neighborhood_tie(self.c_cusp_neighborhood, N)             # <<<<<<<<<<<<<<
 * 
 *     def set_tie(self, which_cusp, new_tie):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_N); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(11, 153, __pyx_L1_error)
  __pyx_t_5 = get_cusp_neighborhood_tie(__pyx_v_self->c_cusp_neighborhood, __pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 153, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyInt_From_Boolean(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/cusp_neighborhoods.pyx":147
 *         return self._number_(reach)
 * 
 *     def get_tie(self, which_cusp):             # <<<<<<<<<<<<<<
 *         """
 *         Return True if the specified cusp is a member of the tied group.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.CCuspNeighborhood.get_tie", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":155
 *         return get_cusp_neighborhood_tie(self.c_cusp_neighborhood, N)
 * 
 *     def set_tie(self, which_cusp, new_tie):             # <<<<<<<<<<<<<<
 *         """
 *         Mark the specified cusp as a member of the tied group.
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_33set_tie(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_6SnapPy_17CCuspNeighborhood_32set_tie, "CCuspNeighborhood.set_tie(self, which_cusp, new_tie)\n\n        Mark the specified cusp as a member of the tied group.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_33set_tie = {"set_tie", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_33set_tie, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_32set_tie};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_33set_tie(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_which_cusp = 0;
  PyObject *__pyx_v_new_tie = 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("set_tie (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_which_cusp,&__pyx_n_s_new_tie,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_which_cusp)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 155, __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_new_tie)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 155, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("set_tie", 1, 2, 2, 1); __PYX_ERR(11, 155, __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, "set_tie") < 0)) __PYX_ERR(11, 155, __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_which_cusp = values[0];
    __pyx_v_new_tie = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_tie", 1, 2, 2, __pyx_nargs); __PYX_ERR(11, 155, __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("SnapPy.CCuspNeighborhood.set_tie", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_32set_tie(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self), __pyx_v_which_cusp, __pyx_v_new_tie);

  /* 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_6SnapPy_17CCuspNeighborhood_32set_tie(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp, PyObject *__pyx_v_new_tie) {
  PyObject *__pyx_v_N = 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;
  Boolean __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_tie", 1);

  /* "cython/core/cusp_neighborhoods.pyx":159
 *         Mark the specified cusp as a member of the tied group.
 *         """
 *         N = self.check_index(which_cusp)             # <<<<<<<<<<<<<<
 *         set_cusp_neighborhood_tie(self.c_cusp_neighborhood, N, new_tie)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 159, __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, __pyx_v_which_cusp};
    __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(11, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_N = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":160
 *         """
 *         N = self.check_index(which_cusp)
 *         set_cusp_neighborhood_tie(self.c_cusp_neighborhood, N, new_tie)             # <<<<<<<<<<<<<<
 * 
 *     def volume(self, which_cusp=0):
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_N); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(11, 160, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyInt_As_Boolean(__pyx_v_new_tie); if (unlikely((__pyx_t_5 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(11, 160, __pyx_L1_error)
  set_cusp_neighborhood_tie(__pyx_v_self->c_cusp_neighborhood, __pyx_t_4, __pyx_t_5); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 160, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":155
 *         return get_cusp_neighborhood_tie(self.c_cusp_neighborhood, N)
 * 
 *     def set_tie(self, which_cusp, new_tie):             # <<<<<<<<<<<<<<
 *         """
 *         Mark the specified cusp as a member of the tied group.
 */

  /* 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("SnapPy.CCuspNeighborhood.set_tie", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":162
 *         set_cusp_neighborhood_tie(self.c_cusp_neighborhood, N, new_tie)
 * 
 *     def volume(self, which_cusp=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the volume of the horoball neighborhood of the specified
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_35volume(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_6SnapPy_17CCuspNeighborhood_34volume, "CCuspNeighborhood.volume(self, which_cusp=0)\n\n        Return the volume of the horoball neighborhood of the specified\n        cusp.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_35volume = {"volume", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_35volume, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_34volume};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_35volume(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_which_cusp = 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("volume (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_which_cusp,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_which_cusp);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 162, __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, "volume") < 0)) __PYX_ERR(11, 162, __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_which_cusp = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("volume", 0, 0, 1, __pyx_nargs); __PYX_ERR(11, 162, __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("SnapPy.CCuspNeighborhood.volume", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_34volume(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self), __pyx_v_which_cusp);

  /* 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_6SnapPy_17CCuspNeighborhood_34volume(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp) {
  PyObject *__pyx_v_N = NULL;
  PyObject *__pyx_v_volume = 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;
  __pyx_t_6SnapPy_Real __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("volume", 1);

  /* "cython/core/cusp_neighborhoods.pyx":167
 *         cusp.
 *         """
 *         N = self.check_index(which_cusp)             # <<<<<<<<<<<<<<
 *         volume = Number(Real2gen(get_cusp_neighborhood_cusp_volume(
 *                 self.c_cusp_neighborhood, N)))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 167, __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, __pyx_v_which_cusp};
    __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(11, 167, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_N = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":168
 *         """
 *         N = self.check_index(which_cusp)
 *         volume = Number(Real2gen(get_cusp_neighborhood_cusp_volume(             # <<<<<<<<<<<<<<
 *                 self.c_cusp_neighborhood, N)))
 *         return self._number_(volume)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Number); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "cython/core/cusp_neighborhoods.pyx":169
 *         N = self.check_index(which_cusp)
 *         volume = Number(Real2gen(get_cusp_neighborhood_cusp_volume(
 *                 self.c_cusp_neighborhood, N)))             # <<<<<<<<<<<<<<
 *         return self._number_(volume)
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_N); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(11, 169, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":168
 *         """
 *         N = self.check_index(which_cusp)
 *         volume = Number(Real2gen(get_cusp_neighborhood_cusp_volume(             # <<<<<<<<<<<<<<
 *                 self.c_cusp_neighborhood, N)))
 *         return self._number_(volume)
 */
  __pyx_t_5 = get_cusp_neighborhood_cusp_volume(__pyx_v_self->c_cusp_neighborhood, __pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 168, __pyx_L1_error)
  __pyx_t_3 = __pyx_v_6SnapPy_Real2gen(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __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_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_volume = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":170
 *         volume = Number(Real2gen(get_cusp_neighborhood_cusp_volume(
 *                 self.c_cusp_neighborhood, N)))
 *         return self._number_(volume)             # <<<<<<<<<<<<<<
 * 
 *     def translations(self, which_cusp = 0):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 170, __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, __pyx_v_volume};
    __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(11, 170, __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;

  /* "cython/core/cusp_neighborhoods.pyx":162
 *         set_cusp_neighborhood_tie(self.c_cusp_neighborhood, N, new_tie)
 * 
 *     def volume(self, which_cusp=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the volume of the horoball neighborhood of the specified
 */

  /* 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_6);
  __Pyx_AddTraceback("SnapPy.CCuspNeighborhood.volume", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XDECREF(__pyx_v_volume);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":172
 *         return self._number_(volume)
 * 
 *     def translations(self, which_cusp = 0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the (complex) Euclidean translations of the meridian
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_37translations(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_6SnapPy_17CCuspNeighborhood_36translations, "CCuspNeighborhood.translations(self, which_cusp=0)\n\n        Return the (complex) Euclidean translations of the meridian\n        and longitude of the specified cusp.\n\n        Also see :py:meth:`CuspNeighborhood.all_translations` which supports\n        arbitrary precision and verified results.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_37translations = {"translations", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_37translations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_36translations};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_37translations(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_which_cusp = 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("translations (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_which_cusp,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_which_cusp);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 172, __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, "translations") < 0)) __PYX_ERR(11, 172, __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_which_cusp = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("translations", 0, 0, 1, __pyx_nargs); __PYX_ERR(11, 172, __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("SnapPy.CCuspNeighborhood.translations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_36translations(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self), __pyx_v_which_cusp);

  /* 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_6SnapPy_17CCuspNeighborhood_36translations(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp) {
  Complex __pyx_v_meridian;
  Complex __pyx_v_longitude;
  PyObject *__pyx_v_N = NULL;
  PyObject *__pyx_v_M = NULL;
  PyObject *__pyx_v_L = 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("translations", 1);

  /* "cython/core/cusp_neighborhoods.pyx":182
 *         cdef Complex meridian
 *         cdef Complex longitude
 *         N = self.check_index(which_cusp)             # <<<<<<<<<<<<<<
 *         get_cusp_neighborhood_translations(self.c_cusp_neighborhood,
 *                                            N,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 182, __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, __pyx_v_which_cusp};
    __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(11, 182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_N = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":184
 *         N = self.check_index(which_cusp)
 *         get_cusp_neighborhood_translations(self.c_cusp_neighborhood,
 *                                            N,             # <<<<<<<<<<<<<<
 *                                            &meridian,
 *                                            &longitude)
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_N); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(11, 184, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":183
 *         cdef Complex longitude
 *         N = self.check_index(which_cusp)
 *         get_cusp_neighborhood_translations(self.c_cusp_neighborhood,             # <<<<<<<<<<<<<<
 *                                            N,
 *                                            &meridian,
 */
  get_cusp_neighborhood_translations(__pyx_v_self->c_cusp_neighborhood, __pyx_t_4, (&__pyx_v_meridian), (&__pyx_v_longitude)); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 183, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":187
 *                                            &meridian,
 *                                            &longitude)
 *         M, L = Complex2Number(meridian), Complex2Number(longitude)             # <<<<<<<<<<<<<<
 *         return self._number_(M), self._number_(L)
 * 
 */
  __pyx_t_1 = __pyx_f_6SnapPy_Complex2Number(__pyx_v_meridian); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_6SnapPy_Complex2Number(__pyx_v_longitude); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_M = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_L = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":188
 *                                            &longitude)
 *         M, L = Complex2Number(meridian), Complex2Number(longitude)
 *         return self._number_(M), self._number_(L)             # <<<<<<<<<<<<<<
 * 
 *     def horoballs(self, cutoff=0.1, which_cusp=0, full_list=True,
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __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_M};
    __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(11, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_L};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(11, 188, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(11, 188, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cython/core/cusp_neighborhoods.pyx":172
 *         return self._number_(volume)
 * 
 *     def translations(self, which_cusp = 0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the (complex) Euclidean translations of the meridian
 */

  /* 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("SnapPy.CCuspNeighborhood.translations", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_N);
  __Pyx_XDECREF(__pyx_v_M);
  __Pyx_XDECREF(__pyx_v_L);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":190
 *         return self._number_(M), self._number_(L)
 * 
 *     def horoballs(self, cutoff=0.1, which_cusp=0, full_list=True,             # <<<<<<<<<<<<<<
 *                   high_precision=False):
 *         """
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_39horoballs(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_6SnapPy_17CCuspNeighborhood_38horoballs, "CCuspNeighborhood.horoballs(self, cutoff=0.1, which_cusp=0, full_list=True, high_precision=False)\n\n        Return a list of dictionaries describing the horoballs with\n        height at least cutoff.  The keys are 'center', 'radius', 'index'.\n\n        If the high_precision flag is set to the default value False, these\n        are Python complexes and floats.  Otherwise they are SnapPy Numbers.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_39horoballs = {"horoballs", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_39horoballs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_38horoballs};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_39horoballs(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_cutoff = 0;
  PyObject *__pyx_v_which_cusp = 0;
  PyObject *__pyx_v_full_list = 0;
  PyObject *__pyx_v_high_precision = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("horoballs (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_cutoff,&__pyx_n_s_which_cusp,&__pyx_n_s_full_list,&__pyx_n_s_high_precision,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_float_0_1));
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_0));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));

    /* "cython/core/cusp_neighborhoods.pyx":191
 * 
 *     def horoballs(self, cutoff=0.1, which_cusp=0, full_list=True,
 *                   high_precision=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of dictionaries describing the horoballs with
 */
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cutoff);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 190, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_which_cusp);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 190, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_full_list);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 190, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_high_precision);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 190, __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, "horoballs") < 0)) __PYX_ERR(11, 190, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        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;
      }
    }
    __pyx_v_cutoff = values[0];
    __pyx_v_which_cusp = values[1];
    __pyx_v_full_list = values[2];
    __pyx_v_high_precision = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("horoballs", 0, 0, 4, __pyx_nargs); __PYX_ERR(11, 190, __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("SnapPy.CCuspNeighborhood.horoballs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_38horoballs(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self), __pyx_v_cutoff, __pyx_v_which_cusp, __pyx_v_full_list, __pyx_v_high_precision);

  /* "cython/core/cusp_neighborhoods.pyx":190
 *         return self._number_(M), self._number_(L)
 * 
 *     def horoballs(self, cutoff=0.1, which_cusp=0, full_list=True,             # <<<<<<<<<<<<<<
 *                   high_precision=False):
 *         """
 */

  /* 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_6SnapPy_17CCuspNeighborhood_38horoballs(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_cutoff, PyObject *__pyx_v_which_cusp, PyObject *__pyx_v_full_list, PyObject *__pyx_v_high_precision) {
  CuspNbhdHoroballList *__pyx_v_horoball_list;
  CuspNbhdHoroball __pyx_v_ball;
  PyObject *__pyx_v_result = NULL;
  long __pyx_v_n;
  PyObject *__pyx_v_dict = 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;
  Boolean __pyx_t_5;
  __pyx_t_6SnapPy_Real __pyx_t_6;
  CuspNbhdHoroballList *__pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("horoballs", 0);
  __Pyx_INCREF(__pyx_v_which_cusp);

  /* "cython/core/cusp_neighborhoods.pyx":201
 *         cdef CuspNbhdHoroballList* horoball_list
 *         cdef CuspNbhdHoroball ball
 *         which_cusp = self.check_index(which_cusp)             # <<<<<<<<<<<<<<
 *         horoball_list = get_cusp_neighborhood_horoballs(
 *             self.c_cusp_neighborhood,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 201, __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, __pyx_v_which_cusp};
    __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(11, 201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_which_cusp, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":204
 *         horoball_list = get_cusp_neighborhood_horoballs(
 *             self.c_cusp_neighborhood,
 *             which_cusp,             # <<<<<<<<<<<<<<
 *             full_list,
 *             Object2Real(cutoff))
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_which_cusp); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(11, 204, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":205
 *             self.c_cusp_neighborhood,
 *             which_cusp,
 *             full_list,             # <<<<<<<<<<<<<<
 *             Object2Real(cutoff))
 *         if horoball_list == NULL:
 */
  __pyx_t_5 = __Pyx_PyInt_As_Boolean(__pyx_v_full_list); if (unlikely((__pyx_t_5 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(11, 205, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":206
 *             which_cusp,
 *             full_list,
 *             Object2Real(cutoff))             # <<<<<<<<<<<<<<
 *         if horoball_list == NULL:
 *             raise RuntimeError('The horoball construction failed.')
 */
  __pyx_t_6 = __pyx_f_6SnapPy_Object2Real(__pyx_v_cutoff); if (unlikely(__pyx_t_6 == ((__pyx_t_6SnapPy_Real)-1) && PyErr_Occurred())) __PYX_ERR(11, 206, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":202
 *         cdef CuspNbhdHoroball ball
 *         which_cusp = self.check_index(which_cusp)
 *         horoball_list = get_cusp_neighborhood_horoballs(             # <<<<<<<<<<<<<<
 *             self.c_cusp_neighborhood,
 *             which_cusp,
 */
  __pyx_t_7 = get_cusp_neighborhood_horoballs(__pyx_v_self->c_cusp_neighborhood, __pyx_t_4, __pyx_t_5, __pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 202, __pyx_L1_error)
  __pyx_v_horoball_list = __pyx_t_7;

  /* "cython/core/cusp_neighborhoods.pyx":207
 *             full_list,
 *             Object2Real(cutoff))
 *         if horoball_list == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('The horoball construction failed.')
 *         result = []
 */
  __pyx_t_8 = (__pyx_v_horoball_list == NULL);
  if (unlikely(__pyx_t_8)) {

    /* "cython/core/cusp_neighborhoods.pyx":208
 *             Object2Real(cutoff))
 *         if horoball_list == NULL:
 *             raise RuntimeError('The horoball construction failed.')             # <<<<<<<<<<<<<<
 *         result = []
 *         for n from 0 <= n < horoball_list.num_horoballs:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__139, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 208, __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(11, 208, __pyx_L1_error)

    /* "cython/core/cusp_neighborhoods.pyx":207
 *             full_list,
 *             Object2Real(cutoff))
 *         if horoball_list == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('The horoball construction failed.')
 *         result = []
 */
  }

  /* "cython/core/cusp_neighborhoods.pyx":209
 *         if horoball_list == NULL:
 *             raise RuntimeError('The horoball construction failed.')
 *         result = []             # <<<<<<<<<<<<<<
 *         for n from 0 <= n < horoball_list.num_horoballs:
 *             ball = horoball_list.horoball[n]
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":210
 *             raise RuntimeError('The horoball construction failed.')
 *         result = []
 *         for n from 0 <= n < horoball_list.num_horoballs:             # <<<<<<<<<<<<<<
 *             ball = horoball_list.horoball[n]
 *             if high_precision:
 */
  __pyx_t_4 = __pyx_v_horoball_list->num_horoballs;
  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {

    /* "cython/core/cusp_neighborhoods.pyx":211
 *         result = []
 *         for n from 0 <= n < horoball_list.num_horoballs:
 *             ball = horoball_list.horoball[n]             # <<<<<<<<<<<<<<
 *             if high_precision:
 *                 dict = {
 */
    __pyx_v_ball = (__pyx_v_horoball_list->horoball[__pyx_v_n]);

    /* "cython/core/cusp_neighborhoods.pyx":212
 *         for n from 0 <= n < horoball_list.num_horoballs:
 *             ball = horoball_list.horoball[n]
 *             if high_precision:             # <<<<<<<<<<<<<<
 *                 dict = {
 *                     'center' : self._number_(Complex2Number(ball.center)),
 */
    __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_high_precision); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(11, 212, __pyx_L1_error)
    if (__pyx_t_8) {

      /* "cython/core/cusp_neighborhoods.pyx":214
 *             if high_precision:
 *                 dict = {
 *                     'center' : self._number_(Complex2Number(ball.center)),             # <<<<<<<<<<<<<<
 *                     'radius' : self._number_(Real2Number(ball.radius)),
 *                     'index'  : ball.cusp_index}
 */
      __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 214, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 214, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = __pyx_f_6SnapPy_Complex2Number(__pyx_v_ball.center); if (unlikely(!__pyx_t_9)) __PYX_ERR(11, 214, __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_3))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_11 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_9};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 214, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_center, __pyx_t_2) < 0) __PYX_ERR(11, 214, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/cusp_neighborhoods.pyx":215
 *                 dict = {
 *                     'center' : self._number_(Complex2Number(ball.center)),
 *                     'radius' : self._number_(Real2Number(ball.radius)),             # <<<<<<<<<<<<<<
 *                     'index'  : ball.cusp_index}
 *             else:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = __pyx_f_6SnapPy_Real2Number(__pyx_v_ball.radius); if (unlikely(!__pyx_t_9)) __PYX_ERR(11, 215, __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_3))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_11 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_9};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 215, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_radius, __pyx_t_2) < 0) __PYX_ERR(11, 214, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/cusp_neighborhoods.pyx":216
 *                     'center' : self._number_(Complex2Number(ball.center)),
 *                     'radius' : self._number_(Real2Number(ball.radius)),
 *                     'index'  : ball.cusp_index}             # <<<<<<<<<<<<<<
 *             else:
 *                 dict = {'center' : Complex2complex(ball.center),
 */
      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ball.cusp_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 216, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_index, __pyx_t_2) < 0) __PYX_ERR(11, 214, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_dict, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "cython/core/cusp_neighborhoods.pyx":212
 *         for n from 0 <= n < horoball_list.num_horoballs:
 *             ball = horoball_list.horoball[n]
 *             if high_precision:             # <<<<<<<<<<<<<<
 *                 dict = {
 *                     'center' : self._number_(Complex2Number(ball.center)),
 */
      goto __pyx_L6;
    }

    /* "cython/core/cusp_neighborhoods.pyx":218
 *                     'index'  : ball.cusp_index}
 *             else:
 *                 dict = {'center' : Complex2complex(ball.center),             # <<<<<<<<<<<<<<
 *                         'radius' : Real2float(ball.radius),
 *                         'index'  : ball.cusp_index}
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __pyx_f_6SnapPy_Complex2complex(__pyx_v_ball.center); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 218, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_center, __pyx_t_2) < 0) __PYX_ERR(11, 218, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/cusp_neighborhoods.pyx":219
 *             else:
 *                 dict = {'center' : Complex2complex(ball.center),
 *                         'radius' : Real2float(ball.radius),             # <<<<<<<<<<<<<<
 *                         'index'  : ball.cusp_index}
 *             result.append(dict)
 */
      __pyx_t_2 = __pyx_f_6SnapPy_Real2float(__pyx_v_ball.radius); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 219, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_radius, __pyx_t_2) < 0) __PYX_ERR(11, 218, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/cusp_neighborhoods.pyx":220
 *                 dict = {'center' : Complex2complex(ball.center),
 *                         'radius' : Real2float(ball.radius),
 *                         'index'  : ball.cusp_index}             # <<<<<<<<<<<<<<
 *             result.append(dict)
 *         free_cusp_neighborhood_horoball_list(horoball_list)
 */
      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ball.cusp_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 220, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_index, __pyx_t_2) < 0) __PYX_ERR(11, 218, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_dict, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;
    }
    __pyx_L6:;

    /* "cython/core/cusp_neighborhoods.pyx":221
 *                         'radius' : Real2float(ball.radius),
 *                         'index'  : ball.cusp_index}
 *             result.append(dict)             # <<<<<<<<<<<<<<
 *         free_cusp_neighborhood_horoball_list(horoball_list)
 *         return result
 */
    __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_dict); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(11, 221, __pyx_L1_error)
  }

  /* "cython/core/cusp_neighborhoods.pyx":222
 *                         'index'  : ball.cusp_index}
 *             result.append(dict)
 *         free_cusp_neighborhood_horoball_list(horoball_list)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  free_cusp_neighborhood_horoball_list(__pyx_v_horoball_list); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 222, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":223
 *             result.append(dict)
 *         free_cusp_neighborhood_horoball_list(horoball_list)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def Ford_domain(self, which_cusp=0, high_precision=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cython/core/cusp_neighborhoods.pyx":190
 *         return self._number_(M), self._number_(L)
 * 
 *     def horoballs(self, cutoff=0.1, which_cusp=0, full_list=True,             # <<<<<<<<<<<<<<
 *                   high_precision=False):
 *         """
 */

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("SnapPy.CCuspNeighborhood.horoballs", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_dict);
  __Pyx_XDECREF(__pyx_v_which_cusp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":225
 *         return result
 * 
 *     def Ford_domain(self, which_cusp=0, high_precision=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of pairs of complex numbers describing the
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_41Ford_domain(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_6SnapPy_17CCuspNeighborhood_40Ford_domain, "CCuspNeighborhood.Ford_domain(self, which_cusp=0, high_precision=False)\n\n        Return a list of pairs of complex numbers describing the\n        endpoints of the segments obtained by projecting the edges of\n        the Ford domain to the xy-plane in the upper half space model.\n\n        If the high_precision flag is set to False (the default), the\n        coordinates are Python complex numbers.  Otherwise they are\n        SnapPy Numbers.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_41Ford_domain = {"Ford_domain", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_41Ford_domain, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_40Ford_domain};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_41Ford_domain(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_which_cusp = 0;
  PyObject *__pyx_v_high_precision = 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("Ford_domain (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_which_cusp,&__pyx_n_s_high_precision,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_0));
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_which_cusp);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 225, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_high_precision);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 225, __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, "Ford_domain") < 0)) __PYX_ERR(11, 225, __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);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_which_cusp = values[0];
    __pyx_v_high_precision = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("Ford_domain", 0, 0, 2, __pyx_nargs); __PYX_ERR(11, 225, __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("SnapPy.CCuspNeighborhood.Ford_domain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_40Ford_domain(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self), __pyx_v_which_cusp, __pyx_v_high_precision);

  /* 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_6SnapPy_17CCuspNeighborhood_40Ford_domain(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp, PyObject *__pyx_v_high_precision) {
  CuspNbhdSegmentList *__pyx_v_segment_list;
  CuspNbhdSegment __pyx_v_segment;
  PyObject *__pyx_v_result = NULL;
  int __pyx_v_n;
  PyObject *__pyx_v_pair = 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;
  CuspNbhdSegmentList *__pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("Ford_domain", 0);
  __Pyx_INCREF(__pyx_v_which_cusp);

  /* "cython/core/cusp_neighborhoods.pyx":237
 *         cdef CuspNbhdSegmentList* segment_list
 *         cdef CuspNbhdSegment segment
 *         which_cusp = self.check_index(which_cusp)             # <<<<<<<<<<<<<<
 *         segment_list = get_cusp_neighborhood_Ford_domain(
 *             self.c_cusp_neighborhood,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 237, __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, __pyx_v_which_cusp};
    __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(11, 237, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_which_cusp, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":240
 *         segment_list = get_cusp_neighborhood_Ford_domain(
 *             self.c_cusp_neighborhood,
 *             which_cusp)             # <<<<<<<<<<<<<<
 *         if segment_list == NULL:
 *             raise RuntimeError('The Ford domain construction failed.')
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_which_cusp); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(11, 240, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":238
 *         cdef CuspNbhdSegment segment
 *         which_cusp = self.check_index(which_cusp)
 *         segment_list = get_cusp_neighborhood_Ford_domain(             # <<<<<<<<<<<<<<
 *             self.c_cusp_neighborhood,
 *             which_cusp)
 */
  __pyx_t_5 = get_cusp_neighborhood_Ford_domain(__pyx_v_self->c_cusp_neighborhood, __pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 238, __pyx_L1_error)
  __pyx_v_segment_list = __pyx_t_5;

  /* "cython/core/cusp_neighborhoods.pyx":241
 *             self.c_cusp_neighborhood,
 *             which_cusp)
 *         if segment_list == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('The Ford domain construction failed.')
 *         result = []
 */
  __pyx_t_6 = (__pyx_v_segment_list == NULL);
  if (unlikely(__pyx_t_6)) {

    /* "cython/core/cusp_neighborhoods.pyx":242
 *             which_cusp)
 *         if segment_list == NULL:
 *             raise RuntimeError('The Ford domain construction failed.')             # <<<<<<<<<<<<<<
 *         result = []
 *         for n in range(segment_list.num_segments):
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__140, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 242, __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(11, 242, __pyx_L1_error)

    /* "cython/core/cusp_neighborhoods.pyx":241
 *             self.c_cusp_neighborhood,
 *             which_cusp)
 *         if segment_list == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('The Ford domain construction failed.')
 *         result = []
 */
  }

  /* "cython/core/cusp_neighborhoods.pyx":243
 *         if segment_list == NULL:
 *             raise RuntimeError('The Ford domain construction failed.')
 *         result = []             # <<<<<<<<<<<<<<
 *         for n in range(segment_list.num_segments):
 *             segment = segment_list.segment[n]
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":244
 *             raise RuntimeError('The Ford domain construction failed.')
 *         result = []
 *         for n in range(segment_list.num_segments):             # <<<<<<<<<<<<<<
 *             segment = segment_list.segment[n]
 *             if high_precision:
 */
  __pyx_t_4 = __pyx_v_segment_list->num_segments;
  __pyx_t_7 = __pyx_t_4;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_n = __pyx_t_8;

    /* "cython/core/cusp_neighborhoods.pyx":245
 *         result = []
 *         for n in range(segment_list.num_segments):
 *             segment = segment_list.segment[n]             # <<<<<<<<<<<<<<
 *             if high_precision:
 *                 pair = (
 */
    __pyx_v_segment = (__pyx_v_segment_list->segment[__pyx_v_n]);

    /* "cython/core/cusp_neighborhoods.pyx":246
 *         for n in range(segment_list.num_segments):
 *             segment = segment_list.segment[n]
 *             if high_precision:             # <<<<<<<<<<<<<<
 *                 pair = (
 *                     self._number_(Complex2Number(segment.endpoint[0])),
 */
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_high_precision); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(11, 246, __pyx_L1_error)
    if (__pyx_t_6) {

      /* "cython/core/cusp_neighborhoods.pyx":248
 *             if high_precision:
 *                 pair = (
 *                     self._number_(Complex2Number(segment.endpoint[0])),             # <<<<<<<<<<<<<<
 *                     self._number_(Complex2Number(segment.endpoint[1])))
 *             else:
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_f_6SnapPy_Complex2Number((__pyx_v_segment.endpoint[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 248, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = NULL;
      __pyx_t_10 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_10 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 248, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }

      /* "cython/core/cusp_neighborhoods.pyx":249
 *                 pair = (
 *                     self._number_(Complex2Number(segment.endpoint[0])),
 *                     self._number_(Complex2Number(segment.endpoint[1])))             # <<<<<<<<<<<<<<
 *             else:
 *                 pair = (Complex2complex(segment.endpoint[0]),
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = __pyx_f_6SnapPy_Complex2Number((__pyx_v_segment.endpoint[1])); if (unlikely(!__pyx_t_9)) __PYX_ERR(11, 249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_11 = NULL;
      __pyx_t_10 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_10 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_9};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 249, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }

      /* "cython/core/cusp_neighborhoods.pyx":248
 *             if high_precision:
 *                 pair = (
 *                     self._number_(Complex2Number(segment.endpoint[0])),             # <<<<<<<<<<<<<<
 *                     self._number_(Complex2Number(segment.endpoint[1])))
 *             else:
 */
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 248, __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(11, 248, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(11, 248, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_pair, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "cython/core/cusp_neighborhoods.pyx":246
 *         for n in range(segment_list.num_segments):
 *             segment = segment_list.segment[n]
 *             if high_precision:             # <<<<<<<<<<<<<<
 *                 pair = (
 *                     self._number_(Complex2Number(segment.endpoint[0])),
 */
      goto __pyx_L6;
    }

    /* "cython/core/cusp_neighborhoods.pyx":251
 *                     self._number_(Complex2Number(segment.endpoint[1])))
 *             else:
 *                 pair = (Complex2complex(segment.endpoint[0]),             # <<<<<<<<<<<<<<
 *                         Complex2complex(segment.endpoint[1]))
 *             result.append(pair)
 */
    /*else*/ {
      __pyx_t_3 = __pyx_f_6SnapPy_Complex2complex((__pyx_v_segment.endpoint[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

      /* "cython/core/cusp_neighborhoods.pyx":252
 *             else:
 *                 pair = (Complex2complex(segment.endpoint[0]),
 *                         Complex2complex(segment.endpoint[1]))             # <<<<<<<<<<<<<<
 *             result.append(pair)
 *         free_cusp_neighborhood_segment_list(segment_list)
 */
      __pyx_t_2 = __pyx_f_6SnapPy_Complex2complex((__pyx_v_segment.endpoint[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 252, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cython/core/cusp_neighborhoods.pyx":251
 *                     self._number_(Complex2Number(segment.endpoint[1])))
 *             else:
 *                 pair = (Complex2complex(segment.endpoint[0]),             # <<<<<<<<<<<<<<
 *                         Complex2complex(segment.endpoint[1]))
 *             result.append(pair)
 */
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 251, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(11, 251, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(11, 251, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_pair, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;
    }
    __pyx_L6:;

    /* "cython/core/cusp_neighborhoods.pyx":253
 *                 pair = (Complex2complex(segment.endpoint[0]),
 *                         Complex2complex(segment.endpoint[1]))
 *             result.append(pair)             # <<<<<<<<<<<<<<
 *         free_cusp_neighborhood_segment_list(segment_list)
 *         return result
 */
    __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_pair); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(11, 253, __pyx_L1_error)
  }

  /* "cython/core/cusp_neighborhoods.pyx":254
 *                         Complex2complex(segment.endpoint[1]))
 *             result.append(pair)
 *         free_cusp_neighborhood_segment_list(segment_list)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  free_cusp_neighborhood_segment_list(__pyx_v_segment_list); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 254, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":255
 *             result.append(pair)
 *         free_cusp_neighborhood_segment_list(segment_list)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def triangulation(self, which_cusp=0, high_precision=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cython/core/cusp_neighborhoods.pyx":225
 *         return result
 * 
 *     def Ford_domain(self, which_cusp=0, high_precision=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of pairs of complex numbers describing the
 */

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("SnapPy.CCuspNeighborhood.Ford_domain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_pair);
  __Pyx_XDECREF(__pyx_v_which_cusp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":257
 *         return result
 * 
 *     def triangulation(self, which_cusp=0, high_precision=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of dictionaries describing the endpoints of the
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_43triangulation(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_6SnapPy_17CCuspNeighborhood_42triangulation, "CCuspNeighborhood.triangulation(self, which_cusp=0, high_precision=False)\n\n        Return a list of dictionaries describing the endpoints of the\n        segments obtained by projecting the edges of the triangulation\n        dual to the Ford domain into the xy-plane in the upper half\n        space model.  The keys are 'endpoints' and 'indices'.\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_43triangulation = {"triangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_43triangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_42triangulation};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_43triangulation(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_which_cusp = 0;
  PyObject *__pyx_v_high_precision = 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("triangulation (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_which_cusp,&__pyx_n_s_high_precision,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_0));
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
    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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_which_cusp);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 257, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_high_precision);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 257, __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, "triangulation") < 0)) __PYX_ERR(11, 257, __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);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_which_cusp = values[0];
    __pyx_v_high_precision = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("triangulation", 0, 0, 2, __pyx_nargs); __PYX_ERR(11, 257, __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("SnapPy.CCuspNeighborhood.triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_42triangulation(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self), __pyx_v_which_cusp, __pyx_v_high_precision);

  /* 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_6SnapPy_17CCuspNeighborhood_42triangulation(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp, PyObject *__pyx_v_high_precision) {
  CuspNbhdSegmentList *__pyx_v_segment_list;
  CuspNbhdSegment __pyx_v_segment;
  PyObject *__pyx_v_result = NULL;
  long __pyx_v_n;
  PyObject *__pyx_v_endpoints = NULL;
  PyObject *__pyx_v_indices = 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;
  CuspNbhdSegmentList *__pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("triangulation", 0);
  __Pyx_INCREF(__pyx_v_which_cusp);

  /* "cython/core/cusp_neighborhoods.pyx":266
 *         cdef CuspNbhdSegmentList* segment_list
 *         cdef CuspNbhdSegment segment
 *         which_cusp = self.check_index(which_cusp)             # <<<<<<<<<<<<<<
 *         segment_list = get_cusp_neighborhood_triangulation(
 *             self.c_cusp_neighborhood,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 266, __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, __pyx_v_which_cusp};
    __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(11, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_which_cusp, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":269
 *         segment_list = get_cusp_neighborhood_triangulation(
 *             self.c_cusp_neighborhood,
 *             which_cusp)             # <<<<<<<<<<<<<<
 *         if segment_list == NULL:
 *             raise RuntimeError('The triangulation construction failed.')
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_which_cusp); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(11, 269, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":267
 *         cdef CuspNbhdSegment segment
 *         which_cusp = self.check_index(which_cusp)
 *         segment_list = get_cusp_neighborhood_triangulation(             # <<<<<<<<<<<<<<
 *             self.c_cusp_neighborhood,
 *             which_cusp)
 */
  __pyx_t_5 = get_cusp_neighborhood_triangulation(__pyx_v_self->c_cusp_neighborhood, __pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 267, __pyx_L1_error)
  __pyx_v_segment_list = __pyx_t_5;

  /* "cython/core/cusp_neighborhoods.pyx":270
 *             self.c_cusp_neighborhood,
 *             which_cusp)
 *         if segment_list == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('The triangulation construction failed.')
 *         result = []
 */
  __pyx_t_6 = (__pyx_v_segment_list == NULL);
  if (unlikely(__pyx_t_6)) {

    /* "cython/core/cusp_neighborhoods.pyx":271
 *             which_cusp)
 *         if segment_list == NULL:
 *             raise RuntimeError('The triangulation construction failed.')             # <<<<<<<<<<<<<<
 *         result = []
 *         for n from 0 <= n < segment_list.num_segments:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__141, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 271, __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(11, 271, __pyx_L1_error)

    /* "cython/core/cusp_neighborhoods.pyx":270
 *             self.c_cusp_neighborhood,
 *             which_cusp)
 *         if segment_list == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError('The triangulation construction failed.')
 *         result = []
 */
  }

  /* "cython/core/cusp_neighborhoods.pyx":272
 *         if segment_list == NULL:
 *             raise RuntimeError('The triangulation construction failed.')
 *         result = []             # <<<<<<<<<<<<<<
 *         for n from 0 <= n < segment_list.num_segments:
 *             segment = segment_list.segment[n]
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":273
 *             raise RuntimeError('The triangulation construction failed.')
 *         result = []
 *         for n from 0 <= n < segment_list.num_segments:             # <<<<<<<<<<<<<<
 *             segment = segment_list.segment[n]
 *             if high_precision:
 */
  __pyx_t_4 = __pyx_v_segment_list->num_segments;
  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_4; __pyx_v_n++) {

    /* "cython/core/cusp_neighborhoods.pyx":274
 *         result = []
 *         for n from 0 <= n < segment_list.num_segments:
 *             segment = segment_list.segment[n]             # <<<<<<<<<<<<<<
 *             if high_precision:
 *                 endpoints = (
 */
    __pyx_v_segment = (__pyx_v_segment_list->segment[__pyx_v_n]);

    /* "cython/core/cusp_neighborhoods.pyx":275
 *         for n from 0 <= n < segment_list.num_segments:
 *             segment = segment_list.segment[n]
 *             if high_precision:             # <<<<<<<<<<<<<<
 *                 endpoints = (
 *                     self._number_(Complex2Number(segment.endpoint[0])),
 */
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_high_precision); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(11, 275, __pyx_L1_error)
    if (__pyx_t_6) {

      /* "cython/core/cusp_neighborhoods.pyx":277
 *             if high_precision:
 *                 endpoints = (
 *                     self._number_(Complex2Number(segment.endpoint[0])),             # <<<<<<<<<<<<<<
 *                     self._number_(Complex2Number(segment.endpoint[1])))
 *             else:
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 277, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __pyx_f_6SnapPy_Complex2Number((__pyx_v_segment.endpoint[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 277, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = NULL;
      __pyx_t_8 = 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_8 = 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_8, 1+__pyx_t_8);
        __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(11, 277, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }

      /* "cython/core/cusp_neighborhoods.pyx":278
 *                 endpoints = (
 *                     self._number_(Complex2Number(segment.endpoint[0])),
 *                     self._number_(Complex2Number(segment.endpoint[1])))             # <<<<<<<<<<<<<<
 *             else:
 *                 endpoints = (Complex2complex(segment.endpoint[0]),
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_number_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 278, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __pyx_f_6SnapPy_Complex2Number((__pyx_v_segment.endpoint[1])); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 278, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 278, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }

      /* "cython/core/cusp_neighborhoods.pyx":277
 *             if high_precision:
 *                 endpoints = (
 *                     self._number_(Complex2Number(segment.endpoint[0])),             # <<<<<<<<<<<<<<
 *                     self._number_(Complex2Number(segment.endpoint[1])))
 *             else:
 */
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 277, __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(11, 277, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(11, 277, __pyx_L1_error);
      __pyx_t_1 = 0;
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_endpoints, ((PyObject*)__pyx_t_3));
      __pyx_t_3 = 0;

      /* "cython/core/cusp_neighborhoods.pyx":275
 *         for n from 0 <= n < segment_list.num_segments:
 *             segment = segment_list.segment[n]
 *             if high_precision:             # <<<<<<<<<<<<<<
 *                 endpoints = (
 *                     self._number_(Complex2Number(segment.endpoint[0])),
 */
      goto __pyx_L6;
    }

    /* "cython/core/cusp_neighborhoods.pyx":280
 *                     self._number_(Complex2Number(segment.endpoint[1])))
 *             else:
 *                 endpoints = (Complex2complex(segment.endpoint[0]),             # <<<<<<<<<<<<<<
 *                              Complex2complex(segment.endpoint[1]))
 *             indices = (segment.start_index,
 */
    /*else*/ {
      __pyx_t_3 = __pyx_f_6SnapPy_Complex2complex((__pyx_v_segment.endpoint[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 280, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);

      /* "cython/core/cusp_neighborhoods.pyx":281
 *             else:
 *                 endpoints = (Complex2complex(segment.endpoint[0]),
 *                              Complex2complex(segment.endpoint[1]))             # <<<<<<<<<<<<<<
 *             indices = (segment.start_index,
 *                        segment.middle_index,
 */
      __pyx_t_2 = __pyx_f_6SnapPy_Complex2complex((__pyx_v_segment.endpoint[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 281, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "cython/core/cusp_neighborhoods.pyx":280
 *                     self._number_(Complex2Number(segment.endpoint[1])))
 *             else:
 *                 endpoints = (Complex2complex(segment.endpoint[0]),             # <<<<<<<<<<<<<<
 *                              Complex2complex(segment.endpoint[1]))
 *             indices = (segment.start_index,
 */
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 280, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_3);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(11, 280, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(11, 280, __pyx_L1_error);
      __pyx_t_3 = 0;
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_endpoints, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;
    }
    __pyx_L6:;

    /* "cython/core/cusp_neighborhoods.pyx":282
 *                 endpoints = (Complex2complex(segment.endpoint[0]),
 *                              Complex2complex(segment.endpoint[1]))
 *             indices = (segment.start_index,             # <<<<<<<<<<<<<<
 *                        segment.middle_index,
 *                        segment.end_index)
 */
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_segment.start_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cython/core/cusp_neighborhoods.pyx":283
 *                              Complex2complex(segment.endpoint[1]))
 *             indices = (segment.start_index,
 *                        segment.middle_index,             # <<<<<<<<<<<<<<
 *                        segment.end_index)
 *             result.append({'endpoints' : endpoints, 'indices' : indices})
 */
    __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_segment.middle_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);

    /* "cython/core/cusp_neighborhoods.pyx":284
 *             indices = (segment.start_index,
 *                        segment.middle_index,
 *                        segment.end_index)             # <<<<<<<<<<<<<<
 *             result.append({'endpoints' : endpoints, 'indices' : indices})
 *         free_cusp_neighborhood_segment_list(segment_list)
 */
    __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_segment.end_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 284, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);

    /* "cython/core/cusp_neighborhoods.pyx":282
 *                 endpoints = (Complex2complex(segment.endpoint[0]),
 *                              Complex2complex(segment.endpoint[1]))
 *             indices = (segment.start_index,             # <<<<<<<<<<<<<<
 *                        segment.middle_index,
 *                        segment.end_index)
 */
    __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1)) __PYX_ERR(11, 282, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_2)) __PYX_ERR(11, 282, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_3)) __PYX_ERR(11, 282, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_indices, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "cython/core/cusp_neighborhoods.pyx":285
 *                        segment.middle_index,
 *                        segment.end_index)
 *             result.append({'endpoints' : endpoints, 'indices' : indices})             # <<<<<<<<<<<<<<
 *         free_cusp_neighborhood_segment_list(segment_list)
 *         return result
 */
    __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_endpoints, __pyx_v_endpoints) < 0) __PYX_ERR(11, 285, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_indices, __pyx_v_indices) < 0) __PYX_ERR(11, 285, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(11, 285, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }

  /* "cython/core/cusp_neighborhoods.pyx":286
 *                        segment.end_index)
 *             result.append({'endpoints' : endpoints, 'indices' : indices})
 *         free_cusp_neighborhood_segment_list(segment_list)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  free_cusp_neighborhood_segment_list(__pyx_v_segment_list); if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 286, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":287
 *             result.append({'endpoints' : endpoints, 'indices' : indices})
 *         free_cusp_neighborhood_segment_list(segment_list)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def view(self, which_cusp=0, cutoff=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cython/core/cusp_neighborhoods.pyx":257
 *         return result
 * 
 *     def triangulation(self, which_cusp=0, high_precision=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of dictionaries describing the endpoints of the
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("SnapPy.CCuspNeighborhood.triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_endpoints);
  __Pyx_XDECREF(__pyx_v_indices);
  __Pyx_XDECREF(__pyx_v_which_cusp);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/cusp_neighborhoods.pyx":289
 *         return result
 * 
 *     def view(self, which_cusp=0, cutoff=None):             # <<<<<<<<<<<<<<
 *         """
 *         Create a 3D picture of the horoball packing.  One can specify
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_45view(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_6SnapPy_17CCuspNeighborhood_44view, "CCuspNeighborhood.view(self, which_cusp=0, cutoff=None)\n\n        Create a 3D picture of the horoball packing.  One can specify\n        which cusp to put at infinity and how large of horoballs to\n        look at, e.g.\n\n        >>> M = Manifold('m125')\n        >>> C = M.cusp_neighborhood()\n        >>> C.view(which_cusp = 1, cutoff=0.2)   #doctest: +CYOPENGL\n        ");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_45view = {"view", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_45view, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_44view};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_45view(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_which_cusp = 0;
  PyObject *__pyx_v_cutoff = 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("view (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_which_cusp,&__pyx_n_s_cutoff,0};
    values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_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 (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_which_cusp);
          if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 289, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_cutoff);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(11, 289, __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, "view") < 0)) __PYX_ERR(11, 289, __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);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_which_cusp = values[0];
    __pyx_v_cutoff = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("view", 0, 0, 2, __pyx_nargs); __PYX_ERR(11, 289, __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("SnapPy.CCuspNeighborhood.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_44view(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self), __pyx_v_which_cusp, __pyx_v_cutoff);

  /* 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_6SnapPy_17CCuspNeighborhood_44view(struct __pyx_obj_6SnapPy_CCuspNeighborhood *__pyx_v_self, PyObject *__pyx_v_which_cusp, PyObject *__pyx_v_cutoff) {
  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;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("view", 0);
  __Pyx_INCREF(__pyx_v_which_cusp);

  /* "cython/core/cusp_neighborhoods.pyx":299
 *         >>> C.view(which_cusp = 1, cutoff=0.2)   #doctest: +CYOPENGL
 *         """
 *         which_cusp = self.check_index(which_cusp)             # <<<<<<<<<<<<<<
 *         if HoroballViewer:
 *             return ViewerWindow(HoroballViewer, self, which_cusp=which_cusp,
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 299, __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, __pyx_v_which_cusp};
    __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(11, 299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_which_cusp, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":300
 *         """
 *         which_cusp = self.check_index(which_cusp)
 *         if HoroballViewer:             # <<<<<<<<<<<<<<
 *             return ViewerWindow(HoroballViewer, self, which_cusp=which_cusp,
 *                                 cutoff=cutoff,
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_HoroballViewer); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(11, 300, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "cython/core/cusp_neighborhoods.pyx":301
 *         which_cusp = self.check_index(which_cusp)
 *         if HoroballViewer:
 *             return ViewerWindow(HoroballViewer, self, which_cusp=which_cusp,             # <<<<<<<<<<<<<<
 *                                 cutoff=cutoff,
 *                                 title='Cusp neighborhood%s of %s' % (
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ViewerWindow); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_HoroballViewer); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(11, 301, __pyx_L1_error);
    __Pyx_INCREF((PyObject *)__pyx_v_self);
    __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self))) __PYX_ERR(11, 301, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(11, 301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_which_cusp, __pyx_v_which_cusp) < 0) __PYX_ERR(11, 301, __pyx_L1_error)

    /* "cython/core/cusp_neighborhoods.pyx":302
 *         if HoroballViewer:
 *             return ViewerWindow(HoroballViewer, self, which_cusp=which_cusp,
 *                                 cutoff=cutoff,             # <<<<<<<<<<<<<<
 *                                 title='Cusp neighborhood%s of %s' % (
 *                                     's' if self.num_cusps() > 1 else '',
 */
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_cutoff, __pyx_v_cutoff) < 0) __PYX_ERR(11, 301, __pyx_L1_error)

    /* "cython/core/cusp_neighborhoods.pyx":304
 *                                 cutoff=cutoff,
 *                                 title='Cusp neighborhood%s of %s' % (
 *                                     's' if self.num_cusps() > 1 else '',             # <<<<<<<<<<<<<<
 *                                     self.manifold_name))
 *         raise RuntimeError('The HoroballViewer class was not imported.')
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_num_cusps); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
      __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 304, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_t_8 = PyObject_RichCompare(__pyx_t_7, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 304, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(11, 304, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (__pyx_t_5) {
      __Pyx_INCREF(__pyx_n_s_s);
      __pyx_t_6 = __pyx_n_s_s;
    } else {
      __Pyx_INCREF(__pyx_kp_s__9);
      __pyx_t_6 = __pyx_kp_s__9;
    }

    /* "cython/core/cusp_neighborhoods.pyx":305
 *                                 title='Cusp neighborhood%s of %s' % (
 *                                     's' if self.num_cusps() > 1 else '',
 *                                     self.manifold_name))             # <<<<<<<<<<<<<<
 *         raise RuntimeError('The HoroballViewer class was not imported.')
 * 
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_manifold_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 305, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);

    /* "cython/core/cusp_neighborhoods.pyx":304
 *                                 cutoff=cutoff,
 *                                 title='Cusp neighborhood%s of %s' % (
 *                                     's' if self.num_cusps() > 1 else '',             # <<<<<<<<<<<<<<
 *                                     self.manifold_name))
 *         raise RuntimeError('The HoroballViewer class was not imported.')
 */
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(11, 304, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6)) __PYX_ERR(11, 304, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_8);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8)) __PYX_ERR(11, 304, __pyx_L1_error);
    __pyx_t_6 = 0;
    __pyx_t_8 = 0;

    /* "cython/core/cusp_neighborhoods.pyx":303
 *             return ViewerWindow(HoroballViewer, self, which_cusp=which_cusp,
 *                                 cutoff=cutoff,
 *                                 title='Cusp neighborhood%s of %s' % (             # <<<<<<<<<<<<<<
 *                                     's' if self.num_cusps() > 1 else '',
 *                                     self.manifold_name))
 */
    __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Cusp_neighborhood_s_of_s, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_title, __pyx_t_8) < 0) __PYX_ERR(11, 301, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cython/core/cusp_neighborhoods.pyx":301
 *         which_cusp = self.check_index(which_cusp)
 *         if HoroballViewer:
 *             return ViewerWindow(HoroballViewer, self, which_cusp=which_cusp,             # <<<<<<<<<<<<<<
 *                                 cutoff=cutoff,
 *                                 title='Cusp neighborhood%s of %s' % (
 */
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_8;
    __pyx_t_8 = 0;
    goto __pyx_L0;

    /* "cython/core/cusp_neighborhoods.pyx":300
 *         """
 *         which_cusp = self.check_index(which_cusp)
 *         if HoroballViewer:             # <<<<<<<<<<<<<<
 *             return ViewerWindow(HoroballViewer, self, which_cusp=which_cusp,
 *                                 cutoff=cutoff,
 */
  }

  /* "cython/core/cusp_neighborhoods.pyx":306
 *                                     's' if self.num_cusps() > 1 else '',
 *                                     self.manifold_name))
 *         raise RuntimeError('The HoroballViewer class was not imported.')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__142, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(11, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __PYX_ERR(11, 306, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":289
 *         return result
 * 
 *     def view(self, which_cusp=0, cutoff=None):             # <<<<<<<<<<<<<<
 *         """
 *         Create a 3D picture of the horoball packing.  One can specify
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("SnapPy.CCuspNeighborhood.view", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_which_cusp);
  __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_6SnapPy_17CCuspNeighborhood_47__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_6SnapPy_17CCuspNeighborhood_46__reduce_cython__, "CCuspNeighborhood.__reduce_cython__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_47__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_47__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_46__reduce_cython__};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_47__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_6SnapPy_17CCuspNeighborhood_46__reduce_cython__(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__pyx_v_self));

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

static PyObject *__pyx_pf_6SnapPy_17CCuspNeighborhood_46__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_6SnapPy_CCuspNeighborhood *__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(7, 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("SnapPy.CCuspNeighborhood.__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_6SnapPy_17CCuspNeighborhood_49__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_6SnapPy_17CCuspNeighborhood_48__setstate_cython__, "CCuspNeighborhood.__setstate_cython__(self, __pyx_state)");
static PyMethodDef __pyx_mdef_6SnapPy_17CCuspNeighborhood_49__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_49__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_48__setstate_cython__};
static PyObject *__pyx_pw_6SnapPy_17CCuspNeighborhood_49__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(7, 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(7, 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(7, 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("SnapPy.CCuspNeighborhood.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_17CCuspNeighborhood_48__setstate_cython__(((struct __pyx_obj_6SnapPy_CCuspNeighborhood *)__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_6SnapPy_17CCuspNeighborhood_48__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_6SnapPy_CCuspNeighborhood *__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(7, 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("SnapPy.CCuspNeighborhood.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/pickle.pyx":31
 * cdef IS_COMPLETE = <unsigned char> 1 << 5
 * 
 * cdef pickle_triangulation(c_Triangulation *tri):             # <<<<<<<<<<<<<<
 *     """
 *     Pickle a Triangulation by constructing a TriangulationData structure
 */

static PyObject *__pyx_f_6SnapPy_pickle_triangulation(Triangulation *__pyx_v_tri) {
  TriangulationData *__pyx_v_tri_data;
  int __pyx_v_i;
  int __pyx_v_flag;
  int __pyx_v_is_complete;
  int __pyx_v_num_cusps;
  unsigned char __pyx_v_buf[7];
  signed char __pyx_v_filling[2];
  PyObject *__pyx_v_result = NULL;
  int __pyx_v_j;
  double __pyx_v_M;
  double __pyx_v_L;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  long __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  unsigned char __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  double __pyx_t_9;
  double __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pickle_triangulation", 1);

  /* "cython/core/pickle.pyx":41
 *     cdef signed char filling[2]
 * 
 *     triangulation_to_data(tri, &tri_data)             # <<<<<<<<<<<<<<
 * 
 *     # Every pickle starts with b'pickle:'
 */
  triangulation_to_data(__pyx_v_tri, (&__pyx_v_tri_data)); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 41, __pyx_L1_error)

  /* "cython/core/pickle.pyx":44
 * 
 *     # Every pickle starts with b'pickle:'
 *     result = b'pickle:'             # <<<<<<<<<<<<<<
 * 
 *     # The first byte uses the two least significant bits to indicate the
 */
  __Pyx_INCREF(__pyx_kp_b_pickle);
  __pyx_v_result = __pyx_kp_b_pickle;

  /* "cython/core/pickle.pyx":48
 *     # The first byte uses the two least significant bits to indicate the
 *     # orientability type and other bits as flags.
 *     buf[0] = <unsigned char>tri_data.orientability             # <<<<<<<<<<<<<<
 *     # NOTE: tri_data.num_tetrahedra is a positive signed int.
 *     if tri_data.num_tetrahedra > 65535:
 */
  (__pyx_v_buf[0]) = ((unsigned char)__pyx_v_tri_data->orientability);

  /* "cython/core/pickle.pyx":50
 *     buf[0] = <unsigned char>tri_data.orientability
 *     # NOTE: tri_data.num_tetrahedra is a positive signed int.
 *     if tri_data.num_tetrahedra > 65535:             # <<<<<<<<<<<<<<
 *         flag = IS_HUGE
 *         buf[0] |= IS_HUGE
 */
  __pyx_t_1 = (__pyx_v_tri_data->num_tetrahedra > 0xFFFF);
  if (__pyx_t_1) {

    /* "cython/core/pickle.pyx":51
 *     # NOTE: tri_data.num_tetrahedra is a positive signed int.
 *     if tri_data.num_tetrahedra > 65535:
 *         flag = IS_HUGE             # <<<<<<<<<<<<<<
 *         buf[0] |= IS_HUGE
 *         buf[1] = tri_data.num_tetrahedra >> 24
 */
    __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_6SnapPy_IS_HUGE); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 51, __pyx_L1_error)
    __pyx_v_flag = __pyx_t_2;

    /* "cython/core/pickle.pyx":52
 *     if tri_data.num_tetrahedra > 65535:
 *         flag = IS_HUGE
 *         buf[0] |= IS_HUGE             # <<<<<<<<<<<<<<
 *         buf[1] = tri_data.num_tetrahedra >> 24
 *         buf[2] = (tri_data.num_tetrahedra >> 16) & 0xff
 */
    __pyx_t_3 = 0;
    __pyx_t_4 = __Pyx_PyInt_From_unsigned_char((__pyx_v_buf[__pyx_t_3])); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyNumber_InPlaceOr(__pyx_t_4, __pyx_v_6SnapPy_IS_HUGE); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_char(__pyx_t_5); if (unlikely((__pyx_t_6 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(12, 52, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    (__pyx_v_buf[__pyx_t_3]) = __pyx_t_6;

    /* "cython/core/pickle.pyx":53
 *         flag = IS_HUGE
 *         buf[0] |= IS_HUGE
 *         buf[1] = tri_data.num_tetrahedra >> 24             # <<<<<<<<<<<<<<
 *         buf[2] = (tri_data.num_tetrahedra >> 16) & 0xff
 *         buf[3] = (tri_data.num_tetrahedra >> 8) & 0xff
 */
    (__pyx_v_buf[1]) = (__pyx_v_tri_data->num_tetrahedra >> 24);

    /* "cython/core/pickle.pyx":54
 *         buf[0] |= IS_HUGE
 *         buf[1] = tri_data.num_tetrahedra >> 24
 *         buf[2] = (tri_data.num_tetrahedra >> 16) & 0xff             # <<<<<<<<<<<<<<
 *         buf[3] = (tri_data.num_tetrahedra >> 8) & 0xff
 *         buf[4] = tri_data.num_tetrahedra & 0xff
 */
    (__pyx_v_buf[2]) = ((__pyx_v_tri_data->num_tetrahedra >> 16) & 0xff);

    /* "cython/core/pickle.pyx":55
 *         buf[1] = tri_data.num_tetrahedra >> 24
 *         buf[2] = (tri_data.num_tetrahedra >> 16) & 0xff
 *         buf[3] = (tri_data.num_tetrahedra >> 8) & 0xff             # <<<<<<<<<<<<<<
 *         buf[4] = tri_data.num_tetrahedra & 0xff
 *         i = 5
 */
    (__pyx_v_buf[3]) = ((__pyx_v_tri_data->num_tetrahedra >> 8) & 0xff);

    /* "cython/core/pickle.pyx":56
 *         buf[2] = (tri_data.num_tetrahedra >> 16) & 0xff
 *         buf[3] = (tri_data.num_tetrahedra >> 8) & 0xff
 *         buf[4] = tri_data.num_tetrahedra & 0xff             # <<<<<<<<<<<<<<
 *         i = 5
 *     elif tri_data.num_tetrahedra > 255:
 */
    (__pyx_v_buf[4]) = (__pyx_v_tri_data->num_tetrahedra & 0xff);

    /* "cython/core/pickle.pyx":57
 *         buf[3] = (tri_data.num_tetrahedra >> 8) & 0xff
 *         buf[4] = tri_data.num_tetrahedra & 0xff
 *         i = 5             # <<<<<<<<<<<<<<
 *     elif tri_data.num_tetrahedra > 255:
 *         flag = IS_BIG
 */
    __pyx_v_i = 5;

    /* "cython/core/pickle.pyx":50
 *     buf[0] = <unsigned char>tri_data.orientability
 *     # NOTE: tri_data.num_tetrahedra is a positive signed int.
 *     if tri_data.num_tetrahedra > 65535:             # <<<<<<<<<<<<<<
 *         flag = IS_HUGE
 *         buf[0] |= IS_HUGE
 */
    goto __pyx_L3;
  }

  /* "cython/core/pickle.pyx":58
 *         buf[4] = tri_data.num_tetrahedra & 0xff
 *         i = 5
 *     elif tri_data.num_tetrahedra > 255:             # <<<<<<<<<<<<<<
 *         flag = IS_BIG
 *         buf[0] |= IS_BIG
 */
  __pyx_t_1 = (__pyx_v_tri_data->num_tetrahedra > 0xFF);
  if (__pyx_t_1) {

    /* "cython/core/pickle.pyx":59
 *         i = 5
 *     elif tri_data.num_tetrahedra > 255:
 *         flag = IS_BIG             # <<<<<<<<<<<<<<
 *         buf[0] |= IS_BIG
 *         buf[1] = tri_data.num_tetrahedra >> 8
 */
    __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_6SnapPy_IS_BIG); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 59, __pyx_L1_error)
    __pyx_v_flag = __pyx_t_2;

    /* "cython/core/pickle.pyx":60
 *     elif tri_data.num_tetrahedra > 255:
 *         flag = IS_BIG
 *         buf[0] |= IS_BIG             # <<<<<<<<<<<<<<
 *         buf[1] = tri_data.num_tetrahedra >> 8
 *         buf[2] = tri_data.num_tetrahedra & 0xff
 */
    __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyInt_From_unsigned_char((__pyx_v_buf[__pyx_t_3])); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyNumber_InPlaceOr(__pyx_t_5, __pyx_v_6SnapPy_IS_BIG); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 60, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyInt_As_unsigned_char(__pyx_t_4); if (unlikely((__pyx_t_6 == (unsigned char)-1) && PyErr_Occurred())) __PYX_ERR(12, 60, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    (__pyx_v_buf[__pyx_t_3]) = __pyx_t_6;

    /* "cython/core/pickle.pyx":61
 *         flag = IS_BIG
 *         buf[0] |= IS_BIG
 *         buf[1] = tri_data.num_tetrahedra >> 8             # <<<<<<<<<<<<<<
 *         buf[2] = tri_data.num_tetrahedra & 0xff
 *         i = 3
 */
    (__pyx_v_buf[1]) = (__pyx_v_tri_data->num_tetrahedra >> 8);

    /* "cython/core/pickle.pyx":62
 *         buf[0] |= IS_BIG
 *         buf[1] = tri_data.num_tetrahedra >> 8
 *         buf[2] = tri_data.num_tetrahedra & 0xff             # <<<<<<<<<<<<<<
 *         i = 3
 *     else:
 */
    (__pyx_v_buf[2]) = (__pyx_v_tri_data->num_tetrahedra & 0xff);

    /* "cython/core/pickle.pyx":63
 *         buf[1] = tri_data.num_tetrahedra >> 8
 *         buf[2] = tri_data.num_tetrahedra & 0xff
 *         i = 3             # <<<<<<<<<<<<<<
 *     else:
 *         flag = 0
 */
    __pyx_v_i = 3;

    /* "cython/core/pickle.pyx":58
 *         buf[4] = tri_data.num_tetrahedra & 0xff
 *         i = 5
 *     elif tri_data.num_tetrahedra > 255:             # <<<<<<<<<<<<<<
 *         flag = IS_BIG
 *         buf[0] |= IS_BIG
 */
    goto __pyx_L3;
  }

  /* "cython/core/pickle.pyx":65
 *         i = 3
 *     else:
 *         flag = 0             # <<<<<<<<<<<<<<
 *         buf[1] = tri_data.num_tetrahedra &0xff
 *         i = 2
 */
  /*else*/ {
    __pyx_v_flag = 0;

    /* "cython/core/pickle.pyx":66
 *     else:
 *         flag = 0
 *         buf[1] = tri_data.num_tetrahedra &0xff             # <<<<<<<<<<<<<<
 *         i = 2
 *     buf[i] = tri_data.num_or_cusps
 */
    (__pyx_v_buf[1]) = (__pyx_v_tri_data->num_tetrahedra & 0xff);

    /* "cython/core/pickle.pyx":67
 *         flag = 0
 *         buf[1] = tri_data.num_tetrahedra &0xff
 *         i = 2             # <<<<<<<<<<<<<<
 *     buf[i] = tri_data.num_or_cusps
 *     buf[i+1] = tri_data.num_nonor_cusps
 */
    __pyx_v_i = 2;
  }
  __pyx_L3:;

  /* "cython/core/pickle.pyx":68
 *         buf[1] = tri_data.num_tetrahedra &0xff
 *         i = 2
 *     buf[i] = tri_data.num_or_cusps             # <<<<<<<<<<<<<<
 *     buf[i+1] = tri_data.num_nonor_cusps
 *     num_cusps = tri_data.num_or_cusps + tri_data.num_nonor_cusps
 */
  __pyx_t_2 = __pyx_v_tri_data->num_or_cusps;
  (__pyx_v_buf[__pyx_v_i]) = __pyx_t_2;

  /* "cython/core/pickle.pyx":69
 *         i = 2
 *     buf[i] = tri_data.num_or_cusps
 *     buf[i+1] = tri_data.num_nonor_cusps             # <<<<<<<<<<<<<<
 *     num_cusps = tri_data.num_or_cusps + tri_data.num_nonor_cusps
 *     is_complete = IS_COMPLETE
 */
  __pyx_t_2 = __pyx_v_tri_data->num_nonor_cusps;
  (__pyx_v_buf[(__pyx_v_i + 1)]) = __pyx_t_2;

  /* "cython/core/pickle.pyx":70
 *     buf[i] = tri_data.num_or_cusps
 *     buf[i+1] = tri_data.num_nonor_cusps
 *     num_cusps = tri_data.num_or_cusps + tri_data.num_nonor_cusps             # <<<<<<<<<<<<<<
 *     is_complete = IS_COMPLETE
 *     for j in range(num_cusps):
 */
  __pyx_v_num_cusps = (__pyx_v_tri_data->num_or_cusps + __pyx_v_tri_data->num_nonor_cusps);

  /* "cython/core/pickle.pyx":71
 *     buf[i+1] = tri_data.num_nonor_cusps
 *     num_cusps = tri_data.num_or_cusps + tri_data.num_nonor_cusps
 *     is_complete = IS_COMPLETE             # <<<<<<<<<<<<<<
 *     for j in range(num_cusps):
 *         M, L = <double>tri_data.cusp_data[j].m, <double>tri_data.cusp_data[j].l
 */
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_6SnapPy_IS_COMPLETE); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 71, __pyx_L1_error)
  __pyx_v_is_complete = __pyx_t_2;

  /* "cython/core/pickle.pyx":72
 *     num_cusps = tri_data.num_or_cusps + tri_data.num_nonor_cusps
 *     is_complete = IS_COMPLETE
 *     for j in range(num_cusps):             # <<<<<<<<<<<<<<
 *         M, L = <double>tri_data.cusp_data[j].m, <double>tri_data.cusp_data[j].l
 *         if M != 0.0 or L != 0.0:
 */
  __pyx_t_2 = __pyx_v_num_cusps;
  __pyx_t_7 = __pyx_t_2;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_j = __pyx_t_8;

    /* "cython/core/pickle.pyx":73
 *     is_complete = IS_COMPLETE
 *     for j in range(num_cusps):
 *         M, L = <double>tri_data.cusp_data[j].m, <double>tri_data.cusp_data[j].l             # <<<<<<<<<<<<<<
 *         if M != 0.0 or L != 0.0:
 *             is_complete = 0
 */
    __pyx_t_9 = ((double)(__pyx_v_tri_data->cusp_data[__pyx_v_j]).m);
    __pyx_t_10 = ((double)(__pyx_v_tri_data->cusp_data[__pyx_v_j]).l);
    __pyx_v_M = __pyx_t_9;
    __pyx_v_L = __pyx_t_10;

    /* "cython/core/pickle.pyx":74
 *     for j in range(num_cusps):
 *         M, L = <double>tri_data.cusp_data[j].m, <double>tri_data.cusp_data[j].l
 *         if M != 0.0 or L != 0.0:             # <<<<<<<<<<<<<<
 *             is_complete = 0
 *         if M != floor(M) or L != floor(L):
 */
    __pyx_t_11 = (__pyx_v_M != 0.0);
    if (!__pyx_t_11) {
    } else {
      __pyx_t_1 = __pyx_t_11;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_11 = (__pyx_v_L != 0.0);
    __pyx_t_1 = __pyx_t_11;
    __pyx_L7_bool_binop_done:;
    if (__pyx_t_1) {

      /* "cython/core/pickle.pyx":75
 *         M, L = <double>tri_data.cusp_data[j].m, <double>tri_data.cusp_data[j].l
 *         if M != 0.0 or L != 0.0:
 *             is_complete = 0             # <<<<<<<<<<<<<<
 *         if M != floor(M) or L != floor(L):
 *             raise ValueError('Manifold must be pickled with _to_string.')
 */
      __pyx_v_is_complete = 0;

      /* "cython/core/pickle.pyx":74
 *     for j in range(num_cusps):
 *         M, L = <double>tri_data.cusp_data[j].m, <double>tri_data.cusp_data[j].l
 *         if M != 0.0 or L != 0.0:             # <<<<<<<<<<<<<<
 *             is_complete = 0
 *         if M != floor(M) or L != floor(L):
 */
    }

    /* "cython/core/pickle.pyx":76
 *         if M != 0.0 or L != 0.0:
 *             is_complete = 0
 *         if M != floor(M) or L != floor(L):             # <<<<<<<<<<<<<<
 *             raise ValueError('Manifold must be pickled with _to_string.')
 *         if M < -128 or M > 127 or L < -128 or L > 127:
 */
    __pyx_t_11 = (__pyx_v_M != floor(__pyx_v_M));
    if (!__pyx_t_11) {
    } else {
      __pyx_t_1 = __pyx_t_11;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_11 = (__pyx_v_L != floor(__pyx_v_L));
    __pyx_t_1 = __pyx_t_11;
    __pyx_L10_bool_binop_done:;
    if (unlikely(__pyx_t_1)) {

      /* "cython/core/pickle.pyx":77
 *             is_complete = 0
 *         if M != floor(M) or L != floor(L):
 *             raise ValueError('Manifold must be pickled with _to_string.')             # <<<<<<<<<<<<<<
 *         if M < -128 or M > 127 or L < -128 or L > 127:
 *             raise ValueError('Manifold must be pickled with _to_string.')
 */
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__143, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 77, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(12, 77, __pyx_L1_error)

      /* "cython/core/pickle.pyx":76
 *         if M != 0.0 or L != 0.0:
 *             is_complete = 0
 *         if M != floor(M) or L != floor(L):             # <<<<<<<<<<<<<<
 *             raise ValueError('Manifold must be pickled with _to_string.')
 *         if M < -128 or M > 127 or L < -128 or L > 127:
 */
    }

    /* "cython/core/pickle.pyx":78
 *         if M != floor(M) or L != floor(L):
 *             raise ValueError('Manifold must be pickled with _to_string.')
 *         if M < -128 or M > 127 or L < -128 or L > 127:             # <<<<<<<<<<<<<<
 *             raise ValueError('Manifold must be pickled with _to_string.')
 *     buf[0] |= is_complete
 */
    __pyx_t_11 = (__pyx_v_M < -128.0);
    if (!__pyx_t_11) {
    } else {
      __pyx_t_1 = __pyx_t_11;
      goto __pyx_L13_bool_binop_done;
    }
    __pyx_t_11 = (__pyx_v_M > 127.0);
    if (!__pyx_t_11) {
    } else {
      __pyx_t_1 = __pyx_t_11;
      goto __pyx_L13_bool_binop_done;
    }
    __pyx_t_11 = (__pyx_v_L < -128.0);
    if (!__pyx_t_11) {
    } else {
      __pyx_t_1 = __pyx_t_11;
      goto __pyx_L13_bool_binop_done;
    }
    __pyx_t_11 = (__pyx_v_L > 127.0);
    __pyx_t_1 = __pyx_t_11;
    __pyx_L13_bool_binop_done:;
    if (unlikely(__pyx_t_1)) {

      /* "cython/core/pickle.pyx":79
 *             raise ValueError('Manifold must be pickled with _to_string.')
 *         if M < -128 or M > 127 or L < -128 or L > 127:
 *             raise ValueError('Manifold must be pickled with _to_string.')             # <<<<<<<<<<<<<<
 *     buf[0] |= is_complete
 *     result += buf[:i+2]
 */
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__143, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 79, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(12, 79, __pyx_L1_error)

      /* "cython/core/pickle.pyx":78
 *         if M != floor(M) or L != floor(L):
 *             raise ValueError('Manifold must be pickled with _to_string.')
 *         if M < -128 or M > 127 or L < -128 or L > 127:             # <<<<<<<<<<<<<<
 *             raise ValueError('Manifold must be pickled with _to_string.')
 *     buf[0] |= is_complete
 */
    }
  }

  /* "cython/core/pickle.pyx":80
 *         if M < -128 or M > 127 or L < -128 or L > 127:
 *             raise ValueError('Manifold must be pickled with _to_string.')
 *     buf[0] |= is_complete             # <<<<<<<<<<<<<<
 *     result += buf[:i+2]
 *     if not is_complete:
 */
  __pyx_t_3 = 0;
  (__pyx_v_buf[__pyx_t_3]) = ((__pyx_v_buf[__pyx_t_3]) | __pyx_v_is_complete);

  /* "cython/core/pickle.pyx":81
 *             raise ValueError('Manifold must be pickled with _to_string.')
 *     buf[0] |= is_complete
 *     result += buf[:i+2]             # <<<<<<<<<<<<<<
 *     if not is_complete:
 *         # Add the Dehn filling coefficients
 */
  __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_buf) + 0, (__pyx_v_i + 2) - 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "cython/core/pickle.pyx":82
 *     buf[0] |= is_complete
 *     result += buf[:i+2]
 *     if not is_complete:             # <<<<<<<<<<<<<<
 *         # Add the Dehn filling coefficients
 *         for j in range(num_cusps):
 */
  __pyx_t_1 = (!(__pyx_v_is_complete != 0));
  if (__pyx_t_1) {

    /* "cython/core/pickle.pyx":84
 *     if not is_complete:
 *         # Add the Dehn filling coefficients
 *         for j in range(num_cusps):             # <<<<<<<<<<<<<<
 *             # The quad double library doesn't support casting qd_real to char.
 *             M, L = <double>tri_data.cusp_data[j].m, <double>tri_data.cusp_data[j].l
 */
    __pyx_t_2 = __pyx_v_num_cusps;
    __pyx_t_7 = __pyx_t_2;
    for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
      __pyx_v_j = __pyx_t_8;

      /* "cython/core/pickle.pyx":86
 *         for j in range(num_cusps):
 *             # The quad double library doesn't support casting qd_real to char.
 *             M, L = <double>tri_data.cusp_data[j].m, <double>tri_data.cusp_data[j].l             # <<<<<<<<<<<<<<
 *             filling[0] = <signed char>M
 *             filling[1] = <signed char>L
 */
      __pyx_t_10 = ((double)(__pyx_v_tri_data->cusp_data[__pyx_v_j]).m);
      __pyx_t_9 = ((double)(__pyx_v_tri_data->cusp_data[__pyx_v_j]).l);
      __pyx_v_M = __pyx_t_10;
      __pyx_v_L = __pyx_t_9;

      /* "cython/core/pickle.pyx":87
 *             # The quad double library doesn't support casting qd_real to char.
 *             M, L = <double>tri_data.cusp_data[j].m, <double>tri_data.cusp_data[j].l
 *             filling[0] = <signed char>M             # <<<<<<<<<<<<<<
 *             filling[1] = <signed char>L
 *             result += filling[:2]
 */
      (__pyx_v_filling[0]) = ((signed char)__pyx_v_M);

      /* "cython/core/pickle.pyx":88
 *             M, L = <double>tri_data.cusp_data[j].m, <double>tri_data.cusp_data[j].l
 *             filling[0] = <signed char>M
 *             filling[1] = <signed char>L             # <<<<<<<<<<<<<<
 *             result += filling[:2]
 *     for j in range(tri_data.num_tetrahedra):
 */
      (__pyx_v_filling[1]) = ((signed char)__pyx_v_L);

      /* "cython/core/pickle.pyx":89
 *             filling[0] = <signed char>M
 *             filling[1] = <signed char>L
 *             result += filling[:2]             # <<<<<<<<<<<<<<
 *     for j in range(tri_data.num_tetrahedra):
 *         result += pickle_tetrahedron_data(&tri_data.tetrahedron_data[j], flag)
 */
      __pyx_t_5 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_filling) + 0, 2 - 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 89, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 89, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_4);
      __pyx_t_4 = 0;
    }

    /* "cython/core/pickle.pyx":82
 *     buf[0] |= is_complete
 *     result += buf[:i+2]
 *     if not is_complete:             # <<<<<<<<<<<<<<
 *         # Add the Dehn filling coefficients
 *         for j in range(num_cusps):
 */
  }

  /* "cython/core/pickle.pyx":90
 *             filling[1] = <signed char>L
 *             result += filling[:2]
 *     for j in range(tri_data.num_tetrahedra):             # <<<<<<<<<<<<<<
 *         result += pickle_tetrahedron_data(&tri_data.tetrahedron_data[j], flag)
 *     return result + bytes(tri_data.name)
 */
  __pyx_t_2 = __pyx_v_tri_data->num_tetrahedra;
  __pyx_t_7 = __pyx_t_2;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_j = __pyx_t_8;

    /* "cython/core/pickle.pyx":91
 *             result += filling[:2]
 *     for j in range(tri_data.num_tetrahedra):
 *         result += pickle_tetrahedron_data(&tri_data.tetrahedron_data[j], flag)             # <<<<<<<<<<<<<<
 *     return result + bytes(tri_data.name)
 * 
 */
    __pyx_t_4 = __pyx_f_6SnapPy_pickle_tetrahedron_data((&(__pyx_v_tri_data->tetrahedron_data[__pyx_v_j])), __pyx_v_flag); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5);
    __pyx_t_5 = 0;
  }

  /* "cython/core/pickle.pyx":92
 *     for j in range(tri_data.num_tetrahedra):
 *         result += pickle_tetrahedron_data(&tri_data.tetrahedron_data[j], flag)
 *     return result + bytes(tri_data.name)             # <<<<<<<<<<<<<<
 * 
 * cdef pickle_tetrahedron_data(c_TetrahedronData* data, int flag):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_tri_data->name); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 92, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(12, 92, __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;

  /* "cython/core/pickle.pyx":31
 * cdef IS_COMPLETE = <unsigned char> 1 << 5
 * 
 * cdef pickle_triangulation(c_Triangulation *tri):             # <<<<<<<<<<<<<<
 *     """
 *     Pickle a Triangulation by constructing a TriangulationData structure
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("SnapPy.pickle_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/pickle.pyx":94
 *     return result + bytes(tri_data.name)
 * 
 * cdef pickle_tetrahedron_data(c_TetrahedronData* data, int flag):             # <<<<<<<<<<<<<<
 *     cdef int i, j, v, f
 *     cdef Py_ssize_t n = 0
 */

static PyObject *__pyx_f_6SnapPy_pickle_tetrahedron_data(TetrahedronData *__pyx_v_data, int __pyx_v_flag) {
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_v;
  int __pyx_v_f;
  Py_ssize_t __pyx_v_n;
  unsigned short __pyx_v_mask;
  unsigned short __pyx_v_bit;
  int __pyx_v_x;
  int __pyx_v_count;
  int __pyx_v_curve;
  signed char __pyx_v_curve_buf[16];
  unsigned char __pyx_v_buffer[16];
  PyObject *__pyx_v_result = NULL;
  int *__pyx_v_perm;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pickle_tetrahedron_data", 1);

  /* "cython/core/pickle.pyx":96
 * cdef pickle_tetrahedron_data(c_TetrahedronData* data, int flag):
 *     cdef int i, j, v, f
 *     cdef Py_ssize_t n = 0             # <<<<<<<<<<<<<<
 *     cdef unsigned short mask, bit
 *     cdef int x, count, curve
 */
  __pyx_v_n = 0;

  /* "cython/core/pickle.pyx":102
 *     cdef unsigned char buffer[16]
 * 
 *     result = bytes()             # <<<<<<<<<<<<<<
 *     # If this tet is in a huge or big triangulation then we use 4 or 2
 *     # bytes in network order to represent the indices of neighbors.
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyBytes_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/pickle.pyx":105
 *     # If this tet is in a huge or big triangulation then we use 4 or 2
 *     # bytes in network order to represent the indices of neighbors.
 *     if flag & IS_HUGE:             # <<<<<<<<<<<<<<
 *         for i in range(4):
 *             x = data.neighbor_index[i]
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_And(__pyx_t_1, __pyx_v_6SnapPy_IS_HUGE); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(12, 105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "cython/core/pickle.pyx":106
 *     # bytes in network order to represent the indices of neighbors.
 *     if flag & IS_HUGE:
 *         for i in range(4):             # <<<<<<<<<<<<<<
 *             x = data.neighbor_index[i]
 *             buffer[n] = (x >> 24)
 */
    for (__pyx_t_4 = 0; __pyx_t_4 < 4; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "cython/core/pickle.pyx":107
 *     if flag & IS_HUGE:
 *         for i in range(4):
 *             x = data.neighbor_index[i]             # <<<<<<<<<<<<<<
 *             buffer[n] = (x >> 24)
 *             buffer[n + 1] = (x >> 16) & 0xff
 */
      __pyx_v_x = (__pyx_v_data->neighbor_index[__pyx_v_i]);

      /* "cython/core/pickle.pyx":108
 *         for i in range(4):
 *             x = data.neighbor_index[i]
 *             buffer[n] = (x >> 24)             # <<<<<<<<<<<<<<
 *             buffer[n + 1] = (x >> 16) & 0xff
 *             buffer[n + 2] = (x >> 8) & 0xff
 */
      (__pyx_v_buffer[__pyx_v_n]) = (__pyx_v_x >> 24);

      /* "cython/core/pickle.pyx":109
 *             x = data.neighbor_index[i]
 *             buffer[n] = (x >> 24)
 *             buffer[n + 1] = (x >> 16) & 0xff             # <<<<<<<<<<<<<<
 *             buffer[n + 2] = (x >> 8) & 0xff
 *             buffer[n + 3] = x & 0xff
 */
      (__pyx_v_buffer[(__pyx_v_n + 1)]) = ((__pyx_v_x >> 16) & 0xff);

      /* "cython/core/pickle.pyx":110
 *             buffer[n] = (x >> 24)
 *             buffer[n + 1] = (x >> 16) & 0xff
 *             buffer[n + 2] = (x >> 8) & 0xff             # <<<<<<<<<<<<<<
 *             buffer[n + 3] = x & 0xff
 *             n += 4
 */
      (__pyx_v_buffer[(__pyx_v_n + 2)]) = ((__pyx_v_x >> 8) & 0xff);

      /* "cython/core/pickle.pyx":111
 *             buffer[n + 1] = (x >> 16) & 0xff
 *             buffer[n + 2] = (x >> 8) & 0xff
 *             buffer[n + 3] = x & 0xff             # <<<<<<<<<<<<<<
 *             n += 4
 *     elif flag & IS_BIG:
 */
      (__pyx_v_buffer[(__pyx_v_n + 3)]) = (__pyx_v_x & 0xff);

      /* "cython/core/pickle.pyx":112
 *             buffer[n + 2] = (x >> 8) & 0xff
 *             buffer[n + 3] = x & 0xff
 *             n += 4             # <<<<<<<<<<<<<<
 *     elif flag & IS_BIG:
 *         for i in range(4):
 */
      __pyx_v_n = (__pyx_v_n + 4);
    }

    /* "cython/core/pickle.pyx":105
 *     # If this tet is in a huge or big triangulation then we use 4 or 2
 *     # bytes in network order to represent the indices of neighbors.
 *     if flag & IS_HUGE:             # <<<<<<<<<<<<<<
 *         for i in range(4):
 *             x = data.neighbor_index[i]
 */
    goto __pyx_L3;
  }

  /* "cython/core/pickle.pyx":113
 *             buffer[n + 3] = x & 0xff
 *             n += 4
 *     elif flag & IS_BIG:             # <<<<<<<<<<<<<<
 *         for i in range(4):
 *             x = data.neighbor_index[i]
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyNumber_And(__pyx_t_2, __pyx_v_6SnapPy_IS_BIG); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(12, 113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_3) {

    /* "cython/core/pickle.pyx":114
 *             n += 4
 *     elif flag & IS_BIG:
 *         for i in range(4):             # <<<<<<<<<<<<<<
 *             x = data.neighbor_index[i]
 *             buffer[n] = (x >> 8)
 */
    for (__pyx_t_4 = 0; __pyx_t_4 < 4; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "cython/core/pickle.pyx":115
 *     elif flag & IS_BIG:
 *         for i in range(4):
 *             x = data.neighbor_index[i]             # <<<<<<<<<<<<<<
 *             buffer[n] = (x >> 8)
 *             buffer[n + 1] = x & 0xff
 */
      __pyx_v_x = (__pyx_v_data->neighbor_index[__pyx_v_i]);

      /* "cython/core/pickle.pyx":116
 *         for i in range(4):
 *             x = data.neighbor_index[i]
 *             buffer[n] = (x >> 8)             # <<<<<<<<<<<<<<
 *             buffer[n + 1] = x & 0xff
 *             n += 2
 */
      (__pyx_v_buffer[__pyx_v_n]) = (__pyx_v_x >> 8);

      /* "cython/core/pickle.pyx":117
 *             x = data.neighbor_index[i]
 *             buffer[n] = (x >> 8)
 *             buffer[n + 1] = x & 0xff             # <<<<<<<<<<<<<<
 *             n += 2
 *     else:
 */
      (__pyx_v_buffer[(__pyx_v_n + 1)]) = (__pyx_v_x & 0xff);

      /* "cython/core/pickle.pyx":118
 *             buffer[n] = (x >> 8)
 *             buffer[n + 1] = x & 0xff
 *             n += 2             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(4):
 */
      __pyx_v_n = (__pyx_v_n + 2);
    }

    /* "cython/core/pickle.pyx":113
 *             buffer[n + 3] = x & 0xff
 *             n += 4
 *     elif flag & IS_BIG:             # <<<<<<<<<<<<<<
 *         for i in range(4):
 *             x = data.neighbor_index[i]
 */
    goto __pyx_L3;
  }

  /* "cython/core/pickle.pyx":120
 *             n += 2
 *     else:
 *         for i in range(4):             # <<<<<<<<<<<<<<
 *             buffer[n] = data.neighbor_index[i]
 *             n += 1
 */
  /*else*/ {
    for (__pyx_t_4 = 0; __pyx_t_4 < 4; __pyx_t_4+=1) {
      __pyx_v_i = __pyx_t_4;

      /* "cython/core/pickle.pyx":121
 *     else:
 *         for i in range(4):
 *             buffer[n] = data.neighbor_index[i]             # <<<<<<<<<<<<<<
 *             n += 1
 * 
 */
      (__pyx_v_buffer[__pyx_v_n]) = (__pyx_v_data->neighbor_index[__pyx_v_i]);

      /* "cython/core/pickle.pyx":122
 *         for i in range(4):
 *             buffer[n] = data.neighbor_index[i]
 *             n += 1             # <<<<<<<<<<<<<<
 * 
 *     # Pack each permutation into a byte, like SnapPea does.
 */
      __pyx_v_n = (__pyx_v_n + 1);
    }
  }
  __pyx_L3:;

  /* "cython/core/pickle.pyx":126
 *     # Pack each permutation into a byte, like SnapPea does.
 *     cdef int *perm
 *     for i in range(4):             # <<<<<<<<<<<<<<
 *         perm = &data.gluing[i][0]
 *         buffer[n] = perm[0] | perm[1]<<2 | perm[2]<<4 | perm[3]<<6
 */
  for (__pyx_t_4 = 0; __pyx_t_4 < 4; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "cython/core/pickle.pyx":127
 *     cdef int *perm
 *     for i in range(4):
 *         perm = &data.gluing[i][0]             # <<<<<<<<<<<<<<
 *         buffer[n] = perm[0] | perm[1]<<2 | perm[2]<<4 | perm[3]<<6
 *         n += 1
 */
    __pyx_v_perm = (&((__pyx_v_data->gluing[__pyx_v_i])[0]));

    /* "cython/core/pickle.pyx":128
 *     for i in range(4):
 *         perm = &data.gluing[i][0]
 *         buffer[n] = perm[0] | perm[1]<<2 | perm[2]<<4 | perm[3]<<6             # <<<<<<<<<<<<<<
 *         n += 1
 * 
 */
    (__pyx_v_buffer[__pyx_v_n]) = ((((__pyx_v_perm[0]) | ((__pyx_v_perm[1]) << 2)) | ((__pyx_v_perm[2]) << 4)) | ((__pyx_v_perm[3]) << 6));

    /* "cython/core/pickle.pyx":129
 *         perm = &data.gluing[i][0]
 *         buffer[n] = perm[0] | perm[1]<<2 | perm[2]<<4 | perm[3]<<6
 *         n += 1             # <<<<<<<<<<<<<<
 * 
 *     # Use 1 byte per cusp index.  This assumes < 256 cusps.
 */
    __pyx_v_n = (__pyx_v_n + 1);
  }

  /* "cython/core/pickle.pyx":132
 * 
 *     # Use 1 byte per cusp index.  This assumes < 256 cusps.
 *     for i in range(4):             # <<<<<<<<<<<<<<
 *         buffer[n] = <unsigned char>data.cusp_index[i]
 *         n += 1
 */
  for (__pyx_t_4 = 0; __pyx_t_4 < 4; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "cython/core/pickle.pyx":133
 *     # Use 1 byte per cusp index.  This assumes < 256 cusps.
 *     for i in range(4):
 *         buffer[n] = <unsigned char>data.cusp_index[i]             # <<<<<<<<<<<<<<
 *         n += 1
 *     result += buffer[:n]
 */
    (__pyx_v_buffer[__pyx_v_n]) = ((unsigned char)(__pyx_v_data->cusp_index[__pyx_v_i]));

    /* "cython/core/pickle.pyx":134
 *     for i in range(4):
 *         buffer[n] = <unsigned char>data.cusp_index[i]
 *         n += 1             # <<<<<<<<<<<<<<
 *     result += buffer[:n]
 * 
 */
    __pyx_v_n = (__pyx_v_n + 1);
  }

  /* "cython/core/pickle.pyx":135
 *         buffer[n] = <unsigned char>data.cusp_index[i]
 *         n += 1
 *     result += buffer[:n]             # <<<<<<<<<<<<<<
 * 
 *     # The curve data consists of 64 integers, which are often mostly
 */
  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_buffer) + 0, __pyx_v_n - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "cython/core/pickle.pyx":143
 *     # network order, followed by one byte for each nonzero bit in the
 *     # mask.
 *     for i in range(2):             # <<<<<<<<<<<<<<
 *         for j in range(2):
 *             mask = 0
 */
  for (__pyx_t_4 = 0; __pyx_t_4 < 2; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "cython/core/pickle.pyx":144
 *     # mask.
 *     for i in range(2):
 *         for j in range(2):             # <<<<<<<<<<<<<<
 *             mask = 0
 *             count = 0
 */
    for (__pyx_t_5 = 0; __pyx_t_5 < 2; __pyx_t_5+=1) {
      __pyx_v_j = __pyx_t_5;

      /* "cython/core/pickle.pyx":145
 *     for i in range(2):
 *         for j in range(2):
 *             mask = 0             # <<<<<<<<<<<<<<
 *             count = 0
 *             bit = 1
 */
      __pyx_v_mask = 0;

      /* "cython/core/pickle.pyx":146
 *         for j in range(2):
 *             mask = 0
 *             count = 0             # <<<<<<<<<<<<<<
 *             bit = 1
 *             for v in range(4):
 */
      __pyx_v_count = 0;

      /* "cython/core/pickle.pyx":147
 *             mask = 0
 *             count = 0
 *             bit = 1             # <<<<<<<<<<<<<<
 *             for v in range(4):
 *                 for f in range(4):
 */
      __pyx_v_bit = 1;

      /* "cython/core/pickle.pyx":148
 *             count = 0
 *             bit = 1
 *             for v in range(4):             # <<<<<<<<<<<<<<
 *                 for f in range(4):
 *                     curve = data.curve[i][j][v][f]
 */
      for (__pyx_t_6 = 0; __pyx_t_6 < 4; __pyx_t_6+=1) {
        __pyx_v_v = __pyx_t_6;

        /* "cython/core/pickle.pyx":149
 *             bit = 1
 *             for v in range(4):
 *                 for f in range(4):             # <<<<<<<<<<<<<<
 *                     curve = data.curve[i][j][v][f]
 *                     if curve != 0:
 */
        for (__pyx_t_7 = 0; __pyx_t_7 < 4; __pyx_t_7+=1) {
          __pyx_v_f = __pyx_t_7;

          /* "cython/core/pickle.pyx":150
 *             for v in range(4):
 *                 for f in range(4):
 *                     curve = data.curve[i][j][v][f]             # <<<<<<<<<<<<<<
 *                     if curve != 0:
 *                         mask |= bit
 */
          __pyx_v_curve = ((((__pyx_v_data->curve[__pyx_v_i])[__pyx_v_j])[__pyx_v_v])[__pyx_v_f]);

          /* "cython/core/pickle.pyx":151
 *                 for f in range(4):
 *                     curve = data.curve[i][j][v][f]
 *                     if curve != 0:             # <<<<<<<<<<<<<<
 *                         mask |= bit
 *                         curve_buf[count] = <signed char>curve
 */
          __pyx_t_3 = (__pyx_v_curve != 0);
          if (__pyx_t_3) {

            /* "cython/core/pickle.pyx":152
 *                     curve = data.curve[i][j][v][f]
 *                     if curve != 0:
 *                         mask |= bit             # <<<<<<<<<<<<<<
 *                         curve_buf[count] = <signed char>curve
 *                         count += 1
 */
            __pyx_v_mask = (__pyx_v_mask | __pyx_v_bit);

            /* "cython/core/pickle.pyx":153
 *                     if curve != 0:
 *                         mask |= bit
 *                         curve_buf[count] = <signed char>curve             # <<<<<<<<<<<<<<
 *                         count += 1
 *                     bit = bit << 1
 */
            (__pyx_v_curve_buf[__pyx_v_count]) = ((signed char)__pyx_v_curve);

            /* "cython/core/pickle.pyx":154
 *                         mask |= bit
 *                         curve_buf[count] = <signed char>curve
 *                         count += 1             # <<<<<<<<<<<<<<
 *                     bit = bit << 1
 *             buffer[0] = mask >> 8
 */
            __pyx_v_count = (__pyx_v_count + 1);

            /* "cython/core/pickle.pyx":151
 *                 for f in range(4):
 *                     curve = data.curve[i][j][v][f]
 *                     if curve != 0:             # <<<<<<<<<<<<<<
 *                         mask |= bit
 *                         curve_buf[count] = <signed char>curve
 */
          }

          /* "cython/core/pickle.pyx":155
 *                         curve_buf[count] = <signed char>curve
 *                         count += 1
 *                     bit = bit << 1             # <<<<<<<<<<<<<<
 *             buffer[0] = mask >> 8
 *             buffer[1] = mask & 0xff
 */
          __pyx_v_bit = (__pyx_v_bit << 1);
        }
      }

      /* "cython/core/pickle.pyx":156
 *                         count += 1
 *                     bit = bit << 1
 *             buffer[0] = mask >> 8             # <<<<<<<<<<<<<<
 *             buffer[1] = mask & 0xff
 *             # Trust Cython to copy both chars and unsigned chars into our
 */
      (__pyx_v_buffer[0]) = (__pyx_v_mask >> 8);

      /* "cython/core/pickle.pyx":157
 *                     bit = bit << 1
 *             buffer[0] = mask >> 8
 *             buffer[1] = mask & 0xff             # <<<<<<<<<<<<<<
 *             # Trust Cython to copy both chars and unsigned chars into our
 *             # bytes object without changing any bits.
 */
      (__pyx_v_buffer[1]) = (__pyx_v_mask & 0xff);

      /* "cython/core/pickle.pyx":160
 *             # Trust Cython to copy both chars and unsigned chars into our
 *             # bytes object without changing any bits.
 *             result += buffer[:2]             # <<<<<<<<<<<<<<
 *             result += curve_buf[:count]
 *     return result
 */
      __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_buffer) + 0, 2 - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 160, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_1));
      __pyx_t_1 = 0;

      /* "cython/core/pickle.pyx":161
 *             # bytes object without changing any bits.
 *             result += buffer[:2]
 *             result += curve_buf[:count]             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
      __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_curve_buf) + 0, __pyx_v_count - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_2));
      __pyx_t_2 = 0;
    }
  }

  /* "cython/core/pickle.pyx":162
 *             result += buffer[:2]
 *             result += curve_buf[:count]
 *     return result             # <<<<<<<<<<<<<<
 * 
 * cdef c_Triangulation* unpickle_triangulation(bytes pickle) except *:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cython/core/pickle.pyx":94
 *     return result + bytes(tri_data.name)
 * 
 * cdef pickle_tetrahedron_data(c_TetrahedronData* data, int flag):             # <<<<<<<<<<<<<<
 *     cdef int i, j, v, f
 *     cdef Py_ssize_t n = 0
 */

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

/* "cython/core/pickle.pyx":164
 *     return result
 * 
 * cdef c_Triangulation* unpickle_triangulation(bytes pickle) except *:             # <<<<<<<<<<<<<<
 *     """
 *     Unpickle a Triangulation by deserializing a TriangulationData structure
 */

static Triangulation *__pyx_f_6SnapPy_unpickle_triangulation(PyObject *__pyx_v_pickle) {
  TetrahedronData *__pyx_v_tets;
  CuspData *__pyx_v_cusps;
  Triangulation *__pyx_v_tri;
  unsigned char *__pyx_v_p;
  TriangulationData __pyx_v_tri_data;
  int __pyx_v_i;
  int __pyx_v_num_tets;
  int __pyx_v_num_cusps;
  int __pyx_v_M;
  int __pyx_v_L;
  int __pyx_v_n;
  PyObject *__pyx_v_header = NULL;
  PyObject *__pyx_v_tri_pickle = NULL;
  PyObject *__pyx_v_py_name = NULL;
  Triangulation *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  unsigned char *__pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  unsigned char __pyx_t_11;
  unsigned char __pyx_t_12;
  long __pyx_t_13;
  int __pyx_t_14;
  char *__pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unpickle_triangulation", 1);

  /* "cython/core/pickle.pyx":169
 *     and then converting it to a Triangulation.
 *     """
 *     cdef c_TetrahedronData* tets = NULL             # <<<<<<<<<<<<<<
 *     cdef c_CuspData* cusps = NULL
 *     cdef c_Triangulation *tri
 */
  __pyx_v_tets = NULL;

  /* "cython/core/pickle.pyx":170
 *     """
 *     cdef c_TetrahedronData* tets = NULL
 *     cdef c_CuspData* cusps = NULL             # <<<<<<<<<<<<<<
 *     cdef c_Triangulation *tri
 *     cdef unsigned char* p
 */
  __pyx_v_cusps = NULL;

  /* "cython/core/pickle.pyx":175
 *     cdef TriangulationData tri_data
 *     cdef int i, num_tets, num_cusps, M, L
 *     cdef int n = 0             # <<<<<<<<<<<<<<
 * 
 *     header, tri_pickle = pickle.split(b':', 1)
 */
  __pyx_v_n = 0;

  /* "cython/core/pickle.pyx":177
 *     cdef int n = 0
 * 
 *     header, tri_pickle = pickle.split(b':', 1)             # <<<<<<<<<<<<<<
 *     assert header == b'pickle', 'Invalid pickle byte sequence'
 *     p = tri_pickle
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyBytes_Type_split, __pyx_v_pickle, __pyx_kp_b__144, __pyx_int_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
    PyObject* sequence = __pyx_t_1;
    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(12, 177, __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(12, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(12, 177, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4);
    index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_2);
    index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(12, 177, __pyx_L1_error)
    __pyx_t_5 = NULL;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(12, 177, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_v_header = __pyx_t_2;
  __pyx_t_2 = 0;
  __pyx_v_tri_pickle = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cython/core/pickle.pyx":178
 * 
 *     header, tri_pickle = pickle.split(b':', 1)
 *     assert header == b'pickle', 'Invalid pickle byte sequence'             # <<<<<<<<<<<<<<
 *     p = tri_pickle
 *     tri_data.solution_type = not_attempted
 */
  #ifndef CYTHON_WITHOUT_ASSERTIONS
  if (unlikely(__pyx_assertions_enabled())) {
    __pyx_t_6 = (__Pyx_PyBytes_Equals(__pyx_v_header, __pyx_n_b_pickle_2, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(12, 178, __pyx_L1_error)
    if (unlikely(!__pyx_t_6)) {
      __Pyx_Raise(__pyx_builtin_AssertionError, __pyx_kp_s_Invalid_pickle_byte_sequence, 0, 0);
      __PYX_ERR(12, 178, __pyx_L1_error)
    }
  }
  #else
  if ((1)); else __PYX_ERR(12, 178, __pyx_L1_error)
  #endif

  /* "cython/core/pickle.pyx":179
 *     header, tri_pickle = pickle.split(b':', 1)
 *     assert header == b'pickle', 'Invalid pickle byte sequence'
 *     p = tri_pickle             # <<<<<<<<<<<<<<
 *     tri_data.solution_type = not_attempted
 *     tri_data.volume = <Real> 0.0
 */
  __pyx_t_7 = __Pyx_PyObject_AsWritableUString(__pyx_v_tri_pickle); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(12, 179, __pyx_L1_error)
  __pyx_v_p = __pyx_t_7;

  /* "cython/core/pickle.pyx":180
 *     assert header == b'pickle', 'Invalid pickle byte sequence'
 *     p = tri_pickle
 *     tri_data.solution_type = not_attempted             # <<<<<<<<<<<<<<
 *     tri_data.volume = <Real> 0.0
 *     tri_data.orientability = <c_Orientability>(p[0] & 0x3)
 */
  __pyx_v_tri_data.solution_type = not_attempted;

  /* "cython/core/pickle.pyx":181
 *     p = tri_pickle
 *     tri_data.solution_type = not_attempted
 *     tri_data.volume = <Real> 0.0             # <<<<<<<<<<<<<<
 *     tri_data.orientability = <c_Orientability>(p[0] & 0x3)
 *     n = 1
 */
  __pyx_v_tri_data.volume = ((__pyx_t_6SnapPy_Real)0.0);

  /* "cython/core/pickle.pyx":182
 *     tri_data.solution_type = not_attempted
 *     tri_data.volume = <Real> 0.0
 *     tri_data.orientability = <c_Orientability>(p[0] & 0x3)             # <<<<<<<<<<<<<<
 *     n = 1
 *     if p[0] & IS_HUGE:
 */
  __pyx_v_tri_data.orientability = ((Orientability)((__pyx_v_p[0]) & 0x3));

  /* "cython/core/pickle.pyx":183
 *     tri_data.volume = <Real> 0.0
 *     tri_data.orientability = <c_Orientability>(p[0] & 0x3)
 *     n = 1             # <<<<<<<<<<<<<<
 *     if p[0] & IS_HUGE:
 *         num_tets = (<int>p[n]) << 24 | (<int>p[n+1]) << 16 | (<int>p[n+2]) << 8 | (<int>p[n+3])
 */
  __pyx_v_n = 1;

  /* "cython/core/pickle.pyx":184
 *     tri_data.orientability = <c_Orientability>(p[0] & 0x3)
 *     n = 1
 *     if p[0] & IS_HUGE:             # <<<<<<<<<<<<<<
 *         num_tets = (<int>p[n]) << 24 | (<int>p[n+1]) << 16 | (<int>p[n+2]) << 8 | (<int>p[n+3])
 *         n += 4
 */
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_char((__pyx_v_p[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_v_6SnapPy_IS_HUGE); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(12, 184, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_6) {

    /* "cython/core/pickle.pyx":185
 *     n = 1
 *     if p[0] & IS_HUGE:
 *         num_tets = (<int>p[n]) << 24 | (<int>p[n+1]) << 16 | (<int>p[n+2]) << 8 | (<int>p[n+3])             # <<<<<<<<<<<<<<
 *         n += 4
 *     elif p[0] & IS_BIG:
 */
    __pyx_v_num_tets = ((((((int)(__pyx_v_p[__pyx_v_n])) << 24) | (((int)(__pyx_v_p[(__pyx_v_n + 1)])) << 16)) | (((int)(__pyx_v_p[(__pyx_v_n + 2)])) << 8)) | ((int)(__pyx_v_p[(__pyx_v_n + 3)])));

    /* "cython/core/pickle.pyx":186
 *     if p[0] & IS_HUGE:
 *         num_tets = (<int>p[n]) << 24 | (<int>p[n+1]) << 16 | (<int>p[n+2]) << 8 | (<int>p[n+3])
 *         n += 4             # <<<<<<<<<<<<<<
 *     elif p[0] & IS_BIG:
 *         num_tets = (<int>p[n]) << 8 | (<int>p[n+1])
 */
    __pyx_v_n = (__pyx_v_n + 4);

    /* "cython/core/pickle.pyx":184
 *     tri_data.orientability = <c_Orientability>(p[0] & 0x3)
 *     n = 1
 *     if p[0] & IS_HUGE:             # <<<<<<<<<<<<<<
 *         num_tets = (<int>p[n]) << 24 | (<int>p[n+1]) << 16 | (<int>p[n+2]) << 8 | (<int>p[n+3])
 *         n += 4
 */
    goto __pyx_L5;
  }

  /* "cython/core/pickle.pyx":187
 *         num_tets = (<int>p[n]) << 24 | (<int>p[n+1]) << 16 | (<int>p[n+2]) << 8 | (<int>p[n+3])
 *         n += 4
 *     elif p[0] & IS_BIG:             # <<<<<<<<<<<<<<
 *         num_tets = (<int>p[n]) << 8 | (<int>p[n+1])
 *         n += 2
 */
  __pyx_t_3 = __Pyx_PyInt_From_unsigned_char((__pyx_v_p[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyNumber_And(__pyx_t_3, __pyx_v_6SnapPy_IS_BIG); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 187, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(12, 187, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {

    /* "cython/core/pickle.pyx":188
 *         n += 4
 *     elif p[0] & IS_BIG:
 *         num_tets = (<int>p[n]) << 8 | (<int>p[n+1])             # <<<<<<<<<<<<<<
 *         n += 2
 *     else:
 */
    __pyx_v_num_tets = ((((int)(__pyx_v_p[__pyx_v_n])) << 8) | ((int)(__pyx_v_p[(__pyx_v_n + 1)])));

    /* "cython/core/pickle.pyx":189
 *     elif p[0] & IS_BIG:
 *         num_tets = (<int>p[n]) << 8 | (<int>p[n+1])
 *         n += 2             # <<<<<<<<<<<<<<
 *     else:
 *         num_tets = p[n]
 */
    __pyx_v_n = (__pyx_v_n + 2);

    /* "cython/core/pickle.pyx":187
 *         num_tets = (<int>p[n]) << 24 | (<int>p[n+1]) << 16 | (<int>p[n+2]) << 8 | (<int>p[n+3])
 *         n += 4
 *     elif p[0] & IS_BIG:             # <<<<<<<<<<<<<<
 *         num_tets = (<int>p[n]) << 8 | (<int>p[n+1])
 *         n += 2
 */
    goto __pyx_L5;
  }

  /* "cython/core/pickle.pyx":191
 *         n += 2
 *     else:
 *         num_tets = p[n]             # <<<<<<<<<<<<<<
 *         n += 1
 *     tri_data.num_tetrahedra = num_tets
 */
  /*else*/ {
    __pyx_v_num_tets = (__pyx_v_p[__pyx_v_n]);

    /* "cython/core/pickle.pyx":192
 *     else:
 *         num_tets = p[n]
 *         n += 1             # <<<<<<<<<<<<<<
 *     tri_data.num_tetrahedra = num_tets
 *     tri_data.num_or_cusps = p[n]
 */
    __pyx_v_n = (__pyx_v_n + 1);
  }
  __pyx_L5:;

  /* "cython/core/pickle.pyx":193
 *         num_tets = p[n]
 *         n += 1
 *     tri_data.num_tetrahedra = num_tets             # <<<<<<<<<<<<<<
 *     tri_data.num_or_cusps = p[n]
 *     tri_data.num_nonor_cusps = p[n+1]
 */
  __pyx_v_tri_data.num_tetrahedra = __pyx_v_num_tets;

  /* "cython/core/pickle.pyx":194
 *         n += 1
 *     tri_data.num_tetrahedra = num_tets
 *     tri_data.num_or_cusps = p[n]             # <<<<<<<<<<<<<<
 *     tri_data.num_nonor_cusps = p[n+1]
 *     tri_data.CS_value_is_known = 0
 */
  __pyx_v_tri_data.num_or_cusps = (__pyx_v_p[__pyx_v_n]);

  /* "cython/core/pickle.pyx":195
 *     tri_data.num_tetrahedra = num_tets
 *     tri_data.num_or_cusps = p[n]
 *     tri_data.num_nonor_cusps = p[n+1]             # <<<<<<<<<<<<<<
 *     tri_data.CS_value_is_known = 0
 *     tri_data.CS_value = <Real>0.0
 */
  __pyx_v_tri_data.num_nonor_cusps = (__pyx_v_p[(__pyx_v_n + 1)]);

  /* "cython/core/pickle.pyx":196
 *     tri_data.num_or_cusps = p[n]
 *     tri_data.num_nonor_cusps = p[n+1]
 *     tri_data.CS_value_is_known = 0             # <<<<<<<<<<<<<<
 *     tri_data.CS_value = <Real>0.0
 *     n += 2
 */
  __pyx_v_tri_data.CS_value_is_known = 0;

  /* "cython/core/pickle.pyx":197
 *     tri_data.num_nonor_cusps = p[n+1]
 *     tri_data.CS_value_is_known = 0
 *     tri_data.CS_value = <Real>0.0             # <<<<<<<<<<<<<<
 *     n += 2
 * 
 */
  __pyx_v_tri_data.CS_value = ((__pyx_t_6SnapPy_Real)0.0);

  /* "cython/core/pickle.pyx":198
 *     tri_data.CS_value_is_known = 0
 *     tri_data.CS_value = <Real>0.0
 *     n += 2             # <<<<<<<<<<<<<<
 * 
 *     num_cusps = tri_data.num_or_cusps + tri_data.num_nonor_cusps
 */
  __pyx_v_n = (__pyx_v_n + 2);

  /* "cython/core/pickle.pyx":200
 *     n += 2
 * 
 *     num_cusps = tri_data.num_or_cusps + tri_data.num_nonor_cusps             # <<<<<<<<<<<<<<
 *     if num_cusps > 0:
 *         # Use malloc (not mymalloc) to allocate memory for the cusp
 */
  __pyx_v_num_cusps = (__pyx_v_tri_data.num_or_cusps + __pyx_v_tri_data.num_nonor_cusps);

  /* "cython/core/pickle.pyx":201
 * 
 *     num_cusps = tri_data.num_or_cusps + tri_data.num_nonor_cusps
 *     if num_cusps > 0:             # <<<<<<<<<<<<<<
 *         # Use malloc (not mymalloc) to allocate memory for the cusp
 *         # data.  We free the memory before returning.
 */
  __pyx_t_6 = (__pyx_v_num_cusps > 0);
  if (__pyx_t_6) {

    /* "cython/core/pickle.pyx":204
 *         # Use malloc (not mymalloc) to allocate memory for the cusp
 *         # data.  We free the memory before returning.
 *         cusps = <c_CuspData*>malloc(num_cusps*sizeof(c_CuspData))             # <<<<<<<<<<<<<<
 *         if cusps:
 *             if p[0] & IS_COMPLETE:
 */
    __pyx_v_cusps = ((CuspData *)malloc((__pyx_v_num_cusps * (sizeof(CuspData)))));

    /* "cython/core/pickle.pyx":205
 *         # data.  We free the memory before returning.
 *         cusps = <c_CuspData*>malloc(num_cusps*sizeof(c_CuspData))
 *         if cusps:             # <<<<<<<<<<<<<<
 *             if p[0] & IS_COMPLETE:
 *                 for i in range(tri_data.num_or_cusps):
 */
    __pyx_t_6 = (__pyx_v_cusps != 0);
    if (likely(__pyx_t_6)) {

      /* "cython/core/pickle.pyx":206
 *         cusps = <c_CuspData*>malloc(num_cusps*sizeof(c_CuspData))
 *         if cusps:
 *             if p[0] & IS_COMPLETE:             # <<<<<<<<<<<<<<
 *                 for i in range(tri_data.num_or_cusps):
 *                     cusps[i].topology = torus_cusp
 */
      __pyx_t_1 = __Pyx_PyInt_From_unsigned_char((__pyx_v_p[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 206, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = PyNumber_And(__pyx_t_1, __pyx_v_6SnapPy_IS_COMPLETE); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 206, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(12, 206, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {

        /* "cython/core/pickle.pyx":207
 *         if cusps:
 *             if p[0] & IS_COMPLETE:
 *                 for i in range(tri_data.num_or_cusps):             # <<<<<<<<<<<<<<
 *                     cusps[i].topology = torus_cusp
 *                     cusps[i].m = <Real>0.0
 */
        __pyx_t_8 = __pyx_v_tri_data.num_or_cusps;
        __pyx_t_9 = __pyx_t_8;
        for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
          __pyx_v_i = __pyx_t_10;

          /* "cython/core/pickle.pyx":208
 *             if p[0] & IS_COMPLETE:
 *                 for i in range(tri_data.num_or_cusps):
 *                     cusps[i].topology = torus_cusp             # <<<<<<<<<<<<<<
 *                     cusps[i].m = <Real>0.0
 *                     cusps[i].l = <Real>0.0
 */
          (__pyx_v_cusps[__pyx_v_i]).topology = torus_cusp;

          /* "cython/core/pickle.pyx":209
 *                 for i in range(tri_data.num_or_cusps):
 *                     cusps[i].topology = torus_cusp
 *                     cusps[i].m = <Real>0.0             # <<<<<<<<<<<<<<
 *                     cusps[i].l = <Real>0.0
 *                 for i in range(tri_data.num_or_cusps, num_cusps):
 */
          (__pyx_v_cusps[__pyx_v_i]).m = ((__pyx_t_6SnapPy_Real)0.0);

          /* "cython/core/pickle.pyx":210
 *                     cusps[i].topology = torus_cusp
 *                     cusps[i].m = <Real>0.0
 *                     cusps[i].l = <Real>0.0             # <<<<<<<<<<<<<<
 *                 for i in range(tri_data.num_or_cusps, num_cusps):
 *                     cusps[i].topology = Klein_cusp
 */
          (__pyx_v_cusps[__pyx_v_i]).l = ((__pyx_t_6SnapPy_Real)0.0);
        }

        /* "cython/core/pickle.pyx":211
 *                     cusps[i].m = <Real>0.0
 *                     cusps[i].l = <Real>0.0
 *                 for i in range(tri_data.num_or_cusps, num_cusps):             # <<<<<<<<<<<<<<
 *                     cusps[i].topology = Klein_cusp
 *                     cusps[i].m = <Real>0.0
 */
        __pyx_t_8 = __pyx_v_num_cusps;
        __pyx_t_9 = __pyx_t_8;
        for (__pyx_t_10 = __pyx_v_tri_data.num_or_cusps; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
          __pyx_v_i = __pyx_t_10;

          /* "cython/core/pickle.pyx":212
 *                     cusps[i].l = <Real>0.0
 *                 for i in range(tri_data.num_or_cusps, num_cusps):
 *                     cusps[i].topology = Klein_cusp             # <<<<<<<<<<<<<<
 *                     cusps[i].m = <Real>0.0
 *                     cusps[i].l = <Real>0.0
 */
          (__pyx_v_cusps[__pyx_v_i]).topology = Klein_cusp;

          /* "cython/core/pickle.pyx":213
 *                 for i in range(tri_data.num_or_cusps, num_cusps):
 *                     cusps[i].topology = Klein_cusp
 *                     cusps[i].m = <Real>0.0             # <<<<<<<<<<<<<<
 *                     cusps[i].l = <Real>0.0
 *             else:
 */
          (__pyx_v_cusps[__pyx_v_i]).m = ((__pyx_t_6SnapPy_Real)0.0);

          /* "cython/core/pickle.pyx":214
 *                     cusps[i].topology = Klein_cusp
 *                     cusps[i].m = <Real>0.0
 *                     cusps[i].l = <Real>0.0             # <<<<<<<<<<<<<<
 *             else:
 *                 for i in range(tri_data.num_or_cusps):
 */
          (__pyx_v_cusps[__pyx_v_i]).l = ((__pyx_t_6SnapPy_Real)0.0);
        }

        /* "cython/core/pickle.pyx":206
 *         cusps = <c_CuspData*>malloc(num_cusps*sizeof(c_CuspData))
 *         if cusps:
 *             if p[0] & IS_COMPLETE:             # <<<<<<<<<<<<<<
 *                 for i in range(tri_data.num_or_cusps):
 *                     cusps[i].topology = torus_cusp
 */
        goto __pyx_L8;
      }

      /* "cython/core/pickle.pyx":216
 *                     cusps[i].l = <Real>0.0
 *             else:
 *                 for i in range(tri_data.num_or_cusps):             # <<<<<<<<<<<<<<
 *                     M, L, n = p[n], p[n+1], n + 2
 *                     cusps[i].topology = torus_cusp
 */
      /*else*/ {
        __pyx_t_8 = __pyx_v_tri_data.num_or_cusps;
        __pyx_t_9 = __pyx_t_8;
        for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
          __pyx_v_i = __pyx_t_10;

          /* "cython/core/pickle.pyx":217
 *             else:
 *                 for i in range(tri_data.num_or_cusps):
 *                     M, L, n = p[n], p[n+1], n + 2             # <<<<<<<<<<<<<<
 *                     cusps[i].topology = torus_cusp
 *                     cusps[i].m = <Real>M
 */
          __pyx_t_11 = (__pyx_v_p[__pyx_v_n]);
          __pyx_t_12 = (__pyx_v_p[(__pyx_v_n + 1)]);
          __pyx_t_13 = (__pyx_v_n + 2);
          __pyx_v_M = __pyx_t_11;
          __pyx_v_L = __pyx_t_12;
          __pyx_v_n = __pyx_t_13;

          /* "cython/core/pickle.pyx":218
 *                 for i in range(tri_data.num_or_cusps):
 *                     M, L, n = p[n], p[n+1], n + 2
 *                     cusps[i].topology = torus_cusp             # <<<<<<<<<<<<<<
 *                     cusps[i].m = <Real>M
 *                     cusps[i].l = <Real>L
 */
          (__pyx_v_cusps[__pyx_v_i]).topology = torus_cusp;

          /* "cython/core/pickle.pyx":219
 *                     M, L, n = p[n], p[n+1], n + 2
 *                     cusps[i].topology = torus_cusp
 *                     cusps[i].m = <Real>M             # <<<<<<<<<<<<<<
 *                     cusps[i].l = <Real>L
 *                 for i in range(tri_data.num_or_cusps, num_cusps):
 */
          (__pyx_v_cusps[__pyx_v_i]).m = ((__pyx_t_6SnapPy_Real)__pyx_v_M);

          /* "cython/core/pickle.pyx":220
 *                     cusps[i].topology = torus_cusp
 *                     cusps[i].m = <Real>M
 *                     cusps[i].l = <Real>L             # <<<<<<<<<<<<<<
 *                 for i in range(tri_data.num_or_cusps, num_cusps):
 *                     M, L, n = p[n], p[n+1], n + 2
 */
          (__pyx_v_cusps[__pyx_v_i]).l = ((__pyx_t_6SnapPy_Real)__pyx_v_L);
        }

        /* "cython/core/pickle.pyx":221
 *                     cusps[i].m = <Real>M
 *                     cusps[i].l = <Real>L
 *                 for i in range(tri_data.num_or_cusps, num_cusps):             # <<<<<<<<<<<<<<
 *                     M, L, n = p[n], p[n+1], n + 2
 *                     cusps[i].topology = Klein_cusp
 */
        __pyx_t_8 = __pyx_v_num_cusps;
        __pyx_t_9 = __pyx_t_8;
        for (__pyx_t_10 = __pyx_v_tri_data.num_or_cusps; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
          __pyx_v_i = __pyx_t_10;

          /* "cython/core/pickle.pyx":222
 *                     cusps[i].l = <Real>L
 *                 for i in range(tri_data.num_or_cusps, num_cusps):
 *                     M, L, n = p[n], p[n+1], n + 2             # <<<<<<<<<<<<<<
 *                     cusps[i].topology = Klein_cusp
 *                     cusps[i].m = <Real>M
 */
          __pyx_t_12 = (__pyx_v_p[__pyx_v_n]);
          __pyx_t_11 = (__pyx_v_p[(__pyx_v_n + 1)]);
          __pyx_t_13 = (__pyx_v_n + 2);
          __pyx_v_M = __pyx_t_12;
          __pyx_v_L = __pyx_t_11;
          __pyx_v_n = __pyx_t_13;

          /* "cython/core/pickle.pyx":223
 *                 for i in range(tri_data.num_or_cusps, num_cusps):
 *                     M, L, n = p[n], p[n+1], n + 2
 *                     cusps[i].topology = Klein_cusp             # <<<<<<<<<<<<<<
 *                     cusps[i].m = <Real>M
 *                     cusps[i].l = <Real>L
 */
          (__pyx_v_cusps[__pyx_v_i]).topology = Klein_cusp;

          /* "cython/core/pickle.pyx":224
 *                     M, L, n = p[n], p[n+1], n + 2
 *                     cusps[i].topology = Klein_cusp
 *                     cusps[i].m = <Real>M             # <<<<<<<<<<<<<<
 *                     cusps[i].l = <Real>L
 *         else:
 */
          (__pyx_v_cusps[__pyx_v_i]).m = ((__pyx_t_6SnapPy_Real)__pyx_v_M);

          /* "cython/core/pickle.pyx":225
 *                     cusps[i].topology = Klein_cusp
 *                     cusps[i].m = <Real>M
 *                     cusps[i].l = <Real>L             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError('Failed to allocate memory for cusps')
 */
          (__pyx_v_cusps[__pyx_v_i]).l = ((__pyx_t_6SnapPy_Real)__pyx_v_L);
        }
      }
      __pyx_L8:;

      /* "cython/core/pickle.pyx":205
 *         # data.  We free the memory before returning.
 *         cusps = <c_CuspData*>malloc(num_cusps*sizeof(c_CuspData))
 *         if cusps:             # <<<<<<<<<<<<<<
 *             if p[0] & IS_COMPLETE:
 *                 for i in range(tri_data.num_or_cusps):
 */
      goto __pyx_L7;
    }

    /* "cython/core/pickle.pyx":227
 *                     cusps[i].l = <Real>L
 *         else:
 *             raise RuntimeError('Failed to allocate memory for cusps')             # <<<<<<<<<<<<<<
 *     tri_data.cusp_data = cusps
 * 
 */
    /*else*/ {
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__145, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 227, __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(12, 227, __pyx_L1_error)
    }
    __pyx_L7:;

    /* "cython/core/pickle.pyx":201
 * 
 *     num_cusps = tri_data.num_or_cusps + tri_data.num_nonor_cusps
 *     if num_cusps > 0:             # <<<<<<<<<<<<<<
 *         # Use malloc (not mymalloc) to allocate memory for the cusp
 *         # data.  We free the memory before returning.
 */
  }

  /* "cython/core/pickle.pyx":228
 *         else:
 *             raise RuntimeError('Failed to allocate memory for cusps')
 *     tri_data.cusp_data = cusps             # <<<<<<<<<<<<<<
 * 
 *     # Use malloc (not mymalloc) to allocate memory for the tetrahedra
 */
  __pyx_v_tri_data.cusp_data = __pyx_v_cusps;

  /* "cython/core/pickle.pyx":232
 *     # Use malloc (not mymalloc) to allocate memory for the tetrahedra
 *     # data.  We free the memory before returning.
 *     tets = <c_TetrahedronData*>malloc(num_tets*sizeof(c_TetrahedronData))             # <<<<<<<<<<<<<<
 *     if tets == NULL:
 *         free(cusps)
 */
  __pyx_v_tets = ((TetrahedronData *)malloc((__pyx_v_num_tets * (sizeof(TetrahedronData)))));

  /* "cython/core/pickle.pyx":233
 *     # data.  We free the memory before returning.
 *     tets = <c_TetrahedronData*>malloc(num_tets*sizeof(c_TetrahedronData))
 *     if tets == NULL:             # <<<<<<<<<<<<<<
 *         free(cusps)
 *         raise RuntimeError('Failed to allocate memory for tets.')
 */
  __pyx_t_6 = (__pyx_v_tets == NULL);
  if (unlikely(__pyx_t_6)) {

    /* "cython/core/pickle.pyx":234
 *     tets = <c_TetrahedronData*>malloc(num_tets*sizeof(c_TetrahedronData))
 *     if tets == NULL:
 *         free(cusps)             # <<<<<<<<<<<<<<
 *         raise RuntimeError('Failed to allocate memory for tets.')
 *     for i in range(tri_data.num_tetrahedra):
 */
    free(__pyx_v_cusps);

    /* "cython/core/pickle.pyx":235
 *     if tets == NULL:
 *         free(cusps)
 *         raise RuntimeError('Failed to allocate memory for tets.')             # <<<<<<<<<<<<<<
 *     for i in range(tri_data.num_tetrahedra):
 *         n = unpickle_tetrahedron_data(&tets[i], tri_pickle, n, p[0])
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__146, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 235, __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(12, 235, __pyx_L1_error)

    /* "cython/core/pickle.pyx":233
 *     # data.  We free the memory before returning.
 *     tets = <c_TetrahedronData*>malloc(num_tets*sizeof(c_TetrahedronData))
 *     if tets == NULL:             # <<<<<<<<<<<<<<
 *         free(cusps)
 *         raise RuntimeError('Failed to allocate memory for tets.')
 */
  }

  /* "cython/core/pickle.pyx":236
 *         free(cusps)
 *         raise RuntimeError('Failed to allocate memory for tets.')
 *     for i in range(tri_data.num_tetrahedra):             # <<<<<<<<<<<<<<
 *         n = unpickle_tetrahedron_data(&tets[i], tri_pickle, n, p[0])
 *     tri_data.tetrahedron_data = tets
 */
  __pyx_t_8 = __pyx_v_tri_data.num_tetrahedra;
  __pyx_t_9 = __pyx_t_8;
  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
    __pyx_v_i = __pyx_t_10;

    /* "cython/core/pickle.pyx":237
 *         raise RuntimeError('Failed to allocate memory for tets.')
 *     for i in range(tri_data.num_tetrahedra):
 *         n = unpickle_tetrahedron_data(&tets[i], tri_pickle, n, p[0])             # <<<<<<<<<<<<<<
 *     tri_data.tetrahedron_data = tets
 * 
 */
    if (!(likely(PyBytes_CheckExact(__pyx_v_tri_pickle))||((__pyx_v_tri_pickle) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_v_tri_pickle))) __PYX_ERR(12, 237, __pyx_L1_error)
    __pyx_t_14 = __pyx_f_6SnapPy_unpickle_tetrahedron_data((&(__pyx_v_tets[__pyx_v_i])), ((PyObject*)__pyx_v_tri_pickle), __pyx_v_n, (__pyx_v_p[0])); if (unlikely(__pyx_t_14 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(12, 237, __pyx_L1_error)
    __pyx_v_n = __pyx_t_14;
  }

  /* "cython/core/pickle.pyx":238
 *     for i in range(tri_data.num_tetrahedra):
 *         n = unpickle_tetrahedron_data(&tets[i], tri_pickle, n, p[0])
 *     tri_data.tetrahedron_data = tets             # <<<<<<<<<<<<<<
 * 
 *     # Create a new bytes object py_name containing the triangulation name,
 */
  __pyx_v_tri_data.tetrahedron_data = __pyx_v_tets;

  /* "cython/core/pickle.pyx":241
 * 
 *     # Create a new bytes object py_name containing the triangulation name,
 *     py_name = tri_pickle[n:]             # <<<<<<<<<<<<<<
 *     # then set tri_data.name to point to the internal buffer of py_name.
 *     tri_data.name = py_name
 */
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_tri_pickle, __pyx_v_n, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 241, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_py_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cython/core/pickle.pyx":243
 *     py_name = tri_pickle[n:]
 *     # then set tri_data.name to point to the internal buffer of py_name.
 *     tri_data.name = py_name             # <<<<<<<<<<<<<<
 *     # Hopefully, Cython takes care of the details.
 * 
 */
  __pyx_t_15 = __Pyx_PyObject_AsWritableString(__pyx_v_py_name); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) __PYX_ERR(12, 243, __pyx_L1_error)
  __pyx_v_tri_data.name = __pyx_t_15;

  /* "cython/core/pickle.pyx":246
 *     # Hopefully, Cython takes care of the details.
 * 
 *     data_to_triangulation(&tri_data, &tri)             # <<<<<<<<<<<<<<
 *     free(tets)
 *     free(cusps)
 */
  data_to_triangulation((&__pyx_v_tri_data), (&__pyx_v_tri)); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 246, __pyx_L1_error)

  /* "cython/core/pickle.pyx":247
 * 
 *     data_to_triangulation(&tri_data, &tri)
 *     free(tets)             # <<<<<<<<<<<<<<
 *     free(cusps)
 *     return tri
 */
  free(__pyx_v_tets);

  /* "cython/core/pickle.pyx":248
 *     data_to_triangulation(&tri_data, &tri)
 *     free(tets)
 *     free(cusps)             # <<<<<<<<<<<<<<
 *     return tri
 * 
 */
  free(__pyx_v_cusps);

  /* "cython/core/pickle.pyx":249
 *     free(tets)
 *     free(cusps)
 *     return tri             # <<<<<<<<<<<<<<
 * 
 * cdef int unpickle_tetrahedron_data(c_TetrahedronData *data, bytes pickle,
 */
  __pyx_r = __pyx_v_tri;
  goto __pyx_L0;

  /* "cython/core/pickle.pyx":164
 *     return result
 * 
 * cdef c_Triangulation* unpickle_triangulation(bytes pickle) except *:             # <<<<<<<<<<<<<<
 *     """
 *     Unpickle a Triangulation by deserializing a TriangulationData structure
 */

  /* 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("SnapPy.unpickle_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_header);
  __Pyx_XDECREF(__pyx_v_tri_pickle);
  __Pyx_XDECREF(__pyx_v_py_name);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/pickle.pyx":251
 *     return tri
 * 
 * cdef int unpickle_tetrahedron_data(c_TetrahedronData *data, bytes pickle,             # <<<<<<<<<<<<<<
 *                                    int start, int flag) except *:
 *     cdef int i, j, v, f
 */

static int __pyx_f_6SnapPy_unpickle_tetrahedron_data(TetrahedronData *__pyx_v_data, PyObject *__pyx_v_pickle, int __pyx_v_start, int __pyx_v_flag) {
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_v;
  int __pyx_v_f;
  int __pyx_v_n;
  unsigned char __pyx_v_perm;
  unsigned short __pyx_v_mask;
  unsigned short __pyx_v_bit;
  unsigned char *__pyx_v_p;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  unsigned char *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("unpickle_tetrahedron_data", 1);

  /* "cython/core/pickle.pyx":254
 *                                    int start, int flag) except *:
 *     cdef int i, j, v, f
 *     cdef int n = start             # <<<<<<<<<<<<<<
 *     cdef unsigned char perm
 *     cdef unsigned short mask, bit
 */
  __pyx_v_n = __pyx_v_start;

  /* "cython/core/pickle.pyx":258
 *     cdef unsigned short mask, bit
 *     # Cython magic to allow using the internal buffer of the bytes object.
 *     cdef unsigned char* p = pickle             # <<<<<<<<<<<<<<
 * 
 *     # Get the neighbors.
 */
  if (unlikely(__pyx_v_pickle == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(12, 258, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_AsWritableUString(__pyx_v_pickle); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(12, 258, __pyx_L1_error)
  __pyx_v_p = __pyx_t_1;

  /* "cython/core/pickle.pyx":261
 * 
 *     # Get the neighbors.
 *     if flag & IS_HUGE:             # <<<<<<<<<<<<<<
 *         for i in range(4):
 *             data.neighbor_index[i] = ((<int>p[n]) << 24 | (<int>p[n+1]) << 16 |
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_And(__pyx_t_2, __pyx_v_6SnapPy_IS_HUGE); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __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(12, 261, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "cython/core/pickle.pyx":262
 *     # Get the neighbors.
 *     if flag & IS_HUGE:
 *         for i in range(4):             # <<<<<<<<<<<<<<
 *             data.neighbor_index[i] = ((<int>p[n]) << 24 | (<int>p[n+1]) << 16 |
 *                                       (<int>p[n+2]) << 8 | (<int>p[n+3]))
 */
    for (__pyx_t_5 = 0; __pyx_t_5 < 4; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "cython/core/pickle.pyx":263
 *     if flag & IS_HUGE:
 *         for i in range(4):
 *             data.neighbor_index[i] = ((<int>p[n]) << 24 | (<int>p[n+1]) << 16 |             # <<<<<<<<<<<<<<
 *                                       (<int>p[n+2]) << 8 | (<int>p[n+3]))
 *             n += 4
 */
      (__pyx_v_data->neighbor_index[__pyx_v_i]) = ((((((int)(__pyx_v_p[__pyx_v_n])) << 24) | (((int)(__pyx_v_p[(__pyx_v_n + 1)])) << 16)) | (((int)(__pyx_v_p[(__pyx_v_n + 2)])) << 8)) | ((int)(__pyx_v_p[(__pyx_v_n + 3)])));

      /* "cython/core/pickle.pyx":265
 *             data.neighbor_index[i] = ((<int>p[n]) << 24 | (<int>p[n+1]) << 16 |
 *                                       (<int>p[n+2]) << 8 | (<int>p[n+3]))
 *             n += 4             # <<<<<<<<<<<<<<
 *     elif flag & IS_BIG:
 *         for i in range(4):
 */
      __pyx_v_n = (__pyx_v_n + 4);
    }

    /* "cython/core/pickle.pyx":261
 * 
 *     # Get the neighbors.
 *     if flag & IS_HUGE:             # <<<<<<<<<<<<<<
 *         for i in range(4):
 *             data.neighbor_index[i] = ((<int>p[n]) << 24 | (<int>p[n+1]) << 16 |
 */
    goto __pyx_L3;
  }

  /* "cython/core/pickle.pyx":266
 *                                       (<int>p[n+2]) << 8 | (<int>p[n+3]))
 *             n += 4
 *     elif flag & IS_BIG:             # <<<<<<<<<<<<<<
 *         for i in range(4):
 *             data.neighbor_index[i] = (<int>p[n] << 8) | (<int>p[n+1])
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_flag); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_And(__pyx_t_3, __pyx_v_6SnapPy_IS_BIG); if (unlikely(!__pyx_t_2)) __PYX_ERR(12, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(12, 266, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {

    /* "cython/core/pickle.pyx":267
 *             n += 4
 *     elif flag & IS_BIG:
 *         for i in range(4):             # <<<<<<<<<<<<<<
 *             data.neighbor_index[i] = (<int>p[n] << 8) | (<int>p[n+1])
 *             n += 2
 */
    for (__pyx_t_5 = 0; __pyx_t_5 < 4; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "cython/core/pickle.pyx":268
 *     elif flag & IS_BIG:
 *         for i in range(4):
 *             data.neighbor_index[i] = (<int>p[n] << 8) | (<int>p[n+1])             # <<<<<<<<<<<<<<
 *             n += 2
 *     else:
 */
      (__pyx_v_data->neighbor_index[__pyx_v_i]) = ((((int)(__pyx_v_p[__pyx_v_n])) << 8) | ((int)(__pyx_v_p[(__pyx_v_n + 1)])));

      /* "cython/core/pickle.pyx":269
 *         for i in range(4):
 *             data.neighbor_index[i] = (<int>p[n] << 8) | (<int>p[n+1])
 *             n += 2             # <<<<<<<<<<<<<<
 *     else:
 *         for i in range(4):
 */
      __pyx_v_n = (__pyx_v_n + 2);
    }

    /* "cython/core/pickle.pyx":266
 *                                       (<int>p[n+2]) << 8 | (<int>p[n+3]))
 *             n += 4
 *     elif flag & IS_BIG:             # <<<<<<<<<<<<<<
 *         for i in range(4):
 *             data.neighbor_index[i] = (<int>p[n] << 8) | (<int>p[n+1])
 */
    goto __pyx_L3;
  }

  /* "cython/core/pickle.pyx":271
 *             n += 2
 *     else:
 *         for i in range(4):             # <<<<<<<<<<<<<<
 *             data.neighbor_index[i] = <int>p[n]
 *             n += 1
 */
  /*else*/ {
    for (__pyx_t_5 = 0; __pyx_t_5 < 4; __pyx_t_5+=1) {
      __pyx_v_i = __pyx_t_5;

      /* "cython/core/pickle.pyx":272
 *     else:
 *         for i in range(4):
 *             data.neighbor_index[i] = <int>p[n]             # <<<<<<<<<<<<<<
 *             n += 1
 * 
 */
      (__pyx_v_data->neighbor_index[__pyx_v_i]) = ((int)(__pyx_v_p[__pyx_v_n]));

      /* "cython/core/pickle.pyx":273
 *         for i in range(4):
 *             data.neighbor_index[i] = <int>p[n]
 *             n += 1             # <<<<<<<<<<<<<<
 * 
 *     # Get the gluing permutations.
 */
      __pyx_v_n = (__pyx_v_n + 1);
    }
  }
  __pyx_L3:;

  /* "cython/core/pickle.pyx":276
 * 
 *     # Get the gluing permutations.
 *     for i in range(4):             # <<<<<<<<<<<<<<
 *         perm = <unsigned char>p[n]
 *         for j in range(4):
 */
  for (__pyx_t_5 = 0; __pyx_t_5 < 4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "cython/core/pickle.pyx":277
 *     # Get the gluing permutations.
 *     for i in range(4):
 *         perm = <unsigned char>p[n]             # <<<<<<<<<<<<<<
 *         for j in range(4):
 *             data.gluing[i][j] = <int>(perm & 0x3)
 */
    __pyx_v_perm = ((unsigned char)(__pyx_v_p[__pyx_v_n]));

    /* "cython/core/pickle.pyx":278
 *     for i in range(4):
 *         perm = <unsigned char>p[n]
 *         for j in range(4):             # <<<<<<<<<<<<<<
 *             data.gluing[i][j] = <int>(perm & 0x3)
 *             perm = perm >> 2
 */
    for (__pyx_t_6 = 0; __pyx_t_6 < 4; __pyx_t_6+=1) {
      __pyx_v_j = __pyx_t_6;

      /* "cython/core/pickle.pyx":279
 *         perm = <unsigned char>p[n]
 *         for j in range(4):
 *             data.gluing[i][j] = <int>(perm & 0x3)             # <<<<<<<<<<<<<<
 *             perm = perm >> 2
 *         n += 1
 */
      ((__pyx_v_data->gluing[__pyx_v_i])[__pyx_v_j]) = ((int)(__pyx_v_perm & 0x3));

      /* "cython/core/pickle.pyx":280
 *         for j in range(4):
 *             data.gluing[i][j] = <int>(perm & 0x3)
 *             perm = perm >> 2             # <<<<<<<<<<<<<<
 *         n += 1
 * 
 */
      __pyx_v_perm = (__pyx_v_perm >> 2);
    }

    /* "cython/core/pickle.pyx":281
 *             data.gluing[i][j] = <int>(perm & 0x3)
 *             perm = perm >> 2
 *         n += 1             # <<<<<<<<<<<<<<
 * 
 *     # Get the cusp indices.
 */
    __pyx_v_n = (__pyx_v_n + 1);
  }

  /* "cython/core/pickle.pyx":284
 * 
 *     # Get the cusp indices.
 *     for i in range(4):             # <<<<<<<<<<<<<<
 *         data.cusp_index[i] = <int>p[n]
 *         n += 1
 */
  for (__pyx_t_5 = 0; __pyx_t_5 < 4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "cython/core/pickle.pyx":285
 *     # Get the cusp indices.
 *     for i in range(4):
 *         data.cusp_index[i] = <int>p[n]             # <<<<<<<<<<<<<<
 *         n += 1
 * 
 */
    (__pyx_v_data->cusp_index[__pyx_v_i]) = ((int)(__pyx_v_p[__pyx_v_n]));

    /* "cython/core/pickle.pyx":286
 *     for i in range(4):
 *         data.cusp_index[i] = <int>p[n]
 *         n += 1             # <<<<<<<<<<<<<<
 * 
 *     # Get the curve data
 */
    __pyx_v_n = (__pyx_v_n + 1);
  }

  /* "cython/core/pickle.pyx":289
 * 
 *     # Get the curve data
 *     for i in range(2):             # <<<<<<<<<<<<<<
 *         for j in range(2):
 *             bit = 1
 */
  for (__pyx_t_5 = 0; __pyx_t_5 < 2; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "cython/core/pickle.pyx":290
 *     # Get the curve data
 *     for i in range(2):
 *         for j in range(2):             # <<<<<<<<<<<<<<
 *             bit = 1
 *             mask = <unsigned char>p[n] << 8 | <unsigned char>p[n+1]
 */
    for (__pyx_t_6 = 0; __pyx_t_6 < 2; __pyx_t_6+=1) {
      __pyx_v_j = __pyx_t_6;

      /* "cython/core/pickle.pyx":291
 *     for i in range(2):
 *         for j in range(2):
 *             bit = 1             # <<<<<<<<<<<<<<
 *             mask = <unsigned char>p[n] << 8 | <unsigned char>p[n+1]
 *             n += 2
 */
      __pyx_v_bit = 1;

      /* "cython/core/pickle.pyx":292
 *         for j in range(2):
 *             bit = 1
 *             mask = <unsigned char>p[n] << 8 | <unsigned char>p[n+1]             # <<<<<<<<<<<<<<
 *             n += 2
 *             for v in range(4):
 */
      __pyx_v_mask = ((((unsigned char)(__pyx_v_p[__pyx_v_n])) << 8) | ((unsigned char)(__pyx_v_p[(__pyx_v_n + 1)])));

      /* "cython/core/pickle.pyx":293
 *             bit = 1
 *             mask = <unsigned char>p[n] << 8 | <unsigned char>p[n+1]
 *             n += 2             # <<<<<<<<<<<<<<
 *             for v in range(4):
 *                 for f in range(4):
 */
      __pyx_v_n = (__pyx_v_n + 2);

      /* "cython/core/pickle.pyx":294
 *             mask = <unsigned char>p[n] << 8 | <unsigned char>p[n+1]
 *             n += 2
 *             for v in range(4):             # <<<<<<<<<<<<<<
 *                 for f in range(4):
 *                     if mask & bit:
 */
      for (__pyx_t_7 = 0; __pyx_t_7 < 4; __pyx_t_7+=1) {
        __pyx_v_v = __pyx_t_7;

        /* "cython/core/pickle.pyx":295
 *             n += 2
 *             for v in range(4):
 *                 for f in range(4):             # <<<<<<<<<<<<<<
 *                     if mask & bit:
 *                         # Curve weights are signed.  The effect of
 */
        for (__pyx_t_8 = 0; __pyx_t_8 < 4; __pyx_t_8+=1) {
          __pyx_v_f = __pyx_t_8;

          /* "cython/core/pickle.pyx":296
 *             for v in range(4):
 *                 for f in range(4):
 *                     if mask & bit:             # <<<<<<<<<<<<<<
 *                         # Curve weights are signed.  The effect of
 *                         # casting an unsigned char to a signed char is
 */
          __pyx_t_4 = ((__pyx_v_mask & __pyx_v_bit) != 0);
          if (__pyx_t_4) {

            /* "cython/core/pickle.pyx":302
 *                         # will break if any bits are changed by the
 *                         # cast.
 *                         data.curve[i][j][v][f] = <signed char>p[n]             # <<<<<<<<<<<<<<
 *                         n += 1
 *                     else:
 */
            ((((__pyx_v_data->curve[__pyx_v_i])[__pyx_v_j])[__pyx_v_v])[__pyx_v_f]) = ((signed char)(__pyx_v_p[__pyx_v_n]));

            /* "cython/core/pickle.pyx":303
 *                         # cast.
 *                         data.curve[i][j][v][f] = <signed char>p[n]
 *                         n += 1             # <<<<<<<<<<<<<<
 *                     else:
 *                         data.curve[i][j][v][f] = 0
 */
            __pyx_v_n = (__pyx_v_n + 1);

            /* "cython/core/pickle.pyx":296
 *             for v in range(4):
 *                 for f in range(4):
 *                     if mask & bit:             # <<<<<<<<<<<<<<
 *                         # Curve weights are signed.  The effect of
 *                         # casting an unsigned char to a signed char is
 */
            goto __pyx_L24;
          }

          /* "cython/core/pickle.pyx":305
 *                         n += 1
 *                     else:
 *                         data.curve[i][j][v][f] = 0             # <<<<<<<<<<<<<<
 *                     bit = bit << 1
 * 
 */
          /*else*/ {
            ((((__pyx_v_data->curve[__pyx_v_i])[__pyx_v_j])[__pyx_v_v])[__pyx_v_f]) = 0;
          }
          __pyx_L24:;

          /* "cython/core/pickle.pyx":306
 *                     else:
 *                         data.curve[i][j][v][f] = 0
 *                     bit = bit << 1             # <<<<<<<<<<<<<<
 * 
 *     # Return the position of the next char.
 */
          __pyx_v_bit = (__pyx_v_bit << 1);
        }
      }
    }
  }

  /* "cython/core/pickle.pyx":309
 * 
 *     # Return the position of the next char.
 *     return n             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_n;
  goto __pyx_L0;

  /* "cython/core/pickle.pyx":251
 *     return tri
 * 
 * cdef int unpickle_tetrahedron_data(c_TetrahedronData *data, bytes pickle,             # <<<<<<<<<<<<<<
 *                                    int start, int flag) except *:
 *     cdef int i, j, v, f
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.unpickle_tetrahedron_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/pickle.pyx":312
 * 
 * 
 * cdef c_Triangulation* listlike_to_triangulation(listlike,             # <<<<<<<<<<<<<<
 *                                                 num_or_cusps=0,
 *                                                 num_nonor_cusps=0,
 */

static Triangulation *__pyx_f_6SnapPy_listlike_to_triangulation(PyObject *__pyx_v_listlike, struct __pyx_opt_args_6SnapPy_listlike_to_triangulation *__pyx_optional_args) {
  PyObject *__pyx_v_num_or_cusps = ((PyObject *)__pyx_int_0);
  PyObject *__pyx_v_num_nonor_cusps = ((PyObject *)__pyx_int_0);

  /* "cython/core/pickle.pyx":315
 *                                                 num_or_cusps=0,
 *                                                 num_nonor_cusps=0,
 *                                                 cusp_indices=None,             # <<<<<<<<<<<<<<
 *                                                 peripheral_curves=None) except *:
 *     cdef c_TetrahedronData* tets = NULL
 */
  PyObject *__pyx_v_cusp_indices = ((PyObject *)Py_None);

  /* "cython/core/pickle.pyx":316
 *                                                 num_nonor_cusps=0,
 *                                                 cusp_indices=None,
 *                                                 peripheral_curves=None) except *:             # <<<<<<<<<<<<<<
 *     cdef c_TetrahedronData* tets = NULL
 *     cdef c_CuspData* cusps = NULL
 */
  PyObject *__pyx_v_peripheral_curves = ((PyObject *)Py_None);
  TetrahedronData *__pyx_v_tets;
  CuspData *__pyx_v_cusps;
  Triangulation *__pyx_v_tri;
  TriangulationData __pyx_v_tri_data;
  int __pyx_v_i;
  int __pyx_v_j;
  int __pyx_v_t;
  int __pyx_v_a;
  int __pyx_v_b;
  int __pyx_v_v;
  int __pyx_v_f;
  int __pyx_v_num_tets;
  int __pyx_v_num_cusps;
  PyObject *__pyx_v_first0 = NULL;
  PyObject *__pyx_v_first1 = NULL;
  PyObject *__pyx_v_py_name = NULL;
  PyObject *__pyx_v_neighbors = NULL;
  PyObject *__pyx_v_gluings = NULL;
  PyObject *__pyx_9genexpr94__pyx_v_x = NULL;
  Triangulation *__pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  int __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  Py_ssize_t __pyx_t_14;
  char *__pyx_t_15;
  int __pyx_t_16;
  int __pyx_t_17;
  long __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_t_20;
  int __pyx_t_21;
  int __pyx_t_22;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("listlike_to_triangulation", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_num_or_cusps = __pyx_optional_args->num_or_cusps;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_num_nonor_cusps = __pyx_optional_args->num_nonor_cusps;
        if (__pyx_optional_args->__pyx_n > 2) {
          __pyx_v_cusp_indices = __pyx_optional_args->cusp_indices;
          if (__pyx_optional_args->__pyx_n > 3) {
            __pyx_v_peripheral_curves = __pyx_optional_args->peripheral_curves;
          }
        }
      }
    }
  }
  __Pyx_INCREF(__pyx_v_peripheral_curves);

  /* "cython/core/pickle.pyx":317
 *                                                 cusp_indices=None,
 *                                                 peripheral_curves=None) except *:
 *     cdef c_TetrahedronData* tets = NULL             # <<<<<<<<<<<<<<
 *     cdef c_CuspData* cusps = NULL
 *     cdef c_Triangulation *tri
 */
  __pyx_v_tets = NULL;

  /* "cython/core/pickle.pyx":318
 *                                                 peripheral_curves=None) except *:
 *     cdef c_TetrahedronData* tets = NULL
 *     cdef c_CuspData* cusps = NULL             # <<<<<<<<<<<<<<
 *     cdef c_Triangulation *tri
 *     cdef TriangulationData tri_data
 */
  __pyx_v_cusps = NULL;

  /* "cython/core/pickle.pyx":323
 *     cdef int i, j, t, a, b, v, f, num_tets, num_cusps
 * 
 *     num_tets = len(listlike)             # <<<<<<<<<<<<<<
 *     if num_tets == 0:
 *         raise ValueError('No tetrahedra data provided')
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_listlike); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(12, 323, __pyx_L1_error)
  __pyx_v_num_tets = __pyx_t_1;

  /* "cython/core/pickle.pyx":324
 * 
 *     num_tets = len(listlike)
 *     if num_tets == 0:             # <<<<<<<<<<<<<<
 *         raise ValueError('No tetrahedra data provided')
 * 
 */
  __pyx_t_2 = (__pyx_v_num_tets == 0);
  if (unlikely(__pyx_t_2)) {

    /* "cython/core/pickle.pyx":325
 *     num_tets = len(listlike)
 *     if num_tets == 0:
 *         raise ValueError('No tetrahedra data provided')             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__147, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 325, __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(12, 325, __pyx_L1_error)

    /* "cython/core/pickle.pyx":324
 * 
 *     num_tets = len(listlike)
 *     if num_tets == 0:             # <<<<<<<<<<<<<<
 *         raise ValueError('No tetrahedra data provided')
 * 
 */
  }

  /* "cython/core/pickle.pyx":327
 *         raise ValueError('No tetrahedra data provided')
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         first0, first1 = listlike[0]
 *     except ValueError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    /*try:*/ {

      /* "cython/core/pickle.pyx":328
 * 
 *     try:
 *         first0, first1 = listlike[0]             # <<<<<<<<<<<<<<
 *     except ValueError:
 *         raise ValueError('Tetrahedra data appears invalid')
 */
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_listlike, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 328, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      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(12, 328, __pyx_L4_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_8 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        #else
        __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(12, 328, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 328, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 328, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
        index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L10_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(12, 328, __pyx_L4_error)
        __pyx_t_10 = NULL;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L11_unpacking_done;
        __pyx_L10_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(12, 328, __pyx_L4_error)
        __pyx_L11_unpacking_done:;
      }
      __pyx_v_first0 = __pyx_t_7;
      __pyx_t_7 = 0;
      __pyx_v_first1 = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "cython/core/pickle.pyx":327
 *         raise ValueError('No tetrahedra data provided')
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         first0, first1 = listlike[0]
 *     except ValueError:
 */
    }
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "cython/core/pickle.pyx":329
 *     try:
 *         first0, first1 = listlike[0]
 *     except ValueError:             # <<<<<<<<<<<<<<
 *         raise ValueError('Tetrahedra data appears invalid')
 *     if len(first0) != 4 or [len(x) for x in first1] != [4, 4, 4, 4]:
 */
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
    if (__pyx_t_11) {
      __Pyx_AddTraceback("SnapPy.listlike_to_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_7) < 0) __PYX_ERR(12, 329, __pyx_L6_except_error)
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_7);

      /* "cython/core/pickle.pyx":330
 *         first0, first1 = listlike[0]
 *     except ValueError:
 *         raise ValueError('Tetrahedra data appears invalid')             # <<<<<<<<<<<<<<
 *     if len(first0) != 4 or [len(x) for x in first1] != [4, 4, 4, 4]:
 *         raise ValueError('Tetrahedra data appears invalid')
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__148, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 330, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(12, 330, __pyx_L6_except_error)
    }
    goto __pyx_L6_except_error;

    /* "cython/core/pickle.pyx":327
 *         raise ValueError('No tetrahedra data provided')
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         first0, first1 = listlike[0]
 *     except ValueError:
 */
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    goto __pyx_L1_error;
    __pyx_L9_try_end:;
  }

  /* "cython/core/pickle.pyx":331
 *     except ValueError:
 *         raise ValueError('Tetrahedra data appears invalid')
 *     if len(first0) != 4 or [len(x) for x in first1] != [4, 4, 4, 4]:             # <<<<<<<<<<<<<<
 *         raise ValueError('Tetrahedra data appears invalid')
 * 
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_first0); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(12, 331, __pyx_L1_error)
  __pyx_t_12 = (__pyx_t_1 != 4);
  if (!__pyx_t_12) {
  } else {
    __pyx_t_2 = __pyx_t_12;
    goto __pyx_L15_bool_binop_done;
  }
  { /* enter inner scope */
    __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(12, 331, __pyx_L19_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (likely(PyList_CheckExact(__pyx_v_first1)) || PyTuple_CheckExact(__pyx_v_first1)) {
      __pyx_t_8 = __pyx_v_first1; __Pyx_INCREF(__pyx_t_8);
      __pyx_t_1 = 0;
      __pyx_t_13 = NULL;
    } else {
      __pyx_t_1 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_first1); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 331, __pyx_L19_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(12, 331, __pyx_L19_error)
    }
    for (;;) {
      if (likely(!__pyx_t_13)) {
        if (likely(PyList_CheckExact(__pyx_t_8))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(12, 331, __pyx_L19_error)
            #endif
            if (__pyx_t_1 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(12, 331, __pyx_L19_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 331, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(12, 331, __pyx_L19_error)
            #endif
            if (__pyx_t_1 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(12, 331, __pyx_L19_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 331, __pyx_L19_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_13(__pyx_t_8);
        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(12, 331, __pyx_L19_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr94__pyx_v_x, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_14 = PyObject_Length(__pyx_9genexpr94__pyx_v_x); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(12, 331, __pyx_L19_error)
      __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 331, __pyx_L19_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_3))) __PYX_ERR(12, 331, __pyx_L19_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_9genexpr94__pyx_v_x); __pyx_9genexpr94__pyx_v_x = 0;
    goto __pyx_L23_exit_scope;
    __pyx_L19_error:;
    __Pyx_XDECREF(__pyx_9genexpr94__pyx_v_x); __pyx_9genexpr94__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L23_exit_scope:;
  } /* exit inner scope */
  __pyx_t_8 = PyList_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(__pyx_int_4);
  __Pyx_GIVEREF(__pyx_int_4);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_4)) __PYX_ERR(12, 331, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_4);
  __Pyx_GIVEREF(__pyx_int_4);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_4)) __PYX_ERR(12, 331, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_4);
  __Pyx_GIVEREF(__pyx_int_4);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 2, __pyx_int_4)) __PYX_ERR(12, 331, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_4);
  __Pyx_GIVEREF(__pyx_int_4);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 3, __pyx_int_4)) __PYX_ERR(12, 331, __pyx_L1_error);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_7, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 331, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(12, 331, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = __pyx_t_12;
  __pyx_L15_bool_binop_done:;
  if (unlikely(__pyx_t_2)) {

    /* "cython/core/pickle.pyx":332
 *         raise ValueError('Tetrahedra data appears invalid')
 *     if len(first0) != 4 or [len(x) for x in first1] != [4, 4, 4, 4]:
 *         raise ValueError('Tetrahedra data appears invalid')             # <<<<<<<<<<<<<<
 * 
 *     py_name = b'from_data'
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__148, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 332, __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(12, 332, __pyx_L1_error)

    /* "cython/core/pickle.pyx":331
 *     except ValueError:
 *         raise ValueError('Tetrahedra data appears invalid')
 *     if len(first0) != 4 or [len(x) for x in first1] != [4, 4, 4, 4]:             # <<<<<<<<<<<<<<
 *         raise ValueError('Tetrahedra data appears invalid')
 * 
 */
  }

  /* "cython/core/pickle.pyx":334
 *         raise ValueError('Tetrahedra data appears invalid')
 * 
 *     py_name = b'from_data'             # <<<<<<<<<<<<<<
 *     tri_data.name = py_name
 *     tri_data.solution_type = not_attempted
 */
  __Pyx_INCREF(__pyx_n_b_from_data);
  __pyx_v_py_name = __pyx_n_b_from_data;

  /* "cython/core/pickle.pyx":335
 * 
 *     py_name = b'from_data'
 *     tri_data.name = py_name             # <<<<<<<<<<<<<<
 *     tri_data.solution_type = not_attempted
 *     tri_data.volume = <Real> 0.0
 */
  __pyx_t_15 = __Pyx_PyBytes_AsWritableString(__pyx_v_py_name); if (unlikely((!__pyx_t_15) && PyErr_Occurred())) __PYX_ERR(12, 335, __pyx_L1_error)
  __pyx_v_tri_data.name = __pyx_t_15;

  /* "cython/core/pickle.pyx":336
 *     py_name = b'from_data'
 *     tri_data.name = py_name
 *     tri_data.solution_type = not_attempted             # <<<<<<<<<<<<<<
 *     tri_data.volume = <Real> 0.0
 *     tri_data.orientability = unknown_orientability
 */
  __pyx_v_tri_data.solution_type = not_attempted;

  /* "cython/core/pickle.pyx":337
 *     tri_data.name = py_name
 *     tri_data.solution_type = not_attempted
 *     tri_data.volume = <Real> 0.0             # <<<<<<<<<<<<<<
 *     tri_data.orientability = unknown_orientability
 *     tri_data.num_tetrahedra = num_tets
 */
  __pyx_v_tri_data.volume = ((__pyx_t_6SnapPy_Real)0.0);

  /* "cython/core/pickle.pyx":338
 *     tri_data.solution_type = not_attempted
 *     tri_data.volume = <Real> 0.0
 *     tri_data.orientability = unknown_orientability             # <<<<<<<<<<<<<<
 *     tri_data.num_tetrahedra = num_tets
 *     tri_data.num_or_cusps = num_or_cusps
 */
  __pyx_v_tri_data.orientability = unknown_orientability;

  /* "cython/core/pickle.pyx":339
 *     tri_data.volume = <Real> 0.0
 *     tri_data.orientability = unknown_orientability
 *     tri_data.num_tetrahedra = num_tets             # <<<<<<<<<<<<<<
 *     tri_data.num_or_cusps = num_or_cusps
 *     tri_data.num_nonor_cusps = num_nonor_cusps
 */
  __pyx_v_tri_data.num_tetrahedra = __pyx_v_num_tets;

  /* "cython/core/pickle.pyx":340
 *     tri_data.orientability = unknown_orientability
 *     tri_data.num_tetrahedra = num_tets
 *     tri_data.num_or_cusps = num_or_cusps             # <<<<<<<<<<<<<<
 *     tri_data.num_nonor_cusps = num_nonor_cusps
 *     tri_data.cusp_data = NULL
 */
  __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_num_or_cusps); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 340, __pyx_L1_error)
  __pyx_v_tri_data.num_or_cusps = __pyx_t_11;

  /* "cython/core/pickle.pyx":341
 *     tri_data.num_tetrahedra = num_tets
 *     tri_data.num_or_cusps = num_or_cusps
 *     tri_data.num_nonor_cusps = num_nonor_cusps             # <<<<<<<<<<<<<<
 *     tri_data.cusp_data = NULL
 *     tri_data.CS_value_is_known = 0
 */
  __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_num_nonor_cusps); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 341, __pyx_L1_error)
  __pyx_v_tri_data.num_nonor_cusps = __pyx_t_11;

  /* "cython/core/pickle.pyx":342
 *     tri_data.num_or_cusps = num_or_cusps
 *     tri_data.num_nonor_cusps = num_nonor_cusps
 *     tri_data.cusp_data = NULL             # <<<<<<<<<<<<<<
 *     tri_data.CS_value_is_known = 0
 *     tri_data.CS_value = <Real>0.0
 */
  __pyx_v_tri_data.cusp_data = NULL;

  /* "cython/core/pickle.pyx":343
 *     tri_data.num_nonor_cusps = num_nonor_cusps
 *     tri_data.cusp_data = NULL
 *     tri_data.CS_value_is_known = 0             # <<<<<<<<<<<<<<
 *     tri_data.CS_value = <Real>0.0
 * 
 */
  __pyx_v_tri_data.CS_value_is_known = 0;

  /* "cython/core/pickle.pyx":344
 *     tri_data.cusp_data = NULL
 *     tri_data.CS_value_is_known = 0
 *     tri_data.CS_value = <Real>0.0             # <<<<<<<<<<<<<<
 * 
 *     num_cusps = tri_data.num_or_cusps + tri_data.num_nonor_cusps
 */
  __pyx_v_tri_data.CS_value = ((__pyx_t_6SnapPy_Real)0.0);

  /* "cython/core/pickle.pyx":346
 *     tri_data.CS_value = <Real>0.0
 * 
 *     num_cusps = tri_data.num_or_cusps + tri_data.num_nonor_cusps             # <<<<<<<<<<<<<<
 *     if num_cusps > 0:
 *         # Use malloc (not mymalloc) to allocate memory for the cusp
 */
  __pyx_v_num_cusps = (__pyx_v_tri_data.num_or_cusps + __pyx_v_tri_data.num_nonor_cusps);

  /* "cython/core/pickle.pyx":347
 * 
 *     num_cusps = tri_data.num_or_cusps + tri_data.num_nonor_cusps
 *     if num_cusps > 0:             # <<<<<<<<<<<<<<
 *         # Use malloc (not mymalloc) to allocate memory for the cusp
 *         # data.  We free the memory before returning.
 */
  __pyx_t_2 = (__pyx_v_num_cusps > 0);
  if (__pyx_t_2) {

    /* "cython/core/pickle.pyx":350
 *         # Use malloc (not mymalloc) to allocate memory for the cusp
 *         # data.  We free the memory before returning.
 *         cusps = <c_CuspData*>malloc(num_cusps*sizeof(c_CuspData))             # <<<<<<<<<<<<<<
 *         if cusps:
 *             for i in range(tri_data.num_or_cusps):
 */
    __pyx_v_cusps = ((CuspData *)malloc((__pyx_v_num_cusps * (sizeof(CuspData)))));

    /* "cython/core/pickle.pyx":351
 *         # data.  We free the memory before returning.
 *         cusps = <c_CuspData*>malloc(num_cusps*sizeof(c_CuspData))
 *         if cusps:             # <<<<<<<<<<<<<<
 *             for i in range(tri_data.num_or_cusps):
 *                 cusps[i].topology = torus_cusp
 */
    __pyx_t_2 = (__pyx_v_cusps != 0);
    if (likely(__pyx_t_2)) {

      /* "cython/core/pickle.pyx":352
 *         cusps = <c_CuspData*>malloc(num_cusps*sizeof(c_CuspData))
 *         if cusps:
 *             for i in range(tri_data.num_or_cusps):             # <<<<<<<<<<<<<<
 *                 cusps[i].topology = torus_cusp
 *                 cusps[i].m = <Real>0.0
 */
      __pyx_t_11 = __pyx_v_tri_data.num_or_cusps;
      __pyx_t_16 = __pyx_t_11;
      for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) {
        __pyx_v_i = __pyx_t_17;

        /* "cython/core/pickle.pyx":353
 *         if cusps:
 *             for i in range(tri_data.num_or_cusps):
 *                 cusps[i].topology = torus_cusp             # <<<<<<<<<<<<<<
 *                 cusps[i].m = <Real>0.0
 *                 cusps[i].l = <Real>0.0
 */
        (__pyx_v_cusps[__pyx_v_i]).topology = torus_cusp;

        /* "cython/core/pickle.pyx":354
 *             for i in range(tri_data.num_or_cusps):
 *                 cusps[i].topology = torus_cusp
 *                 cusps[i].m = <Real>0.0             # <<<<<<<<<<<<<<
 *                 cusps[i].l = <Real>0.0
 *             for i in range(tri_data.num_or_cusps, num_cusps):
 */
        (__pyx_v_cusps[__pyx_v_i]).m = ((__pyx_t_6SnapPy_Real)0.0);

        /* "cython/core/pickle.pyx":355
 *                 cusps[i].topology = torus_cusp
 *                 cusps[i].m = <Real>0.0
 *                 cusps[i].l = <Real>0.0             # <<<<<<<<<<<<<<
 *             for i in range(tri_data.num_or_cusps, num_cusps):
 *                 cusps[i].topology = Klein_cusp
 */
        (__pyx_v_cusps[__pyx_v_i]).l = ((__pyx_t_6SnapPy_Real)0.0);
      }

      /* "cython/core/pickle.pyx":356
 *                 cusps[i].m = <Real>0.0
 *                 cusps[i].l = <Real>0.0
 *             for i in range(tri_data.num_or_cusps, num_cusps):             # <<<<<<<<<<<<<<
 *                 cusps[i].topology = Klein_cusp
 *                 cusps[i].m = <Real>0.0
 */
      __pyx_t_11 = __pyx_v_num_cusps;
      __pyx_t_16 = __pyx_t_11;
      for (__pyx_t_17 = __pyx_v_tri_data.num_or_cusps; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) {
        __pyx_v_i = __pyx_t_17;

        /* "cython/core/pickle.pyx":357
 *                 cusps[i].l = <Real>0.0
 *             for i in range(tri_data.num_or_cusps, num_cusps):
 *                 cusps[i].topology = Klein_cusp             # <<<<<<<<<<<<<<
 *                 cusps[i].m = <Real>0.0
 *                 cusps[i].l = <Real>0.0
 */
        (__pyx_v_cusps[__pyx_v_i]).topology = Klein_cusp;

        /* "cython/core/pickle.pyx":358
 *             for i in range(tri_data.num_or_cusps, num_cusps):
 *                 cusps[i].topology = Klein_cusp
 *                 cusps[i].m = <Real>0.0             # <<<<<<<<<<<<<<
 *                 cusps[i].l = <Real>0.0
 *         else:
 */
        (__pyx_v_cusps[__pyx_v_i]).m = ((__pyx_t_6SnapPy_Real)0.0);

        /* "cython/core/pickle.pyx":359
 *                 cusps[i].topology = Klein_cusp
 *                 cusps[i].m = <Real>0.0
 *                 cusps[i].l = <Real>0.0             # <<<<<<<<<<<<<<
 *         else:
 *             raise RuntimeError('Failed to allocate memory for cusps')
 */
        (__pyx_v_cusps[__pyx_v_i]).l = ((__pyx_t_6SnapPy_Real)0.0);
      }

      /* "cython/core/pickle.pyx":351
 *         # data.  We free the memory before returning.
 *         cusps = <c_CuspData*>malloc(num_cusps*sizeof(c_CuspData))
 *         if cusps:             # <<<<<<<<<<<<<<
 *             for i in range(tri_data.num_or_cusps):
 *                 cusps[i].topology = torus_cusp
 */
      goto __pyx_L25;
    }

    /* "cython/core/pickle.pyx":361
 *                 cusps[i].l = <Real>0.0
 *         else:
 *             raise RuntimeError('Failed to allocate memory for cusps')             # <<<<<<<<<<<<<<
 *     tri_data.cusp_data = cusps
 * 
 */
    /*else*/ {
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__145, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 361, __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(12, 361, __pyx_L1_error)
    }
    __pyx_L25:;

    /* "cython/core/pickle.pyx":347
 * 
 *     num_cusps = tri_data.num_or_cusps + tri_data.num_nonor_cusps
 *     if num_cusps > 0:             # <<<<<<<<<<<<<<
 *         # Use malloc (not mymalloc) to allocate memory for the cusp
 *         # data.  We free the memory before returning.
 */
  }

  /* "cython/core/pickle.pyx":362
 *         else:
 *             raise RuntimeError('Failed to allocate memory for cusps')
 *     tri_data.cusp_data = cusps             # <<<<<<<<<<<<<<
 * 
 *     if peripheral_curves is None:
 */
  __pyx_v_tri_data.cusp_data = __pyx_v_cusps;

  /* "cython/core/pickle.pyx":364
 *     tri_data.cusp_data = cusps
 * 
 *     if peripheral_curves is None:             # <<<<<<<<<<<<<<
 *         peripheral_curves = (4*num_tets)*[16*[0]]
 * 
 */
  __pyx_t_2 = (__pyx_v_peripheral_curves == Py_None);
  if (__pyx_t_2) {

    /* "cython/core/pickle.pyx":365
 * 
 *     if peripheral_curves is None:
 *         peripheral_curves = (4*num_tets)*[16*[0]]             # <<<<<<<<<<<<<<
 * 
 *     # Use malloc (not mymalloc) to allocate memory for the tetrahedra
 */
    __pyx_t_3 = PyList_New(1 * 16); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    { Py_ssize_t __pyx_temp;
      for (__pyx_temp=0; __pyx_temp < 16; __pyx_temp++) {
        __Pyx_INCREF(__pyx_int_0);
        __Pyx_GIVEREF(__pyx_int_0);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_int_0)) __PYX_ERR(12, 365, __pyx_L1_error);
      }
    }
    __pyx_t_18 = (4 * __pyx_v_num_tets);
    __pyx_t_8 = PyList_New(1 * ((__pyx_t_18<0) ? 0:__pyx_t_18)); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    { Py_ssize_t __pyx_temp;
      for (__pyx_temp=0; __pyx_temp < __pyx_t_18; __pyx_temp++) {
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_8, __pyx_temp, __pyx_t_3)) __PYX_ERR(12, 365, __pyx_L1_error);
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_peripheral_curves, __pyx_t_8);
    __pyx_t_8 = 0;

    /* "cython/core/pickle.pyx":364
 *     tri_data.cusp_data = cusps
 * 
 *     if peripheral_curves is None:             # <<<<<<<<<<<<<<
 *         peripheral_curves = (4*num_tets)*[16*[0]]
 * 
 */
  }

  /* "cython/core/pickle.pyx":369
 *     # Use malloc (not mymalloc) to allocate memory for the tetrahedra
 *     # data.  We free the memory before returning.
 *     tets = <c_TetrahedronData*>malloc(num_tets*sizeof(c_TetrahedronData))             # <<<<<<<<<<<<<<
 *     if tets == NULL:
 *         raise RuntimeError('Failed to allocate memory for tets.')
 */
  __pyx_v_tets = ((TetrahedronData *)malloc((__pyx_v_num_tets * (sizeof(TetrahedronData)))));

  /* "cython/core/pickle.pyx":370
 *     # data.  We free the memory before returning.
 *     tets = <c_TetrahedronData*>malloc(num_tets*sizeof(c_TetrahedronData))
 *     if tets == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError('Failed to allocate memory for tets.')
 *     tri_data.tetrahedron_data = tets
 */
  __pyx_t_2 = (__pyx_v_tets == NULL);
  if (unlikely(__pyx_t_2)) {

    /* "cython/core/pickle.pyx":371
 *     tets = <c_TetrahedronData*>malloc(num_tets*sizeof(c_TetrahedronData))
 *     if tets == NULL:
 *         raise RuntimeError('Failed to allocate memory for tets.')             # <<<<<<<<<<<<<<
 *     tri_data.tetrahedron_data = tets
 * 
 */
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__146, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 371, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_Raise(__pyx_t_8, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __PYX_ERR(12, 371, __pyx_L1_error)

    /* "cython/core/pickle.pyx":370
 *     # data.  We free the memory before returning.
 *     tets = <c_TetrahedronData*>malloc(num_tets*sizeof(c_TetrahedronData))
 *     if tets == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError('Failed to allocate memory for tets.')
 *     tri_data.tetrahedron_data = tets
 */
  }

  /* "cython/core/pickle.pyx":372
 *     if tets == NULL:
 *         raise RuntimeError('Failed to allocate memory for tets.')
 *     tri_data.tetrahedron_data = tets             # <<<<<<<<<<<<<<
 * 
 *     for t, (neighbors, gluings) in enumerate(listlike):
 */
  __pyx_v_tri_data.tetrahedron_data = __pyx_v_tets;

  /* "cython/core/pickle.pyx":374
 *     tri_data.tetrahedron_data = tets
 * 
 *     for t, (neighbors, gluings) in enumerate(listlike):             # <<<<<<<<<<<<<<
 *         for i in range(4):
 *             tets[t].neighbor_index[i] = neighbors[i]
 */
  __pyx_t_11 = 0;
  if (likely(PyList_CheckExact(__pyx_v_listlike)) || PyTuple_CheckExact(__pyx_v_listlike)) {
    __pyx_t_8 = __pyx_v_listlike; __Pyx_INCREF(__pyx_t_8);
    __pyx_t_1 = 0;
    __pyx_t_13 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_listlike); if (unlikely(!__pyx_t_8)) __PYX_ERR(12, 374, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8); if (unlikely(!__pyx_t_13)) __PYX_ERR(12, 374, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_13)) {
      if (likely(PyList_CheckExact(__pyx_t_8))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_8);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(12, 374, __pyx_L1_error)
          #endif
          if (__pyx_t_1 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(12, 374, __pyx_L1_error)
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 374, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_8);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(12, 374, __pyx_L1_error)
          #endif
          if (__pyx_t_1 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(12, 374, __pyx_L1_error)
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_8, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 374, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_13(__pyx_t_8);
      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(12, 374, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    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(12, 374, __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(12, 374, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 374, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_19 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_19)) __PYX_ERR(12, 374, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_19);
      index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_19); if (unlikely(!__pyx_t_7)) goto __pyx_L34_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_9 = __pyx_t_10(__pyx_t_19); if (unlikely(!__pyx_t_9)) goto __pyx_L34_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_19), 2) < 0) __PYX_ERR(12, 374, __pyx_L1_error)
      __pyx_t_10 = NULL;
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      goto __pyx_L35_unpacking_done;
      __pyx_L34_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
      __pyx_t_10 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(12, 374, __pyx_L1_error)
      __pyx_L35_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_neighbors, __pyx_t_7);
    __pyx_t_7 = 0;
    __Pyx_XDECREF_SET(__pyx_v_gluings, __pyx_t_9);
    __pyx_t_9 = 0;
    __pyx_v_t = __pyx_t_11;
    __pyx_t_11 = (__pyx_t_11 + 1);

    /* "cython/core/pickle.pyx":375
 * 
 *     for t, (neighbors, gluings) in enumerate(listlike):
 *         for i in range(4):             # <<<<<<<<<<<<<<
 *             tets[t].neighbor_index[i] = neighbors[i]
 *             for j in range(4):
 */
    for (__pyx_t_16 = 0; __pyx_t_16 < 4; __pyx_t_16+=1) {
      __pyx_v_i = __pyx_t_16;

      /* "cython/core/pickle.pyx":376
 *     for t, (neighbors, gluings) in enumerate(listlike):
 *         for i in range(4):
 *             tets[t].neighbor_index[i] = neighbors[i]             # <<<<<<<<<<<<<<
 *             for j in range(4):
 *                 tets[t].gluing[i][j] = gluings[i][j]
 */
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_neighbors, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 376, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 376, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      ((__pyx_v_tets[__pyx_v_t]).neighbor_index[__pyx_v_i]) = __pyx_t_17;

      /* "cython/core/pickle.pyx":377
 *         for i in range(4):
 *             tets[t].neighbor_index[i] = neighbors[i]
 *             for j in range(4):             # <<<<<<<<<<<<<<
 *                 tets[t].gluing[i][j] = gluings[i][j]
 *             if cusp_indices:
 */
      for (__pyx_t_17 = 0; __pyx_t_17 < 4; __pyx_t_17+=1) {
        __pyx_v_j = __pyx_t_17;

        /* "cython/core/pickle.pyx":378
 *             tets[t].neighbor_index[i] = neighbors[i]
 *             for j in range(4):
 *                 tets[t].gluing[i][j] = gluings[i][j]             # <<<<<<<<<<<<<<
 *             if cusp_indices:
 *                 tets[t].cusp_index[i] = cusp_indices[t][i]
 */
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_gluings, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 378, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_j, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 378, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 378, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        (((__pyx_v_tets[__pyx_v_t]).gluing[__pyx_v_i])[__pyx_v_j]) = __pyx_t_20;
      }

      /* "cython/core/pickle.pyx":379
 *             for j in range(4):
 *                 tets[t].gluing[i][j] = gluings[i][j]
 *             if cusp_indices:             # <<<<<<<<<<<<<<
 *                 tets[t].cusp_index[i] = cusp_indices[t][i]
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_cusp_indices); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(12, 379, __pyx_L1_error)
      if (__pyx_t_2) {

        /* "cython/core/pickle.pyx":380
 *                 tets[t].gluing[i][j] = gluings[i][j]
 *             if cusp_indices:
 *                 tets[t].cusp_index[i] = cusp_indices[t][i]             # <<<<<<<<<<<<<<
 * 
 *         if cusp_indices:
 */
        __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_cusp_indices, __pyx_v_t, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 380, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_9, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 380, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 380, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        ((__pyx_v_tets[__pyx_v_t]).cusp_index[__pyx_v_i]) = __pyx_t_17;

        /* "cython/core/pickle.pyx":379
 *             for j in range(4):
 *                 tets[t].gluing[i][j] = gluings[i][j]
 *             if cusp_indices:             # <<<<<<<<<<<<<<
 *                 tets[t].cusp_index[i] = cusp_indices[t][i]
 * 
 */
      }
    }

    /* "cython/core/pickle.pyx":382
 *                 tets[t].cusp_index[i] = cusp_indices[t][i]
 * 
 *         if cusp_indices:             # <<<<<<<<<<<<<<
 *             for a in range(2):
 *                 for b in range(2):
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_cusp_indices); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(12, 382, __pyx_L1_error)
    if (__pyx_t_2) {

      /* "cython/core/pickle.pyx":383
 * 
 *         if cusp_indices:
 *             for a in range(2):             # <<<<<<<<<<<<<<
 *                 for b in range(2):
 *                     for v in range(4):
 */
      for (__pyx_t_16 = 0; __pyx_t_16 < 2; __pyx_t_16+=1) {
        __pyx_v_a = __pyx_t_16;

        /* "cython/core/pickle.pyx":384
 *         if cusp_indices:
 *             for a in range(2):
 *                 for b in range(2):             # <<<<<<<<<<<<<<
 *                     for v in range(4):
 *                         for f in range(4):
 */
        for (__pyx_t_17 = 0; __pyx_t_17 < 2; __pyx_t_17+=1) {
          __pyx_v_b = __pyx_t_17;

          /* "cython/core/pickle.pyx":385
 *             for a in range(2):
 *                 for b in range(2):
 *                     for v in range(4):             # <<<<<<<<<<<<<<
 *                         for f in range(4):
 *                             tets[t].curve[a][b][v][f] = peripheral_curves[4*t + 2*a + b][4*v + f]
 */
          for (__pyx_t_20 = 0; __pyx_t_20 < 4; __pyx_t_20+=1) {
            __pyx_v_v = __pyx_t_20;

            /* "cython/core/pickle.pyx":386
 *                 for b in range(2):
 *                     for v in range(4):
 *                         for f in range(4):             # <<<<<<<<<<<<<<
 *                             tets[t].curve[a][b][v][f] = peripheral_curves[4*t + 2*a + b][4*v + f]
 * 
 */
            for (__pyx_t_21 = 0; __pyx_t_21 < 4; __pyx_t_21+=1) {
              __pyx_v_f = __pyx_t_21;

              /* "cython/core/pickle.pyx":387
 *                     for v in range(4):
 *                         for f in range(4):
 *                             tets[t].curve[a][b][v][f] = peripheral_curves[4*t + 2*a + b][4*v + f]             # <<<<<<<<<<<<<<
 * 
 *     data_to_triangulation(&tri_data, &tri)
 */
              __pyx_t_18 = (((4 * __pyx_v_t) + (2 * __pyx_v_a)) + __pyx_v_b);
              __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_peripheral_curves, __pyx_t_18, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(12, 387, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_18 = ((4 * __pyx_v_v) + __pyx_v_f);
              __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_3, __pyx_t_18, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(12, 387, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_22 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_22 == (int)-1) && PyErr_Occurred())) __PYX_ERR(12, 387, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              (((((__pyx_v_tets[__pyx_v_t]).curve[__pyx_v_a])[__pyx_v_b])[__pyx_v_v])[__pyx_v_f]) = __pyx_t_22;
            }
          }
        }
      }

      /* "cython/core/pickle.pyx":382
 *                 tets[t].cusp_index[i] = cusp_indices[t][i]
 * 
 *         if cusp_indices:             # <<<<<<<<<<<<<<
 *             for a in range(2):
 *                 for b in range(2):
 */
    }

    /* "cython/core/pickle.pyx":374
 *     tri_data.tetrahedron_data = tets
 * 
 *     for t, (neighbors, gluings) in enumerate(listlike):             # <<<<<<<<<<<<<<
 *         for i in range(4):
 *             tets[t].neighbor_index[i] = neighbors[i]
 */
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "cython/core/pickle.pyx":389
 *                             tets[t].curve[a][b][v][f] = peripheral_curves[4*t + 2*a + b][4*v + f]
 * 
 *     data_to_triangulation(&tri_data, &tri)             # <<<<<<<<<<<<<<
 *     free(tets)
 *     if cusps:
 */
  data_to_triangulation((&__pyx_v_tri_data), (&__pyx_v_tri)); if (unlikely(PyErr_Occurred())) __PYX_ERR(12, 389, __pyx_L1_error)

  /* "cython/core/pickle.pyx":390
 * 
 *     data_to_triangulation(&tri_data, &tri)
 *     free(tets)             # <<<<<<<<<<<<<<
 *     if cusps:
 *         free(cusps)
 */
  free(__pyx_v_tets);

  /* "cython/core/pickle.pyx":391
 *     data_to_triangulation(&tri_data, &tri)
 *     free(tets)
 *     if cusps:             # <<<<<<<<<<<<<<
 *         free(cusps)
 *     return tri
 */
  __pyx_t_2 = (__pyx_v_cusps != 0);
  if (__pyx_t_2) {

    /* "cython/core/pickle.pyx":392
 *     free(tets)
 *     if cusps:
 *         free(cusps)             # <<<<<<<<<<<<<<
 *     return tri
 */
    free(__pyx_v_cusps);

    /* "cython/core/pickle.pyx":391
 *     data_to_triangulation(&tri_data, &tri)
 *     free(tets)
 *     if cusps:             # <<<<<<<<<<<<<<
 *         free(cusps)
 *     return tri
 */
  }

  /* "cython/core/pickle.pyx":393
 *     if cusps:
 *         free(cusps)
 *     return tri             # <<<<<<<<<<<<<<
 */
  __pyx_r = __pyx_v_tri;
  goto __pyx_L0;

  /* "cython/core/pickle.pyx":312
 * 
 * 
 * cdef c_Triangulation* listlike_to_triangulation(listlike,             # <<<<<<<<<<<<<<
 *                                                 num_or_cusps=0,
 *                                                 num_nonor_cusps=0,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_AddTraceback("SnapPy.listlike_to_triangulation", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_first0);
  __Pyx_XDECREF(__pyx_v_first1);
  __Pyx_XDECREF(__pyx_v_py_name);
  __Pyx_XDECREF(__pyx_v_neighbors);
  __Pyx_XDECREF(__pyx_v_gluings);
  __Pyx_XDECREF(__pyx_9genexpr94__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_peripheral_curves);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":29
 * 
 * 
 * def bundle_from_string(desc):             # <<<<<<<<<<<<<<
 *     desc = desc.replace(' ', '')
 *     m = is_twister_bundle.match(desc)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_47bundle_from_string(PyObject *__pyx_self, 
#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_6SnapPy_46bundle_from_string, "bundle_from_string(desc)");
static PyMethodDef __pyx_mdef_6SnapPy_47bundle_from_string = {"bundle_from_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_47bundle_from_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_46bundle_from_string};
static PyObject *__pyx_pw_6SnapPy_47bundle_from_string(PyObject *__pyx_self, 
#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_desc = 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("bundle_from_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);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_desc,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_desc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 29, __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, "bundle_from_string") < 0)) __PYX_ERR(2, 29, __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_desc = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bundle_from_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 29, __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("SnapPy.bundle_from_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_46bundle_from_string(__pyx_self, __pyx_v_desc);

  /* 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_6SnapPy_46bundle_from_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_desc) {
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_v_g = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_monodromy = NULL;
  PyObject *__pyx_v_surface = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bundle_from_string", 0);
  __Pyx_INCREF(__pyx_v_desc);

  /* "cython/core/tail.pyx":30
 * 
 * def bundle_from_string(desc):
 *     desc = desc.replace(' ', '')             # <<<<<<<<<<<<<<
 *     m = is_twister_bundle.match(desc)
 *     if m:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_desc, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":31
 * def bundle_from_string(desc):
 *     desc = desc.replace(' ', '')
 *     m = is_twister_bundle.match(desc)             # <<<<<<<<<<<<<<
 *     if m:
 *         g, n, monodromy = m.groups()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_twister_bundle); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_match); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 31, __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_desc};
    __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(2, 31, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_m = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":32
 *     desc = desc.replace(' ', '')
 *     m = is_twister_bundle.match(desc)
 *     if m:             # <<<<<<<<<<<<<<
 *         g, n, monodromy = m.groups()
 *         g, n = int(g), int(n)
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_m); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(2, 32, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "cython/core/tail.pyx":33
 *     m = is_twister_bundle.match(desc)
 *     if m:
 *         g, n, monodromy = m.groups()             # <<<<<<<<<<<<<<
 *         g, n = int(g), int(n)
 *         monodromy = monodromy.replace(',', '*').replace('_', '')
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_groups); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 33, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(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, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 33, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 3)) {
        if (size > 3) __Pyx_RaiseTooManyValuesError(3);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(2, 33, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 33, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 33, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 33, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 33, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
      index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 2; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 3) < 0) __PYX_ERR(2, 33, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(2, 33, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    __pyx_v_g = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_v_n = __pyx_t_1;
    __pyx_t_1 = 0;
    __pyx_v_monodromy = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "cython/core/tail.pyx":34
 *     if m:
 *         g, n, monodromy = m.groups()
 *         g, n = int(g), int(n)             # <<<<<<<<<<<<<<
 *         monodromy = monodromy.replace(',', '*').replace('_', '')
 *         surface = twister.Surface((g, n))
 */
    __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_g); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_v_n); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF_SET(__pyx_v_g, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "cython/core/tail.pyx":35
 *         g, n, monodromy = m.groups()
 *         g, n = int(g), int(n)
 *         monodromy = monodromy.replace(',', '*').replace('_', '')             # <<<<<<<<<<<<<<
 *         surface = twister.Surface((g, n))
 *         return surface.bundle(monodromy, return_type='string')
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_monodromy, __pyx_n_s_replace); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 35, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__149, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 35, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_replace); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 35, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__151, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 35, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF_SET(__pyx_v_monodromy, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":36
 *         g, n = int(g), int(n)
 *         monodromy = monodromy.replace(',', '*').replace('_', '')
 *         surface = twister.Surface((g, n))             # <<<<<<<<<<<<<<
 *         return surface.bundle(monodromy, return_type='string')
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_twister); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 36, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Surface); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 36, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 36, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_g);
    __Pyx_GIVEREF(__pyx_v_g);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_g)) __PYX_ERR(2, 36, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_n)) __PYX_ERR(2, 36, __pyx_L1_error);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(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_t_6};
      __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;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 36, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_v_surface = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":37
 *         monodromy = monodromy.replace(',', '*').replace('_', '')
 *         surface = twister.Surface((g, n))
 *         return surface.bundle(monodromy, return_type='string')             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_bundle); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 37, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 37, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_monodromy);
    __Pyx_GIVEREF(__pyx_v_monodromy);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_monodromy)) __PYX_ERR(2, 37, __pyx_L1_error);
    __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 37, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return_type, __pyx_n_s_string) < 0) __PYX_ERR(2, 37, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 37, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cython/core/tail.pyx":32
 *     desc = desc.replace(' ', '')
 *     m = is_twister_bundle.match(desc)
 *     if m:             # <<<<<<<<<<<<<<
 *         g, n, monodromy = m.groups()
 *         g, n = int(g), int(n)
 */
  }

  /* "cython/core/tail.pyx":29
 * 
 * 
 * def bundle_from_string(desc):             # <<<<<<<<<<<<<<
 *     desc = desc.replace(' ', '')
 *     m = is_twister_bundle.match(desc)
 */

  /* 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_AddTraceback("SnapPy.bundle_from_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_v_g);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_monodromy);
  __Pyx_XDECREF(__pyx_v_surface);
  __Pyx_XDECREF(__pyx_v_desc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":40
 * 
 * 
 * def splitting_from_string(desc):             # <<<<<<<<<<<<<<
 *     desc = desc.replace(' ', '')
 *     m = is_twister_splitting.match(desc)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_49splitting_from_string(PyObject *__pyx_self, 
#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_6SnapPy_48splitting_from_string, "splitting_from_string(desc)");
static PyMethodDef __pyx_mdef_6SnapPy_49splitting_from_string = {"splitting_from_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_49splitting_from_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_48splitting_from_string};
static PyObject *__pyx_pw_6SnapPy_49splitting_from_string(PyObject *__pyx_self, 
#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_desc = 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("splitting_from_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);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_desc,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_desc)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 40, __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, "splitting_from_string") < 0)) __PYX_ERR(2, 40, __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_desc = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("splitting_from_string", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 40, __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("SnapPy.splitting_from_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_48splitting_from_string(__pyx_self, __pyx_v_desc);

  /* 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_6SnapPy_48splitting_from_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_desc) {
  PyObject *__pyx_v_m = NULL;
  PyObject *__pyx_v_g = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_gluing = NULL;
  PyObject *__pyx_v_handles = NULL;
  PyObject *__pyx_v_surface = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("splitting_from_string", 0);
  __Pyx_INCREF(__pyx_v_desc);

  /* "cython/core/tail.pyx":41
 * 
 * def splitting_from_string(desc):
 *     desc = desc.replace(' ', '')             # <<<<<<<<<<<<<<
 *     m = is_twister_splitting.match(desc)
 *     if m:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_desc, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_desc, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":42
 * def splitting_from_string(desc):
 *     desc = desc.replace(' ', '')
 *     m = is_twister_splitting.match(desc)             # <<<<<<<<<<<<<<
 *     if m:
 *         g, n, gluing, handles = m.groups()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_is_twister_splitting); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_match); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 42, __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_desc};
    __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(2, 42, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_m = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":43
 *     desc = desc.replace(' ', '')
 *     m = is_twister_splitting.match(desc)
 *     if m:             # <<<<<<<<<<<<<<
 *         g, n, gluing, handles = m.groups()
 *         g, n = int(g), int(n)
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_m); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(2, 43, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "cython/core/tail.pyx":44
 *     m = is_twister_splitting.match(desc)
 *     if m:
 *         g, n, gluing, handles = m.groups()             # <<<<<<<<<<<<<<
 *         g, n = int(g), int(n)
 *         gluing = gluing.replace(',', '*').replace('_', '')
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_groups); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 44, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(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, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 44, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 4)) {
        if (size > 4) __Pyx_RaiseTooManyValuesError(4);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(2, 44, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 2); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 3); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      #else
      {
        Py_ssize_t i;
        PyObject** temps[4] = {&__pyx_t_3,&__pyx_t_1,&__pyx_t_6,&__pyx_t_7};
        for (i=0; i < 4; i++) {
          PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(2, 44, __pyx_L1_error)
          __Pyx_GOTREF(item);
          *(temps[i]) = item;
        }
      }
      #endif
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      PyObject** temps[4] = {&__pyx_t_3,&__pyx_t_1,&__pyx_t_6,&__pyx_t_7};
      __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 44, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_8);
      for (index=0; index < 4; index++) {
        PyObject* item = __pyx_t_9(__pyx_t_8); if (unlikely(!item)) goto __pyx_L4_unpacking_failed;
        __Pyx_GOTREF(item);
        *(temps[index]) = item;
      }
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 4) < 0) __PYX_ERR(2, 44, __pyx_L1_error)
      __pyx_t_9 = NULL;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(2, 44, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    __pyx_v_g = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_v_n = __pyx_t_1;
    __pyx_t_1 = 0;
    __pyx_v_gluing = __pyx_t_6;
    __pyx_t_6 = 0;
    __pyx_v_handles = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "cython/core/tail.pyx":45
 *     if m:
 *         g, n, gluing, handles = m.groups()
 *         g, n = int(g), int(n)             # <<<<<<<<<<<<<<
 *         gluing = gluing.replace(',', '*').replace('_', '')
 *         handles = handles.replace(',', '*').replace('_', '')
 */
    __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_g); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_v_n); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF_SET(__pyx_v_g, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "cython/core/tail.pyx":46
 *         g, n, gluing, handles = m.groups()
 *         g, n = int(g), int(n)
 *         gluing = gluing.replace(',', '*').replace('_', '')             # <<<<<<<<<<<<<<
 *         handles = handles.replace(',', '*').replace('_', '')
 *         surface = twister.Surface((g, n))
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_gluing, __pyx_n_s_replace); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 46, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__149, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 46, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_replace); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 46, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__151, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 46, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF_SET(__pyx_v_gluing, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":47
 *         g, n = int(g), int(n)
 *         gluing = gluing.replace(',', '*').replace('_', '')
 *         handles = handles.replace(',', '*').replace('_', '')             # <<<<<<<<<<<<<<
 *         surface = twister.Surface((g, n))
 *         return surface.splitting(gluing, handles, return_type='string')
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_handles, __pyx_n_s_replace); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__149, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 47, __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_replace); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__151, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_handles, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "cython/core/tail.pyx":48
 *         gluing = gluing.replace(',', '*').replace('_', '')
 *         handles = handles.replace(',', '*').replace('_', '')
 *         surface = twister.Surface((g, n))             # <<<<<<<<<<<<<<
 *         return surface.splitting(gluing, handles, return_type='string')
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_twister); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Surface); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 48, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_g);
    __Pyx_GIVEREF(__pyx_v_g);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_g)) __PYX_ERR(2, 48, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_n);
    __Pyx_GIVEREF(__pyx_v_n);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_n)) __PYX_ERR(2, 48, __pyx_L1_error);
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_2};
      __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 48, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __pyx_v_surface = __pyx_t_7;
    __pyx_t_7 = 0;

    /* "cython/core/tail.pyx":49
 *         handles = handles.replace(',', '*').replace('_', '')
 *         surface = twister.Surface((g, n))
 *         return surface.splitting(gluing, handles, return_type='string')             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_surface, __pyx_n_s_splitting); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 49, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 49, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_v_gluing);
    __Pyx_GIVEREF(__pyx_v_gluing);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_gluing)) __PYX_ERR(2, 49, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_handles);
    __Pyx_GIVEREF(__pyx_v_handles);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_handles)) __PYX_ERR(2, 49, __pyx_L1_error);
    __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 49, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return_type, __pyx_n_s_string) < 0) __PYX_ERR(2, 49, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 49, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cython/core/tail.pyx":43
 *     desc = desc.replace(' ', '')
 *     m = is_twister_splitting.match(desc)
 *     if m:             # <<<<<<<<<<<<<<
 *         g, n, gluing, handles = m.groups()
 *         g, n = int(g), int(n)
 */
  }

  /* "cython/core/tail.pyx":40
 * 
 * 
 * def splitting_from_string(desc):             # <<<<<<<<<<<<<<
 *     desc = desc.replace(' ', '')
 *     m = is_twister_splitting.match(desc)
 */

  /* 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("SnapPy.splitting_from_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_v_g);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_gluing);
  __Pyx_XDECREF(__pyx_v_handles);
  __Pyx_XDECREF(__pyx_v_surface);
  __Pyx_XDECREF(__pyx_v_desc);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":65
 *     """
 * 
 * cdef c_Triangulation* triangulation_from_bytes(bytestring) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef c_Triangulation* c_triangulation = NULL
 *     cdef TerseTriangulation c_terse
 */

static Triangulation *__pyx_f_6SnapPy_triangulation_from_bytes(PyObject *__pyx_v_bytestring) {
  Triangulation *__pyx_v_c_triangulation;
  TerseTriangulation __pyx_v_c_terse;
  int __pyx_v_N;
  int __pyx_v_n;
  int __pyx_v_m;
  PyObject *__pyx_v_byteseq = NULL;
  PyObject *__pyx_v_bit = NULL;
  Triangulation *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  long __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Triangulation *__pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("triangulation_from_bytes", 1);

  /* "cython/core/tail.pyx":66
 * 
 * cdef c_Triangulation* triangulation_from_bytes(bytestring) except ? NULL:
 *     cdef c_Triangulation* c_triangulation = NULL             # <<<<<<<<<<<<<<
 *     cdef TerseTriangulation c_terse
 *     cdef int N=0, n=0, m=1
 */
  __pyx_v_c_triangulation = NULL;

  /* "cython/core/tail.pyx":68
 *     cdef c_Triangulation* c_triangulation = NULL
 *     cdef TerseTriangulation c_terse
 *     cdef int N=0, n=0, m=1             # <<<<<<<<<<<<<<
 *     byteseq = bytearray(bytestring)
 *     c_terse.num_tetrahedra = N = byteseq[0]
 */
  __pyx_v_N = 0;
  __pyx_v_n = 0;
  __pyx_v_m = 1;

  /* "cython/core/tail.pyx":69
 *     cdef TerseTriangulation c_terse
 *     cdef int N=0, n=0, m=1
 *     byteseq = bytearray(bytestring)             # <<<<<<<<<<<<<<
 *     c_terse.num_tetrahedra = N = byteseq[0]
 *     c_terse.glues_to_old_tet = <Boolean*>malloc(2*N*sizeof(Boolean))
 */
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyByteArray_Type)), __pyx_v_bytestring); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_byteseq = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/tail.pyx":70
 *     cdef int N=0, n=0, m=1
 *     byteseq = bytearray(bytestring)
 *     c_terse.num_tetrahedra = N = byteseq[0]             # <<<<<<<<<<<<<<
 *     c_terse.glues_to_old_tet = <Boolean*>malloc(2*N*sizeof(Boolean))
 *     c_terse.which_old_tet = <int*>malloc((N+1)*sizeof(int))
 */
  __pyx_t_2 = __Pyx_GetItemInt_ByteArray(__pyx_v_byteseq, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(2, 70, __pyx_L1_error)
  __pyx_v_c_terse.num_tetrahedra = __pyx_t_2;
  __pyx_v_N = __pyx_t_2;

  /* "cython/core/tail.pyx":71
 *     byteseq = bytearray(bytestring)
 *     c_terse.num_tetrahedra = N = byteseq[0]
 *     c_terse.glues_to_old_tet = <Boolean*>malloc(2*N*sizeof(Boolean))             # <<<<<<<<<<<<<<
 *     c_terse.which_old_tet = <int*>malloc((N+1)*sizeof(int))
 *     c_terse.which_gluing = <Permutation*>malloc((N+1)*sizeof(Permutation))
 */
  __pyx_v_c_terse.glues_to_old_tet = ((Boolean *)malloc(((2 * __pyx_v_N) * (sizeof(Boolean)))));

  /* "cython/core/tail.pyx":72
 *     c_terse.num_tetrahedra = N = byteseq[0]
 *     c_terse.glues_to_old_tet = <Boolean*>malloc(2*N*sizeof(Boolean))
 *     c_terse.which_old_tet = <int*>malloc((N+1)*sizeof(int))             # <<<<<<<<<<<<<<
 *     c_terse.which_gluing = <Permutation*>malloc((N+1)*sizeof(Permutation))
 *     bit = 0
 */
  __pyx_v_c_terse.which_old_tet = ((int *)malloc(((__pyx_v_N + 1) * (sizeof(int)))));

  /* "cython/core/tail.pyx":73
 *     c_terse.glues_to_old_tet = <Boolean*>malloc(2*N*sizeof(Boolean))
 *     c_terse.which_old_tet = <int*>malloc((N+1)*sizeof(int))
 *     c_terse.which_gluing = <Permutation*>malloc((N+1)*sizeof(Permutation))             # <<<<<<<<<<<<<<
 *     bit = 0
 *     for n from 0 <= n < 2*N:
 */
  __pyx_v_c_terse.which_gluing = ((Permutation *)malloc(((__pyx_v_N + 1) * (sizeof(Permutation)))));

  /* "cython/core/tail.pyx":74
 *     c_terse.which_old_tet = <int*>malloc((N+1)*sizeof(int))
 *     c_terse.which_gluing = <Permutation*>malloc((N+1)*sizeof(Permutation))
 *     bit = 0             # <<<<<<<<<<<<<<
 *     for n from 0 <= n < 2*N:
 *         if byteseq[m] & (1 << bit):
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_bit = __pyx_int_0;

  /* "cython/core/tail.pyx":75
 *     c_terse.which_gluing = <Permutation*>malloc((N+1)*sizeof(Permutation))
 *     bit = 0
 *     for n from 0 <= n < 2*N:             # <<<<<<<<<<<<<<
 *         if byteseq[m] & (1 << bit):
 *             c_terse.glues_to_old_tet[n] = 1
 */
  __pyx_t_3 = (2 * __pyx_v_N);
  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_3; __pyx_v_n++) {

    /* "cython/core/tail.pyx":76
 *     bit = 0
 *     for n from 0 <= n < 2*N:
 *         if byteseq[m] & (1 << bit):             # <<<<<<<<<<<<<<
 *             c_terse.glues_to_old_tet[n] = 1
 *         else:
 */
    __pyx_t_2 = __Pyx_GetItemInt_ByteArray(__pyx_v_byteseq, __pyx_v_m, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(2, 76, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyNumber_Lshift(__pyx_int_1, __pyx_v_bit); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyNumber_And(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 76, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(2, 76, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {

      /* "cython/core/tail.pyx":77
 *     for n from 0 <= n < 2*N:
 *         if byteseq[m] & (1 << bit):
 *             c_terse.glues_to_old_tet[n] = 1             # <<<<<<<<<<<<<<
 *         else:
 *             c_terse.glues_to_old_tet[n] = 0
 */
      (__pyx_v_c_terse.glues_to_old_tet[__pyx_v_n]) = 1;

      /* "cython/core/tail.pyx":76
 *     bit = 0
 *     for n from 0 <= n < 2*N:
 *         if byteseq[m] & (1 << bit):             # <<<<<<<<<<<<<<
 *             c_terse.glues_to_old_tet[n] = 1
 *         else:
 */
      goto __pyx_L5;
    }

    /* "cython/core/tail.pyx":79
 *             c_terse.glues_to_old_tet[n] = 1
 *         else:
 *             c_terse.glues_to_old_tet[n] = 0             # <<<<<<<<<<<<<<
 *         bit += 1
 *         if bit % 8 == 0:
 */
    /*else*/ {
      (__pyx_v_c_terse.glues_to_old_tet[__pyx_v_n]) = 0;
    }
    __pyx_L5:;

    /* "cython/core/tail.pyx":80
 *         else:
 *             c_terse.glues_to_old_tet[n] = 0
 *         bit += 1             # <<<<<<<<<<<<<<
 *         if bit % 8 == 0:
 *             m += 1
 */
    __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_bit, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_bit, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cython/core/tail.pyx":81
 *             c_terse.glues_to_old_tet[n] = 0
 *         bit += 1
 *         if bit % 8 == 0:             # <<<<<<<<<<<<<<
 *             m += 1
 *             bit = 0
 */
    __pyx_t_5 = __Pyx_PyInt_RemainderObjC(__pyx_v_bit, __pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 81, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_5, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(2, 81, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_6) {

      /* "cython/core/tail.pyx":82
 *         bit += 1
 *         if bit % 8 == 0:
 *             m += 1             # <<<<<<<<<<<<<<
 *             bit = 0
 *     if bit:
 */
      __pyx_v_m = (__pyx_v_m + 1);

      /* "cython/core/tail.pyx":83
 *         if bit % 8 == 0:
 *             m += 1
 *             bit = 0             # <<<<<<<<<<<<<<
 *     if bit:
 *         m += 1
 */
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_DECREF_SET(__pyx_v_bit, __pyx_int_0);

      /* "cython/core/tail.pyx":81
 *             c_terse.glues_to_old_tet[n] = 0
 *         bit += 1
 *         if bit % 8 == 0:             # <<<<<<<<<<<<<<
 *             m += 1
 *             bit = 0
 */
    }
  }

  /* "cython/core/tail.pyx":84
 *             m += 1
 *             bit = 0
 *     if bit:             # <<<<<<<<<<<<<<
 *         m += 1
 *     for n from 0 <= n < 1 + N:
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_bit); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(2, 84, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "cython/core/tail.pyx":85
 *             bit = 0
 *     if bit:
 *         m += 1             # <<<<<<<<<<<<<<
 *     for n from 0 <= n < 1 + N:
 *         c_terse.which_old_tet[n] = int(byteseq[m])
 */
    __pyx_v_m = (__pyx_v_m + 1);

    /* "cython/core/tail.pyx":84
 *             m += 1
 *             bit = 0
 *     if bit:             # <<<<<<<<<<<<<<
 *         m += 1
 *     for n from 0 <= n < 1 + N:
 */
  }

  /* "cython/core/tail.pyx":86
 *     if bit:
 *         m += 1
 *     for n from 0 <= n < 1 + N:             # <<<<<<<<<<<<<<
 *         c_terse.which_old_tet[n] = int(byteseq[m])
 *         m += 1
 */
  __pyx_t_3 = (1 + __pyx_v_N);
  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_3; __pyx_v_n++) {

    /* "cython/core/tail.pyx":87
 *         m += 1
 *     for n from 0 <= n < 1 + N:
 *         c_terse.which_old_tet[n] = int(byteseq[m])             # <<<<<<<<<<<<<<
 *         m += 1
 *     for n from 0 <= n < 1 + N:
 */
    __pyx_t_2 = __Pyx_GetItemInt_ByteArray(__pyx_v_byteseq, __pyx_v_m, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(2, 87, __pyx_L1_error)
    (__pyx_v_c_terse.which_old_tet[__pyx_v_n]) = __pyx_t_2;

    /* "cython/core/tail.pyx":88
 *     for n from 0 <= n < 1 + N:
 *         c_terse.which_old_tet[n] = int(byteseq[m])
 *         m += 1             # <<<<<<<<<<<<<<
 *     for n from 0 <= n < 1 + N:
 *         c_terse.which_gluing[n] = int(byteseq[m])
 */
    __pyx_v_m = (__pyx_v_m + 1);
  }

  /* "cython/core/tail.pyx":89
 *         c_terse.which_old_tet[n] = int(byteseq[m])
 *         m += 1
 *     for n from 0 <= n < 1 + N:             # <<<<<<<<<<<<<<
 *         c_terse.which_gluing[n] = int(byteseq[m])
 *         m += 1
 */
  __pyx_t_3 = (1 + __pyx_v_N);
  for (__pyx_v_n = 0; __pyx_v_n < __pyx_t_3; __pyx_v_n++) {

    /* "cython/core/tail.pyx":90
 *         m += 1
 *     for n from 0 <= n < 1 + N:
 *         c_terse.which_gluing[n] = int(byteseq[m])             # <<<<<<<<<<<<<<
 *         m += 1
 *     c_triangulation = terse_to_tri(&c_terse)
 */
    __pyx_t_2 = __Pyx_GetItemInt_ByteArray(__pyx_v_byteseq, __pyx_v_m, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(2, 90, __pyx_L1_error)
    (__pyx_v_c_terse.which_gluing[__pyx_v_n]) = ((Permutation)__pyx_t_2);

    /* "cython/core/tail.pyx":91
 *     for n from 0 <= n < 1 + N:
 *         c_terse.which_gluing[n] = int(byteseq[m])
 *         m += 1             # <<<<<<<<<<<<<<
 *     c_triangulation = terse_to_tri(&c_terse)
 *     free(c_terse.glues_to_old_tet)
 */
    __pyx_v_m = (__pyx_v_m + 1);
  }

  /* "cython/core/tail.pyx":92
 *         c_terse.which_gluing[n] = int(byteseq[m])
 *         m += 1
 *     c_triangulation = terse_to_tri(&c_terse)             # <<<<<<<<<<<<<<
 *     free(c_terse.glues_to_old_tet)
 *     free(c_terse.which_old_tet)
 */
  __pyx_t_7 = terse_to_tri((&__pyx_v_c_terse)); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 92, __pyx_L1_error)
  __pyx_v_c_triangulation = __pyx_t_7;

  /* "cython/core/tail.pyx":93
 *         m += 1
 *     c_triangulation = terse_to_tri(&c_terse)
 *     free(c_terse.glues_to_old_tet)             # <<<<<<<<<<<<<<
 *     free(c_terse.which_old_tet)
 *     free(c_terse.which_gluing)
 */
  free(__pyx_v_c_terse.glues_to_old_tet);

  /* "cython/core/tail.pyx":94
 *     c_triangulation = terse_to_tri(&c_terse)
 *     free(c_terse.glues_to_old_tet)
 *     free(c_terse.which_old_tet)             # <<<<<<<<<<<<<<
 *     free(c_terse.which_gluing)
 *     return c_triangulation
 */
  free(__pyx_v_c_terse.which_old_tet);

  /* "cython/core/tail.pyx":95
 *     free(c_terse.glues_to_old_tet)
 *     free(c_terse.which_old_tet)
 *     free(c_terse.which_gluing)             # <<<<<<<<<<<<<<
 *     return c_triangulation
 * 
 */
  free(__pyx_v_c_terse.which_gluing);

  /* "cython/core/tail.pyx":96
 *     free(c_terse.which_old_tet)
 *     free(c_terse.which_gluing)
 *     return c_triangulation             # <<<<<<<<<<<<<<
 * 
 * cdef int set_cusps(c_Triangulation* c_triangulation, fillings) except -1:
 */
  __pyx_r = __pyx_v_c_triangulation;
  goto __pyx_L0;

  /* "cython/core/tail.pyx":65
 *     """
 * 
 * cdef c_Triangulation* triangulation_from_bytes(bytestring) except ? NULL:             # <<<<<<<<<<<<<<
 *     cdef c_Triangulation* c_triangulation = NULL
 *     cdef TerseTriangulation c_terse
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("SnapPy.triangulation_from_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_byteseq);
  __Pyx_XDECREF(__pyx_v_bit);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":98
 *     return c_triangulation
 * 
 * cdef int set_cusps(c_Triangulation* c_triangulation, fillings) except -1:             # <<<<<<<<<<<<<<
 *     if c_triangulation == NULL:
 *         return 0
 */

static int __pyx_f_6SnapPy_set_cusps(Triangulation *__pyx_v_c_triangulation, PyObject *__pyx_v_fillings) {
  int __pyx_v_num_cusps;
  Py_ssize_t __pyx_v_i;
  PyObject *__pyx_v_meridian = NULL;
  PyObject *__pyx_v_longitude = NULL;
  PyObject *__pyx_v_is_complete = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  Boolean __pyx_t_11;
  __pyx_t_6SnapPy_Real __pyx_t_12;
  __pyx_t_6SnapPy_Real __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_cusps", 1);

  /* "cython/core/tail.pyx":99
 * 
 * cdef int set_cusps(c_Triangulation* c_triangulation, fillings) except -1:
 *     if c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *         return 0
 *     if len(fillings) > 0:
 */
  __pyx_t_1 = (__pyx_v_c_triangulation == NULL);
  if (__pyx_t_1) {

    /* "cython/core/tail.pyx":100
 * cdef int set_cusps(c_Triangulation* c_triangulation, fillings) except -1:
 *     if c_triangulation == NULL:
 *         return 0             # <<<<<<<<<<<<<<
 *     if len(fillings) > 0:
 *         num_cusps = get_num_cusps(c_triangulation)
 */
    __pyx_r = 0;
    goto __pyx_L0;

    /* "cython/core/tail.pyx":99
 * 
 * cdef int set_cusps(c_Triangulation* c_triangulation, fillings) except -1:
 *     if c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *         return 0
 *     if len(fillings) > 0:
 */
  }

  /* "cython/core/tail.pyx":101
 *     if c_triangulation == NULL:
 *         return 0
 *     if len(fillings) > 0:             # <<<<<<<<<<<<<<
 *         num_cusps = get_num_cusps(c_triangulation)
 *         if len(fillings) > num_cusps:
 */
  __pyx_t_2 = PyObject_Length(__pyx_v_fillings); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(2, 101, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 > 0);
  if (__pyx_t_1) {

    /* "cython/core/tail.pyx":102
 *         return 0
 *     if len(fillings) > 0:
 *         num_cusps = get_num_cusps(c_triangulation)             # <<<<<<<<<<<<<<
 *         if len(fillings) > num_cusps:
 *             raise ValueError('The number of fillings specified exceeds '
 */
    __pyx_t_3 = get_num_cusps(__pyx_v_c_triangulation); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 102, __pyx_L1_error)
    __pyx_v_num_cusps = __pyx_t_3;

    /* "cython/core/tail.pyx":103
 *     if len(fillings) > 0:
 *         num_cusps = get_num_cusps(c_triangulation)
 *         if len(fillings) > num_cusps:             # <<<<<<<<<<<<<<
 *             raise ValueError('The number of fillings specified exceeds '
 *                              'the number of cusps.')
 */
    __pyx_t_2 = PyObject_Length(__pyx_v_fillings); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(2, 103, __pyx_L1_error)
    __pyx_t_1 = (__pyx_t_2 > __pyx_v_num_cusps);
    if (unlikely(__pyx_t_1)) {

      /* "cython/core/tail.pyx":104
 *         num_cusps = get_num_cusps(c_triangulation)
 *         if len(fillings) > num_cusps:
 *             raise ValueError('The number of fillings specified exceeds '             # <<<<<<<<<<<<<<
 *                              'the number of cusps.')
 *         for i in range(len(fillings)):
 */
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__152, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 104, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __PYX_ERR(2, 104, __pyx_L1_error)

      /* "cython/core/tail.pyx":103
 *     if len(fillings) > 0:
 *         num_cusps = get_num_cusps(c_triangulation)
 *         if len(fillings) > num_cusps:             # <<<<<<<<<<<<<<
 *             raise ValueError('The number of fillings specified exceeds '
 *                              'the number of cusps.')
 */
    }

    /* "cython/core/tail.pyx":106
 *             raise ValueError('The number of fillings specified exceeds '
 *                              'the number of cusps.')
 *         for i in range(len(fillings)):             # <<<<<<<<<<<<<<
 *             meridian, longitude = fillings[i]
 *             is_complete = (meridian == 0 and longitude == 0)
 */
    __pyx_t_2 = PyObject_Length(__pyx_v_fillings); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(2, 106, __pyx_L1_error)
    __pyx_t_5 = __pyx_t_2;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_i = __pyx_t_6;

      /* "cython/core/tail.pyx":107
 *                              'the number of cusps.')
 *         for i in range(len(fillings)):
 *             meridian, longitude = fillings[i]             # <<<<<<<<<<<<<<
 *             is_complete = (meridian == 0 and longitude == 0)
 *             set_cusp_info(c_triangulation, <int>i,
 */
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_fillings, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 107, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
        PyObject* sequence = __pyx_t_4;
        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(2, 107, __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_8 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        #else
        __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 107, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 107, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        #endif
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 107, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
        index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L8_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(2, 107, __pyx_L1_error)
        __pyx_t_10 = NULL;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L9_unpacking_done;
        __pyx_L8_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(2, 107, __pyx_L1_error)
        __pyx_L9_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_meridian, __pyx_t_7);
      __pyx_t_7 = 0;
      __Pyx_XDECREF_SET(__pyx_v_longitude, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "cython/core/tail.pyx":108
 *         for i in range(len(fillings)):
 *             meridian, longitude = fillings[i]
 *             is_complete = (meridian == 0 and longitude == 0)             # <<<<<<<<<<<<<<
 *             set_cusp_info(c_triangulation, <int>i,
 *                           is_complete,
 */
      __pyx_t_8 = __Pyx_PyInt_EqObjC(__pyx_v_meridian, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 108, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 108, __pyx_L1_error)
      if (__pyx_t_1) {
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      } else {
        __Pyx_INCREF(__pyx_t_8);
        __pyx_t_4 = __pyx_t_8;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L10_bool_binop_done;
      }
      __pyx_t_8 = __Pyx_PyInt_EqObjC(__pyx_v_longitude, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 108, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_8);
      __pyx_t_4 = __pyx_t_8;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_L10_bool_binop_done:;
      __Pyx_XDECREF_SET(__pyx_v_is_complete, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "cython/core/tail.pyx":110
 *             is_complete = (meridian == 0 and longitude == 0)
 *             set_cusp_info(c_triangulation, <int>i,
 *                           is_complete,             # <<<<<<<<<<<<<<
 *                           Object2Real(meridian),
 *                           Object2Real(longitude))
 */
      __pyx_t_11 = __Pyx_PyInt_As_Boolean(__pyx_v_is_complete); if (unlikely((__pyx_t_11 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(2, 110, __pyx_L1_error)

      /* "cython/core/tail.pyx":111
 *             set_cusp_info(c_triangulation, <int>i,
 *                           is_complete,
 *                           Object2Real(meridian),             # <<<<<<<<<<<<<<
 *                           Object2Real(longitude))
 *     return 0
 */
      __pyx_t_12 = __pyx_f_6SnapPy_Object2Real(__pyx_v_meridian); if (unlikely(__pyx_t_12 == ((__pyx_t_6SnapPy_Real)-1) && PyErr_Occurred())) __PYX_ERR(2, 111, __pyx_L1_error)

      /* "cython/core/tail.pyx":112
 *                           is_complete,
 *                           Object2Real(meridian),
 *                           Object2Real(longitude))             # <<<<<<<<<<<<<<
 *     return 0
 * 
 */
      __pyx_t_13 = __pyx_f_6SnapPy_Object2Real(__pyx_v_longitude); if (unlikely(__pyx_t_13 == ((__pyx_t_6SnapPy_Real)-1) && PyErr_Occurred())) __PYX_ERR(2, 112, __pyx_L1_error)

      /* "cython/core/tail.pyx":109
 *             meridian, longitude = fillings[i]
 *             is_complete = (meridian == 0 and longitude == 0)
 *             set_cusp_info(c_triangulation, <int>i,             # <<<<<<<<<<<<<<
 *                           is_complete,
 *                           Object2Real(meridian),
 */
      set_cusp_info(__pyx_v_c_triangulation, ((int)__pyx_v_i), __pyx_t_11, __pyx_t_12, __pyx_t_13); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 109, __pyx_L1_error)
    }

    /* "cython/core/tail.pyx":101
 *     if c_triangulation == NULL:
 *         return 0
 *     if len(fillings) > 0:             # <<<<<<<<<<<<<<
 *         num_cusps = get_num_cusps(c_triangulation)
 *         if len(fillings) > num_cusps:
 */
  }

  /* "cython/core/tail.pyx":113
 *                           Object2Real(meridian),
 *                           Object2Real(longitude))
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "cython/core/tail.pyx":98
 *     return c_triangulation
 * 
 * cdef int set_cusps(c_Triangulation* c_triangulation, fillings) except -1:             # <<<<<<<<<<<<<<
 *     if c_triangulation == NULL:
 *         return 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("SnapPy.set_cusps", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_meridian);
  __Pyx_XDECREF(__pyx_v_longitude);
  __Pyx_XDECREF(__pyx_v_is_complete);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":117
 * 
 * # Testing code for get_triangulation
 * def get_triangulation_tester():             # <<<<<<<<<<<<<<
 *     """
 *     >>> get_triangulation_tester() # doctest: +NUMERIC6
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_51get_triangulation_tester(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
PyDoc_STRVAR(__pyx_doc_6SnapPy_50get_triangulation_tester, "get_triangulation_tester()\n\n    >>> get_triangulation_tester() # doctest: +NUMERIC6\n    L13n9331(0,0)(0,0)(0,0) 16.64369585 Z + Z + Z\n    m003(0,0) 2.02988321 Z/5 + Z\n    m004(0,0) 2.02988321 Z\n    v1205(2,3) 4.70744340 Z/40\n    x012(0,0)(0,0) 3.54972978 Z/2 + Z\n    y123(0,0) 5.02755480 Z\n    L13n9331(3,4)(2,3)(2,1) 14.60215339 Z/53\n    K7_1(0,0) 3.57388254 Z\n    6_1(0,0) 3.16396323 Z\n    5^2_1(3,4)(1,-2) 2.73300075 Z/3\n    8^3_3(0,0)(0,0)(0,0) 8.96736085 Z + Z + Z\n    4_1(0,0) 2.02988321 Z\n    12n123(0,0) 18.15036328 Z\n    16n1235(0,0) 21.29383093 Z\n    b++RL(0,0) 2.02988321 Z\n    b-+RRL(0,0) 2.40690959 Z/3 + Z\n    b+-RL(0,0) 2.02988321 Z/5 + Z\n    b--RRL(0,0) 2.40690959 Z/3 + Z\n    Braid:[1, 2, -1, -2](0,0)(0,0) 4.05976643 Z + Z\n    DT:[(8, 10, -14), (2, 6, 20), (-4, 22, 24, 12, 26, 18, 16)](0,0)(0,0)(0,0) 16.64369585 Z + Z + Z\n    DT[4,6,2](0,0) 0.0 Z\n    DT[mcccgdeGacjBklfmih](0,0)(0,0)(0,0) 16.64369585 Z + Z + Z\n    DT:mcccgdeGacjBklfmih(0,0)(0,0)(0,0) 16.64369585 Z + Z + Z\n    a0*B1(0,0) 2.02988321 Z\n    b1*A0 a0*B1(1,0) 0.0 Z/2\n    dLQbcccdxwb(0,0) 2.56897060 Z/3 + Z\n    L13n9331(0,0)(0,0)(0,0) Z + Z + Z\n    m003(0,0) Z/5 + Z\n    m004(0,0) Z\n    v1205(2,3) Z/40\n    x012(0,0)(0,0) Z/2 + Z\n    y123(0,0) Z\n    L13n9331(3,4)(2,3)(2,1) Z/53\n    K7_1(0,0) Z\n    6_1(0,0) Z\n    5^2_1(3,4)(1,-2) Z/3\n    8^3_3(0,0)(0,0)(0,0) Z + Z + Z\n    4_1(0,0) Z\n    12n123(0,0) Z\n    16n1235(0,0) Z\n    b++RL(0,0) Z\n    b-+RRL(0,0) Z/3 + Z\n    b+-RL(0,0) Z/5 + Z\n    b--RRL(0,0) Z/3 + Z\n    Braid:[1, 2, -1, -2](0,0)(0,0) Z + Z\n    DT:[(8, 10, -14), (2, 6, 20), (-4, 22, 24, 12, 26, 18, 16)](0,0)(0,0)(0,0) Z + Z + Z\n    DT[4,6,2](0,0) Z\n    DT[mcccgdeGacjBklfmih](0,0)(0,0)(0,0) Z + Z + Z\n    DT:mcccgdeGacjBklfmih(0,0)(0,0)(0,0) Z + Z + Z\n    a0*B1(0,0) Z\n    b1*A0 a0*B1(1,0) Z/2\n    dLQbcccdxwb(0,0) Z/3 + Z\n    ");
static PyMethodDef __pyx_mdef_6SnapPy_51get_triangulation_tester = {"get_triangulation_tester", (PyCFunction)__pyx_pw_6SnapPy_51get_triangulation_tester, METH_NOARGS, __pyx_doc_6SnapPy_50get_triangulation_tester};
static PyObject *__pyx_pw_6SnapPy_51get_triangulation_tester(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_triangulation_tester (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_6SnapPy_50get_triangulation_tester(__pyx_self);

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

static PyObject *__pyx_pf_6SnapPy_50get_triangulation_tester(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_M = NULL;
  PyObject *__pyx_v_specs = NULL;
  PyObject *__pyx_v_spec = NULL;
  PyObject *__pyx_v_vol = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_triangulation_tester", 1);

  /* "cython/core/tail.pyx":174
 *     """
 * 
 *     M = database.HTLinkExteriors['L13n9331']             # <<<<<<<<<<<<<<
 *     specs = [M._to_string(), 'm003', 'm004', 'v1205(2,3)', 'x012', 'y123',
 *              'L13n9331(3,4)(2,3)(2,1)', 'K7_1', '6_1',
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_database); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_HTLinkExteriors); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_L13n9331); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_M = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/tail.pyx":175
 * 
 *     M = database.HTLinkExteriors['L13n9331']
 *     specs = [M._to_string(), 'm003', 'm004', 'v1205(2,3)', 'x012', 'y123',             # <<<<<<<<<<<<<<
 *              'L13n9331(3,4)(2,3)(2,1)', 'K7_1', '6_1',
 *              '5^2_1(3,4)(1,-2)', '8_3^3', 'L104001', '12n123', '16n1235',
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_M, __pyx_n_s_to_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 175, __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(2, 175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "cython/core/tail.pyx":179
 *              '5^2_1(3,4)(1,-2)', '8_3^3', 'L104001', '12n123', '16n1235',
 *              'b++RL', 'b-+RRL', 'b+-RL', 'b--RRL',
 *              'Braid[1,2,-1,-2]', 'DT:'+repr(M.DT_code()), 'DT[4,6,2]',             # <<<<<<<<<<<<<<
 *              'DT['+M.DT_code(alpha=True) + ']',
 *              'DT:'+M.DT_code(alpha=True),
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_M, __pyx_n_s_DT_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_kp_s_DT, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":180
 *              'b++RL', 'b-+RRL', 'b+-RL', 'b--RRL',
 *              'Braid[1,2,-1,-2]', 'DT:'+repr(M.DT_code()), 'DT[4,6,2]',
 *              'DT['+M.DT_code(alpha=True) + ']',             # <<<<<<<<<<<<<<
 *              'DT:'+M.DT_code(alpha=True),
 *              'Bundle(S_{1,1}, [a0, B1])', 'Splitting(S_{1,0}, [b1, A0], [a0,B1])',
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_M, __pyx_n_s_DT_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_alpha, Py_True) < 0) __PYX_ERR(2, 180, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_kp_s_DT_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__18); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":181
 *              'Braid[1,2,-1,-2]', 'DT:'+repr(M.DT_code()), 'DT[4,6,2]',
 *              'DT['+M.DT_code(alpha=True) + ']',
 *              'DT:'+M.DT_code(alpha=True),             # <<<<<<<<<<<<<<
 *              'Bundle(S_{1,1}, [a0, B1])', 'Splitting(S_{1,0}, [b1, A0], [a0,B1])',
 *              'dLQbcccdxwb']
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_M, __pyx_n_s_DT_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_alpha, Py_True) < 0) __PYX_ERR(2, 181, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_kp_s_DT, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cython/core/tail.pyx":175
 * 
 *     M = database.HTLinkExteriors['L13n9331']
 *     specs = [M._to_string(), 'm003', 'm004', 'v1205(2,3)', 'x012', 'y123',             # <<<<<<<<<<<<<<
 *              'L13n9331(3,4)(2,3)(2,1)', 'K7_1', '6_1',
 *              '5^2_1(3,4)(1,-2)', '8_3^3', 'L104001', '12n123', '16n1235',
 */
  __pyx_t_7 = PyList_New(26); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_1)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_m003);
  __Pyx_GIVEREF(__pyx_n_s_m003);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_m003)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_m004);
  __Pyx_GIVEREF(__pyx_n_s_m004);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 2, __pyx_n_s_m004)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_v1205_2_3);
  __Pyx_GIVEREF(__pyx_kp_s_v1205_2_3);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 3, __pyx_kp_s_v1205_2_3)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_x012);
  __Pyx_GIVEREF(__pyx_n_s_x012);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 4, __pyx_n_s_x012)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_y123);
  __Pyx_GIVEREF(__pyx_n_s_y123);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 5, __pyx_n_s_y123)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_L13n9331_3_4_2_3_2_1);
  __Pyx_GIVEREF(__pyx_kp_s_L13n9331_3_4_2_3_2_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 6, __pyx_kp_s_L13n9331_3_4_2_3_2_1)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_K7_1);
  __Pyx_GIVEREF(__pyx_n_s_K7_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 7, __pyx_n_s_K7_1)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_6_1);
  __Pyx_GIVEREF(__pyx_kp_s_6_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 8, __pyx_kp_s_6_1)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_5_2_1_3_4_1_2);
  __Pyx_GIVEREF(__pyx_kp_s_5_2_1_3_4_1_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 9, __pyx_kp_s_5_2_1_3_4_1_2)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_8_3_3);
  __Pyx_GIVEREF(__pyx_kp_s_8_3_3);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 10, __pyx_kp_s_8_3_3)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_L104001);
  __Pyx_GIVEREF(__pyx_n_s_L104001);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 11, __pyx_n_s_L104001)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_12n123);
  __Pyx_GIVEREF(__pyx_kp_s_12n123);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 12, __pyx_kp_s_12n123)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_16n1235);
  __Pyx_GIVEREF(__pyx_kp_s_16n1235);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 13, __pyx_kp_s_16n1235)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_b_RL);
  __Pyx_GIVEREF(__pyx_kp_s_b_RL);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 14, __pyx_kp_s_b_RL)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_b_RRL);
  __Pyx_GIVEREF(__pyx_kp_s_b_RRL);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 15, __pyx_kp_s_b_RRL)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_b_RL_2);
  __Pyx_GIVEREF(__pyx_kp_s_b_RL_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 16, __pyx_kp_s_b_RL_2)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_b_RRL_2);
  __Pyx_GIVEREF(__pyx_kp_s_b_RRL_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 17, __pyx_kp_s_b_RRL_2)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_Braid_1_2_1_2);
  __Pyx_GIVEREF(__pyx_kp_s_Braid_1_2_1_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 18, __pyx_kp_s_Braid_1_2_1_2)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 19, __pyx_t_2)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_DT_4_6_2);
  __Pyx_GIVEREF(__pyx_kp_s_DT_4_6_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 20, __pyx_kp_s_DT_4_6_2)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 21, __pyx_t_6)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 22, __pyx_t_3)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_Bundle_S__1_1_a0_B1);
  __Pyx_GIVEREF(__pyx_kp_s_Bundle_S__1_1_a0_B1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 23, __pyx_kp_s_Bundle_S__1_1_a0_B1)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_Splitting_S__1_0_b1_A0_a0_B1);
  __Pyx_GIVEREF(__pyx_kp_s_Splitting_S__1_0_b1_A0_a0_B1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 24, __pyx_kp_s_Splitting_S__1_0_b1_A0_a0_B1)) __PYX_ERR(2, 175, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_dLQbcccdxwb);
  __Pyx_GIVEREF(__pyx_n_s_dLQbcccdxwb);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_7, 25, __pyx_n_s_dLQbcccdxwb)) __PYX_ERR(2, 175, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_6 = 0;
  __pyx_t_3 = 0;
  __pyx_v_specs = ((PyObject*)__pyx_t_7);
  __pyx_t_7 = 0;

  /* "cython/core/tail.pyx":185
 *              'dLQbcccdxwb']
 * 
 *     for spec in specs:             # <<<<<<<<<<<<<<
 *         M = Manifold(spec)
 *         vol = M.volume()
 */
  __pyx_t_7 = __pyx_v_specs; __Pyx_INCREF(__pyx_t_7);
  __pyx_t_8 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(2, 185, __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_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(2, 185, __pyx_L1_error)
    #else
    __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_spec, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cython/core/tail.pyx":186
 * 
 *     for spec in specs:
 *         M = Manifold(spec)             # <<<<<<<<<<<<<<
 *         vol = M.volume()
 *         if abs(vol) < 0.1:
 */
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6SnapPy_Manifold), __pyx_v_spec); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_M, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cython/core/tail.pyx":187
 *     for spec in specs:
 *         M = Manifold(spec)
 *         vol = M.volume()             # <<<<<<<<<<<<<<
 *         if abs(vol) < 0.1:
 *             vol = 0.0
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_M, __pyx_n_s_volume); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 187, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_vol, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cython/core/tail.pyx":188
 *         M = Manifold(spec)
 *         vol = M.volume()
 *         if abs(vol) < 0.1:             # <<<<<<<<<<<<<<
 *             vol = 0.0
 *         print(M, vol, M.homology())
 */
    __pyx_t_3 = __Pyx_PyNumber_Absolute(__pyx_v_vol); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 188, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_float_0_1, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 188, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 188, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_9) {

      /* "cython/core/tail.pyx":189
 *         vol = M.volume()
 *         if abs(vol) < 0.1:
 *             vol = 0.0             # <<<<<<<<<<<<<<
 *         print(M, vol, M.homology())
 * 
 */
      __Pyx_INCREF(__pyx_float_0_0);
      __Pyx_DECREF_SET(__pyx_v_vol, __pyx_float_0_0);

      /* "cython/core/tail.pyx":188
 *         M = Manifold(spec)
 *         vol = M.volume()
 *         if abs(vol) < 0.1:             # <<<<<<<<<<<<<<
 *             vol = 0.0
 *         print(M, vol, M.homology())
 */
    }

    /* "cython/core/tail.pyx":190
 *         if abs(vol) < 0.1:
 *             vol = 0.0
 *         print(M, vol, M.homology())             # <<<<<<<<<<<<<<
 * 
 *     for spec in specs:
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_M, __pyx_n_s_homology); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 190, __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_6 = __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_6)) __PYX_ERR(2, 190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_M);
    __Pyx_GIVEREF(__pyx_v_M);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_M)) __PYX_ERR(2, 190, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_vol);
    __Pyx_GIVEREF(__pyx_v_vol);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_vol)) __PYX_ERR(2, 190, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_6)) __PYX_ERR(2, 190, __pyx_L1_error);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "cython/core/tail.pyx":185
 *              'dLQbcccdxwb']
 * 
 *     for spec in specs:             # <<<<<<<<<<<<<<
 *         M = Manifold(spec)
 *         vol = M.volume()
 */
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cython/core/tail.pyx":192
 *         print(M, vol, M.homology())
 * 
 *     for spec in specs:             # <<<<<<<<<<<<<<
 *         M = Triangulation(spec)
 *         print(M, M.homology())
 */
  __pyx_t_7 = __pyx_v_specs; __Pyx_INCREF(__pyx_t_7);
  __pyx_t_8 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_7);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(2, 192, __pyx_L1_error)
      #endif
      if (__pyx_t_8 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(2, 192, __pyx_L1_error)
    #else
    __pyx_t_6 = __Pyx_PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 192, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_spec, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "cython/core/tail.pyx":193
 * 
 *     for spec in specs:
 *         M = Triangulation(spec)             # <<<<<<<<<<<<<<
 *         print(M, M.homology())
 * 
 */
    __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6SnapPy_Triangulation), __pyx_v_spec); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF_SET(__pyx_v_M, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "cython/core/tail.pyx":194
 *     for spec in specs:
 *         M = Triangulation(spec)
 *         print(M, M.homology())             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_M, __pyx_n_s_homology); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 194, __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_6 = __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_6)) __PYX_ERR(2, 194, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_M);
    __Pyx_GIVEREF(__pyx_v_M);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_M)) __PYX_ERR(2, 194, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_6);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6)) __PYX_ERR(2, 194, __pyx_L1_error);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "cython/core/tail.pyx":192
 *         print(M, vol, M.homology())
 * 
 *     for spec in specs:             # <<<<<<<<<<<<<<
 *         M = Triangulation(spec)
 *         print(M, M.homology())
 */
  }
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cython/core/tail.pyx":117
 * 
 * # Testing code for get_triangulation
 * def get_triangulation_tester():             # <<<<<<<<<<<<<<
 *     """
 *     >>> get_triangulation_tester() # doctest: +NUMERIC6
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.get_triangulation_tester", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_M);
  __Pyx_XDECREF(__pyx_v_specs);
  __Pyx_XDECREF(__pyx_v_spec);
  __Pyx_XDECREF(__pyx_v_vol);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":227
 * 
 * 
 * def extract_HT_knot(record, crossings, alternation):             # <<<<<<<<<<<<<<
 *     DT = []
 *     size = (1+crossings)//2
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_53extract_HT_knot(PyObject *__pyx_self, 
#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_6SnapPy_52extract_HT_knot, "extract_HT_knot(record, crossings, alternation)");
static PyMethodDef __pyx_mdef_6SnapPy_53extract_HT_knot = {"extract_HT_knot", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_53extract_HT_knot, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_52extract_HT_knot};
static PyObject *__pyx_pw_6SnapPy_53extract_HT_knot(PyObject *__pyx_self, 
#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_record = 0;
  PyObject *__pyx_v_crossings = 0;
  PyObject *__pyx_v_alternation = 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("extract_HT_knot (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_record,&__pyx_n_s_crossings,&__pyx_n_s_alternation,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_record)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 227, __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_crossings)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 227, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("extract_HT_knot", 1, 3, 3, 1); __PYX_ERR(2, 227, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_alternation)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 227, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("extract_HT_knot", 1, 3, 3, 2); __PYX_ERR(2, 227, __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, "extract_HT_knot") < 0)) __PYX_ERR(2, 227, __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_record = values[0];
    __pyx_v_crossings = values[1];
    __pyx_v_alternation = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("extract_HT_knot", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 227, __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("SnapPy.extract_HT_knot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_52extract_HT_knot(__pyx_self, __pyx_v_record, __pyx_v_crossings, __pyx_v_alternation);

  /* 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_6SnapPy_52extract_HT_knot(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_record, PyObject *__pyx_v_crossings, PyObject *__pyx_v_alternation) {
  PyObject *__pyx_v_DT = NULL;
  PyObject *__pyx_v_size = NULL;
  PyObject *__pyx_v_byte = NULL;
  PyObject *__pyx_v_first_nybble = NULL;
  PyObject *__pyx_v_second_nybble = NULL;
  PyObject *__pyx_v_signs = NULL;
  PyObject *__pyx_v_mask = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extract_HT_knot", 1);

  /* "cython/core/tail.pyx":228
 * 
 * def extract_HT_knot(record, crossings, alternation):
 *     DT = []             # <<<<<<<<<<<<<<
 *     size = (1+crossings)//2
 *     for byte in record[:size]:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_DT = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/tail.pyx":229
 * def extract_HT_knot(record, crossings, alternation):
 *     DT = []
 *     size = (1+crossings)//2             # <<<<<<<<<<<<<<
 *     for byte in record[:size]:
 *         first_nybble = (byte & 0xf0) >> 4
 */
  __pyx_t_1 = __Pyx_PyInt_AddCObj(__pyx_int_1, __pyx_v_crossings, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_1, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_size = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":230
 *     DT = []
 *     size = (1+crossings)//2
 *     for byte in record[:size]:             # <<<<<<<<<<<<<<
 *         first_nybble = (byte & 0xf0) >> 4
 *         if first_nybble == 0:
 */
  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_record, 0, 0, NULL, &__pyx_v_size, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 230, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 230, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      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(2, 230, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(2, 230, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 230, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #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(2, 230, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(2, 230, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 230, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      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(2, 230, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_byte, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":231
 *     size = (1+crossings)//2
 *     for byte in record[:size]:
 *         first_nybble = (byte & 0xf0) >> 4             # <<<<<<<<<<<<<<
 *         if first_nybble == 0:
 *             first_nybble = 16
 */
    __pyx_t_2 = __Pyx_PyInt_AndObjC(__pyx_v_byte, __pyx_int_240, 0xf0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyInt_RshiftObjC(__pyx_t_2, __pyx_int_4, 4, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 231, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_first_nybble, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cython/core/tail.pyx":232
 *     for byte in record[:size]:
 *         first_nybble = (byte & 0xf0) >> 4
 *         if first_nybble == 0:             # <<<<<<<<<<<<<<
 *             first_nybble = 16
 *         DT.append(2*first_nybble)
 */
    __pyx_t_6 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_first_nybble, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(2, 232, __pyx_L1_error)
    if (__pyx_t_6) {

      /* "cython/core/tail.pyx":233
 *         first_nybble = (byte & 0xf0) >> 4
 *         if first_nybble == 0:
 *             first_nybble = 16             # <<<<<<<<<<<<<<
 *         DT.append(2*first_nybble)
 *         second_nybble = byte & 0x0f
 */
      __Pyx_INCREF(__pyx_int_16);
      __Pyx_DECREF_SET(__pyx_v_first_nybble, __pyx_int_16);

      /* "cython/core/tail.pyx":232
 *     for byte in record[:size]:
 *         first_nybble = (byte & 0xf0) >> 4
 *         if first_nybble == 0:             # <<<<<<<<<<<<<<
 *             first_nybble = 16
 *         DT.append(2*first_nybble)
 */
    }

    /* "cython/core/tail.pyx":234
 *         if first_nybble == 0:
 *             first_nybble = 16
 *         DT.append(2*first_nybble)             # <<<<<<<<<<<<<<
 *         second_nybble = byte & 0x0f
 *         if second_nybble == 0:
 */
    __pyx_t_5 = __Pyx_PyInt_MultiplyCObj(__pyx_int_2, __pyx_v_first_nybble, 2, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_DT, __pyx_t_5); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 234, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/tail.pyx":235
 *             first_nybble = 16
 *         DT.append(2*first_nybble)
 *         second_nybble = byte & 0x0f             # <<<<<<<<<<<<<<
 *         if second_nybble == 0:
 *             second_nybble = 16
 */
    __pyx_t_5 = __Pyx_PyInt_AndObjC(__pyx_v_byte, __pyx_int_15, 0x0f, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 235, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_XDECREF_SET(__pyx_v_second_nybble, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "cython/core/tail.pyx":236
 *         DT.append(2*first_nybble)
 *         second_nybble = byte & 0x0f
 *         if second_nybble == 0:             # <<<<<<<<<<<<<<
 *             second_nybble = 16
 *         DT.append(2*second_nybble)
 */
    __pyx_t_6 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_second_nybble, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(2, 236, __pyx_L1_error)
    if (__pyx_t_6) {

      /* "cython/core/tail.pyx":237
 *         second_nybble = byte & 0x0f
 *         if second_nybble == 0:
 *             second_nybble = 16             # <<<<<<<<<<<<<<
 *         DT.append(2*second_nybble)
 *     if alternation == 'n':
 */
      __Pyx_INCREF(__pyx_int_16);
      __Pyx_DECREF_SET(__pyx_v_second_nybble, __pyx_int_16);

      /* "cython/core/tail.pyx":236
 *         DT.append(2*first_nybble)
 *         second_nybble = byte & 0x0f
 *         if second_nybble == 0:             # <<<<<<<<<<<<<<
 *             second_nybble = 16
 *         DT.append(2*second_nybble)
 */
    }

    /* "cython/core/tail.pyx":238
 *         if second_nybble == 0:
 *             second_nybble = 16
 *         DT.append(2*second_nybble)             # <<<<<<<<<<<<<<
 *     if alternation == 'n':
 *         signs = record[-2]<<8 | record[-1]
 */
    __pyx_t_5 = __Pyx_PyInt_MultiplyCObj(__pyx_int_2, __pyx_v_second_nybble, 2, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 238, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_DT, __pyx_t_5); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(2, 238, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/tail.pyx":230
 *     DT = []
 *     size = (1+crossings)//2
 *     for byte in record[:size]:             # <<<<<<<<<<<<<<
 *         first_nybble = (byte & 0xf0) >> 4
 *         if first_nybble == 0:
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/tail.pyx":239
 *             second_nybble = 16
 *         DT.append(2*second_nybble)
 *     if alternation == 'n':             # <<<<<<<<<<<<<<
 *         signs = record[-2]<<8 | record[-1]
 *         mask = 0x8000
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_alternation, __pyx_n_s_n, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(2, 239, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "cython/core/tail.pyx":240
 *         DT.append(2*second_nybble)
 *     if alternation == 'n':
 *         signs = record[-2]<<8 | record[-1]             # <<<<<<<<<<<<<<
 *         mask = 0x8000
 *         for i in range(crossings):
 */
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_record, -2L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyInt_LshiftObjC(__pyx_t_1, __pyx_int_8, 8, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_record, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_Or(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_signs = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":241
 *     if alternation == 'n':
 *         signs = record[-2]<<8 | record[-1]
 *         mask = 0x8000             # <<<<<<<<<<<<<<
 *         for i in range(crossings):
 *             if (signs & (mask >> i)) == 0:
 */
    __Pyx_INCREF(__pyx_int_32768);
    __pyx_v_mask = __pyx_int_32768;

    /* "cython/core/tail.pyx":242
 *         signs = record[-2]<<8 | record[-1]
 *         mask = 0x8000
 *         for i in range(crossings):             # <<<<<<<<<<<<<<
 *             if (signs & (mask >> i)) == 0:
 *                 DT[i] = -DT[i]
 */
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_crossings); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 242, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = 0;
      __pyx_t_4 = NULL;
    } else {
      __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 242, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 242, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_4)) {
        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(2, 242, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(2, 242, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 242, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #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(2, 242, __pyx_L1_error)
            #endif
            if (__pyx_t_3 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(2, 242, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 242, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_4(__pyx_t_1);
        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(2, 242, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "cython/core/tail.pyx":243
 *         mask = 0x8000
 *         for i in range(crossings):
 *             if (signs & (mask >> i)) == 0:             # <<<<<<<<<<<<<<
 *                 DT[i] = -DT[i]
 *     return DT[:crossings]
 */
      __pyx_t_2 = PyNumber_Rshift(__pyx_v_mask, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_5 = PyNumber_And(__pyx_v_signs, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 243, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_6 = (__Pyx_PyInt_BoolEqObjC(__pyx_t_5, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(2, 243, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_6) {

        /* "cython/core/tail.pyx":244
 *         for i in range(crossings):
 *             if (signs & (mask >> i)) == 0:
 *                 DT[i] = -DT[i]             # <<<<<<<<<<<<<<
 *     return DT[:crossings]
 * 
 */
        __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_DT, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 244, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_2 = PyNumber_Negative(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 244, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely((PyObject_SetItem(__pyx_v_DT, __pyx_v_i, __pyx_t_2) < 0))) __PYX_ERR(2, 244, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "cython/core/tail.pyx":243
 *         mask = 0x8000
 *         for i in range(crossings):
 *             if (signs & (mask >> i)) == 0:             # <<<<<<<<<<<<<<
 *                 DT[i] = -DT[i]
 *     return DT[:crossings]
 */
      }

      /* "cython/core/tail.pyx":242
 *         signs = record[-2]<<8 | record[-1]
 *         mask = 0x8000
 *         for i in range(crossings):             # <<<<<<<<<<<<<<
 *             if (signs & (mask >> i)) == 0:
 *                 DT[i] = -DT[i]
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/tail.pyx":239
 *             second_nybble = 16
 *         DT.append(2*second_nybble)
 *     if alternation == 'n':             # <<<<<<<<<<<<<<
 *         signs = record[-2]<<8 | record[-1]
 *         mask = 0x8000
 */
  }

  /* "cython/core/tail.pyx":245
 *             if (signs & (mask >> i)) == 0:
 *                 DT[i] = -DT[i]
 *     return DT[:crossings]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_crossings);
  __pyx_t_1 = __pyx_v_crossings;
  __pyx_t_6 = (__pyx_t_1 == Py_None);
  if (__pyx_t_6) {
    __pyx_t_3 = PY_SSIZE_T_MAX;
  } else {
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 245, __pyx_L1_error)
    __pyx_t_3 = __pyx_t_8;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_v_DT, 0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/tail.pyx":227
 * 
 * 
 * def extract_HT_knot(record, crossings, alternation):             # <<<<<<<<<<<<<<
 *     DT = []
 *     size = (1+crossings)//2
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("SnapPy.extract_HT_knot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_DT);
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XDECREF(__pyx_v_byte);
  __Pyx_XDECREF(__pyx_v_first_nybble);
  __Pyx_XDECREF(__pyx_v_second_nybble);
  __Pyx_XDECREF(__pyx_v_signs);
  __Pyx_XDECREF(__pyx_v_mask);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":248
 * 
 * 
 * def get_HT_knot_DT(crossings, alternation, index):             # <<<<<<<<<<<<<<
 *     size = (1 + crossings) // 2
 *     index -= 1
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_55get_HT_knot_DT(PyObject *__pyx_self, 
#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_6SnapPy_54get_HT_knot_DT, "get_HT_knot_DT(crossings, alternation, index)");
static PyMethodDef __pyx_mdef_6SnapPy_55get_HT_knot_DT = {"get_HT_knot_DT", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_55get_HT_knot_DT, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_54get_HT_knot_DT};
static PyObject *__pyx_pw_6SnapPy_55get_HT_knot_DT(PyObject *__pyx_self, 
#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_crossings = 0;
  PyObject *__pyx_v_alternation = 0;
  PyObject *__pyx_v_index = 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("get_HT_knot_DT (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_crossings,&__pyx_n_s_alternation,&__pyx_n_s_index,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_crossings)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 248, __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_alternation)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 248, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("get_HT_knot_DT", 1, 3, 3, 1); __PYX_ERR(2, 248, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 248, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("get_HT_knot_DT", 1, 3, 3, 2); __PYX_ERR(2, 248, __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_HT_knot_DT") < 0)) __PYX_ERR(2, 248, __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_crossings = values[0];
    __pyx_v_alternation = values[1];
    __pyx_v_index = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_HT_knot_DT", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 248, __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("SnapPy.get_HT_knot_DT", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_54get_HT_knot_DT(__pyx_self, __pyx_v_crossings, __pyx_v_alternation, __pyx_v_index);

  /* 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_6SnapPy_54get_HT_knot_DT(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_crossings, PyObject *__pyx_v_alternation, PyObject *__pyx_v_index) {
  PyObject *__pyx_v_size = NULL;
  PyObject *__pyx_v_offset = NULL;
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_v_record = NULL;
  PyObject *__pyx_v_DT = NULL;
  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_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_HT_knot_DT", 0);
  __Pyx_INCREF(__pyx_v_index);

  /* "cython/core/tail.pyx":249
 * 
 * def get_HT_knot_DT(crossings, alternation, index):
 *     size = (1 + crossings) // 2             # <<<<<<<<<<<<<<
 *     index -= 1
 *     if (alternation == 'a'
 */
  __pyx_t_1 = __Pyx_PyInt_AddCObj(__pyx_int_1, __pyx_v_crossings, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_FloorDivideObjC(__pyx_t_1, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_size = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":250
 * def get_HT_knot_DT(crossings, alternation, index):
 *     size = (1 + crossings) // 2
 *     index -= 1             # <<<<<<<<<<<<<<
 *     if (alternation == 'a'
 *             and crossings in Alternating_numbers
 */
  __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_index, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":251
 *     size = (1 + crossings) // 2
 *     index -= 1
 *     if (alternation == 'a'             # <<<<<<<<<<<<<<
 *             and crossings in Alternating_numbers
 *             and 0 <= index < Alternating_numbers[crossings]):
 */
  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_alternation, __pyx_n_s_a_2, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 251, __pyx_L1_error)
  if (__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cython/core/tail.pyx":252
 *     index -= 1
 *     if (alternation == 'a'
 *             and crossings in Alternating_numbers             # <<<<<<<<<<<<<<
 *             and 0 <= index < Alternating_numbers[crossings]):
 *         offset = 8*(Alternating_offsets[crossings] + index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Alternating_numbers); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_crossings, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }

  /* "cython/core/tail.pyx":253
 *     if (alternation == 'a'
 *             and crossings in Alternating_numbers
 *             and 0 <= index < Alternating_numbers[crossings]):             # <<<<<<<<<<<<<<
 *         offset = 8*(Alternating_offsets[crossings] + index)
 *         Alternating_table.seek(offset)
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_int_0, __pyx_v_index, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 253, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
    __Pyx_DECREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Alternating_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_crossings); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_index, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 253, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 253, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;

  /* "cython/core/tail.pyx":251
 *     size = (1 + crossings) // 2
 *     index -= 1
 *     if (alternation == 'a'             # <<<<<<<<<<<<<<
 *             and crossings in Alternating_numbers
 *             and 0 <= index < Alternating_numbers[crossings]):
 */
  if (__pyx_t_3) {

    /* "cython/core/tail.pyx":254
 *             and crossings in Alternating_numbers
 *             and 0 <= index < Alternating_numbers[crossings]):
 *         offset = 8*(Alternating_offsets[crossings] + index)             # <<<<<<<<<<<<<<
 *         Alternating_table.seek(offset)
 *         data = Alternating_table.read(size)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Alternating_offsets); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_crossings); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyNumber_Add(__pyx_t_5, __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyInt_MultiplyCObj(__pyx_int_8, __pyx_t_2, 8, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_offset = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cython/core/tail.pyx":255
 *             and 0 <= index < Alternating_numbers[crossings]):
 *         offset = 8*(Alternating_offsets[crossings] + index)
 *         Alternating_table.seek(offset)             # <<<<<<<<<<<<<<
 *         data = Alternating_table.read(size)
 *         record = struct.unpack('%dB' % size, data)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Alternating_table); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 255, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_offset};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 255, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/tail.pyx":256
 *         offset = 8*(Alternating_offsets[crossings] + index)
 *         Alternating_table.seek(offset)
 *         data = Alternating_table.read(size)             # <<<<<<<<<<<<<<
 *         record = struct.unpack('%dB' % size, data)
 *     elif (alternation == 'n'
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Alternating_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_6 = 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_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_size};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 256, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_data = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cython/core/tail.pyx":257
 *         Alternating_table.seek(offset)
 *         data = Alternating_table.read(size)
 *         record = struct.unpack('%dB' % size, data)             # <<<<<<<<<<<<<<
 *     elif (alternation == 'n'
 *           and crossings in Nonalternating_numbers
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_struct); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_unpack); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_kp_s_dB, __pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 257, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_2, __pyx_v_data};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_v_record = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cython/core/tail.pyx":251
 *     size = (1 + crossings) // 2
 *     index -= 1
 *     if (alternation == 'a'             # <<<<<<<<<<<<<<
 *             and crossings in Alternating_numbers
 *             and 0 <= index < Alternating_numbers[crossings]):
 */
    goto __pyx_L3;
  }

  /* "cython/core/tail.pyx":258
 *         data = Alternating_table.read(size)
 *         record = struct.unpack('%dB' % size, data)
 *     elif (alternation == 'n'             # <<<<<<<<<<<<<<
 *           and crossings in Nonalternating_numbers
 *           and 0 <= index < Nonalternating_numbers[crossings]):
 */
  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_alternation, __pyx_n_s_n, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 258, __pyx_L1_error)
  if (__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L7_bool_binop_done;
  }

  /* "cython/core/tail.pyx":259
 *         record = struct.unpack('%dB' % size, data)
 *     elif (alternation == 'n'
 *           and crossings in Nonalternating_numbers             # <<<<<<<<<<<<<<
 *           and 0 <= index < Nonalternating_numbers[crossings]):
 *         offset = 10*(Nonalternating_offsets[crossings] + index)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Nonalternating_numbers); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_crossings, __pyx_t_5, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 259, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_4) {
  } else {
    __pyx_t_3 = __pyx_t_4;
    goto __pyx_L7_bool_binop_done;
  }

  /* "cython/core/tail.pyx":260
 *     elif (alternation == 'n'
 *           and crossings in Nonalternating_numbers
 *           and 0 <= index < Nonalternating_numbers[crossings]):             # <<<<<<<<<<<<<<
 *         offset = 10*(Nonalternating_offsets[crossings] + index)
 *         Nonalternating_table.seek(offset)
 */
  __pyx_t_5 = PyObject_RichCompare(__pyx_int_0, __pyx_v_index, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 260, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_5)) {
    __Pyx_DECREF(__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Nonalternating_numbers); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_crossings); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_index, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 260, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(2, 260, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = __pyx_t_4;
  __pyx_L7_bool_binop_done:;

  /* "cython/core/tail.pyx":258
 *         data = Alternating_table.read(size)
 *         record = struct.unpack('%dB' % size, data)
 *     elif (alternation == 'n'             # <<<<<<<<<<<<<<
 *           and crossings in Nonalternating_numbers
 *           and 0 <= index < Nonalternating_numbers[crossings]):
 */
  if (likely(__pyx_t_3)) {

    /* "cython/core/tail.pyx":261
 *           and crossings in Nonalternating_numbers
 *           and 0 <= index < Nonalternating_numbers[crossings]):
 *         offset = 10*(Nonalternating_offsets[crossings] + index)             # <<<<<<<<<<<<<<
 *         Nonalternating_table.seek(offset)
 *         data = Nonalternating_table.read(size+2)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Nonalternating_offsets); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_crossings); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_v_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyInt_MultiplyCObj(__pyx_int_10, __pyx_t_5, 10, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_offset = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":262
 *           and 0 <= index < Nonalternating_numbers[crossings]):
 *         offset = 10*(Nonalternating_offsets[crossings] + index)
 *         Nonalternating_table.seek(offset)             # <<<<<<<<<<<<<<
 *         data = Nonalternating_table.read(size+2)
 *         record = struct.unpack('%dB' % (size+2), data)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Nonalternating_table); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_seek); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_offset};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":263
 *         offset = 10*(Nonalternating_offsets[crossings] + index)
 *         Nonalternating_table.seek(offset)
 *         data = Nonalternating_table.read(size+2)             # <<<<<<<<<<<<<<
 *         record = struct.unpack('%dB' % (size+2), data)
 *     else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Nonalternating_table); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_read); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_size, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 263, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(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_1};
      __pyx_t_2 = __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_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 263, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_v_data = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":264
 *         Nonalternating_table.seek(offset)
 *         data = Nonalternating_table.read(size+2)
 *         record = struct.unpack('%dB' % (size+2), data)             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError('You have specified a Hoste-Thistlethwaite '
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_struct); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_unpack); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_size, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_dB, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_7, __pyx_v_data};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 264, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_v_record = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":258
 *         data = Alternating_table.read(size)
 *         record = struct.unpack('%dB' % size, data)
 *     elif (alternation == 'n'             # <<<<<<<<<<<<<<
 *           and crossings in Nonalternating_numbers
 *           and 0 <= index < Nonalternating_numbers[crossings]):
 */
    goto __pyx_L3;
  }

  /* "cython/core/tail.pyx":266
 *         record = struct.unpack('%dB' % (size+2), data)
 *     else:
 *         raise ValueError('You have specified a Hoste-Thistlethwaite '             # <<<<<<<<<<<<<<
 *                          'knot with an \n'
 *                          'inappropriate index or number of crossings.')
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__153, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 266, __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(2, 266, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cython/core/tail.pyx":270
 *                          'inappropriate index or number of crossings.')
 * 
 *     DT = extract_HT_knot(record, crossings, alternation)             # <<<<<<<<<<<<<<
 *     return DT
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_extract_HT_knot); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_7, __pyx_v_record, __pyx_v_crossings, __pyx_v_alternation};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 3+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_DT = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":271
 * 
 *     DT = extract_HT_knot(record, crossings, alternation)
 *     return DT             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_DT);
  __pyx_r = __pyx_v_DT;
  goto __pyx_L0;

  /* "cython/core/tail.pyx":248
 * 
 * 
 * def get_HT_knot_DT(crossings, alternation, index):             # <<<<<<<<<<<<<<
 *     size = (1 + crossings) // 2
 *     index -= 1
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.get_HT_knot_DT", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_size);
  __Pyx_XDECREF(__pyx_v_offset);
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XDECREF(__pyx_v_record);
  __Pyx_XDECREF(__pyx_v_DT);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":274
 * 
 * 
 * def get_HT_knot_by_index(alternation, index, manifold_class):             # <<<<<<<<<<<<<<
 *     crossings = 16
 *     if alternation == 'a':
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_57get_HT_knot_by_index(PyObject *__pyx_self, 
#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_6SnapPy_56get_HT_knot_by_index, "get_HT_knot_by_index(alternation, index, manifold_class)");
static PyMethodDef __pyx_mdef_6SnapPy_57get_HT_knot_by_index = {"get_HT_knot_by_index", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_57get_HT_knot_by_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_56get_HT_knot_by_index};
static PyObject *__pyx_pw_6SnapPy_57get_HT_knot_by_index(PyObject *__pyx_self, 
#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_alternation = 0;
  PyObject *__pyx_v_index = 0;
  PyObject *__pyx_v_manifold_class = 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("get_HT_knot_by_index (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_alternation,&__pyx_n_s_index,&__pyx_n_s_manifold_class_2,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_alternation)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 274, __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_index)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 274, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("get_HT_knot_by_index", 1, 3, 3, 1); __PYX_ERR(2, 274, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_manifold_class_2)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 274, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("get_HT_knot_by_index", 1, 3, 3, 2); __PYX_ERR(2, 274, __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_HT_knot_by_index") < 0)) __PYX_ERR(2, 274, __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_alternation = values[0];
    __pyx_v_index = values[1];
    __pyx_v_manifold_class = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_HT_knot_by_index", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 274, __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("SnapPy.get_HT_knot_by_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_56get_HT_knot_by_index(__pyx_self, __pyx_v_alternation, __pyx_v_index, __pyx_v_manifold_class);

  /* 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_6SnapPy_56get_HT_knot_by_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_alternation, PyObject *__pyx_v_index, PyObject *__pyx_v_manifold_class) {
  PyObject *__pyx_v_crossings = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_index_within_crossings = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  long __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("get_HT_knot_by_index", 1);

  /* "cython/core/tail.pyx":275
 * 
 * def get_HT_knot_by_index(alternation, index, manifold_class):
 *     crossings = 16             # <<<<<<<<<<<<<<
 *     if alternation == 'a':
 *         for i in range(3, 17):
 */
  __Pyx_INCREF(__pyx_int_16);
  __pyx_v_crossings = __pyx_int_16;

  /* "cython/core/tail.pyx":276
 * def get_HT_knot_by_index(alternation, index, manifold_class):
 *     crossings = 16
 *     if alternation == 'a':             # <<<<<<<<<<<<<<
 *         for i in range(3, 17):
 *             if Alternating_offsets[i] > index:
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_alternation, __pyx_n_s_a_2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 276, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/tail.pyx":277
 *     crossings = 16
 *     if alternation == 'a':
 *         for i in range(3, 17):             # <<<<<<<<<<<<<<
 *             if Alternating_offsets[i] > index:
 *                 crossings = i-1
 */
    for (__pyx_t_2 = 3; __pyx_t_2 < 17; __pyx_t_2+=1) {
      __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 277, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cython/core/tail.pyx":278
 *     if alternation == 'a':
 *         for i in range(3, 17):
 *             if Alternating_offsets[i] > index:             # <<<<<<<<<<<<<<
 *                 crossings = i-1
 *                 break
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Alternating_offsets); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 278, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 278, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_v_index, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 278, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 278, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_1) {

        /* "cython/core/tail.pyx":279
 *         for i in range(3, 17):
 *             if Alternating_offsets[i] > index:
 *                 crossings = i-1             # <<<<<<<<<<<<<<
 *                 break
 *         index_within_crossings = index - Alternating_offsets[crossings]
 */
        __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 279, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_crossings, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "cython/core/tail.pyx":280
 *             if Alternating_offsets[i] > index:
 *                 crossings = i-1
 *                 break             # <<<<<<<<<<<<<<
 *         index_within_crossings = index - Alternating_offsets[crossings]
 *     elif alternation == 'n':
 */
        goto __pyx_L5_break;

        /* "cython/core/tail.pyx":278
 *     if alternation == 'a':
 *         for i in range(3, 17):
 *             if Alternating_offsets[i] > index:             # <<<<<<<<<<<<<<
 *                 crossings = i-1
 *                 break
 */
      }
    }
    __pyx_L5_break:;

    /* "cython/core/tail.pyx":281
 *                 crossings = i-1
 *                 break
 *         index_within_crossings = index - Alternating_offsets[crossings]             # <<<<<<<<<<<<<<
 *     elif alternation == 'n':
 *         for i in range(8, 17):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Alternating_offsets); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_crossings); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Subtract(__pyx_v_index, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 281, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_index_within_crossings = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cython/core/tail.pyx":276
 * def get_HT_knot_by_index(alternation, index, manifold_class):
 *     crossings = 16
 *     if alternation == 'a':             # <<<<<<<<<<<<<<
 *         for i in range(3, 17):
 *             if Alternating_offsets[i] > index:
 */
    goto __pyx_L3;
  }

  /* "cython/core/tail.pyx":282
 *                 break
 *         index_within_crossings = index - Alternating_offsets[crossings]
 *     elif alternation == 'n':             # <<<<<<<<<<<<<<
 *         for i in range(8, 17):
 *             if Nonalternating_offsets[i] > index:
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_alternation, __pyx_n_s_n, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 282, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "cython/core/tail.pyx":283
 *         index_within_crossings = index - Alternating_offsets[crossings]
 *     elif alternation == 'n':
 *         for i in range(8, 17):             # <<<<<<<<<<<<<<
 *             if Nonalternating_offsets[i] > index:
 *                 crossings = i-1
 */
    for (__pyx_t_2 = 8; __pyx_t_2 < 17; __pyx_t_2+=1) {
      __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 283, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "cython/core/tail.pyx":284
 *     elif alternation == 'n':
 *         for i in range(8, 17):
 *             if Nonalternating_offsets[i] > index:             # <<<<<<<<<<<<<<
 *                 crossings = i-1
 *                 break
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Nonalternating_offsets); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 284, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_v_index, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 284, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 284, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_1) {

        /* "cython/core/tail.pyx":285
 *         for i in range(8, 17):
 *             if Nonalternating_offsets[i] > index:
 *                 crossings = i-1             # <<<<<<<<<<<<<<
 *                 break
 *         index_within_crossings = index - Nonalternating_offsets[crossings]
 */
        __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 285, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_crossings, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "cython/core/tail.pyx":286
 *             if Nonalternating_offsets[i] > index:
 *                 crossings = i-1
 *                 break             # <<<<<<<<<<<<<<
 *         index_within_crossings = index - Nonalternating_offsets[crossings]
 *     name = '%d' % crossings + alternation + '%d' % (index_within_crossings + 1)
 */
        goto __pyx_L8_break;

        /* "cython/core/tail.pyx":284
 *     elif alternation == 'n':
 *         for i in range(8, 17):
 *             if Nonalternating_offsets[i] > index:             # <<<<<<<<<<<<<<
 *                 crossings = i-1
 *                 break
 */
      }
    }
    __pyx_L8_break:;

    /* "cython/core/tail.pyx":287
 *                 crossings = i-1
 *                 break
 *         index_within_crossings = index - Nonalternating_offsets[crossings]             # <<<<<<<<<<<<<<
 *     name = '%d' % crossings + alternation + '%d' % (index_within_crossings + 1)
 *     return manifold_class(name)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Nonalternating_offsets); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_crossings); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Subtract(__pyx_v_index, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 287, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_index_within_crossings = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cython/core/tail.pyx":282
 *                 break
 *         index_within_crossings = index - Alternating_offsets[crossings]
 *     elif alternation == 'n':             # <<<<<<<<<<<<<<
 *         for i in range(8, 17):
 *             if Nonalternating_offsets[i] > index:
 */
  }
  __pyx_L3:;

  /* "cython/core/tail.pyx":288
 *                 break
 *         index_within_crossings = index - Nonalternating_offsets[crossings]
 *     name = '%d' % crossings + alternation + '%d' % (index_within_crossings + 1)             # <<<<<<<<<<<<<<
 *     return manifold_class(name)
 * 
 */
  __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_d, __pyx_v_crossings); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_v_alternation); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_v_index_within_crossings)) { __Pyx_RaiseUnboundLocalError("index_within_crossings"); __PYX_ERR(2, 288, __pyx_L1_error) }
  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_index_within_crossings, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyString_FormatSafe(__pyx_kp_s_d, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 288, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":289
 *         index_within_crossings = index - Nonalternating_offsets[crossings]
 *     name = '%d' % crossings + alternation + '%d' % (index_within_crossings + 1)
 *     return manifold_class(name)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_manifold_class);
  __pyx_t_5 = __pyx_v_manifold_class; __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_v_name};
    __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(2, 289, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cython/core/tail.pyx":274
 * 
 * 
 * def get_HT_knot_by_index(alternation, index, manifold_class):             # <<<<<<<<<<<<<<
 *     crossings = 16
 *     if alternation == 'a':
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("SnapPy.get_HT_knot_by_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_crossings);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_index_within_crossings);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":301
 *     length = 0
 * 
 *     def __init__(self, indices=(0, 0, 0)):             # <<<<<<<<<<<<<<
 *         myslice = slice(*indices)
 *         self.start, self.stop, self.step = myslice.indices(self.length)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_6Census_1__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_6SnapPy_6Census___init__, "Census.__init__(self, indices=(0, 0, 0))");
static PyMethodDef __pyx_mdef_6SnapPy_6Census_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_6Census_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_6Census___init__};
static PyObject *__pyx_pw_6SnapPy_6Census_1__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_self = 0;
  PyObject *__pyx_v_indices = 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("__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_self,&__pyx_n_s_indices,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_tuple__154)));
    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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 301, __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_indices);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 301, __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(2, 301, __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_self = values[0];
    __pyx_v_indices = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(2, 301, __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("SnapPy.Census.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_6Census___init__(__pyx_self, __pyx_v_self, __pyx_v_indices);

  /* 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_6SnapPy_6Census___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_indices) {
  PyObject *__pyx_v_myslice = 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)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "cython/core/tail.pyx":302
 * 
 *     def __init__(self, indices=(0, 0, 0)):
 *         myslice = slice(*indices)             # <<<<<<<<<<<<<<
 *         self.start, self.stop, self.step = myslice.indices(self.length)
 *         self.index = self.start
 */
  __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_indices); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PySlice_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_myslice = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":303
 *     def __init__(self, indices=(0, 0, 0)):
 *         myslice = slice(*indices)
 *         self.start, self.stop, self.step = myslice.indices(self.length)             # <<<<<<<<<<<<<<
 *         self.index = self.start
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_myslice, __pyx_n_s_indices); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 303, __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_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_5 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 3)) {
      if (size > 3) __Pyx_RaiseTooManyValuesError(3);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(2, 303, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 2); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
    index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 2; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 3) < 0) __PYX_ERR(2, 303, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(2, 303, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_start, __pyx_t_1) < 0) __PYX_ERR(2, 303, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_stop, __pyx_t_3) < 0) __PYX_ERR(2, 303, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_step, __pyx_t_4) < 0) __PYX_ERR(2, 303, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":304
 *         myslice = slice(*indices)
 *         self.start, self.stop, self.step = myslice.indices(self.length)
 *         self.index = self.start             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_t_2) < 0) __PYX_ERR(2, 304, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":301
 *     length = 0
 * 
 *     def __init__(self, indices=(0, 0, 0)):             # <<<<<<<<<<<<<<
 *         myslice = slice(*indices)
 *         self.start, self.stop, self.step = myslice.indices(self.length)
 */

  /* 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_6);
  __Pyx_AddTraceback("SnapPy.Census.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_myslice);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":306
 *         self.index = self.start
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_6Census_3__iter__(PyObject *__pyx_self, 
#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_6SnapPy_6Census_2__iter__, "Census.__iter__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_6Census_3__iter__ = {"__iter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_6Census_3__iter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_6Census_2__iter__};
static PyObject *__pyx_pw_6SnapPy_6Census_3__iter__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 306, __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, "__iter__") < 0)) __PYX_ERR(2, 306, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 306, __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("SnapPy.Census.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_6Census_2__iter__(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_6Census_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__", 1);

  /* "cython/core/tail.pyx":307
 * 
 *     def __iter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, item):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  /* "cython/core/tail.pyx":306
 *         self.index = self.start
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "cython/core/tail.pyx":309
 *         return self
 * 
 *     def __contains__(self, item):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("This census does not support manifold lookup")
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_6Census_5__contains__(PyObject *__pyx_self, 
#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_6SnapPy_6Census_4__contains__, "Census.__contains__(self, item)");
static PyMethodDef __pyx_mdef_6SnapPy_6Census_5__contains__ = {"__contains__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_6Census_5__contains__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_6Census_4__contains__};
static PyObject *__pyx_pw_6SnapPy_6Census_5__contains__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_item = 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("__contains__ (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_self,&__pyx_n_s_item,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 309, __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_item)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 309, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__contains__", 1, 2, 2, 1); __PYX_ERR(2, 309, __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, "__contains__") < 0)) __PYX_ERR(2, 309, __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_self = values[0];
    __pyx_v_item = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__contains__", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 309, __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("SnapPy.Census.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_6Census_4__contains__(__pyx_self, __pyx_v_self, __pyx_v_item);

  /* 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_6SnapPy_6Census_4__contains__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_item) {
  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("__contains__", 1);

  /* "cython/core/tail.pyx":310
 * 
 *     def __contains__(self, item):
 *         raise NotImplementedError("This census does not support manifold lookup")             # <<<<<<<<<<<<<<
 * 
 *     def next(self):
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__155, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 310, __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(2, 310, __pyx_L1_error)

  /* "cython/core/tail.pyx":309
 *         return self
 * 
 *     def __contains__(self, item):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("This census does not support manifold lookup")
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("SnapPy.Census.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":312
 *         raise NotImplementedError("This census does not support manifold lookup")
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         if self.index >= self.stop:
 *             raise StopIteration
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_6Census_7next(PyObject *__pyx_self, 
#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_6SnapPy_6Census_6next, "Census.next(self)");
static PyMethodDef __pyx_mdef_6SnapPy_6Census_7next = {"next", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_6Census_7next, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_6Census_6next};
static PyObject *__pyx_pw_6SnapPy_6Census_7next(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("next (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 312, __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, "next") < 0)) __PYX_ERR(2, 312, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("next", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 312, __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("SnapPy.Census.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_6Census_6next(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_6Census_6next(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("next", 1);

  /* "cython/core/tail.pyx":313
 * 
 *     def next(self):
 *         if self.index >= self.stop:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         self.index = self.index + self.step
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_stop); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 313, __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(2, 313, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_4)) {

    /* "cython/core/tail.pyx":314
 *     def next(self):
 *         if self.index >= self.stop:
 *             raise StopIteration             # <<<<<<<<<<<<<<
 *         self.index = self.index + self.step
 *         return self[self.index-self.step]
 */
    __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
    __PYX_ERR(2, 314, __pyx_L1_error)

    /* "cython/core/tail.pyx":313
 * 
 *     def next(self):
 *         if self.index >= self.stop:             # <<<<<<<<<<<<<<
 *             raise StopIteration
 *         self.index = self.index + self.step
 */
  }

  /* "cython/core/tail.pyx":315
 *         if self.index >= self.stop:
 *             raise StopIteration
 *         self.index = self.index + self.step             # <<<<<<<<<<<<<<
 *         return self[self.index-self.step]
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_step); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_index, __pyx_t_1) < 0) __PYX_ERR(2, 315, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/tail.pyx":316
 *             raise StopIteration
 *         self.index = self.index + self.step
 *         return self[self.index-self.step]             # <<<<<<<<<<<<<<
 * 
 *     __next__ = next
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_step); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 316, __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_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 316, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/tail.pyx":312
 *         raise NotImplementedError("This census does not support manifold lookup")
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         if self.index >= self.stop:
 *             raise StopIteration
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.Census.next", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":320
 *     __next__ = next
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.length
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_6Census_9__len__(PyObject *__pyx_self, 
#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_6SnapPy_6Census_8__len__, "Census.__len__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_6Census_9__len__ = {"__len__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_6Census_9__len__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_6Census_8__len__};
static PyObject *__pyx_pw_6SnapPy_6Census_9__len__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 320, __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, "__len__") < 0)) __PYX_ERR(2, 320, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__len__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 320, __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("SnapPy.Census.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_6Census_8__len__(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_6Census_8__len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__len__", 1);

  /* "cython/core/tail.pyx":321
 * 
 *     def __len__(self):
 *         return self.length             # <<<<<<<<<<<<<<
 * 
 *     # subclasses override this
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cython/core/tail.pyx":320
 *     __next__ = next
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.length
 * 
 */

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

/* "cython/core/tail.pyx":324
 * 
 *     # subclasses override this
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_6Census_11__getitem__(PyObject *__pyx_self, 
#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_6SnapPy_6Census_10__getitem__, "Census.__getitem__(self, n)");
static PyMethodDef __pyx_mdef_6SnapPy_6Census_11__getitem__ = {"__getitem__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_6Census_11__getitem__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_6Census_10__getitem__};
static PyObject *__pyx_pw_6SnapPy_6Census_11__getitem__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_n = 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("__getitem__ (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_self,&__pyx_n_s_n,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 324, __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_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 324, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(2, 324, __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, "__getitem__") < 0)) __PYX_ERR(2, 324, __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_self = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 324, __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("SnapPy.Census.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_6Census_10__getitem__(__pyx_self, __pyx_v_self, __pyx_v_n);

  /* 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_6SnapPy_6Census_10__getitem__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_n) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__", 1);

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":376
 *     path = str(manifold_path)
 * 
 *     def __init__(self, indices=(0, length, 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 *         self.Census_Morwen8 = tarfile.open(os.path.join(manifold_path, 'morwen8.tgz'), 'r:*')
 */

static PyObject *__pyx_pf_6SnapPy_62__defaults__(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("__defaults__", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_indices);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_indices);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_indices)) __PYX_ERR(2, 376, __pyx_L1_error);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(2, 376, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None)) __PYX_ERR(2, 376, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_12CuspedCensus_1__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_6SnapPy_12CuspedCensus___init__, "CuspedCensus.__init__(self, indices=(0, length, 1))");
static PyMethodDef __pyx_mdef_6SnapPy_12CuspedCensus_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_12CuspedCensus_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_12CuspedCensus___init__};
static PyObject *__pyx_pw_6SnapPy_12CuspedCensus_1__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_self = 0;
  PyObject *__pyx_v_indices = 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("__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_self,&__pyx_n_s_indices,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_dynamic_args->__pyx_arg_indices);
    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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 376, __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_indices);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 376, __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(2, 376, __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_self = values[0];
    __pyx_v_indices = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(2, 376, __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("SnapPy.CuspedCensus.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_12CuspedCensus___init__(__pyx_self, __pyx_v_self, __pyx_v_indices);

  /* 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_6SnapPy_12CuspedCensus___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_indices) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "cython/core/tail.pyx":377
 * 
 *     def __init__(self, indices=(0, length, 1)):
 *         Census.__init__(self, indices)             # <<<<<<<<<<<<<<
 *         self.Census_Morwen8 = tarfile.open(os.path.join(manifold_path, 'morwen8.tgz'), 'r:*')
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Census); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 377, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 377, __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[3] = {__pyx_t_2, __pyx_v_self, __pyx_v_indices};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 377, __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;

  /* "cython/core/tail.pyx":378
 *     def __init__(self, indices=(0, length, 1)):
 *         Census.__init__(self, indices)
 *         self.Census_Morwen8 = tarfile.open(os.path.join(manifold_path, 'morwen8.tgz'), 'r:*')             # <<<<<<<<<<<<<<
 * 
 *     # Override
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tarfile); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_join); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_manifold_path); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_4 = 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_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_6, __pyx_kp_s_morwen8_tgz};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_3, __pyx_kp_s_r_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 378, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_Census_Morwen8, __pyx_t_1) < 0) __PYX_ERR(2, 378, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/tail.pyx":376
 *     path = str(manifold_path)
 * 
 *     def __init__(self, indices=(0, length, 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 *         self.Census_Morwen8 = tarfile.open(os.path.join(manifold_path, 'morwen8.tgz'), 'r:*')
 */

  /* 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_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.CuspedCensus.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":381
 * 
 *     # Override
 *     def lookup(self, n):             # <<<<<<<<<<<<<<
 *         return five_tet_orientable[n]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_12CuspedCensus_3lookup(PyObject *__pyx_self, 
#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_6SnapPy_12CuspedCensus_2lookup, "CuspedCensus.lookup(self, n)");
static PyMethodDef __pyx_mdef_6SnapPy_12CuspedCensus_3lookup = {"lookup", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_12CuspedCensus_3lookup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_12CuspedCensus_2lookup};
static PyObject *__pyx_pw_6SnapPy_12CuspedCensus_3lookup(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_n = 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("lookup (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_self,&__pyx_n_s_n,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 381, __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_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 381, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("lookup", 1, 2, 2, 1); __PYX_ERR(2, 381, __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, "lookup") < 0)) __PYX_ERR(2, 381, __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_self = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lookup", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 381, __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("SnapPy.CuspedCensus.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_12CuspedCensus_2lookup(__pyx_self, __pyx_v_self, __pyx_v_n);

  /* 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_6SnapPy_12CuspedCensus_2lookup(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_n) {
  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("lookup", 1);

  /* "cython/core/tail.pyx":382
 *     # Override
 *     def lookup(self, n):
 *         return five_tet_orientable[n]             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, n):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_five_tet_orientable); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 382, __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;

  /* "cython/core/tail.pyx":381
 * 
 *     # Override
 *     def lookup(self, n):             # <<<<<<<<<<<<<<
 *         return five_tet_orientable[n]
 * 
 */

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

/* "cython/core/tail.pyx":384
 *         return five_tet_orientable[n]
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_12CuspedCensus_5__getitem__(PyObject *__pyx_self, 
#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_6SnapPy_12CuspedCensus_4__getitem__, "CuspedCensus.__getitem__(self, n)");
static PyMethodDef __pyx_mdef_6SnapPy_12CuspedCensus_5__getitem__ = {"__getitem__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_12CuspedCensus_5__getitem__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_12CuspedCensus_4__getitem__};
static PyObject *__pyx_pw_6SnapPy_12CuspedCensus_5__getitem__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_n = 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("__getitem__ (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_self,&__pyx_n_s_n,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 384, __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_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 384, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(2, 384, __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, "__getitem__") < 0)) __PYX_ERR(2, 384, __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_self = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 384, __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("SnapPy.CuspedCensus.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_12CuspedCensus_4__getitem__(__pyx_self, __pyx_v_self, __pyx_v_n);

  /* 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_6SnapPy_12CuspedCensus_4__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n) {
  Triangulation *__pyx_v_c_triangulation;
  struct __pyx_obj_6SnapPy_Manifold *__pyx_v_result = 0;
  long __pyx_v_num_tet;
  PyObject *__pyx_v_census_index = NULL;
  PyObject *__pyx_v_num = NULL;
  PyObject *__pyx_v_spec = NULL;
  PyObject *__pyx_v_tarpath = NULL;
  PyObject *__pyx_v_filedata = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  char *__pyx_t_14;
  Orientability __pyx_t_15;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);
  __Pyx_INCREF(__pyx_v_n);

  /* "cython/core/tail.pyx":387
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 *         if isinstance(n, slice):             # <<<<<<<<<<<<<<
 *             return self.__class__(n.indices(self.length))
 *         if n < 0:
 */
  __pyx_t_1 = PySlice_Check(__pyx_v_n); 
  if (__pyx_t_1) {

    /* "cython/core/tail.pyx":388
 *         cdef Manifold result
 *         if isinstance(n, slice):
 *             return self.__class__(n.indices(self.length))             # <<<<<<<<<<<<<<
 *         if n < 0:
 *             n = self.length - n
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_n, __pyx_n_s_indices); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 388, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 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_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 388, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 388, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/tail.pyx":387
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 *         if isinstance(n, slice):             # <<<<<<<<<<<<<<
 *             return self.__class__(n.indices(self.length))
 *         if n < 0:
 */
  }

  /* "cython/core/tail.pyx":389
 *         if isinstance(n, slice):
 *             return self.__class__(n.indices(self.length))
 *         if n < 0:             # <<<<<<<<<<<<<<
 *             n = self.length - n
 *         if n < self.five_length:
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_n, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 389, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 389, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "cython/core/tail.pyx":390
 *             return self.__class__(n.indices(self.length))
 *         if n < 0:
 *             n = self.length - n             # <<<<<<<<<<<<<<
 *         if n < self.five_length:
 *             num_tet = 5
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyNumber_Subtract(__pyx_t_2, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_n, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cython/core/tail.pyx":389
 *         if isinstance(n, slice):
 *             return self.__class__(n.indices(self.length))
 *         if n < 0:             # <<<<<<<<<<<<<<
 *             n = self.length - n
 *         if n < self.five_length:
 */
  }

  /* "cython/core/tail.pyx":391
 *         if n < 0:
 *             n = self.length - n
 *         if n < self.five_length:             # <<<<<<<<<<<<<<
 *             num_tet = 5
 *             census_index = self.lookup(n)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_five_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_n, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 391, __pyx_L1_error)
  __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(2, 391, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "cython/core/tail.pyx":392
 *             n = self.length - n
 *         if n < self.five_length:
 *             num_tet = 5             # <<<<<<<<<<<<<<
 *             census_index = self.lookup(n)
 *         elif n - self.five_length < self.six_length:
 */
    __pyx_v_num_tet = 5;

    /* "cython/core/tail.pyx":393
 *         if n < self.five_length:
 *             num_tet = 5
 *             census_index = self.lookup(n)             # <<<<<<<<<<<<<<
 *         elif n - self.five_length < self.six_length:
 *             num_tet = 6
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_lookup); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 393, __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, __pyx_v_n};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 393, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_census_index = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":391
 *         if n < 0:
 *             n = self.length - n
 *         if n < self.five_length:             # <<<<<<<<<<<<<<
 *             num_tet = 5
 *             census_index = self.lookup(n)
 */
    goto __pyx_L5;
  }

  /* "cython/core/tail.pyx":394
 *             num_tet = 5
 *             census_index = self.lookup(n)
 *         elif n - self.five_length < self.six_length:             # <<<<<<<<<<<<<<
 *             num_tet = 6
 *             census_index = n - self.five_length
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_five_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Subtract(__pyx_v_n, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_six_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "cython/core/tail.pyx":395
 *             census_index = self.lookup(n)
 *         elif n - self.five_length < self.six_length:
 *             num_tet = 6             # <<<<<<<<<<<<<<
 *             census_index = n - self.five_length
 *         elif n - self.five_length - self.six_length < self.seven_length:
 */
    __pyx_v_num_tet = 6;

    /* "cython/core/tail.pyx":396
 *         elif n - self.five_length < self.six_length:
 *             num_tet = 6
 *             census_index = n - self.five_length             # <<<<<<<<<<<<<<
 *         elif n - self.five_length - self.six_length < self.seven_length:
 *             num_tet = 7
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_five_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyNumber_Subtract(__pyx_v_n, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_census_index = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":394
 *             num_tet = 5
 *             census_index = self.lookup(n)
 *         elif n - self.five_length < self.six_length:             # <<<<<<<<<<<<<<
 *             num_tet = 6
 *             census_index = n - self.five_length
 */
    goto __pyx_L5;
  }

  /* "cython/core/tail.pyx":397
 *             num_tet = 6
 *             census_index = n - self.five_length
 *         elif n - self.five_length - self.six_length < self.seven_length:             # <<<<<<<<<<<<<<
 *             num_tet = 7
 *             census_index = n - self.five_length - self.six_length
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_five_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyNumber_Subtract(__pyx_v_n, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_six_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_seven_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 397, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 397, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_1) {

    /* "cython/core/tail.pyx":398
 *             census_index = n - self.five_length
 *         elif n - self.five_length - self.six_length < self.seven_length:
 *             num_tet = 7             # <<<<<<<<<<<<<<
 *             census_index = n - self.five_length - self.six_length
 *         elif (self.orientability == Orientability.index('orientable')
 */
    __pyx_v_num_tet = 7;

    /* "cython/core/tail.pyx":399
 *         elif n - self.five_length - self.six_length < self.seven_length:
 *             num_tet = 7
 *             census_index = n - self.five_length - self.six_length             # <<<<<<<<<<<<<<
 *         elif (self.orientability == Orientability.index('orientable')
 *               and (n - self.five_length - self.six_length -
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_five_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_2 = PyNumber_Subtract(__pyx_v_n, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_six_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = PyNumber_Subtract(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 399, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_census_index = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "cython/core/tail.pyx":397
 *             num_tet = 6
 *             census_index = n - self.five_length
 *         elif n - self.five_length - self.six_length < self.seven_length:             # <<<<<<<<<<<<<<
 *             num_tet = 7
 *             census_index = n - self.five_length - self.six_length
 */
    goto __pyx_L5;
  }

  /* "cython/core/tail.pyx":400
 *             num_tet = 7
 *             census_index = n - self.five_length - self.six_length
 *         elif (self.orientability == Orientability.index('orientable')             # <<<<<<<<<<<<<<
 *               and (n - self.five_length - self.six_length -
 *                    self.seven_length < self.eight_length)):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_orientability); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Orientability); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_orientable};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 400, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_9) {
  } else {
    __pyx_t_1 = __pyx_t_9;
    goto __pyx_L6_bool_binop_done;
  }

  /* "cython/core/tail.pyx":401
 *             census_index = n - self.five_length - self.six_length
 *         elif (self.orientability == Orientability.index('orientable')
 *               and (n - self.five_length - self.six_length -             # <<<<<<<<<<<<<<
 *                    self.seven_length < self.eight_length)):
 *             census_index = (n - self.five_length - self.six_length
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_five_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyNumber_Subtract(__pyx_v_n, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_six_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyNumber_Subtract(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":402
 *         elif (self.orientability == Orientability.index('orientable')
 *               and (n - self.five_length - self.six_length -
 *                    self.seven_length < self.eight_length)):             # <<<<<<<<<<<<<<
 *             census_index = (n - self.five_length - self.six_length
 *                             - self.seven_length)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_seven_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cython/core/tail.pyx":401
 *             census_index = n - self.five_length - self.six_length
 *         elif (self.orientability == Orientability.index('orientable')
 *               and (n - self.five_length - self.six_length -             # <<<<<<<<<<<<<<
 *                    self.seven_length < self.eight_length)):
 *             census_index = (n - self.five_length - self.six_length
 */
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":402
 *         elif (self.orientability == Orientability.index('orientable')
 *               and (n - self.five_length - self.six_length -
 *                    self.seven_length < self.eight_length)):             # <<<<<<<<<<<<<<
 *             census_index = (n - self.five_length - self.six_length
 *                             - self.seven_length)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_eight_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(2, 402, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_1 = __pyx_t_9;
  __pyx_L6_bool_binop_done:;

  /* "cython/core/tail.pyx":400
 *             num_tet = 7
 *             census_index = n - self.five_length - self.six_length
 *         elif (self.orientability == Orientability.index('orientable')             # <<<<<<<<<<<<<<
 *               and (n - self.five_length - self.six_length -
 *                    self.seven_length < self.eight_length)):
 */
  if (likely(__pyx_t_1)) {

    /* "cython/core/tail.pyx":403
 *               and (n - self.five_length - self.six_length -
 *                    self.seven_length < self.eight_length)):
 *             census_index = (n - self.five_length - self.six_length             # <<<<<<<<<<<<<<
 *                             - self.seven_length)
 *             # Make this work without passing the spec to Manifold()
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_five_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyNumber_Subtract(__pyx_v_n, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_six_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyNumber_Subtract(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 403, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/tail.pyx":404
 *                    self.seven_length < self.eight_length)):
 *             census_index = (n - self.five_length - self.six_length
 *                             - self.seven_length)             # <<<<<<<<<<<<<<
 *             # Make this work without passing the spec to Manifold()
 *             num = repr(census_index)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_seven_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyNumber_Subtract(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 404, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_census_index = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cython/core/tail.pyx":406
 *                             - self.seven_length)
 *             # Make this work without passing the spec to Manifold()
 *             num = repr(census_index)             # <<<<<<<<<<<<<<
 *             spec = "t" + "0"*(5 - len(num)) + num
 *             tarpath = "morwen8/" + spec
 */
    __pyx_t_5 = PyObject_Repr(__pyx_v_census_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 406, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_num = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cython/core/tail.pyx":407
 *             # Make this work without passing the spec to Manifold()
 *             num = repr(census_index)
 *             spec = "t" + "0"*(5 - len(num)) + num             # <<<<<<<<<<<<<<
 *             tarpath = "morwen8/" + spec
 *             try:
 */
    __pyx_t_10 = PyObject_Length(__pyx_v_num); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(2, 407, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PySequence_Multiply(__pyx_kp_s_0, (5 - __pyx_t_10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyStr_Concat(__pyx_n_s_t, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_v_num); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_spec = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cython/core/tail.pyx":408
 *             num = repr(census_index)
 *             spec = "t" + "0"*(5 - len(num)) + num
 *             tarpath = "morwen8/" + spec             # <<<<<<<<<<<<<<
 *             try:
 *                 filedata = self.Census_Morwen8.extractfile(tarpath).read()
 */
    __pyx_t_5 = PyNumber_Add(__pyx_kp_s_morwen8, __pyx_v_spec); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_tarpath = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "cython/core/tail.pyx":409
 *             spec = "t" + "0"*(5 - len(num)) + num
 *             tarpath = "morwen8/" + spec
 *             try:             # <<<<<<<<<<<<<<
 *                 filedata = self.Census_Morwen8.extractfile(tarpath).read()
 *                 c_triangulation = read_triangulation_from_string(filedata)
 */
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      /*try:*/ {

        /* "cython/core/tail.pyx":410
 *             tarpath = "morwen8/" + spec
 *             try:
 *                 filedata = self.Census_Morwen8.extractfile(tarpath).read()             # <<<<<<<<<<<<<<
 *                 c_triangulation = read_triangulation_from_string(filedata)
 *             except:
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Census_Morwen8); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 410, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_extractfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 410, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = NULL;
        __pyx_t_8 = 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_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_tarpath};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 410, __pyx_L8_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_read); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 410, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        __pyx_t_8 = 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_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 410, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __pyx_v_filedata = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "cython/core/tail.pyx":411
 *             try:
 *                 filedata = self.Census_Morwen8.extractfile(tarpath).read()
 *                 c_triangulation = read_triangulation_from_string(filedata)             # <<<<<<<<<<<<<<
 *             except:
 *                 raise IOError('The Morwen 8 tetrahedra manifold %s '
 */
        __pyx_t_14 = __Pyx_PyObject_AsWritableString(__pyx_v_filedata); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(2, 411, __pyx_L8_error)
        __pyx_v_c_triangulation = read_triangulation_from_string(__pyx_t_14);

        /* "cython/core/tail.pyx":409
 *             spec = "t" + "0"*(5 - len(num)) + num
 *             tarpath = "morwen8/" + spec
 *             try:             # <<<<<<<<<<<<<<
 *                 filedata = self.Census_Morwen8.extractfile(tarpath).read()
 *                 c_triangulation = read_triangulation_from_string(filedata)
 */
      }
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L13_try_end;
      __pyx_L8_error:;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "cython/core/tail.pyx":412
 *                 filedata = self.Census_Morwen8.extractfile(tarpath).read()
 *                 c_triangulation = read_triangulation_from_string(filedata)
 *             except:             # <<<<<<<<<<<<<<
 *                 raise IOError('The Morwen 8 tetrahedra manifold %s '
 *                               'was not found.' % spec)
 */
      /*except:*/ {
        __Pyx_AddTraceback("SnapPy.CuspedCensus.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(2, 412, __pyx_L10_except_error)
        __Pyx_XGOTREF(__pyx_t_5);
        __Pyx_XGOTREF(__pyx_t_2);
        __Pyx_XGOTREF(__pyx_t_3);

        /* "cython/core/tail.pyx":414
 *             except:
 *                 raise IOError('The Morwen 8 tetrahedra manifold %s '
 *                               'was not found.' % spec)             # <<<<<<<<<<<<<<
 *             result = Manifold(spec='empty')
 *             result.set_c_triangulation(c_triangulation)
 */
        __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_The_Morwen_8_tetrahedra_manifold, __pyx_v_spec); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 414, __pyx_L10_except_error)
        __Pyx_GOTREF(__pyx_t_4);

        /* "cython/core/tail.pyx":413
 *                 c_triangulation = read_triangulation_from_string(filedata)
 *             except:
 *                 raise IOError('The Morwen 8 tetrahedra manifold %s '             # <<<<<<<<<<<<<<
 *                               'was not found.' % spec)
 *             result = Manifold(spec='empty')
 */
        __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 413, __pyx_L10_except_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_Raise(__pyx_t_6, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __PYX_ERR(2, 413, __pyx_L10_except_error)
      }

      /* "cython/core/tail.pyx":409
 *             spec = "t" + "0"*(5 - len(num)) + num
 *             tarpath = "morwen8/" + spec
 *             try:             # <<<<<<<<<<<<<<
 *                 filedata = self.Census_Morwen8.extractfile(tarpath).read()
 *                 c_triangulation = read_triangulation_from_string(filedata)
 */
      __pyx_L10_except_error:;
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      goto __pyx_L1_error;
      __pyx_L13_try_end:;
    }

    /* "cython/core/tail.pyx":415
 *                 raise IOError('The Morwen 8 tetrahedra manifold %s '
 *                               'was not found.' % spec)
 *             result = Manifold(spec='empty')             # <<<<<<<<<<<<<<
 *             result.set_c_triangulation(c_triangulation)
 *             return result
 */
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_spec, __pyx_n_s_empty) < 0) __PYX_ERR(2, 415, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6SnapPy_Manifold), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 415, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_result = ((struct __pyx_obj_6SnapPy_Manifold *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":416
 *                               'was not found.' % spec)
 *             result = Manifold(spec='empty')
 *             result.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 *             return result
 *             # return Manifold('t%d' % census_index)
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_Manifold *)__pyx_v_result->__pyx_base.__pyx_vtab)->__pyx_base.set_c_triangulation(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_result), __pyx_v_c_triangulation); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":417
 *             result = Manifold(spec='empty')
 *             result.set_c_triangulation(c_triangulation)
 *             return result             # <<<<<<<<<<<<<<
 *             # return Manifold('t%d' % census_index)
 *         else:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_result);
    __pyx_r = ((PyObject *)__pyx_v_result);
    goto __pyx_L0;

    /* "cython/core/tail.pyx":400
 *             num_tet = 7
 *             census_index = n - self.five_length - self.six_length
 *         elif (self.orientability == Orientability.index('orientable')             # <<<<<<<<<<<<<<
 *               and (n - self.five_length - self.six_length -
 *                    self.seven_length < self.eight_length)):
 */
  }

  /* "cython/core/tail.pyx":420
 *             # return Manifold('t%d' % census_index)
 *         else:
 *             raise IndexError('Index is out of range.')             # <<<<<<<<<<<<<<
 *         c_triangulation = GetCuspedCensusManifold(
 *             self.path, num_tet, self.orientability, census_index)
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__156, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 420, __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(2, 420, __pyx_L1_error)
  }
  __pyx_L5:;

  /* "cython/core/tail.pyx":422
 *             raise IndexError('Index is out of range.')
 *         c_triangulation = GetCuspedCensusManifold(
 *             self.path, num_tet, self.orientability, census_index)             # <<<<<<<<<<<<<<
 *         if c_triangulation == NULL:
 *             print(num_tet, census_index)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_14 = __Pyx_PyObject_AsWritableString(__pyx_t_2); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(2, 422, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_orientability); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_15 = ((Orientability)__Pyx_PyInt_As_Orientability(__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_census_index); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 422, __pyx_L1_error)

  /* "cython/core/tail.pyx":421
 *         else:
 *             raise IndexError('Index is out of range.')
 *         c_triangulation = GetCuspedCensusManifold(             # <<<<<<<<<<<<<<
 *             self.path, num_tet, self.orientability, census_index)
 *         if c_triangulation == NULL:
 */
  __pyx_v_c_triangulation = GetCuspedCensusManifold(__pyx_t_14, __pyx_v_num_tet, __pyx_t_15, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":423
 *         c_triangulation = GetCuspedCensusManifold(
 *             self.path, num_tet, self.orientability, census_index)
 *         if c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             print(num_tet, census_index)
 *             raise RuntimeError('SnapPea failed to read the census manifold.')
 */
  __pyx_t_1 = (__pyx_v_c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/tail.pyx":424
 *             self.path, num_tet, self.orientability, census_index)
 *         if c_triangulation == NULL:
 *             print(num_tet, census_index)             # <<<<<<<<<<<<<<
 *             raise RuntimeError('SnapPea failed to read the census manifold.')
 *         result = Manifold(spec='empty')
 */
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_num_tet); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 424, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(2, 424, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_census_index);
    __Pyx_GIVEREF(__pyx_v_census_index);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_census_index)) __PYX_ERR(2, 424, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 424, __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;

    /* "cython/core/tail.pyx":425
 *         if c_triangulation == NULL:
 *             print(num_tet, census_index)
 *             raise RuntimeError('SnapPea failed to read the census manifold.')             # <<<<<<<<<<<<<<
 *         result = Manifold(spec='empty')
 *         result.set_c_triangulation(c_triangulation)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__157, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 425, __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(2, 425, __pyx_L1_error)

    /* "cython/core/tail.pyx":423
 *         c_triangulation = GetCuspedCensusManifold(
 *             self.path, num_tet, self.orientability, census_index)
 *         if c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             print(num_tet, census_index)
 *             raise RuntimeError('SnapPea failed to read the census manifold.')
 */
  }

  /* "cython/core/tail.pyx":426
 *             print(num_tet, census_index)
 *             raise RuntimeError('SnapPea failed to read the census manifold.')
 *         result = Manifold(spec='empty')             # <<<<<<<<<<<<<<
 *         result.set_c_triangulation(c_triangulation)
 *         return result
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_spec, __pyx_n_s_empty) < 0) __PYX_ERR(2, 426, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6SnapPy_Manifold), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 426, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_result = ((struct __pyx_obj_6SnapPy_Manifold *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":427
 *             raise RuntimeError('SnapPea failed to read the census manifold.')
 *         result = Manifold(spec='empty')
 *         result.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_6SnapPy_Manifold *)__pyx_v_result->__pyx_base.__pyx_vtab)->__pyx_base.set_c_triangulation(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_result), __pyx_v_c_triangulation); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":428
 *         result = Manifold(spec='empty')
 *         result.set_c_triangulation(c_triangulation)
 *         return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF((PyObject *)__pyx_v_result);
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "cython/core/tail.pyx":384
 *         return five_tet_orientable[n]
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.CuspedCensus.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_census_index);
  __Pyx_XDECREF(__pyx_v_num);
  __Pyx_XDECREF(__pyx_v_spec);
  __Pyx_XDECREF(__pyx_v_tarpath);
  __Pyx_XDECREF(__pyx_v_filedata);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":444
 *     orientability = Orientability.index('nonorientable')
 * 
 *     def __init__(self, indices=(0, length, 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 * 
 */

static PyObject *__pyx_pf_6SnapPy_64__defaults__(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("__defaults__", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_indices);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_indices);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self)->__pyx_arg_indices)) __PYX_ERR(2, 444, __pyx_L1_error);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(2, 444, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None)) __PYX_ERR(2, 444, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_28ObsNonorientableCuspedCensus_1__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_6SnapPy_28ObsNonorientableCuspedCensus___init__, "ObsNonorientableCuspedCensus.__init__(self, indices=(0, length, 1))");
static PyMethodDef __pyx_mdef_6SnapPy_28ObsNonorientableCuspedCensus_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_28ObsNonorientableCuspedCensus_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_28ObsNonorientableCuspedCensus___init__};
static PyObject *__pyx_pw_6SnapPy_28ObsNonorientableCuspedCensus_1__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_self = 0;
  PyObject *__pyx_v_indices = 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("__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_self,&__pyx_n_s_indices,0};
    __pyx_defaults1 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_self);
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_dynamic_args->__pyx_arg_indices);
    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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 444, __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_indices);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 444, __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(2, 444, __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_self = values[0];
    __pyx_v_indices = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(2, 444, __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("SnapPy.ObsNonorientableCuspedCensus.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_28ObsNonorientableCuspedCensus___init__(__pyx_self, __pyx_v_self, __pyx_v_indices);

  /* 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_6SnapPy_28ObsNonorientableCuspedCensus___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_indices) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "cython/core/tail.pyx":445
 * 
 *     def __init__(self, indices=(0, length, 1)):
 *         Census.__init__(self, indices)             # <<<<<<<<<<<<<<
 * 
 *     def lookup(self, n):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Census); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 445, __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[3] = {__pyx_t_2, __pyx_v_self, __pyx_v_indices};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 445, __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;

  /* "cython/core/tail.pyx":444
 *     orientability = Orientability.index('nonorientable')
 * 
 *     def __init__(self, indices=(0, length, 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 * 
 */

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

/* "cython/core/tail.pyx":447
 *         Census.__init__(self, indices)
 * 
 *     def lookup(self, n):             # <<<<<<<<<<<<<<
 *         return five_tet_nonorientable[n]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_28ObsNonorientableCuspedCensus_3lookup(PyObject *__pyx_self, 
#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_6SnapPy_28ObsNonorientableCuspedCensus_2lookup, "ObsNonorientableCuspedCensus.lookup(self, n)");
static PyMethodDef __pyx_mdef_6SnapPy_28ObsNonorientableCuspedCensus_3lookup = {"lookup", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_28ObsNonorientableCuspedCensus_3lookup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_28ObsNonorientableCuspedCensus_2lookup};
static PyObject *__pyx_pw_6SnapPy_28ObsNonorientableCuspedCensus_3lookup(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_n = 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("lookup (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_self,&__pyx_n_s_n,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 447, __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_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 447, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("lookup", 1, 2, 2, 1); __PYX_ERR(2, 447, __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, "lookup") < 0)) __PYX_ERR(2, 447, __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_self = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lookup", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 447, __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("SnapPy.ObsNonorientableCuspedCensus.lookup", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_28ObsNonorientableCuspedCensus_2lookup(__pyx_self, __pyx_v_self, __pyx_v_n);

  /* 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_6SnapPy_28ObsNonorientableCuspedCensus_2lookup(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_n) {
  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("lookup", 1);

  /* "cython/core/tail.pyx":448
 * 
 *     def lookup(self, n):
 *         return five_tet_nonorientable[n]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_five_tet_nonorientable); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 448, __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;

  /* "cython/core/tail.pyx":447
 *         Census.__init__(self, indices)
 * 
 *     def lookup(self, n):             # <<<<<<<<<<<<<<
 *         return five_tet_nonorientable[n]
 * 
 */

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

/* "cython/core/tail.pyx":461
 *     path = str(manifold_path)
 * 
 *     def __init__(self, indices=(0, 11031, 1)):             # <<<<<<<<<<<<<<
 *         if ObsOrientableClosedCensus.data is None:
 *             datafile = os.path.join(closed_census_directory,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_25ObsOrientableClosedCensus_1__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_6SnapPy_25ObsOrientableClosedCensus___init__, "ObsOrientableClosedCensus.__init__(self, indices=(0, 11031, 1))");
static PyMethodDef __pyx_mdef_6SnapPy_25ObsOrientableClosedCensus_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_25ObsOrientableClosedCensus_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_25ObsOrientableClosedCensus___init__};
static PyObject *__pyx_pw_6SnapPy_25ObsOrientableClosedCensus_1__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_self = 0;
  PyObject *__pyx_v_indices = 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("__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_self,&__pyx_n_s_indices,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_tuple__158)));
    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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 461, __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_indices);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 461, __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(2, 461, __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_self = values[0];
    __pyx_v_indices = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(2, 461, __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("SnapPy.ObsOrientableClosedCensus.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_25ObsOrientableClosedCensus___init__(__pyx_self, __pyx_v_self, __pyx_v_indices);

  /* 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_6SnapPy_25ObsOrientableClosedCensus___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_indices) {
  PyObject *__pyx_v_datafile = NULL;
  PyObject *__pyx_v_closed_orientable = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "cython/core/tail.pyx":462
 * 
 *     def __init__(self, indices=(0, 11031, 1)):
 *         if ObsOrientableClosedCensus.data is None:             # <<<<<<<<<<<<<<
 *             datafile = os.path.join(closed_census_directory,
 *                                     'ClosedOrientableDistinct.txt')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ObsOrientableClosedCensus); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 == Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "cython/core/tail.pyx":463
 *     def __init__(self, indices=(0, 11031, 1)):
 *         if ObsOrientableClosedCensus.data is None:
 *             datafile = os.path.join(closed_census_directory,             # <<<<<<<<<<<<<<
 *                                     'ClosedOrientableDistinct.txt')
 *             closed_orientable = open(datafile)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_join); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 463, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_closed_census_directory); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 463, __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_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_4, __pyx_kp_s_ClosedOrientableDistinct_txt};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 463, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_v_datafile = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":465
 *             datafile = os.path.join(closed_census_directory,
 *                                     'ClosedOrientableDistinct.txt')
 *             closed_orientable = open(datafile)             # <<<<<<<<<<<<<<
 *             ObsOrientableClosedCensus.data = closed_orientable.readlines()
 *             closed_orientable.close()
 */
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_open, __pyx_v_datafile); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_closed_orientable = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":466
 *                                     'ClosedOrientableDistinct.txt')
 *             closed_orientable = open(datafile)
 *             ObsOrientableClosedCensus.data = closed_orientable.readlines()             # <<<<<<<<<<<<<<
 *             closed_orientable.close()
 *         self.length = len(ObsOrientableClosedCensus.data)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_closed_orientable, __pyx_n_s_readlines); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 466, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ObsOrientableClosedCensus); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_data, __pyx_t_2) < 0) __PYX_ERR(2, 466, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/tail.pyx":467
 *             closed_orientable = open(datafile)
 *             ObsOrientableClosedCensus.data = closed_orientable.readlines()
 *             closed_orientable.close()             # <<<<<<<<<<<<<<
 *         self.length = len(ObsOrientableClosedCensus.data)
 *         Census.__init__(self, indices)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_closed_orientable, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 467, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 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_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __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(2, 467, __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;

    /* "cython/core/tail.pyx":462
 * 
 *     def __init__(self, indices=(0, 11031, 1)):
 *         if ObsOrientableClosedCensus.data is None:             # <<<<<<<<<<<<<<
 *             datafile = os.path.join(closed_census_directory,
 *                                     'ClosedOrientableDistinct.txt')
 */
  }

  /* "cython/core/tail.pyx":468
 *             ObsOrientableClosedCensus.data = closed_orientable.readlines()
 *             closed_orientable.close()
 *         self.length = len(ObsOrientableClosedCensus.data)             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ObsOrientableClosedCensus); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(2, 468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_length, __pyx_t_2) < 0) __PYX_ERR(2, 468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":469
 *             closed_orientable.close()
 *         self.length = len(ObsOrientableClosedCensus.data)
 *         Census.__init__(self, indices)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, n):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Census); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_self, __pyx_v_indices};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 469, __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;

  /* "cython/core/tail.pyx":461
 *     path = str(manifold_path)
 * 
 *     def __init__(self, indices=(0, 11031, 1)):             # <<<<<<<<<<<<<<
 *         if ObsOrientableClosedCensus.data is None:
 *             datafile = os.path.join(closed_census_directory,
 */

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("SnapPy.ObsOrientableClosedCensus.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datafile);
  __Pyx_XDECREF(__pyx_v_closed_orientable);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":471
 *         Census.__init__(self, indices)
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_25ObsOrientableClosedCensus_3__getitem__(PyObject *__pyx_self, 
#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_6SnapPy_25ObsOrientableClosedCensus_2__getitem__, "ObsOrientableClosedCensus.__getitem__(self, n)");
static PyMethodDef __pyx_mdef_6SnapPy_25ObsOrientableClosedCensus_3__getitem__ = {"__getitem__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_25ObsOrientableClosedCensus_3__getitem__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_25ObsOrientableClosedCensus_2__getitem__};
static PyObject *__pyx_pw_6SnapPy_25ObsOrientableClosedCensus_3__getitem__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_n = 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("__getitem__ (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_self,&__pyx_n_s_n,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 471, __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_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 471, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(2, 471, __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, "__getitem__") < 0)) __PYX_ERR(2, 471, __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_self = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 471, __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("SnapPy.ObsOrientableClosedCensus.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_25ObsOrientableClosedCensus_2__getitem__(__pyx_self, __pyx_v_self, __pyx_v_n);

  /* 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_6SnapPy_25ObsOrientableClosedCensus_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n) {
  Triangulation *__pyx_v_c_triangulation;
  struct __pyx_obj_6SnapPy_Manifold *__pyx_v_result = 0;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  PyObject *__pyx_v_num_tet = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_m = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  char *__pyx_t_11;
  Orientability __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 1);

  /* "cython/core/tail.pyx":474
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 *         if isinstance(n, slice):             # <<<<<<<<<<<<<<
 *             return self.__class__(n.indices(self.length))
 *         _, num_tet, index, m, l = ObsOrientableClosedCensus.data[n].split()
 */
  __pyx_t_1 = PySlice_Check(__pyx_v_n); 
  if (__pyx_t_1) {

    /* "cython/core/tail.pyx":475
 *         cdef Manifold result
 *         if isinstance(n, slice):
 *             return self.__class__(n.indices(self.length))             # <<<<<<<<<<<<<<
 *         _, num_tet, index, m, l = ObsOrientableClosedCensus.data[n].split()
 *         c_triangulation = GetCuspedCensusManifold(
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_n, __pyx_n_s_indices); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 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_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 475, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 475, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/tail.pyx":474
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 *         if isinstance(n, slice):             # <<<<<<<<<<<<<<
 *             return self.__class__(n.indices(self.length))
 *         _, num_tet, index, m, l = ObsOrientableClosedCensus.data[n].split()
 */
  }

  /* "cython/core/tail.pyx":476
 *         if isinstance(n, slice):
 *             return self.__class__(n.indices(self.length))
 *         _, num_tet, index, m, l = ObsOrientableClosedCensus.data[n].split()             # <<<<<<<<<<<<<<
 *         c_triangulation = GetCuspedCensusManifold(
 *             self.path, int(num_tet), self.orientability, int(index))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ObsOrientableClosedCensus); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(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_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 5)) {
      if (size > 5) __Pyx_RaiseTooManyValuesError(5);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(2, 476, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 3); 
      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 4); 
    } else {
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 3); 
      __pyx_t_7 = PyList_GET_ITEM(sequence, 4); 
    }
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[5] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7};
      for (i=0; i < 5; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(2, 476, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    PyObject** temps[5] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7};
    __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 476, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
    for (index=0; index < 5; index++) {
      PyObject* item = __pyx_t_10(__pyx_t_9); if (unlikely(!item)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(item);
      *(temps[index]) = item;
    }
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 5) < 0) __PYX_ERR(2, 476, __pyx_L1_error)
    __pyx_t_10 = NULL;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(2, 476, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __pyx_v__ = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_num_tet = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_index = __pyx_t_5;
  __pyx_t_5 = 0;
  __pyx_v_m = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_l = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "cython/core/tail.pyx":478
 *         _, num_tet, index, m, l = ObsOrientableClosedCensus.data[n].split()
 *         c_triangulation = GetCuspedCensusManifold(
 *             self.path, int(num_tet), self.orientability, int(index))             # <<<<<<<<<<<<<<
 *         if c_triangulation == NULL:
 *             print(num_tet, index)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = __Pyx_PyObject_AsWritableString(__pyx_t_2); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(2, 478, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_v_num_tet); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 478, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_orientability); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_12 = ((Orientability)__Pyx_PyInt_As_Orientability(__pyx_t_7)); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 478, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_v_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 478, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cython/core/tail.pyx":477
 *             return self.__class__(n.indices(self.length))
 *         _, num_tet, index, m, l = ObsOrientableClosedCensus.data[n].split()
 *         c_triangulation = GetCuspedCensusManifold(             # <<<<<<<<<<<<<<
 *             self.path, int(num_tet), self.orientability, int(index))
 *         if c_triangulation == NULL:
 */
  __pyx_v_c_triangulation = GetCuspedCensusManifold(__pyx_t_11, __pyx_t_8, __pyx_t_12, __pyx_t_13);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":479
 *         c_triangulation = GetCuspedCensusManifold(
 *             self.path, int(num_tet), self.orientability, int(index))
 *         if c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             print(num_tet, index)
 *             raise RuntimeError('SnapPea failed to read the census manifold.')
 */
  __pyx_t_1 = (__pyx_v_c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/tail.pyx":480
 *             self.path, int(num_tet), self.orientability, int(index))
 *         if c_triangulation == NULL:
 *             print(num_tet, index)             # <<<<<<<<<<<<<<
 *             raise RuntimeError('SnapPea failed to read the census manifold.')
 *         result = Triangulation(spec='empty')
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_num_tet);
    __Pyx_GIVEREF(__pyx_v_num_tet);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_num_tet)) __PYX_ERR(2, 480, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_index)) __PYX_ERR(2, 480, __pyx_L1_error);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cython/core/tail.pyx":481
 *         if c_triangulation == NULL:
 *             print(num_tet, index)
 *             raise RuntimeError('SnapPea failed to read the census manifold.')             # <<<<<<<<<<<<<<
 *         result = Triangulation(spec='empty')
 *         result.set_c_triangulation(c_triangulation)
 */
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__157, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __PYX_ERR(2, 481, __pyx_L1_error)

    /* "cython/core/tail.pyx":479
 *         c_triangulation = GetCuspedCensusManifold(
 *             self.path, int(num_tet), self.orientability, int(index))
 *         if c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             print(num_tet, index)
 *             raise RuntimeError('SnapPea failed to read the census manifold.')
 */
  }

  /* "cython/core/tail.pyx":482
 *             print(num_tet, index)
 *             raise RuntimeError('SnapPea failed to read the census manifold.')
 *         result = Triangulation(spec='empty')             # <<<<<<<<<<<<<<
 *         result.set_c_triangulation(c_triangulation)
 *         result.dehn_fill((int(m), int(l)))
 */
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_spec, __pyx_n_s_empty) < 0) __PYX_ERR(2, 482, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6SnapPy_Triangulation), __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6SnapPy_Manifold)))) __PYX_ERR(2, 482, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_obj_6SnapPy_Manifold *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":483
 *             raise RuntimeError('SnapPea failed to read the census manifold.')
 *         result = Triangulation(spec='empty')
 *         result.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 *         result.dehn_fill((int(m), int(l)))
 *         return result.with_hyperbolic_structure()
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_Manifold *)__pyx_v_result->__pyx_base.__pyx_vtab)->__pyx_base.set_c_triangulation(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_result), __pyx_v_c_triangulation); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":484
 *         result = Triangulation(spec='empty')
 *         result.set_c_triangulation(c_triangulation)
 *         result.dehn_fill((int(m), int(l)))             # <<<<<<<<<<<<<<
 *         return result.with_hyperbolic_structure()
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_dehn_fill); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_v_m); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_l); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6)) __PYX_ERR(2, 484, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5)) __PYX_ERR(2, 484, __pyx_L1_error);
  __pyx_t_6 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_13 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_13 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 484, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":485
 *         result.set_c_triangulation(c_triangulation)
 *         result.dehn_fill((int(m), int(l)))
 *         return result.with_hyperbolic_structure()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_with_hyperbolic_structure); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = NULL;
  __pyx_t_13 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_13 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_13, 0+__pyx_t_13);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 485, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/tail.pyx":471
 *         Census.__init__(self, indices)
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("SnapPy.ObsOrientableClosedCensus.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_XDECREF(__pyx_v_num_tet);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":496
 *     path = str(manifold_path)
 * 
 *     def __init__(self, indices=(0, 17, 1)):             # <<<<<<<<<<<<<<
 *         if ObsNonorientableClosedCensus.data is None:
 *             datafile = os.path.join(closed_census_directory,
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_28ObsNonorientableClosedCensus_1__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_6SnapPy_28ObsNonorientableClosedCensus___init__, "ObsNonorientableClosedCensus.__init__(self, indices=(0, 17, 1))");
static PyMethodDef __pyx_mdef_6SnapPy_28ObsNonorientableClosedCensus_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_28ObsNonorientableClosedCensus_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_28ObsNonorientableClosedCensus___init__};
static PyObject *__pyx_pw_6SnapPy_28ObsNonorientableClosedCensus_1__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_self = 0;
  PyObject *__pyx_v_indices = 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("__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_self,&__pyx_n_s_indices,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_tuple__159)));
    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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 496, __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_indices);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 496, __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(2, 496, __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_self = values[0];
    __pyx_v_indices = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(2, 496, __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("SnapPy.ObsNonorientableClosedCensus.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_28ObsNonorientableClosedCensus___init__(__pyx_self, __pyx_v_self, __pyx_v_indices);

  /* 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_6SnapPy_28ObsNonorientableClosedCensus___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_indices) {
  PyObject *__pyx_v_datafile = NULL;
  PyObject *__pyx_v_closed_nonorientable = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "cython/core/tail.pyx":497
 * 
 *     def __init__(self, indices=(0, 17, 1)):
 *         if ObsNonorientableClosedCensus.data is None:             # <<<<<<<<<<<<<<
 *             datafile = os.path.join(closed_census_directory,
 *                                     'ClosedNonorientableDistinct.txt')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ObsNonorientableClosedCensus); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 == Py_None);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "cython/core/tail.pyx":498
 *     def __init__(self, indices=(0, 17, 1)):
 *         if ObsNonorientableClosedCensus.data is None:
 *             datafile = os.path.join(closed_census_directory,             # <<<<<<<<<<<<<<
 *                                     'ClosedNonorientableDistinct.txt')
 *             closed_nonorientable = open(datafile)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_join); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_closed_census_directory); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 498, __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_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_4, __pyx_kp_s_ClosedNonorientableDistinct_txt};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 498, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_v_datafile = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":500
 *             datafile = os.path.join(closed_census_directory,
 *                                     'ClosedNonorientableDistinct.txt')
 *             closed_nonorientable = open(datafile)             # <<<<<<<<<<<<<<
 *             ObsNonorientableClosedCensus.data = closed_nonorientable.readlines()
 *             closed_nonorientable.close()
 */
    __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_open, __pyx_v_datafile); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 500, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_closed_nonorientable = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":501
 *                                     'ClosedNonorientableDistinct.txt')
 *             closed_nonorientable = open(datafile)
 *             ObsNonorientableClosedCensus.data = closed_nonorientable.readlines()             # <<<<<<<<<<<<<<
 *             closed_nonorientable.close()
 *         self.length = len(ObsNonorientableClosedCensus.data)
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_closed_nonorientable, __pyx_n_s_readlines); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 501, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ObsNonorientableClosedCensus); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 501, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_data, __pyx_t_2) < 0) __PYX_ERR(2, 501, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/tail.pyx":502
 *             closed_nonorientable = open(datafile)
 *             ObsNonorientableClosedCensus.data = closed_nonorientable.readlines()
 *             closed_nonorientable.close()             # <<<<<<<<<<<<<<
 *         self.length = len(ObsNonorientableClosedCensus.data)
 *         Census.__init__(self, indices)
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_closed_nonorientable, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    __pyx_t_6 = 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_6 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __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(2, 502, __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;

    /* "cython/core/tail.pyx":497
 * 
 *     def __init__(self, indices=(0, 17, 1)):
 *         if ObsNonorientableClosedCensus.data is None:             # <<<<<<<<<<<<<<
 *             datafile = os.path.join(closed_census_directory,
 *                                     'ClosedNonorientableDistinct.txt')
 */
  }

  /* "cython/core/tail.pyx":503
 *             ObsNonorientableClosedCensus.data = closed_nonorientable.readlines()
 *             closed_nonorientable.close()
 *         self.length = len(ObsNonorientableClosedCensus.data)             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ObsNonorientableClosedCensus); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_data); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(2, 503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_length, __pyx_t_2) < 0) __PYX_ERR(2, 503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":504
 *             closed_nonorientable.close()
 *         self.length = len(ObsNonorientableClosedCensus.data)
 *         Census.__init__(self, indices)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, n):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Census); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_6 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_6 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_1, __pyx_v_self, __pyx_v_indices};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 504, __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;

  /* "cython/core/tail.pyx":496
 *     path = str(manifold_path)
 * 
 *     def __init__(self, indices=(0, 17, 1)):             # <<<<<<<<<<<<<<
 *         if ObsNonorientableClosedCensus.data is None:
 *             datafile = os.path.join(closed_census_directory,
 */

  /* 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("SnapPy.ObsNonorientableClosedCensus.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_datafile);
  __Pyx_XDECREF(__pyx_v_closed_nonorientable);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":506
 *         Census.__init__(self, indices)
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_28ObsNonorientableClosedCensus_3__getitem__(PyObject *__pyx_self, 
#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_6SnapPy_28ObsNonorientableClosedCensus_2__getitem__, "ObsNonorientableClosedCensus.__getitem__(self, n)");
static PyMethodDef __pyx_mdef_6SnapPy_28ObsNonorientableClosedCensus_3__getitem__ = {"__getitem__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_28ObsNonorientableClosedCensus_3__getitem__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_28ObsNonorientableClosedCensus_2__getitem__};
static PyObject *__pyx_pw_6SnapPy_28ObsNonorientableClosedCensus_3__getitem__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_n = 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("__getitem__ (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_self,&__pyx_n_s_n,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 506, __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_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 506, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(2, 506, __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, "__getitem__") < 0)) __PYX_ERR(2, 506, __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_self = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 506, __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("SnapPy.ObsNonorientableClosedCensus.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_28ObsNonorientableClosedCensus_2__getitem__(__pyx_self, __pyx_v_self, __pyx_v_n);

  /* 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_6SnapPy_28ObsNonorientableClosedCensus_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n) {
  Triangulation *__pyx_v_c_triangulation;
  struct __pyx_obj_6SnapPy_Manifold *__pyx_v_result = 0;
  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
  PyObject *__pyx_v_num_tet = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_m = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  char *__pyx_t_11;
  Orientability __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 1);

  /* "cython/core/tail.pyx":509
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 *         if isinstance(n, slice):             # <<<<<<<<<<<<<<
 *             return self.__class__(n.indices(self.length))
 *         _, num_tet, index, m, l = ObsNonorientableClosedCensus.data[n].split()
 */
  __pyx_t_1 = PySlice_Check(__pyx_v_n); 
  if (__pyx_t_1) {

    /* "cython/core/tail.pyx":510
 *         cdef Manifold result
 *         if isinstance(n, slice):
 *             return self.__class__(n.indices(self.length))             # <<<<<<<<<<<<<<
 *         _, num_tet, index, m, l = ObsNonorientableClosedCensus.data[n].split()
 *         c_triangulation = GetCuspedCensusManifold(
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_n, __pyx_n_s_indices); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 510, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 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_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 510, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 510, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/tail.pyx":509
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 *         if isinstance(n, slice):             # <<<<<<<<<<<<<<
 *             return self.__class__(n.indices(self.length))
 *         _, num_tet, index, m, l = ObsNonorientableClosedCensus.data[n].split()
 */
  }

  /* "cython/core/tail.pyx":511
 *         if isinstance(n, slice):
 *             return self.__class__(n.indices(self.length))
 *         _, num_tet, index, m, l = ObsNonorientableClosedCensus.data[n].split()             # <<<<<<<<<<<<<<
 *         c_triangulation = GetCuspedCensusManifold(
 *             self.path, int(num_tet), self.orientability, int(index))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ObsNonorientableClosedCensus); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_data); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(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_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 5)) {
      if (size > 5) __Pyx_RaiseTooManyValuesError(5);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(2, 511, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 2); 
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 3); 
      __pyx_t_7 = PyTuple_GET_ITEM(sequence, 4); 
    } else {
      __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_6 = PyList_GET_ITEM(sequence, 3); 
      __pyx_t_7 = PyList_GET_ITEM(sequence, 4); 
    }
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_5);
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_7);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[5] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7};
      for (i=0; i < 5; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(2, 511, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    PyObject** temps[5] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7};
    __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 511, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
    for (index=0; index < 5; index++) {
      PyObject* item = __pyx_t_10(__pyx_t_9); if (unlikely(!item)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(item);
      *(temps[index]) = item;
    }
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 5) < 0) __PYX_ERR(2, 511, __pyx_L1_error)
    __pyx_t_10 = NULL;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    goto __pyx_L5_unpacking_done;
    __pyx_L4_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_10 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(2, 511, __pyx_L1_error)
    __pyx_L5_unpacking_done:;
  }
  __pyx_v__ = __pyx_t_4;
  __pyx_t_4 = 0;
  __pyx_v_num_tet = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_index = __pyx_t_5;
  __pyx_t_5 = 0;
  __pyx_v_m = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_l = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "cython/core/tail.pyx":513
 *         _, num_tet, index, m, l = ObsNonorientableClosedCensus.data[n].split()
 *         c_triangulation = GetCuspedCensusManifold(
 *             self.path, int(num_tet), self.orientability, int(index))             # <<<<<<<<<<<<<<
 *         if c_triangulation == NULL:
 *             print(num_tet, index)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_11 = __Pyx_PyObject_AsWritableString(__pyx_t_2); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(2, 513, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_v_num_tet); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 513, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_orientability); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_12 = ((Orientability)__Pyx_PyInt_As_Orientability(__pyx_t_7)); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 513, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_v_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 513, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cython/core/tail.pyx":512
 *             return self.__class__(n.indices(self.length))
 *         _, num_tet, index, m, l = ObsNonorientableClosedCensus.data[n].split()
 *         c_triangulation = GetCuspedCensusManifold(             # <<<<<<<<<<<<<<
 *             self.path, int(num_tet), self.orientability, int(index))
 *         if c_triangulation == NULL:
 */
  __pyx_v_c_triangulation = GetCuspedCensusManifold(__pyx_t_11, __pyx_t_8, __pyx_t_12, __pyx_t_13);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":514
 *         c_triangulation = GetCuspedCensusManifold(
 *             self.path, int(num_tet), self.orientability, int(index))
 *         if c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             print(num_tet, index)
 *             raise RuntimeError('SnapPea failed to read the census manifold.')
 */
  __pyx_t_1 = (__pyx_v_c_triangulation == NULL);
  if (unlikely(__pyx_t_1)) {

    /* "cython/core/tail.pyx":515
 *             self.path, int(num_tet), self.orientability, int(index))
 *         if c_triangulation == NULL:
 *             print(num_tet, index)             # <<<<<<<<<<<<<<
 *             raise RuntimeError('SnapPea failed to read the census manifold.')
 *         result = Triangulation(spec='empty')
 */
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_v_num_tet);
    __Pyx_GIVEREF(__pyx_v_num_tet);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_num_tet)) __PYX_ERR(2, 515, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_index);
    __Pyx_GIVEREF(__pyx_v_index);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_index)) __PYX_ERR(2, 515, __pyx_L1_error);
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 515, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cython/core/tail.pyx":516
 *         if c_triangulation == NULL:
 *             print(num_tet, index)
 *             raise RuntimeError('SnapPea failed to read the census manifold.')             # <<<<<<<<<<<<<<
 *         result = Triangulation(spec='empty')
 *         result.set_c_triangulation(c_triangulation)
 */
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__157, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 516, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_Raise(__pyx_t_7, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __PYX_ERR(2, 516, __pyx_L1_error)

    /* "cython/core/tail.pyx":514
 *         c_triangulation = GetCuspedCensusManifold(
 *             self.path, int(num_tet), self.orientability, int(index))
 *         if c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *             print(num_tet, index)
 *             raise RuntimeError('SnapPea failed to read the census manifold.')
 */
  }

  /* "cython/core/tail.pyx":517
 *             print(num_tet, index)
 *             raise RuntimeError('SnapPea failed to read the census manifold.')
 *         result = Triangulation(spec='empty')             # <<<<<<<<<<<<<<
 *         result.set_c_triangulation(c_triangulation)
 *         result.dehn_fill((int(m), int(l)))
 */
  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_spec, __pyx_n_s_empty) < 0) __PYX_ERR(2, 517, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6SnapPy_Triangulation), __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (!(likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_6SnapPy_Manifold)))) __PYX_ERR(2, 517, __pyx_L1_error)
  __pyx_v_result = ((struct __pyx_obj_6SnapPy_Manifold *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":518
 *             raise RuntimeError('SnapPea failed to read the census manifold.')
 *         result = Triangulation(spec='empty')
 *         result.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 *         result.dehn_fill((int(m), int(l)))
 *         return result.with_hyperbolic_structure()
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_Manifold *)__pyx_v_result->__pyx_base.__pyx_vtab)->__pyx_base.set_c_triangulation(((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_v_result), __pyx_v_c_triangulation); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":519
 *         result = Triangulation(spec='empty')
 *         result.set_c_triangulation(c_triangulation)
 *         result.dehn_fill((int(m), int(l)))             # <<<<<<<<<<<<<<
 *         return result.with_hyperbolic_structure()
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_dehn_fill); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_v_m); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_l); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_6);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6)) __PYX_ERR(2, 519, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5)) __PYX_ERR(2, 519, __pyx_L1_error);
  __pyx_t_6 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_13 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_13 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 519, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":520
 *         result.set_c_triangulation(c_triangulation)
 *         result.dehn_fill((int(m), int(l)))
 *         return result.with_hyperbolic_structure()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_with_hyperbolic_structure); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_3 = NULL;
  __pyx_t_13 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_13 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_13, 0+__pyx_t_13);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 520, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cython/core/tail.pyx":506
 *         Census.__init__(self, indices)
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("SnapPy.ObsNonorientableClosedCensus.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XDECREF(__pyx_v__);
  __Pyx_XDECREF(__pyx_v_num_tet);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_m);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":533
 *     alternation = 'a'
 * 
 *     def __init__(self, indices=(0, sum(Alternating_numbers.values()), 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 * 
 */

static PyObject *__pyx_pf_6SnapPy_66__defaults__(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("__defaults__", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_indices);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_indices);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self)->__pyx_arg_indices)) __PYX_ERR(2, 533, __pyx_L1_error);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(2, 533, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None)) __PYX_ERR(2, 533, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13KnotExteriors_1__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_6SnapPy_13KnotExteriors___init__, "KnotExteriors.__init__(self, indices=(0, sum(Alternating_numbers.values()), 1))");
static PyMethodDef __pyx_mdef_6SnapPy_13KnotExteriors_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13KnotExteriors_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13KnotExteriors___init__};
static PyObject *__pyx_pw_6SnapPy_13KnotExteriors_1__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_self = 0;
  PyObject *__pyx_v_indices = 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("__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_self,&__pyx_n_s_indices,0};
    __pyx_defaults2 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_self);
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_dynamic_args->__pyx_arg_indices);
    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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 533, __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_indices);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 533, __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(2, 533, __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_self = values[0];
    __pyx_v_indices = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(2, 533, __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("SnapPy.KnotExteriors.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13KnotExteriors___init__(__pyx_self, __pyx_v_self, __pyx_v_indices);

  /* 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_6SnapPy_13KnotExteriors___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_indices) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "cython/core/tail.pyx":534
 * 
 *     def __init__(self, indices=(0, sum(Alternating_numbers.values()), 1)):
 *         Census.__init__(self, indices)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, n):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Census); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 534, __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[3] = {__pyx_t_2, __pyx_v_self, __pyx_v_indices};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 534, __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;

  /* "cython/core/tail.pyx":533
 *     alternation = 'a'
 * 
 *     def __init__(self, indices=(0, sum(Alternating_numbers.values()), 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 * 
 */

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

/* "cython/core/tail.pyx":536
 *         Census.__init__(self, indices)
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         if isinstance(n, slice):
 *             return self.__class__(n.indices(self.length))
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_13KnotExteriors_3__getitem__(PyObject *__pyx_self, 
#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_6SnapPy_13KnotExteriors_2__getitem__, "KnotExteriors.__getitem__(self, n)");
static PyMethodDef __pyx_mdef_6SnapPy_13KnotExteriors_3__getitem__ = {"__getitem__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13KnotExteriors_3__getitem__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13KnotExteriors_2__getitem__};
static PyObject *__pyx_pw_6SnapPy_13KnotExteriors_3__getitem__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_n = 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("__getitem__ (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_self,&__pyx_n_s_n,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 536, __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_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 536, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(2, 536, __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, "__getitem__") < 0)) __PYX_ERR(2, 536, __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_self = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 536, __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("SnapPy.KnotExteriors.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_13KnotExteriors_2__getitem__(__pyx_self, __pyx_v_self, __pyx_v_n);

  /* 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_6SnapPy_13KnotExteriors_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 1);

  /* "cython/core/tail.pyx":537
 * 
 *     def __getitem__(self, n):
 *         if isinstance(n, slice):             # <<<<<<<<<<<<<<
 *             return self.__class__(n.indices(self.length))
 *         else:
 */
  __pyx_t_1 = PySlice_Check(__pyx_v_n); 
  if (__pyx_t_1) {

    /* "cython/core/tail.pyx":538
 *     def __getitem__(self, n):
 *         if isinstance(n, slice):
 *             return self.__class__(n.indices(self.length))             # <<<<<<<<<<<<<<
 *         else:
 *             return get_HT_knot_by_index(self.alternation, n, _manifold_class)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 538, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_n, __pyx_n_s_indices); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 538, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 538, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 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_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/tail.pyx":537
 * 
 *     def __getitem__(self, n):
 *         if isinstance(n, slice):             # <<<<<<<<<<<<<<
 *             return self.__class__(n.indices(self.length))
 *         else:
 */
  }

  /* "cython/core/tail.pyx":540
 *             return self.__class__(n.indices(self.length))
 *         else:
 *             return get_HT_knot_by_index(self.alternation, n, _manifold_class)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_get_HT_knot_by_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_alternation); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_manifold_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 540, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_t_4, __pyx_v_n, __pyx_t_5};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 3+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 540, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "cython/core/tail.pyx":536
 *         Census.__init__(self, indices)
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         if isinstance(n, slice):
 *             return self.__class__(n.indices(self.length))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.KnotExteriors.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":558
 *     alternation = 'n'
 * 
 *     def __init__(self, indices=(0, sum(Nonalternating_numbers.values()), 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 * 
 */

static PyObject *__pyx_pf_6SnapPy_68__defaults__(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("__defaults__", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_indices);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_indices);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self)->__pyx_arg_indices)) __PYX_ERR(2, 558, __pyx_L1_error);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(2, 558, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None)) __PYX_ERR(2, 558, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_27NonalternatingKnotExteriors_1__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_6SnapPy_27NonalternatingKnotExteriors___init__, "NonalternatingKnotExteriors.__init__(self, indices=(0, sum(Nonalternating_numbers.values()), 1))");
static PyMethodDef __pyx_mdef_6SnapPy_27NonalternatingKnotExteriors_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_27NonalternatingKnotExteriors_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_27NonalternatingKnotExteriors___init__};
static PyObject *__pyx_pw_6SnapPy_27NonalternatingKnotExteriors_1__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_self = 0;
  PyObject *__pyx_v_indices = 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("__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_self,&__pyx_n_s_indices,0};
    __pyx_defaults3 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_self);
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_dynamic_args->__pyx_arg_indices);
    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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 558, __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_indices);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 558, __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(2, 558, __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_self = values[0];
    __pyx_v_indices = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(2, 558, __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("SnapPy.NonalternatingKnotExteriors.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_27NonalternatingKnotExteriors___init__(__pyx_self, __pyx_v_self, __pyx_v_indices);

  /* 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_6SnapPy_27NonalternatingKnotExteriors___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_indices) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "cython/core/tail.pyx":559
 * 
 *     def __init__(self, indices=(0, sum(Nonalternating_numbers.values()), 1)):
 *         Census.__init__(self, indices)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Census); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 559, __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[3] = {__pyx_t_2, __pyx_v_self, __pyx_v_indices};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 559, __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;

  /* "cython/core/tail.pyx":558
 *     alternation = 'n'
 * 
 *     def __init__(self, indices=(0, sum(Nonalternating_numbers.values()), 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 * 
 */

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

/* "cython/core/tail.pyx":571
 *     length = sum(census_knot_numbers)
 * 
 *     def __init__(self, indices=(0, sum(census_knot_numbers), 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 *         self.Census_Knots = tarfile.open(census_knot_archive, 'r:*')
 */

static PyObject *__pyx_pf_6SnapPy_70__defaults__(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("__defaults__", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_indices);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_indices);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self)->__pyx_arg_indices)) __PYX_ERR(2, 571, __pyx_L1_error);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(2, 571, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None)) __PYX_ERR(2, 571, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_14ObsCensusKnots_1__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_6SnapPy_14ObsCensusKnots___init__, "ObsCensusKnots.__init__(self, indices=(0, sum(census_knot_numbers), 1))");
static PyMethodDef __pyx_mdef_6SnapPy_14ObsCensusKnots_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14ObsCensusKnots_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14ObsCensusKnots___init__};
static PyObject *__pyx_pw_6SnapPy_14ObsCensusKnots_1__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_self = 0;
  PyObject *__pyx_v_indices = 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("__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_self,&__pyx_n_s_indices,0};
    __pyx_defaults4 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_self);
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_dynamic_args->__pyx_arg_indices);
    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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 571, __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_indices);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 571, __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(2, 571, __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_self = values[0];
    __pyx_v_indices = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(2, 571, __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("SnapPy.ObsCensusKnots.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_14ObsCensusKnots___init__(__pyx_self, __pyx_v_self, __pyx_v_indices);

  /* 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_6SnapPy_14ObsCensusKnots___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_indices) {
  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("__init__", 1);

  /* "cython/core/tail.pyx":572
 * 
 *     def __init__(self, indices=(0, sum(census_knot_numbers), 1)):
 *         Census.__init__(self, indices)             # <<<<<<<<<<<<<<
 *         self.Census_Knots = tarfile.open(census_knot_archive, 'r:*')
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Census); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 572, __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[3] = {__pyx_t_2, __pyx_v_self, __pyx_v_indices};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 572, __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;

  /* "cython/core/tail.pyx":573
 *     def __init__(self, indices=(0, sum(census_knot_numbers), 1)):
 *         Census.__init__(self, indices)
 *         self.Census_Knots = tarfile.open(census_knot_archive, 'r:*')             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tarfile); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_census_knot_archive); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_3, __pyx_kp_s_r_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_Census_Knots, __pyx_t_1) < 0) __PYX_ERR(2, 573, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/tail.pyx":571
 *     length = sum(census_knot_numbers)
 * 
 *     def __init__(self, indices=(0, sum(census_knot_numbers), 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 *         self.Census_Knots = tarfile.open(census_knot_archive, 'r:*')
 */

  /* 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_AddTraceback("SnapPy.ObsCensusKnots.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":575
 *         self.Census_Knots = tarfile.open(census_knot_archive, 'r:*')
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'Knots in S^3 which appear in the SnapPea Census'
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_14ObsCensusKnots_3__repr__(PyObject *__pyx_self, 
#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_6SnapPy_14ObsCensusKnots_2__repr__, "ObsCensusKnots.__repr__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_14ObsCensusKnots_3__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14ObsCensusKnots_3__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14ObsCensusKnots_2__repr__};
static PyObject *__pyx_pw_6SnapPy_14ObsCensusKnots_3__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 575, __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, "__repr__") < 0)) __PYX_ERR(2, 575, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 575, __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("SnapPy.ObsCensusKnots.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_14ObsCensusKnots_2__repr__(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_14ObsCensusKnots_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "cython/core/tail.pyx":576
 * 
 *     def __repr__(self):
 *         return 'Knots in S^3 which appear in the SnapPea Census'             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, n):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_kp_s_Knots_in_S_3_which_appear_in_the);
  __pyx_r = __pyx_kp_s_Knots_in_S_3_which_appear_in_the;
  goto __pyx_L0;

  /* "cython/core/tail.pyx":575
 *         self.Census_Knots = tarfile.open(census_knot_archive, 'r:*')
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'Knots in S^3 which appear in the SnapPea Census'
 * 
 */

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

/* "cython/core/tail.pyx":578
 *         return 'Knots in S^3 which appear in the SnapPea Census'
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         if isinstance(n, slice):
 *             return self.__class__(n.indices(self.length))
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_14ObsCensusKnots_5__getitem__(PyObject *__pyx_self, 
#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_6SnapPy_14ObsCensusKnots_4__getitem__, "ObsCensusKnots.__getitem__(self, n)");
static PyMethodDef __pyx_mdef_6SnapPy_14ObsCensusKnots_5__getitem__ = {"__getitem__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14ObsCensusKnots_5__getitem__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14ObsCensusKnots_4__getitem__};
static PyObject *__pyx_pw_6SnapPy_14ObsCensusKnots_5__getitem__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_n = 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("__getitem__ (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_self,&__pyx_n_s_n,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 578, __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_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 578, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(2, 578, __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, "__getitem__") < 0)) __PYX_ERR(2, 578, __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_self = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 578, __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("SnapPy.ObsCensusKnots.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_14ObsCensusKnots_4__getitem__(__pyx_self, __pyx_v_self, __pyx_v_n);

  /* 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_6SnapPy_14ObsCensusKnots_4__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n) {
  PyObject *__pyx_v_total = NULL;
  long __pyx_v_m;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_tarpath = NULL;
  PyObject *__pyx_v_filedata = NULL;
  Triangulation *__pyx_v_c_triangulation;
  struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  long __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  char *__pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 1);

  /* "cython/core/tail.pyx":579
 * 
 *     def __getitem__(self, n):
 *         if isinstance(n, slice):             # <<<<<<<<<<<<<<
 *             return self.__class__(n.indices(self.length))
 *         else:
 */
  __pyx_t_1 = PySlice_Check(__pyx_v_n); 
  if (__pyx_t_1) {

    /* "cython/core/tail.pyx":580
 *     def __getitem__(self, n):
 *         if isinstance(n, slice):
 *             return self.__class__(n.indices(self.length))             # <<<<<<<<<<<<<<
 *         else:
 *             total = 0
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_n, __pyx_n_s_indices); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 580, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 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_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/tail.pyx":579
 * 
 *     def __getitem__(self, n):
 *         if isinstance(n, slice):             # <<<<<<<<<<<<<<
 *             return self.__class__(n.indices(self.length))
 *         else:
 */
  }

  /* "cython/core/tail.pyx":582
 *             return self.__class__(n.indices(self.length))
 *         else:
 *             total = 0             # <<<<<<<<<<<<<<
 *             for m in range(2, 8):
 *                 if total + census_knot_numbers[m] <= n:
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_int_0);
    __pyx_v_total = __pyx_int_0;

    /* "cython/core/tail.pyx":583
 *         else:
 *             total = 0
 *             for m in range(2, 8):             # <<<<<<<<<<<<<<
 *                 if total + census_knot_numbers[m] <= n:
 *                     total += census_knot_numbers[m]
 */
    for (__pyx_t_9 = 2; __pyx_t_9 < 8; __pyx_t_9+=1) {
      __pyx_v_m = __pyx_t_9;

      /* "cython/core/tail.pyx":584
 *             total = 0
 *             for m in range(2, 8):
 *                 if total + census_knot_numbers[m] <= n:             # <<<<<<<<<<<<<<
 *                     total += census_knot_numbers[m]
 *                     continue
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_census_knot_numbers); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 584, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, __pyx_v_m, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 584, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyNumber_Add(__pyx_v_total, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 584, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_v_n, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 584, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 584, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_1) {

        /* "cython/core/tail.pyx":585
 *             for m in range(2, 8):
 *                 if total + census_knot_numbers[m] <= n:
 *                     total += census_knot_numbers[m]             # <<<<<<<<<<<<<<
 *                     continue
 *                 else:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_census_knot_numbers); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 585, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_m, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 585, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_total, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 585, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF_SET(__pyx_v_total, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "cython/core/tail.pyx":586
 *                 if total + census_knot_numbers[m] <= n:
 *                     total += census_knot_numbers[m]
 *                     continue             # <<<<<<<<<<<<<<
 *                 else:
 *                     name = 'K%s_%s' % (m, n - total + 1)
 */
        goto __pyx_L4_continue;

        /* "cython/core/tail.pyx":584
 *             total = 0
 *             for m in range(2, 8):
 *                 if total + census_knot_numbers[m] <= n:             # <<<<<<<<<<<<<<
 *                     total += census_knot_numbers[m]
 *                     continue
 */
      }

      /* "cython/core/tail.pyx":588
 *                     continue
 *                 else:
 *                     name = 'K%s_%s' % (m, n - total + 1)             # <<<<<<<<<<<<<<
 *                     break
 *             if name:
 */
      /*else*/ {
        __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_m); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 588, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = PyNumber_Subtract(__pyx_v_n, __pyx_v_total); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 588, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 588, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 588, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GIVEREF(__pyx_t_3);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(2, 588, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_4);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4)) __PYX_ERR(2, 588, __pyx_L1_error);
        __pyx_t_3 = 0;
        __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_K_s__s, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 588, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_v_name = ((PyObject*)__pyx_t_4);
        __pyx_t_4 = 0;

        /* "cython/core/tail.pyx":589
 *                 else:
 *                     name = 'K%s_%s' % (m, n - total + 1)
 *                     break             # <<<<<<<<<<<<<<
 *             if name:
 *                 tarpath = 'CensusKnots/%s' % name
 */
        goto __pyx_L5_break;
      }
      __pyx_L4_continue:;
    }
    __pyx_L5_break:;

    /* "cython/core/tail.pyx":590
 *                     name = 'K%s_%s' % (m, n - total + 1)
 *                     break
 *             if name:             # <<<<<<<<<<<<<<
 *                 tarpath = 'CensusKnots/%s' % name
 *                 try:
 */
    if (unlikely(!__pyx_v_name)) { __Pyx_RaiseUnboundLocalError("name"); __PYX_ERR(2, 590, __pyx_L1_error) }
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_name); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 590, __pyx_L1_error)
    if (likely(__pyx_t_1)) {

      /* "cython/core/tail.pyx":591
 *                     break
 *             if name:
 *                 tarpath = 'CensusKnots/%s' % name             # <<<<<<<<<<<<<<
 *                 try:
 *                     filedata = self.Census_Knots.extractfile(tarpath).read()
 */
      if (unlikely(!__pyx_v_name)) { __Pyx_RaiseUnboundLocalError("name"); __PYX_ERR(2, 591, __pyx_L1_error) }
      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_CensusKnots_s, __pyx_v_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 591, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_tarpath = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "cython/core/tail.pyx":592
 *             if name:
 *                 tarpath = 'CensusKnots/%s' % name
 *                 try:             # <<<<<<<<<<<<<<
 *                     filedata = self.Census_Knots.extractfile(tarpath).read()
 *                     c_triangulation = read_triangulation_from_string(filedata)
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        /*try:*/ {

          /* "cython/core/tail.pyx":593
 *                 tarpath = 'CensusKnots/%s' % name
 *                 try:
 *                     filedata = self.Census_Knots.extractfile(tarpath).read()             # <<<<<<<<<<<<<<
 *                     c_triangulation = read_triangulation_from_string(filedata)
 *                 except:
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Census_Knots); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 593, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_extractfile); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 593, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = NULL;
          __pyx_t_8 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(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_8 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_tarpath};
            __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 593, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          }
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_read); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 593, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = NULL;
          __pyx_t_8 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
              __pyx_t_8 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
            __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 593, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          }
          __pyx_v_filedata = __pyx_t_4;
          __pyx_t_4 = 0;

          /* "cython/core/tail.pyx":594
 *                 try:
 *                     filedata = self.Census_Knots.extractfile(tarpath).read()
 *                     c_triangulation = read_triangulation_from_string(filedata)             # <<<<<<<<<<<<<<
 *                 except:
 *                     raise IOError("The census knot %s was not found." % name)
 */
          __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_filedata); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(2, 594, __pyx_L8_error)
          __pyx_v_c_triangulation = read_triangulation_from_string(__pyx_t_13);

          /* "cython/core/tail.pyx":592
 *             if name:
 *                 tarpath = 'CensusKnots/%s' % name
 *                 try:             # <<<<<<<<<<<<<<
 *                     filedata = self.Census_Knots.extractfile(tarpath).read()
 *                     c_triangulation = read_triangulation_from_string(filedata)
 */
        }
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L13_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "cython/core/tail.pyx":595
 *                     filedata = self.Census_Knots.extractfile(tarpath).read()
 *                     c_triangulation = read_triangulation_from_string(filedata)
 *                 except:             # <<<<<<<<<<<<<<
 *                     raise IOError("The census knot %s was not found." % name)
 *                 result = Triangulation('empty')
 */
        /*except:*/ {
          __Pyx_AddTraceback("SnapPy.ObsCensusKnots.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_2) < 0) __PYX_ERR(2, 595, __pyx_L10_except_error)
          __Pyx_XGOTREF(__pyx_t_4);
          __Pyx_XGOTREF(__pyx_t_5);
          __Pyx_XGOTREF(__pyx_t_2);

          /* "cython/core/tail.pyx":596
 *                     c_triangulation = read_triangulation_from_string(filedata)
 *                 except:
 *                     raise IOError("The census knot %s was not found." % name)             # <<<<<<<<<<<<<<
 *                 result = Triangulation('empty')
 *                 result.set_c_triangulation(c_triangulation)
 */
          if (unlikely(!__pyx_v_name)) { __Pyx_RaiseUnboundLocalError("name"); __PYX_ERR(2, 596, __pyx_L10_except_error) }
          __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_The_census_knot_s_was_not_found, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 596, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 596, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_Raise(__pyx_t_6, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __PYX_ERR(2, 596, __pyx_L10_except_error)
        }

        /* "cython/core/tail.pyx":592
 *             if name:
 *                 tarpath = 'CensusKnots/%s' % name
 *                 try:             # <<<<<<<<<<<<<<
 *                     filedata = self.Census_Knots.extractfile(tarpath).read()
 *                     c_triangulation = read_triangulation_from_string(filedata)
 */
        __pyx_L10_except_error:;
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
        goto __pyx_L1_error;
        __pyx_L13_try_end:;
      }

      /* "cython/core/tail.pyx":597
 *                 except:
 *                     raise IOError("The census knot %s was not found." % name)
 *                 result = Triangulation('empty')             # <<<<<<<<<<<<<<
 *                 result.set_c_triangulation(c_triangulation)
 *                 result.set_name(name)
 */
      __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6SnapPy_Triangulation), __pyx_tuple__160, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 597, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_result = ((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_t_2);
      __pyx_t_2 = 0;

      /* "cython/core/tail.pyx":598
 *                     raise IOError("The census knot %s was not found." % name)
 *                 result = Triangulation('empty')
 *                 result.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 *                 result.set_name(name)
 *                 return result.with_hyperbolic_structure()
 */
      __pyx_t_2 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_result->__pyx_vtab)->set_c_triangulation(__pyx_v_result, __pyx_v_c_triangulation); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 598, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/tail.pyx":599
 *                 result = Triangulation('empty')
 *                 result.set_c_triangulation(c_triangulation)
 *                 result.set_name(name)             # <<<<<<<<<<<<<<
 *                 return result.with_hyperbolic_structure()
 *             else:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_set_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 599, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(!__pyx_v_name)) { __Pyx_RaiseUnboundLocalError("name"); __PYX_ERR(2, 599, __pyx_L1_error) }
      __pyx_t_4 = NULL;
      __pyx_t_8 = 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_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_name};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 599, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "cython/core/tail.pyx":600
 *                 result.set_c_triangulation(c_triangulation)
 *                 result.set_name(name)
 *                 return result.with_hyperbolic_structure()             # <<<<<<<<<<<<<<
 *             else:
 *                 raise IndexError('There are only 201 census knots.')
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_with_hyperbolic_structure); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = NULL;
      __pyx_t_8 = 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_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __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(2, 600, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

      /* "cython/core/tail.pyx":590
 *                     name = 'K%s_%s' % (m, n - total + 1)
 *                     break
 *             if name:             # <<<<<<<<<<<<<<
 *                 tarpath = 'CensusKnots/%s' % name
 *                 try:
 */
    }

    /* "cython/core/tail.pyx":602
 *                 return result.with_hyperbolic_structure()
 *             else:
 *                 raise IndexError('There are only 201 census knots.')             # <<<<<<<<<<<<<<
 * 
 * 
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__161, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 602, __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(2, 602, __pyx_L1_error)
    }
  }

  /* "cython/core/tail.pyx":578
 *         return 'Knots in S^3 which appear in the SnapPea Census'
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         if isinstance(n, slice):
 *             return self.__class__(n.indices(self.length))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.ObsCensusKnots.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_total);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_tarpath);
  __Pyx_XDECREF(__pyx_v_filedata);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":619
 *     max_crossings = 11
 * 
 *     def __init__(self, components, indices=(0, 10000, 1)):             # <<<<<<<<<<<<<<
 *         self.Christy_links = tarfile.open(link_archive, 'r:*')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16ObsLinkExteriors_1__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_6SnapPy_16ObsLinkExteriors___init__, "ObsLinkExteriors.__init__(self, components, indices=(0, 10000, 1))");
static PyMethodDef __pyx_mdef_6SnapPy_16ObsLinkExteriors_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16ObsLinkExteriors_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16ObsLinkExteriors___init__};
static PyObject *__pyx_pw_6SnapPy_16ObsLinkExteriors_1__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_self = 0;
  PyObject *__pyx_v_components = 0;
  PyObject *__pyx_v_indices = 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("__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_self,&__pyx_n_s_components,&__pyx_n_s_indices,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_tuple__162)));
    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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 619, __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(2, 619, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(2, 619, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_indices);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 619, __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(2, 619, __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_self = values[0];
    __pyx_v_components = values[1];
    __pyx_v_indices = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(2, 619, __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("SnapPy.ObsLinkExteriors.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_16ObsLinkExteriors___init__(__pyx_self, __pyx_v_self, __pyx_v_components, __pyx_v_indices);

  /* 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_6SnapPy_16ObsLinkExteriors___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_components, PyObject *__pyx_v_indices) {
  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;
  int __pyx_t_7;
  int __pyx_t_8;
  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("__init__", 1);

  /* "cython/core/tail.pyx":620
 * 
 *     def __init__(self, components, indices=(0, 10000, 1)):
 *         self.Christy_links = tarfile.open(link_archive, 'r:*')             # <<<<<<<<<<<<<<
 * 
 *         if not (1 <= components < len(self.num_links)):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_tarfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_open); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 620, __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_link_archive); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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[3] = {__pyx_t_4, __pyx_t_2, __pyx_kp_s_r_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 620, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_Christy_links, __pyx_t_1) < 0) __PYX_ERR(2, 620, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/tail.pyx":622
 *         self.Christy_links = tarfile.open(link_archive, 'r:*')
 * 
 *         if not (1 <= components < len(self.num_links)):             # <<<<<<<<<<<<<<
 *             raise IndexError('SnapPy has no data on links with '
 *                              '%s components.' % components)
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_int_1, __pyx_v_components, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 622, __pyx_L1_error)
  if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
    __Pyx_DECREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_num_links); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(2, 622, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_components, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 622, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(2, 622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = (!__pyx_t_7);
  if (unlikely(__pyx_t_8)) {

    /* "cython/core/tail.pyx":624
 *         if not (1 <= components < len(self.num_links)):
 *             raise IndexError('SnapPy has no data on links with '
 *                              '%s components.' % components)             # <<<<<<<<<<<<<<
 * 
 *         self.components = components
 */
    __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_SnapPy_has_no_data_on_links_with, __pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 624, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);

    /* "cython/core/tail.pyx":623
 * 
 *         if not (1 <= components < len(self.num_links)):
 *             raise IndexError('SnapPy has no data on links with '             # <<<<<<<<<<<<<<
 *                              '%s components.' % components)
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 623, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(2, 623, __pyx_L1_error)

    /* "cython/core/tail.pyx":622
 *         self.Christy_links = tarfile.open(link_archive, 'r:*')
 * 
 *         if not (1 <= components < len(self.num_links)):             # <<<<<<<<<<<<<<
 *             raise IndexError('SnapPy has no data on links with '
 *                              '%s components.' % components)
 */
  }

  /* "cython/core/tail.pyx":626
 *                              '%s components.' % components)
 * 
 *         self.components = components             # <<<<<<<<<<<<<<
 * 
 *         self.length = sum(self.num_links[components])
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_components, __pyx_v_components) < 0) __PYX_ERR(2, 626, __pyx_L1_error)

  /* "cython/core/tail.pyx":628
 *         self.components = components
 * 
 *         self.length = sum(self.num_links[components])             # <<<<<<<<<<<<<<
 * 
 *         Census.__init__(self, (indices[0],
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_num_links); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_length, __pyx_t_3) < 0) __PYX_ERR(2, 628, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":630
 *         self.length = sum(self.num_links[components])
 * 
 *         Census.__init__(self, (indices[0],             # <<<<<<<<<<<<<<
 *                                min(self.length, indices[1]),
 *                                indices[2]))
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Census); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_indices, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "cython/core/tail.pyx":631
 * 
 *         Census.__init__(self, (indices[0],
 *                                min(self.length, indices[1]),             # <<<<<<<<<<<<<<
 *                                indices[2]))
 * 
 */
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_indices, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_11 = PyObject_RichCompare(__pyx_t_4, __pyx_t_9, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 631, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(2, 631, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__pyx_t_8) {
    __Pyx_INCREF(__pyx_t_4);
    __pyx_t_10 = __pyx_t_4;
  } else {
    __Pyx_INCREF(__pyx_t_9);
    __pyx_t_10 = __pyx_t_9;
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":632
 *         Census.__init__(self, (indices[0],
 *                                min(self.length, indices[1]),
 *                                indices[2]))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_indices, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "cython/core/tail.pyx":630
 *         self.length = sum(self.num_links[components])
 * 
 *         Census.__init__(self, (indices[0],             # <<<<<<<<<<<<<<
 *                                min(self.length, indices[1]),
 *                                indices[2]))
 */
  __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 630, __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(2, 630, __pyx_L1_error);
  __Pyx_INCREF(__pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_10);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_10)) __PYX_ERR(2, 630, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_4)) __PYX_ERR(2, 630, __pyx_L1_error);
  __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_5 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(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[3] = {__pyx_t_4, __pyx_v_self, __pyx_t_9};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 630, __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;

  /* "cython/core/tail.pyx":619
 *     max_crossings = 11
 * 
 *     def __init__(self, components, indices=(0, 10000, 1)):             # <<<<<<<<<<<<<<
 *         self.Christy_links = tarfile.open(link_archive, 'r:*')
 * 
 */

  /* 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_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("SnapPy.ObsLinkExteriors.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":634
 *                                indices[2]))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return ('Christy census of %s-component link complements '
 *                 'in S^3' % self.components)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16ObsLinkExteriors_3__repr__(PyObject *__pyx_self, 
#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_6SnapPy_16ObsLinkExteriors_2__repr__, "ObsLinkExteriors.__repr__(self)");
static PyMethodDef __pyx_mdef_6SnapPy_16ObsLinkExteriors_3__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16ObsLinkExteriors_3__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16ObsLinkExteriors_2__repr__};
static PyObject *__pyx_pw_6SnapPy_16ObsLinkExteriors_3__repr__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (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_self,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 634, __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, "__repr__") < 0)) __PYX_ERR(2, 634, __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_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(2, 634, __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("SnapPy.ObsLinkExteriors.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_16ObsLinkExteriors_2__repr__(__pyx_self, __pyx_v_self);

  /* 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_6SnapPy_16ObsLinkExteriors_2__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 1);

  /* "cython/core/tail.pyx":635
 * 
 *     def __repr__(self):
 *         return ('Christy census of %s-component link complements '             # <<<<<<<<<<<<<<
 *                 'in S^3' % self.components)
 * 
 */
  __Pyx_XDECREF(__pyx_r);

  /* "cython/core/tail.pyx":636
 *     def __repr__(self):
 *         return ('Christy census of %s-component link complements '
 *                 'in S^3' % self.components)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, j):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_components); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 636, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Christy_census_of_s_component_li, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 636, __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;

  /* "cython/core/tail.pyx":634
 *                                indices[2]))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return ('Christy census of %s-component link complements '
 *                 'in S^3' % self.components)
 */

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

/* "cython/core/tail.pyx":638
 *                 'in S^3' % self.components)
 * 
 *     def __getitem__(self, j):             # <<<<<<<<<<<<<<
 *         if isinstance(j, slice):
 *             return self.__class__(j.indices(self.length))
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_16ObsLinkExteriors_5__getitem__(PyObject *__pyx_self, 
#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_6SnapPy_16ObsLinkExteriors_4__getitem__, "ObsLinkExteriors.__getitem__(self, j)");
static PyMethodDef __pyx_mdef_6SnapPy_16ObsLinkExteriors_5__getitem__ = {"__getitem__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16ObsLinkExteriors_5__getitem__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16ObsLinkExteriors_4__getitem__};
static PyObject *__pyx_pw_6SnapPy_16ObsLinkExteriors_5__getitem__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_j = 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("__getitem__ (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_self,&__pyx_n_s_j,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 638, __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_j)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 638, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(2, 638, __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, "__getitem__") < 0)) __PYX_ERR(2, 638, __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_self = values[0];
    __pyx_v_j = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 638, __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("SnapPy.ObsLinkExteriors.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_16ObsLinkExteriors_4__getitem__(__pyx_self, __pyx_v_self, __pyx_v_j);

  /* 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_6SnapPy_16ObsLinkExteriors_4__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_j) {
  PyObject *__pyx_v_so_far = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_v_filename = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_tarpath = NULL;
  PyObject *__pyx_v_filedata = NULL;
  Triangulation *__pyx_v_c_triangulation;
  struct __pyx_obj_6SnapPy_Triangulation *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  char *__pyx_t_14;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 1);

  /* "cython/core/tail.pyx":639
 * 
 *     def __getitem__(self, j):
 *         if isinstance(j, slice):             # <<<<<<<<<<<<<<
 *             return self.__class__(j.indices(self.length))
 *         so_far = 0
 */
  __pyx_t_1 = PySlice_Check(__pyx_v_j); 
  if (__pyx_t_1) {

    /* "cython/core/tail.pyx":640
 *     def __getitem__(self, j):
 *         if isinstance(j, slice):
 *             return self.__class__(j.indices(self.length))             # <<<<<<<<<<<<<<
 *         so_far = 0
 *         for k in range(self.max_crossings + 1):
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_j, __pyx_n_s_indices); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    __pyx_t_8 = 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_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __pyx_t_5 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 640, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "cython/core/tail.pyx":639
 * 
 *     def __getitem__(self, j):
 *         if isinstance(j, slice):             # <<<<<<<<<<<<<<
 *             return self.__class__(j.indices(self.length))
 *         so_far = 0
 */
  }

  /* "cython/core/tail.pyx":641
 *         if isinstance(j, slice):
 *             return self.__class__(j.indices(self.length))
 *         so_far = 0             # <<<<<<<<<<<<<<
 *         for k in range(self.max_crossings + 1):
 *             n = self.num_links[self.components][k]
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_so_far = __pyx_int_0;

  /* "cython/core/tail.pyx":642
 *             return self.__class__(j.indices(self.length))
 *         so_far = 0
 *         for k in range(self.max_crossings + 1):             # <<<<<<<<<<<<<<
 *             n = self.num_links[self.components][k]
 *             so_far = so_far + n
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_max_crossings); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 642, __pyx_L1_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_9 = 0;
    __pyx_t_10 = NULL;
  } else {
    __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 642, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_10)) {
      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(2, 642, __pyx_L1_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_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(2, 642, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 642, __pyx_L1_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(2, 642, __pyx_L1_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_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(2, 642, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 642, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_10(__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(2, 642, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":643
 *         so_far = 0
 *         for k in range(self.max_crossings + 1):
 *             n = self.num_links[self.components][k]             # <<<<<<<<<<<<<<
 *             so_far = so_far + n
 *             if so_far > j:
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_num_links); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_components); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_k); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 643, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/tail.pyx":644
 *         for k in range(self.max_crossings + 1):
 *             n = self.num_links[self.components][k]
 *             so_far = so_far + n             # <<<<<<<<<<<<<<
 *             if so_far > j:
 *                 l = j - so_far + n + 1
 */
    __pyx_t_4 = PyNumber_Add(__pyx_v_so_far, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_so_far, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/tail.pyx":645
 *             n = self.num_links[self.components][k]
 *             so_far = so_far + n
 *             if so_far > j:             # <<<<<<<<<<<<<<
 *                 l = j - so_far + n + 1
 *                 filename = 'L%d%.2d%.3d' % (self.components, k, l)
 */
    __pyx_t_4 = PyObject_RichCompare(__pyx_v_so_far, __pyx_v_j, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 645, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(2, 645, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "cython/core/tail.pyx":646
 *             so_far = so_far + n
 *             if so_far > j:
 *                 l = j - so_far + n + 1             # <<<<<<<<<<<<<<
 *                 filename = 'L%d%.2d%.3d' % (self.components, k, l)
 *                 if self.components > 1:
 */
      __pyx_t_4 = PyNumber_Subtract(__pyx_v_j, __pyx_v_so_far); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_v_n); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_l = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "cython/core/tail.pyx":647
 *             if so_far > j:
 *                 l = j - so_far + n + 1
 *                 filename = 'L%d%.2d%.3d' % (self.components, k, l)             # <<<<<<<<<<<<<<
 *                 if self.components > 1:
 *                     name = "%d^%d_%d" % (k, self.components, l)
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_components); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 647, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 647, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(2, 647, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_k);
      __Pyx_GIVEREF(__pyx_v_k);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_k)) __PYX_ERR(2, 647, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_l);
      __Pyx_GIVEREF(__pyx_v_l);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_l)) __PYX_ERR(2, 647, __pyx_L1_error);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_L_d_2d_3d, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 647, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_filename = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "cython/core/tail.pyx":648
 *                 l = j - so_far + n + 1
 *                 filename = 'L%d%.2d%.3d' % (self.components, k, l)
 *                 if self.components > 1:             # <<<<<<<<<<<<<<
 *                     name = "%d^%d_%d" % (k, self.components, l)
 *                 else:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_components); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 648, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 648, __pyx_L1_error)
      __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(2, 648, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_1) {

        /* "cython/core/tail.pyx":649
 *                 filename = 'L%d%.2d%.3d' % (self.components, k, l)
 *                 if self.components > 1:
 *                     name = "%d^%d_%d" % (k, self.components, l)             # <<<<<<<<<<<<<<
 *                 else:
 *                     name = "%d_%d" % (k, l)
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_components); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 649, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 649, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_k);
        __Pyx_GIVEREF(__pyx_v_k);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_k)) __PYX_ERR(2, 649, __pyx_L1_error);
        __Pyx_GIVEREF(__pyx_t_5);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5)) __PYX_ERR(2, 649, __pyx_L1_error);
        __Pyx_INCREF(__pyx_v_l);
        __Pyx_GIVEREF(__pyx_v_l);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_l)) __PYX_ERR(2, 649, __pyx_L1_error);
        __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_d_d__d, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 649, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_name = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "cython/core/tail.pyx":648
 *                 l = j - so_far + n + 1
 *                 filename = 'L%d%.2d%.3d' % (self.components, k, l)
 *                 if self.components > 1:             # <<<<<<<<<<<<<<
 *                     name = "%d^%d_%d" % (k, self.components, l)
 *                 else:
 */
        goto __pyx_L7;
      }

      /* "cython/core/tail.pyx":651
 *                     name = "%d^%d_%d" % (k, self.components, l)
 *                 else:
 *                     name = "%d_%d" % (k, l)             # <<<<<<<<<<<<<<
 *                 tarpath = 'ChristyLinks/%s' % filename
 *                 try:
 */
      /*else*/ {
        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 651, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_v_k);
        __Pyx_GIVEREF(__pyx_v_k);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_k)) __PYX_ERR(2, 651, __pyx_L1_error);
        __Pyx_INCREF(__pyx_v_l);
        __Pyx_GIVEREF(__pyx_v_l);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_l)) __PYX_ERR(2, 651, __pyx_L1_error);
        __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_d__d, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 651, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_v_name = __pyx_t_4;
        __pyx_t_4 = 0;
      }
      __pyx_L7:;

      /* "cython/core/tail.pyx":652
 *                 else:
 *                     name = "%d_%d" % (k, l)
 *                 tarpath = 'ChristyLinks/%s' % filename             # <<<<<<<<<<<<<<
 *                 try:
 *                     filedata = self.Christy_links.extractfile(tarpath).read()
 */
      __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_ChristyLinks_s, __pyx_v_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 652, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_tarpath = ((PyObject*)__pyx_t_4);
      __pyx_t_4 = 0;

      /* "cython/core/tail.pyx":653
 *                     name = "%d_%d" % (k, l)
 *                 tarpath = 'ChristyLinks/%s' % filename
 *                 try:             # <<<<<<<<<<<<<<
 *                     filedata = self.Christy_links.extractfile(tarpath).read()
 *                     c_triangulation = read_triangulation_from_string(filedata)
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_11);
        __Pyx_XGOTREF(__pyx_t_12);
        __Pyx_XGOTREF(__pyx_t_13);
        /*try:*/ {

          /* "cython/core/tail.pyx":654
 *                 tarpath = 'ChristyLinks/%s' % filename
 *                 try:
 *                     filedata = self.Christy_links.extractfile(tarpath).read()             # <<<<<<<<<<<<<<
 *                     c_triangulation = read_triangulation_from_string(filedata)
 *                 except:
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_Christy_links); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 654, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_extractfile); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 654, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = NULL;
          __pyx_t_8 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
              __pyx_t_8 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_tarpath};
            __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 654, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          }
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 654, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = NULL;
          __pyx_t_8 = 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_8 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
            __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 654, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          }
          __pyx_v_filedata = __pyx_t_4;
          __pyx_t_4 = 0;

          /* "cython/core/tail.pyx":655
 *                 try:
 *                     filedata = self.Christy_links.extractfile(tarpath).read()
 *                     c_triangulation = read_triangulation_from_string(filedata)             # <<<<<<<<<<<<<<
 *                 except:
 *                     raise IOError('The link complement %s was not '
 */
          __pyx_t_14 = __Pyx_PyObject_AsWritableString(__pyx_v_filedata); if (unlikely((!__pyx_t_14) && PyErr_Occurred())) __PYX_ERR(2, 655, __pyx_L8_error)
          __pyx_v_c_triangulation = read_triangulation_from_string(__pyx_t_14);

          /* "cython/core/tail.pyx":653
 *                     name = "%d_%d" % (k, l)
 *                 tarpath = 'ChristyLinks/%s' % filename
 *                 try:             # <<<<<<<<<<<<<<
 *                     filedata = self.Christy_links.extractfile(tarpath).read()
 *                     c_triangulation = read_triangulation_from_string(filedata)
 */
        }
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        goto __pyx_L15_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "cython/core/tail.pyx":656
 *                     filedata = self.Christy_links.extractfile(tarpath).read()
 *                     c_triangulation = read_triangulation_from_string(filedata)
 *                 except:             # <<<<<<<<<<<<<<
 *                     raise IOError('The link complement %s was not '
 *                                   'found.' % filename)
 */
        /*except:*/ {
          __Pyx_AddTraceback("SnapPy.ObsLinkExteriors.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(2, 656, __pyx_L10_except_error)
          __Pyx_XGOTREF(__pyx_t_4);
          __Pyx_XGOTREF(__pyx_t_6);
          __Pyx_XGOTREF(__pyx_t_5);

          /* "cython/core/tail.pyx":658
 *                 except:
 *                     raise IOError('The link complement %s was not '
 *                                   'found.' % filename)             # <<<<<<<<<<<<<<
 *                 result = Triangulation('empty')
 *                 result.set_c_triangulation(c_triangulation)
 */
          __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_kp_s_The_link_complement_s_was_not_fo, __pyx_v_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 658, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);

          /* "cython/core/tail.pyx":657
 *                     c_triangulation = read_triangulation_from_string(filedata)
 *                 except:
 *                     raise IOError('The link complement %s was not '             # <<<<<<<<<<<<<<
 *                                   'found.' % filename)
 *                 result = Triangulation('empty')
 */
          __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 657, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_Raise(__pyx_t_7, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __PYX_ERR(2, 657, __pyx_L10_except_error)
        }

        /* "cython/core/tail.pyx":653
 *                     name = "%d_%d" % (k, l)
 *                 tarpath = 'ChristyLinks/%s' % filename
 *                 try:             # <<<<<<<<<<<<<<
 *                     filedata = self.Christy_links.extractfile(tarpath).read()
 *                     c_triangulation = read_triangulation_from_string(filedata)
 */
        __pyx_L10_except_error:;
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_XGIVEREF(__pyx_t_12);
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
        goto __pyx_L1_error;
        __pyx_L15_try_end:;
      }

      /* "cython/core/tail.pyx":659
 *                     raise IOError('The link complement %s was not '
 *                                   'found.' % filename)
 *                 result = Triangulation('empty')             # <<<<<<<<<<<<<<
 *                 result.set_c_triangulation(c_triangulation)
 *                 result.set_name(name)
 */
      __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_6SnapPy_Triangulation), __pyx_tuple__160, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 659, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_v_result = ((struct __pyx_obj_6SnapPy_Triangulation *)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "cython/core/tail.pyx":660
 *                                   'found.' % filename)
 *                 result = Triangulation('empty')
 *                 result.set_c_triangulation(c_triangulation)             # <<<<<<<<<<<<<<
 *                 result.set_name(name)
 *                 return result.with_hyperbolic_structure()
 */
      __pyx_t_5 = ((struct __pyx_vtabstruct_6SnapPy_Triangulation *)__pyx_v_result->__pyx_vtab)->set_c_triangulation(__pyx_v_result, __pyx_v_c_triangulation); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 660, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cython/core/tail.pyx":661
 *                 result = Triangulation('empty')
 *                 result.set_c_triangulation(c_triangulation)
 *                 result.set_name(name)             # <<<<<<<<<<<<<<
 *                 return result.with_hyperbolic_structure()
 * 
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_set_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 661, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = NULL;
      __pyx_t_8 = 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_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_name};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 661, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cython/core/tail.pyx":662
 *                 result.set_c_triangulation(c_triangulation)
 *                 result.set_name(name)
 *                 return result.with_hyperbolic_structure()             # <<<<<<<<<<<<<<
 * 
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_with_hyperbolic_structure); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 662, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = NULL;
      __pyx_t_8 = 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_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 662, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_r = __pyx_t_5;
      __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "cython/core/tail.pyx":645
 *             n = self.num_links[self.components][k]
 *             so_far = so_far + n
 *             if so_far > j:             # <<<<<<<<<<<<<<
 *                 l = j - so_far + n + 1
 *                 filename = 'L%d%.2d%.3d' % (self.components, k, l)
 */
    }

    /* "cython/core/tail.pyx":642
 *             return self.__class__(j.indices(self.length))
 *         so_far = 0
 *         for k in range(self.max_crossings + 1):             # <<<<<<<<<<<<<<
 *             n = self.num_links[self.components][k]
 *             so_far = so_far + n
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":638
 *                 'in S^3' % self.components)
 * 
 *     def __getitem__(self, j):             # <<<<<<<<<<<<<<
 *         if isinstance(j, slice):
 *             return self.__class__(j.indices(self.length))
 */

  /* 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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.ObsLinkExteriors.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_so_far);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XDECREF(__pyx_v_filename);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_tarpath);
  __Pyx_XDECREF(__pyx_v_filedata);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":672
 * 
 * class MorwenLinks:
 *     def __init__(self, num_components, num_crossings = None):             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             'The MorwenLinks class has been replaced by HTLinkExteriors. '
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_11MorwenLinks_1__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_6SnapPy_11MorwenLinks___init__, "MorwenLinks.__init__(self, num_components, num_crossings=None)");
static PyMethodDef __pyx_mdef_6SnapPy_11MorwenLinks_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_11MorwenLinks_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_11MorwenLinks___init__};
static PyObject *__pyx_pw_6SnapPy_11MorwenLinks_1__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
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  CYTHON_UNUSED PyObject *__pyx_v_num_components = 0;
  CYTHON_UNUSED PyObject *__pyx_v_num_crossings = 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("__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_self,&__pyx_n_s_num_components,&__pyx_n_s_num_crossings,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 672, __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_num_components)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 672, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(2, 672, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_crossings);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 672, __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(2, 672, __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_self = values[0];
    __pyx_v_num_components = values[1];
    __pyx_v_num_crossings = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(2, 672, __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("SnapPy.MorwenLinks.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_11MorwenLinks___init__(__pyx_self, __pyx_v_self, __pyx_v_num_components, __pyx_v_num_crossings);

  /* 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_6SnapPy_11MorwenLinks___init__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_num_components, CYTHON_UNUSED PyObject *__pyx_v_num_crossings) {
  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("__init__", 1);

  /* "cython/core/tail.pyx":673
 * class MorwenLinks:
 *     def __init__(self, num_components, num_crossings = None):
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             'The MorwenLinks class has been replaced by HTLinkExteriors. '
 *             'Please refer to the documentation for HTLinkExteriors.'
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__163, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 673, __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(2, 673, __pyx_L1_error)

  /* "cython/core/tail.pyx":672
 * 
 * class MorwenLinks:
 *     def __init__(self, num_components, num_crossings = None):             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             'The MorwenLinks class has been replaced by HTLinkExteriors. '
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("SnapPy.MorwenLinks.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":679
 * 
 * 
 * def left_pad_string(str,  length, pad=' '):             # <<<<<<<<<<<<<<
 *     return pad*(length - len(str)) + str
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_59left_pad_string(PyObject *__pyx_self, 
#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_6SnapPy_58left_pad_string, "left_pad_string(str, length, pad=' ')");
static PyMethodDef __pyx_mdef_6SnapPy_59left_pad_string = {"left_pad_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_59left_pad_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_58left_pad_string};
static PyObject *__pyx_pw_6SnapPy_59left_pad_string(PyObject *__pyx_self, 
#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_str = 0;
  PyObject *__pyx_v_length = 0;
  PyObject *__pyx_v_pad = 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("left_pad_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);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_str,&__pyx_n_s_length,&__pyx_n_s_pad,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_kp_s__8)));
    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_str)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 679, __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_length)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 679, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("left_pad_string", 0, 2, 3, 1); __PYX_ERR(2, 679, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pad);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 679, __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, "left_pad_string") < 0)) __PYX_ERR(2, 679, __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_str = values[0];
    __pyx_v_length = values[1];
    __pyx_v_pad = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("left_pad_string", 0, 2, 3, __pyx_nargs); __PYX_ERR(2, 679, __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("SnapPy.left_pad_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_58left_pad_string(__pyx_self, __pyx_v_str, __pyx_v_length, __pyx_v_pad);

  /* 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_6SnapPy_58left_pad_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_str, PyObject *__pyx_v_length, PyObject *__pyx_v_pad) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __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("left_pad_string", 1);

  /* "cython/core/tail.pyx":680
 * 
 * def left_pad_string(str,  length, pad=' '):
 *     return pad*(length - len(str)) + str             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_Length(__pyx_v_str); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(2, 680, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Subtract(__pyx_v_length, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Multiply(__pyx_v_pad, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 680, __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;

  /* "cython/core/tail.pyx":679
 * 
 * 
 * def left_pad_string(str,  length, pad=' '):             # <<<<<<<<<<<<<<
 *     return pad*(length - len(str)) + str
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("SnapPy.left_pad_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":687
 *     Obsolete.
 *     """
 *     def __init__(self, num_components, num_crossings = None):             # <<<<<<<<<<<<<<
 *         if num_components < 0:
 *             return
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_14ObsMorwenLinks_1__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_6SnapPy_14ObsMorwenLinks___init__, "ObsMorwenLinks.__init__(self, num_components, num_crossings=None)");
static PyMethodDef __pyx_mdef_6SnapPy_14ObsMorwenLinks_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14ObsMorwenLinks_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14ObsMorwenLinks___init__};
static PyObject *__pyx_pw_6SnapPy_14ObsMorwenLinks_1__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_self = 0;
  PyObject *__pyx_v_num_components = 0;
  PyObject *__pyx_v_num_crossings = 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("__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_self,&__pyx_n_s_num_components,&__pyx_n_s_num_crossings,0};
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
    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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 687, __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_num_components)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 687, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(2, 687, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_crossings);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 687, __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(2, 687, __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_self = values[0];
    __pyx_v_num_components = values[1];
    __pyx_v_num_crossings = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, __pyx_nargs); __PYX_ERR(2, 687, __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("SnapPy.ObsMorwenLinks.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_14ObsMorwenLinks___init__(__pyx_self, __pyx_v_self, __pyx_v_num_components, __pyx_v_num_crossings);

  /* 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_6SnapPy_14ObsMorwenLinks___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_num_components, PyObject *__pyx_v_num_crossings) {
  PyObject *__pyx_v_crossings = NULL;
  PyObject *__pyx_v_files = NULL;
  PyObject *__pyx_v_c = NULL;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_second_char = NULL;
  PyObject *__pyx_v_file = NULL;
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_v_line = NULL;
  PyObject *__pyx_v_strline = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "cython/core/tail.pyx":688
 *     """
 *     def __init__(self, num_components, num_crossings = None):
 *         if num_components < 0:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_num_components, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 688, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cython/core/tail.pyx":689
 *     def __init__(self, num_components, num_crossings = None):
 *         if num_components < 0:
 *             return             # <<<<<<<<<<<<<<
 * 
 *         crossings = range(4, 15) if num_crossings is None else [num_crossings]
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "cython/core/tail.pyx":688
 *     """
 *     def __init__(self, num_components, num_crossings = None):
 *         if num_components < 0:             # <<<<<<<<<<<<<<
 *             return
 * 
 */
  }

  /* "cython/core/tail.pyx":691
 *             return
 * 
 *         crossings = range(4, 15) if num_crossings is None else [num_crossings]             # <<<<<<<<<<<<<<
 *         files = []
 *         for c in crossings:
 */
  __pyx_t_2 = (__pyx_v_num_crossings == Py_None);
  if (__pyx_t_2) {
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_tuple__164, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  } else {
    __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 691, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_num_crossings);
    __Pyx_GIVEREF(__pyx_v_num_crossings);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_num_crossings)) __PYX_ERR(2, 691, __pyx_L1_error);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
  }
  __pyx_v_crossings = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cython/core/tail.pyx":692
 * 
 *         crossings = range(4, 15) if num_crossings is None else [num_crossings]
 *         files = []             # <<<<<<<<<<<<<<
 *         for c in crossings:
 *             n = left_pad_string('%d' % c, 2, '0')
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_files = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cython/core/tail.pyx":693
 *         crossings = range(4, 15) if num_crossings is None else [num_crossings]
 *         files = []
 *         for c in crossings:             # <<<<<<<<<<<<<<
 *             n = left_pad_string('%d' % c, 2, '0')
 *             files.append('hyperbolic_data_%sa.gz' % n)
 */
  if (likely(PyList_CheckExact(__pyx_v_crossings)) || PyTuple_CheckExact(__pyx_v_crossings)) {
    __pyx_t_1 = __pyx_v_crossings; __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_crossings); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 693, __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(2, 693, __pyx_L1_error)
          #endif
          if (__pyx_t_4 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(2, 693, __pyx_L1_error)
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 693, __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(2, 693, __pyx_L1_error)
          #endif
          if (__pyx_t_4 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(2, 693, __pyx_L1_error)
        #else
        __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 693, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_5(__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(2, 693, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cython/core/tail.pyx":694
 *         files = []
 *         for c in crossings:
 *             n = left_pad_string('%d' % c, 2, '0')             # <<<<<<<<<<<<<<
 *             files.append('hyperbolic_data_%sa.gz' % n)
 *             if c > 5:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_left_pad_string); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_d, __pyx_v_c); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 694, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = NULL;
    __pyx_t_9 = 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_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_8, __pyx_t_7, __pyx_int_2, __pyx_kp_s_0};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 3+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 694, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cython/core/tail.pyx":695
 *         for c in crossings:
 *             n = left_pad_string('%d' % c, 2, '0')
 *             files.append('hyperbolic_data_%sa.gz' % n)             # <<<<<<<<<<<<<<
 *             if c > 5:
 *                 files.append('hyperbolic_data_%sn.gz' % n)
 */
    __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_hyperbolic_data__sa_gz, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_files, __pyx_t_3); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(2, 695, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/tail.pyx":696
 *             n = left_pad_string('%d' % c, 2, '0')
 *             files.append('hyperbolic_data_%sa.gz' % n)
 *             if c > 5:             # <<<<<<<<<<<<<<
 *                 files.append('hyperbolic_data_%sn.gz' % n)
 * 
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_c, __pyx_int_5, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 696, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 696, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_2) {

      /* "cython/core/tail.pyx":697
 *             files.append('hyperbolic_data_%sa.gz' % n)
 *             if c > 5:
 *                 files.append('hyperbolic_data_%sn.gz' % n)             # <<<<<<<<<<<<<<
 * 
 *         self.files = files
 */
      __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_hyperbolic_data__sn_gz, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 697, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_files, __pyx_t_3); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(2, 697, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cython/core/tail.pyx":696
 *             n = left_pad_string('%d' % c, 2, '0')
 *             files.append('hyperbolic_data_%sa.gz' % n)
 *             if c > 5:             # <<<<<<<<<<<<<<
 *                 files.append('hyperbolic_data_%sn.gz' % n)
 * 
 */
    }

    /* "cython/core/tail.pyx":693
 *         crossings = range(4, 15) if num_crossings is None else [num_crossings]
 *         files = []
 *         for c in crossings:             # <<<<<<<<<<<<<<
 *             n = left_pad_string('%d' % c, 2, '0')
 *             files.append('hyperbolic_data_%sa.gz' % n)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/tail.pyx":699
 *                 files.append('hyperbolic_data_%sn.gz' % n)
 * 
 *         self.files = files             # <<<<<<<<<<<<<<
 * 
 *         self.DT_codes = []
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_files, __pyx_v_files) < 0) __PYX_ERR(2, 699, __pyx_L1_error)

  /* "cython/core/tail.pyx":701
 *         self.files = files
 * 
 *         self.DT_codes = []             # <<<<<<<<<<<<<<
 *         second_char = string.ascii_lowercase[num_components-1]
 *         for file in files:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_DT_codes, __pyx_t_1) < 0) __PYX_ERR(2, 701, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cython/core/tail.pyx":702
 * 
 *         self.DT_codes = []
 *         second_char = string.ascii_lowercase[num_components-1]             # <<<<<<<<<<<<<<
 *         for file in files:
 *             data = gzip.open(morwen_link_directory + os.sep + file).readlines()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ascii_lowercase); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_v_num_components, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_second_char = __pyx_t_6;
  __pyx_t_6 = 0;

  /* "cython/core/tail.pyx":703
 *         self.DT_codes = []
 *         second_char = string.ascii_lowercase[num_components-1]
 *         for file in files:             # <<<<<<<<<<<<<<
 *             data = gzip.open(morwen_link_directory + os.sep + file).readlines()
 *             for line in data:
 */
  __pyx_t_6 = __pyx_v_files; __Pyx_INCREF(__pyx_t_6);
  __pyx_t_4 = 0;
  for (;;) {
    {
      Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_6);
      #if !CYTHON_ASSUME_SAFE_MACROS
      if (unlikely((__pyx_temp < 0))) __PYX_ERR(2, 703, __pyx_L1_error)
      #endif
      if (__pyx_t_4 >= __pyx_temp) break;
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(2, 703, __pyx_L1_error)
    #else
    __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 703, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_file, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cython/core/tail.pyx":704
 *         second_char = string.ascii_lowercase[num_components-1]
 *         for file in files:
 *             data = gzip.open(morwen_link_directory + os.sep + file).readlines()             # <<<<<<<<<<<<<<
 *             for line in data:
 *                 strline = line.decode()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_gzip); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_open); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_morwen_link_directory); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_os); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_sep); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyNumber_Add(__pyx_t_7, __pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    __pyx_t_12 = PyNumber_Add(__pyx_t_11, __pyx_v_file); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_12);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = NULL;
    __pyx_t_9 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_12};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 704, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_readlines); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 704, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_9 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_9 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 704, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_data, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "cython/core/tail.pyx":705
 *         for file in files:
 *             data = gzip.open(morwen_link_directory + os.sep + file).readlines()
 *             for line in data:             # <<<<<<<<<<<<<<
 *                 strline = line.decode()
 *                 if strline[1] == second_char:
 */
    if (likely(PyList_CheckExact(__pyx_v_data)) || PyTuple_CheckExact(__pyx_v_data)) {
      __pyx_t_1 = __pyx_v_data; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_13 = 0;
      __pyx_t_5 = NULL;
    } else {
      __pyx_t_13 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 705, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 705, __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(2, 705, __pyx_L1_error)
            #endif
            if (__pyx_t_13 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_8); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(2, 705, __pyx_L1_error)
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 705, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #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(2, 705, __pyx_L1_error)
            #endif
            if (__pyx_t_13 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_13); __Pyx_INCREF(__pyx_t_8); __pyx_t_13++; if (unlikely((0 < 0))) __PYX_ERR(2, 705, __pyx_L1_error)
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 705, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        }
      } else {
        __pyx_t_8 = __pyx_t_5(__pyx_t_1);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(2, 705, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "cython/core/tail.pyx":706
 *             data = gzip.open(morwen_link_directory + os.sep + file).readlines()
 *             for line in data:
 *                 strline = line.decode()             # <<<<<<<<<<<<<<
 *                 if strline[1] == second_char:
 *                     self.DT_codes.append(strline.strip())
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 706, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_12 = NULL;
      __pyx_t_9 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_12)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_12);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_9 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_12, NULL};
        __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 706, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_strline, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "cython/core/tail.pyx":707
 *             for line in data:
 *                 strline = line.decode()
 *                 if strline[1] == second_char:             # <<<<<<<<<<<<<<
 *                     self.DT_codes.append(strline.strip())
 * 
 */
      __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_strline, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 707, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_v_second_char, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 707, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 707, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_2) {

        /* "cython/core/tail.pyx":708
 *                 strline = line.decode()
 *                 if strline[1] == second_char:
 *                     self.DT_codes.append(strline.strip())             # <<<<<<<<<<<<<<
 * 
 *         self.length = len(self.DT_codes)
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_DT_codes); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 708, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_strline, __pyx_n_s_strip); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 708, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_11 = NULL;
        __pyx_t_9 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
            __pyx_t_9 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
          __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 708, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
        __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_t_8); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(2, 708, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "cython/core/tail.pyx":707
 *             for line in data:
 *                 strline = line.decode()
 *                 if strline[1] == second_char:             # <<<<<<<<<<<<<<
 *                     self.DT_codes.append(strline.strip())
 * 
 */
      }

      /* "cython/core/tail.pyx":705
 *         for file in files:
 *             data = gzip.open(morwen_link_directory + os.sep + file).readlines()
 *             for line in data:             # <<<<<<<<<<<<<<
 *                 strline = line.decode()
 *                 if strline[1] == second_char:
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "cython/core/tail.pyx":703
 *         self.DT_codes = []
 *         second_char = string.ascii_lowercase[num_components-1]
 *         for file in files:             # <<<<<<<<<<<<<<
 *             data = gzip.open(morwen_link_directory + os.sep + file).readlines()
 *             for line in data:
 */
  }
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cython/core/tail.pyx":710
 *                     self.DT_codes.append(strline.strip())
 * 
 *         self.length = len(self.DT_codes)             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices=(0, len(self.DT_codes), 1))
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_DT_codes); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_length, __pyx_t_6) < 0) __PYX_ERR(2, 710, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "cython/core/tail.pyx":711
 * 
 *         self.length = len(self.DT_codes)
 *         Census.__init__(self, indices=(0, len(self.DT_codes), 1))             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, n):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Census); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_INCREF(__pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_self)) __PYX_ERR(2, 711, __pyx_L1_error);
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_DT_codes); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 711, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_int_0)) __PYX_ERR(2, 711, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_3)) __PYX_ERR(2, 711, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_int_1)) __PYX_ERR(2, 711, __pyx_L1_error);
  __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_indices, __pyx_t_12) < 0) __PYX_ERR(2, 711, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(2, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;

  /* "cython/core/tail.pyx":687
 *     Obsolete.
 *     """
 *     def __init__(self, num_components, num_crossings = None):             # <<<<<<<<<<<<<<
 *         if num_components < 0:
 *             return
 */

  /* 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_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("SnapPy.ObsMorwenLinks.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_crossings);
  __Pyx_XDECREF(__pyx_v_files);
  __Pyx_XDECREF(__pyx_v_c);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_second_char);
  __Pyx_XDECREF(__pyx_v_file);
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XDECREF(__pyx_v_line);
  __Pyx_XDECREF(__pyx_v_strline);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":713
 *         Census.__init__(self, indices=(0, len(self.DT_codes), 1))
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         if isinstance(n, slice):
 *             SC = self.__class__(-1)
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_14ObsMorwenLinks_3__getitem__(PyObject *__pyx_self, 
#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_6SnapPy_14ObsMorwenLinks_2__getitem__, "ObsMorwenLinks.__getitem__(self, n)");
static PyMethodDef __pyx_mdef_6SnapPy_14ObsMorwenLinks_3__getitem__ = {"__getitem__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14ObsMorwenLinks_3__getitem__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14ObsMorwenLinks_2__getitem__};
static PyObject *__pyx_pw_6SnapPy_14ObsMorwenLinks_3__getitem__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_n = 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("__getitem__ (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_self,&__pyx_n_s_n,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_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 713, __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_n)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 713, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(2, 713, __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, "__getitem__") < 0)) __PYX_ERR(2, 713, __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_self = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, __pyx_nargs); __PYX_ERR(2, 713, __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("SnapPy.ObsMorwenLinks.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_14ObsMorwenLinks_2__getitem__(__pyx_self, __pyx_v_self, __pyx_v_n);

  /* 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_6SnapPy_14ObsMorwenLinks_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_n) {
  PyObject *__pyx_v_SC = NULL;
  PyObject *__pyx_v_name = NULL;
  struct __pyx_obj_6SnapPy_Manifold *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 1);

  /* "cython/core/tail.pyx":714
 * 
 *     def __getitem__(self, n):
 *         if isinstance(n, slice):             # <<<<<<<<<<<<<<
 *             SC = self.__class__(-1)
 *             SC.DT_codes = self.DT_codes[n]
 */
  __pyx_t_1 = PySlice_Check(__pyx_v_n); 
  if (__pyx_t_1) {

    /* "cython/core/tail.pyx":715
 *     def __getitem__(self, n):
 *         if isinstance(n, slice):
 *             SC = self.__class__(-1)             # <<<<<<<<<<<<<<
 *             SC.DT_codes = self.DT_codes[n]
 *             SC.length = len(SC.DT_codes)
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 715, __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_int_neg_1};
      __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(2, 715, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_SC = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "cython/core/tail.pyx":716
 *         if isinstance(n, slice):
 *             SC = self.__class__(-1)
 *             SC.DT_codes = self.DT_codes[n]             # <<<<<<<<<<<<<<
 *             SC.length = len(SC.DT_codes)
 *             Census.__init__(SC, indices=(0, len(SC.DT_codes), 1))
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_DT_codes); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_SC, __pyx_n_s_DT_codes, __pyx_t_3) < 0) __PYX_ERR(2, 716, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/tail.pyx":717
 *             SC = self.__class__(-1)
 *             SC.DT_codes = self.DT_codes[n]
 *             SC.length = len(SC.DT_codes)             # <<<<<<<<<<<<<<
 *             Census.__init__(SC, indices=(0, len(SC.DT_codes), 1))
 *             return SC
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_SC, __pyx_n_s_DT_codes); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(2, 717, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 717, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_PyObject_SetAttrStr(__pyx_v_SC, __pyx_n_s_length, __pyx_t_3) < 0) __PYX_ERR(2, 717, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/tail.pyx":718
 *             SC.DT_codes = self.DT_codes[n]
 *             SC.length = len(SC.DT_codes)
 *             Census.__init__(SC, indices=(0, len(SC.DT_codes), 1))             # <<<<<<<<<<<<<<
 *             return SC
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Census); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_SC);
    __Pyx_GIVEREF(__pyx_v_SC);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_SC)) __PYX_ERR(2, 718, __pyx_L1_error);
    __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_SC, __pyx_n_s_DT_codes); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(2, 718, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_int_0)) __PYX_ERR(2, 718, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7)) __PYX_ERR(2, 718, __pyx_L1_error);
    __Pyx_INCREF(__pyx_int_1);
    __Pyx_GIVEREF(__pyx_int_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_int_1)) __PYX_ERR(2, 718, __pyx_L1_error);
    __pyx_t_7 = 0;
    if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_indices, __pyx_t_8) < 0) __PYX_ERR(2, 718, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 718, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "cython/core/tail.pyx":719
 *             SC.length = len(SC.DT_codes)
 *             Census.__init__(SC, indices=(0, len(SC.DT_codes), 1))
 *             return SC             # <<<<<<<<<<<<<<
 *         else:
 *             name = str('DT:%s' % self.DT_codes[n])
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_SC);
    __pyx_r = __pyx_v_SC;
    goto __pyx_L0;

    /* "cython/core/tail.pyx":714
 * 
 *     def __getitem__(self, n):
 *         if isinstance(n, slice):             # <<<<<<<<<<<<<<
 *             SC = self.__class__(-1)
 *             SC.DT_codes = self.DT_codes[n]
 */
  }

  /* "cython/core/tail.pyx":721
 *             return SC
 *         else:
 *             name = str('DT:%s' % self.DT_codes[n])             # <<<<<<<<<<<<<<
 *             result = Manifold(name)
 *             result.set_name(name)
 */
  /*else*/ {
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_DT_codes); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyString_FormatSafe(__pyx_kp_s_DT_s, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Str(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_v_name = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "cython/core/tail.pyx":722
 *         else:
 *             name = str('DT:%s' % self.DT_codes[n])
 *             result = Manifold(name)             # <<<<<<<<<<<<<<
 *             result.set_name(name)
 *             return result
 */
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_6SnapPy_Manifold), __pyx_v_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_result = ((struct __pyx_obj_6SnapPy_Manifold *)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/tail.pyx":723
 *             name = str('DT:%s' % self.DT_codes[n])
 *             result = Manifold(name)
 *             result.set_name(name)             # <<<<<<<<<<<<<<
 *             return result
 * 
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_set_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 723, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_3 = NULL;
    __pyx_t_5 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_5 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_name};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 723, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cython/core/tail.pyx":724
 *             result = Manifold(name)
 *             result.set_name(name)
 *             return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF((PyObject *)__pyx_v_result);
    __pyx_r = ((PyObject *)__pyx_v_result);
    goto __pyx_L0;
  }

  /* "cython/core/tail.pyx":713
 *         Census.__init__(self, indices=(0, len(self.DT_codes), 1))
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         if isinstance(n, slice):
 *             SC = self.__class__(-1)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("SnapPy.ObsMorwenLinks.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_SC);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":729
 * # Creating fibered manifolds from braids
 * 
 * cdef c_Triangulation* get_fibered_manifold_associated_to_braid(num_strands,             # <<<<<<<<<<<<<<
 *                                                                braid_word):
 *     if num_strands < 2:
 */

static Triangulation *__pyx_f_6SnapPy_get_fibered_manifold_associated_to_braid(PyObject *__pyx_v_num_strands, PyObject *__pyx_v_braid_word) {
  PyObject *__pyx_v_allowed_letters = NULL;
  int *__pyx_v_word;
  Triangulation *__pyx_v_c_triangulation;
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_w = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_9genexpr95__pyx_v_x = NULL;
  PyObject *__pyx_9genexpr96__pyx_v_x = NULL;
  PyObject *__pyx_9genexpr97__pyx_v_b = NULL;
  Triangulation *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  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;
  size_t __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  Triangulation *__pyx_t_12;
  char *__pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_fibered_manifold_associated_to_braid", 1);

  /* "cython/core/tail.pyx":731
 * cdef c_Triangulation* get_fibered_manifold_associated_to_braid(num_strands,
 *                                                                braid_word):
 *     if num_strands < 2:             # <<<<<<<<<<<<<<
 *         raise ValueError('Braids must have at least 2 strands.')
 *     allowed_letters = ([x for x in range(1, num_strands)] +
 */
  __pyx_t_1 = PyObject_RichCompare(__pyx_v_num_strands, __pyx_int_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 731, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 731, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "cython/core/tail.pyx":732
 *                                                                braid_word):
 *     if num_strands < 2:
 *         raise ValueError('Braids must have at least 2 strands.')             # <<<<<<<<<<<<<<
 *     allowed_letters = ([x for x in range(1, num_strands)] +
 *                        [x for x in range(-num_strands+1, 0)])
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__165, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 732, __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(2, 732, __pyx_L1_error)

    /* "cython/core/tail.pyx":731
 * cdef c_Triangulation* get_fibered_manifold_associated_to_braid(num_strands,
 *                                                                braid_word):
 *     if num_strands < 2:             # <<<<<<<<<<<<<<
 *         raise ValueError('Braids must have at least 2 strands.')
 *     allowed_letters = ([x for x in range(1, num_strands)] +
 */
  }

  /* "cython/core/tail.pyx":733
 *     if num_strands < 2:
 *         raise ValueError('Braids must have at least 2 strands.')
 *     allowed_letters = ([x for x in range(1, num_strands)] +             # <<<<<<<<<<<<<<
 *                        [x for x in range(-num_strands+1, 0)])
 *     if False in [b in allowed_letters for b in braid_word]:
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 733, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 733, __pyx_L6_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_int_1);
    __Pyx_GIVEREF(__pyx_int_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_1)) __PYX_ERR(2, 733, __pyx_L6_error);
    __Pyx_INCREF(__pyx_v_num_strands);
    __Pyx_GIVEREF(__pyx_v_num_strands);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_num_strands)) __PYX_ERR(2, 733, __pyx_L6_error);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 733, __pyx_L6_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_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 733, __pyx_L6_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 733, __pyx_L6_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_6)) {
        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(2, 733, __pyx_L6_error)
            #endif
            if (__pyx_t_5 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(2, 733, __pyx_L6_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 733, __pyx_L6_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(2, 733, __pyx_L6_error)
            #endif
            if (__pyx_t_5 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(2, 733, __pyx_L6_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 733, __pyx_L6_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_6(__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(2, 733, __pyx_L6_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr95__pyx_v_x, __pyx_t_4);
      __pyx_t_4 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_9genexpr95__pyx_v_x))) __PYX_ERR(2, 733, __pyx_L6_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr95__pyx_v_x); __pyx_9genexpr95__pyx_v_x = 0;
    goto __pyx_L10_exit_scope;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_9genexpr95__pyx_v_x); __pyx_9genexpr95__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L10_exit_scope:;
  } /* exit inner scope */
  { /* enter inner scope */

    /* "cython/core/tail.pyx":734
 *         raise ValueError('Braids must have at least 2 strands.')
 *     allowed_letters = ([x for x in range(1, num_strands)] +
 *                        [x for x in range(-num_strands+1, 0)])             # <<<<<<<<<<<<<<
 *     if False in [b in allowed_letters for b in braid_word]:
 *         raise ValueError('The braid word is invalid.')
 */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 734, __pyx_L13_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyNumber_Negative(__pyx_v_num_strands); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 734, __pyx_L13_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 734, __pyx_L13_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 734, __pyx_L13_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_7);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7)) __PYX_ERR(2, 734, __pyx_L13_error);
    __Pyx_INCREF(__pyx_int_0);
    __Pyx_GIVEREF(__pyx_int_0);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_0)) __PYX_ERR(2, 734, __pyx_L13_error);
    __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 734, __pyx_L13_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
      __pyx_t_4 = __pyx_t_7; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 734, __pyx_L13_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 734, __pyx_L13_error)
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    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(2, 734, __pyx_L13_error)
            #endif
            if (__pyx_t_5 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(2, 734, __pyx_L13_error)
          #else
          __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 734, __pyx_L13_error)
          __Pyx_GOTREF(__pyx_t_7);
          #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(2, 734, __pyx_L13_error)
            #endif
            if (__pyx_t_5 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(2, 734, __pyx_L13_error)
          #else
          __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 734, __pyx_L13_error)
          __Pyx_GOTREF(__pyx_t_7);
          #endif
        }
      } else {
        __pyx_t_7 = __pyx_t_6(__pyx_t_4);
        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(2, 734, __pyx_L13_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr96__pyx_v_x, __pyx_t_7);
      __pyx_t_7 = 0;
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_9genexpr96__pyx_v_x))) __PYX_ERR(2, 734, __pyx_L13_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_9genexpr96__pyx_v_x); __pyx_9genexpr96__pyx_v_x = 0;
    goto __pyx_L17_exit_scope;
    __pyx_L13_error:;
    __Pyx_XDECREF(__pyx_9genexpr96__pyx_v_x); __pyx_9genexpr96__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L17_exit_scope:;
  } /* exit inner scope */

  /* "cython/core/tail.pyx":733
 *     if num_strands < 2:
 *         raise ValueError('Braids must have at least 2 strands.')
 *     allowed_letters = ([x for x in range(1, num_strands)] +             # <<<<<<<<<<<<<<
 *                        [x for x in range(-num_strands+1, 0)])
 *     if False in [b in allowed_letters for b in braid_word]:
 */
  __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 733, __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_v_allowed_letters = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":735
 *     allowed_letters = ([x for x in range(1, num_strands)] +
 *                        [x for x in range(-num_strands+1, 0)])
 *     if False in [b in allowed_letters for b in braid_word]:             # <<<<<<<<<<<<<<
 *         raise ValueError('The braid word is invalid.')
 * 
 */
  { /* enter inner scope */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 735, __pyx_L21_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (likely(PyList_CheckExact(__pyx_v_braid_word)) || PyTuple_CheckExact(__pyx_v_braid_word)) {
      __pyx_t_3 = __pyx_v_braid_word; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_5 = 0;
      __pyx_t_6 = NULL;
    } else {
      __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_braid_word); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 735, __pyx_L21_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 735, __pyx_L21_error)
    }
    for (;;) {
      if (likely(!__pyx_t_6)) {
        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(2, 735, __pyx_L21_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_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(2, 735, __pyx_L21_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 735, __pyx_L21_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(2, 735, __pyx_L21_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_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(2, 735, __pyx_L21_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 735, __pyx_L21_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_6(__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(2, 735, __pyx_L21_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_9genexpr97__pyx_v_b, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_9genexpr97__pyx_v_b, __pyx_v_allowed_letters, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 735, __pyx_L21_error)
      __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 735, __pyx_L21_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_1))) __PYX_ERR(2, 735, __pyx_L21_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_9genexpr97__pyx_v_b); __pyx_9genexpr97__pyx_v_b = 0;
    goto __pyx_L25_exit_scope;
    __pyx_L21_error:;
    __Pyx_XDECREF(__pyx_9genexpr97__pyx_v_b); __pyx_9genexpr97__pyx_v_b = 0;
    goto __pyx_L1_error;
    __pyx_L25_exit_scope:;
  } /* exit inner scope */
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(Py_False, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(2, 735, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(__pyx_t_2)) {

    /* "cython/core/tail.pyx":736
 *                        [x for x in range(-num_strands+1, 0)])
 *     if False in [b in allowed_letters for b in braid_word]:
 *         raise ValueError('The braid word is invalid.')             # <<<<<<<<<<<<<<
 * 
 *     cdef int* word
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__166, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 736, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(2, 736, __pyx_L1_error)

    /* "cython/core/tail.pyx":735
 *     allowed_letters = ([x for x in range(1, num_strands)] +
 *                        [x for x in range(-num_strands+1, 0)])
 *     if False in [b in allowed_letters for b in braid_word]:             # <<<<<<<<<<<<<<
 *         raise ValueError('The braid word is invalid.')
 * 
 */
  }

  /* "cython/core/tail.pyx":741
 *     cdef c_Triangulation* c_triangulation
 * 
 *     n = len(braid_word)             # <<<<<<<<<<<<<<
 *     word = <int*>malloc(n*sizeof(int))
 *     for  i, w in enumerate(braid_word):
 */
  __pyx_t_5 = PyObject_Length(__pyx_v_braid_word); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(2, 741, __pyx_L1_error)
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_n = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":742
 * 
 *     n = len(braid_word)
 *     word = <int*>malloc(n*sizeof(int))             # <<<<<<<<<<<<<<
 *     for  i, w in enumerate(braid_word):
 *         word[i] = w
 */
  __pyx_t_4 = __Pyx_PyInt_FromSize_t((sizeof(int))); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyNumber_Multiply(__pyx_v_n, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_8 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_word = ((int *)malloc(__pyx_t_8));

  /* "cython/core/tail.pyx":743
 *     n = len(braid_word)
 *     word = <int*>malloc(n*sizeof(int))
 *     for  i, w in enumerate(braid_word):             # <<<<<<<<<<<<<<
 *         word[i] = w
 *     c_triangulation = fibered_manifold_associated_to_braid(num_strands, n, word)
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_t_3 = __pyx_int_0;
  if (likely(PyList_CheckExact(__pyx_v_braid_word)) || PyTuple_CheckExact(__pyx_v_braid_word)) {
    __pyx_t_4 = __pyx_v_braid_word; __Pyx_INCREF(__pyx_t_4);
    __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_braid_word); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 743, __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(2, 743, __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_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(2, 743, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 743, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #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(2, 743, __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_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(2, 743, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 743, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_6(__pyx_t_4);
      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(2, 743, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_w, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
    __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3);
    __pyx_t_3 = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "cython/core/tail.pyx":744
 *     word = <int*>malloc(n*sizeof(int))
 *     for  i, w in enumerate(braid_word):
 *         word[i] = w             # <<<<<<<<<<<<<<
 *     c_triangulation = fibered_manifold_associated_to_braid(num_strands, n, word)
 *     free(word)
 */
    __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_w); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 744, __pyx_L1_error)
    __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 744, __pyx_L1_error)
    (__pyx_v_word[__pyx_t_10]) = __pyx_t_9;

    /* "cython/core/tail.pyx":743
 *     n = len(braid_word)
 *     word = <int*>malloc(n*sizeof(int))
 *     for  i, w in enumerate(braid_word):             # <<<<<<<<<<<<<<
 *         word[i] = w
 *     c_triangulation = fibered_manifold_associated_to_braid(num_strands, n, word)
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":745
 *     for  i, w in enumerate(braid_word):
 *         word[i] = w
 *     c_triangulation = fibered_manifold_associated_to_braid(num_strands, n, word)             # <<<<<<<<<<<<<<
 *     free(word)
 *     name = to_byte_str('Braid:' + repr(braid_word))
 */
  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_num_strands); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 745, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_n); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 745, __pyx_L1_error)
  __pyx_t_12 = fibered_manifold_associated_to_braid(__pyx_t_9, __pyx_t_11, __pyx_v_word); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 745, __pyx_L1_error)
  __pyx_v_c_triangulation = __pyx_t_12;

  /* "cython/core/tail.pyx":746
 *         word[i] = w
 *     c_triangulation = fibered_manifold_associated_to_braid(num_strands, n, word)
 *     free(word)             # <<<<<<<<<<<<<<
 *     name = to_byte_str('Braid:' + repr(braid_word))
 *     set_triangulation_name(c_triangulation, name)
 */
  free(__pyx_v_word);

  /* "cython/core/tail.pyx":747
 *     c_triangulation = fibered_manifold_associated_to_braid(num_strands, n, word)
 *     free(word)
 *     name = to_byte_str('Braid:' + repr(braid_word))             # <<<<<<<<<<<<<<
 *     set_triangulation_name(c_triangulation, name)
 *     return c_triangulation
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_to_byte_str); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = PyObject_Repr(__pyx_v_braid_word); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = PyNumber_Add(__pyx_kp_s_Braid, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_11 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_11 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_7};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 747, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_v_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":748
 *     free(word)
 *     name = to_byte_str('Braid:' + repr(braid_word))
 *     set_triangulation_name(c_triangulation, name)             # <<<<<<<<<<<<<<
 *     return c_triangulation
 * 
 */
  __pyx_t_13 = __Pyx_PyObject_AsWritableString(__pyx_v_name); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(2, 748, __pyx_L1_error)
  set_triangulation_name(__pyx_v_c_triangulation, __pyx_t_13); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 748, __pyx_L1_error)

  /* "cython/core/tail.pyx":749
 *     name = to_byte_str('Braid:' + repr(braid_word))
 *     set_triangulation_name(c_triangulation, name)
 *     return c_triangulation             # <<<<<<<<<<<<<<
 * 
 * # Link Editor support
 */
  __pyx_r = __pyx_v_c_triangulation;
  goto __pyx_L0;

  /* "cython/core/tail.pyx":729
 * # Creating fibered manifolds from braids
 * 
 * cdef c_Triangulation* get_fibered_manifold_associated_to_braid(num_strands,             # <<<<<<<<<<<<<<
 *                                                                braid_word):
 *     if num_strands < 2:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("SnapPy.get_fibered_manifold_associated_to_braid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_allowed_letters);
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_w);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_9genexpr95__pyx_v_x);
  __Pyx_XDECREF(__pyx_9genexpr96__pyx_v_x);
  __Pyx_XDECREF(__pyx_9genexpr97__pyx_v_b);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cython/core/tail.pyx":756
 * signtype = {'R': KLPHalfTwistCL, 'L': KLPHalfTwistCCL}
 * 
 * cdef c_Triangulation* get_triangulation_from_PythonKLP(pythonklp, remove_finite_vertices=True) except *:             # <<<<<<<<<<<<<<
 *     cdef KLPProjection P
 *     cdef c_Triangulation *c_triangulation
 */

static Triangulation *__pyx_f_6SnapPy_get_triangulation_from_PythonKLP(PyObject *__pyx_v_pythonklp, struct __pyx_opt_args_6SnapPy_get_triangulation_from_PythonKLP *__pyx_optional_args) {
  PyObject *__pyx_v_remove_finite_vertices = ((PyObject *)Py_True);
  KLPProjection __pyx_v_P;
  Triangulation *__pyx_v_c_triangulation;
  PyObject *__pyx_v_Pycrossings = NULL;
  int __pyx_v_i;
  PyObject *__pyx_v_cr_dict = NULL;
  PyObject *__pyx_v_neighbor = NULL;
  PyObject *__pyx_v_strand = NULL;
  PyObject *__pyx_v_sign = NULL;
  PyObject *__pyx_v_tri_name = NULL;
  Triangulation *__pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *(*__pyx_t_6)(PyObject *);
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  KLPStrandType __pyx_t_12;
  KLPCrossingType __pyx_t_13;
  int __pyx_t_14;
  Boolean __pyx_t_15;
  Triangulation *__pyx_t_16;
  char *__pyx_t_17;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_triangulation_from_PythonKLP", 1);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_remove_finite_vertices = __pyx_optional_args->remove_finite_vertices;
    }
  }

  /* "cython/core/tail.pyx":760
 *     cdef c_Triangulation *c_triangulation
 * 
 *     P.num_crossings, P.num_free_loops, P.num_components, Pycrossings = pythonklp             # <<<<<<<<<<<<<<
 *     P.crossings = <KLPCrossing *>malloc(P.num_crossings * sizeof(KLPCrossing))
 *     if P.crossings == NULL:
 */
  if ((likely(PyTuple_CheckExact(__pyx_v_pythonklp))) || (PyList_CheckExact(__pyx_v_pythonklp))) {
    PyObject* sequence = __pyx_v_pythonklp;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 4)) {
      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(2, 760, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 3); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 3); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_4);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_3,&__pyx_t_4};
      for (i=0; i < 4; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(2, 760, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
  } else {
    Py_ssize_t index = -1;
    PyObject** temps[4] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_3,&__pyx_t_4};
    __pyx_t_5 = PyObject_GetIter(__pyx_v_pythonklp); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 760, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
    for (index=0; index < 4; index++) {
      PyObject* item = __pyx_t_6(__pyx_t_5); if (unlikely(!item)) goto __pyx_L3_unpacking_failed;
      __Pyx_GOTREF(item);
      *(temps[index]) = item;
    }
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_5), 4) < 0) __PYX_ERR(2, 760, __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(2, 760, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 760, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 760, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 760, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_P.num_crossings = __pyx_t_7;
  __pyx_v_P.num_free_loops = __pyx_t_8;
  __pyx_v_P.num_components = __pyx_t_9;
  __pyx_v_Pycrossings = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":761
 * 
 *     P.num_crossings, P.num_free_loops, P.num_components, Pycrossings = pythonklp
 *     P.crossings = <KLPCrossing *>malloc(P.num_crossings * sizeof(KLPCrossing))             # <<<<<<<<<<<<<<
 *     if P.crossings == NULL:
 *         raise RuntimeError('Could not allocate a crossing table.')
 */
  __pyx_v_P.crossings = ((KLPCrossing *)malloc((__pyx_v_P.num_crossings * (sizeof(KLPCrossing)))));

  /* "cython/core/tail.pyx":762
 *     P.num_crossings, P.num_free_loops, P.num_components, Pycrossings = pythonklp
 *     P.crossings = <KLPCrossing *>malloc(P.num_crossings * sizeof(KLPCrossing))
 *     if P.crossings == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError('Could not allocate a crossing table.')
 * 
 */
  __pyx_t_10 = (__pyx_v_P.crossings == NULL);
  if (unlikely(__pyx_t_10)) {

    /* "cython/core/tail.pyx":763
 *     P.crossings = <KLPCrossing *>malloc(P.num_crossings * sizeof(KLPCrossing))
 *     if P.crossings == NULL:
 *         raise RuntimeError('Could not allocate a crossing table.')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(P.num_crossings):
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__167, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(2, 763, __pyx_L1_error)

    /* "cython/core/tail.pyx":762
 *     P.num_crossings, P.num_free_loops, P.num_components, Pycrossings = pythonklp
 *     P.crossings = <KLPCrossing *>malloc(P.num_crossings * sizeof(KLPCrossing))
 *     if P.crossings == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError('Could not allocate a crossing table.')
 * 
 */
  }

  /* "cython/core/tail.pyx":765
 *         raise RuntimeError('Could not allocate a crossing table.')
 * 
 *     for i in range(P.num_crossings):             # <<<<<<<<<<<<<<
 *         cr_dict = Pycrossings[i]
 *         neighbor = cr_dict['Xbackward_neighbor']
 */
  __pyx_t_9 = __pyx_v_P.num_crossings;
  __pyx_t_8 = __pyx_t_9;
  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_8; __pyx_t_7+=1) {
    __pyx_v_i = __pyx_t_7;

    /* "cython/core/tail.pyx":766
 * 
 *     for i in range(P.num_crossings):
 *         cr_dict = Pycrossings[i]             # <<<<<<<<<<<<<<
 *         neighbor = cr_dict['Xbackward_neighbor']
 *         P.crossings[i].neighbor[<int>KLPStrandX][<int>KLPBackward] = &P.crossings[neighbor]
 */
    __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_Pycrossings, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_cr_dict, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/tail.pyx":767
 *     for i in range(P.num_crossings):
 *         cr_dict = Pycrossings[i]
 *         neighbor = cr_dict['Xbackward_neighbor']             # <<<<<<<<<<<<<<
 *         P.crossings[i].neighbor[<int>KLPStrandX][<int>KLPBackward] = &P.crossings[neighbor]
 *         neighbor = cr_dict['Xforward_neighbor']
 */
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_cr_dict, __pyx_n_s_Xbackward_neighbor); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 767, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_neighbor, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/tail.pyx":768
 *         cr_dict = Pycrossings[i]
 *         neighbor = cr_dict['Xbackward_neighbor']
 *         P.crossings[i].neighbor[<int>KLPStrandX][<int>KLPBackward] = &P.crossings[neighbor]             # <<<<<<<<<<<<<<
 *         neighbor = cr_dict['Xforward_neighbor']
 *         P.crossings[i].neighbor[<int>KLPStrandX][<int>KLPForward] = &P.crossings[neighbor]
 */
    __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_neighbor); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 768, __pyx_L1_error)
    (((__pyx_v_P.crossings[__pyx_v_i]).neighbor[((int)KLPStrandX)])[((int)KLPBackward)]) = (&(__pyx_v_P.crossings[__pyx_t_11]));

    /* "cython/core/tail.pyx":769
 *         neighbor = cr_dict['Xbackward_neighbor']
 *         P.crossings[i].neighbor[<int>KLPStrandX][<int>KLPBackward] = &P.crossings[neighbor]
 *         neighbor = cr_dict['Xforward_neighbor']             # <<<<<<<<<<<<<<
 *         P.crossings[i].neighbor[<int>KLPStrandX][<int>KLPForward] = &P.crossings[neighbor]
 *         neighbor = cr_dict['Ybackward_neighbor']
 */
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_cr_dict, __pyx_n_s_Xforward_neighbor); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 769, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_neighbor, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/tail.pyx":770
 *         P.crossings[i].neighbor[<int>KLPStrandX][<int>KLPBackward] = &P.crossings[neighbor]
 *         neighbor = cr_dict['Xforward_neighbor']
 *         P.crossings[i].neighbor[<int>KLPStrandX][<int>KLPForward] = &P.crossings[neighbor]             # <<<<<<<<<<<<<<
 *         neighbor = cr_dict['Ybackward_neighbor']
 *         P.crossings[i].neighbor[<int>KLPStrandY][<int>KLPBackward] = &P.crossings[neighbor]
 */
    __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_neighbor); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 770, __pyx_L1_error)
    (((__pyx_v_P.crossings[__pyx_v_i]).neighbor[((int)KLPStrandX)])[((int)KLPForward)]) = (&(__pyx_v_P.crossings[__pyx_t_11]));

    /* "cython/core/tail.pyx":771
 *         neighbor = cr_dict['Xforward_neighbor']
 *         P.crossings[i].neighbor[<int>KLPStrandX][<int>KLPForward] = &P.crossings[neighbor]
 *         neighbor = cr_dict['Ybackward_neighbor']             # <<<<<<<<<<<<<<
 *         P.crossings[i].neighbor[<int>KLPStrandY][<int>KLPBackward] = &P.crossings[neighbor]
 *         neighbor = cr_dict['Yforward_neighbor']
 */
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_cr_dict, __pyx_n_s_Ybackward_neighbor); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_neighbor, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/tail.pyx":772
 *         P.crossings[i].neighbor[<int>KLPStrandX][<int>KLPForward] = &P.crossings[neighbor]
 *         neighbor = cr_dict['Ybackward_neighbor']
 *         P.crossings[i].neighbor[<int>KLPStrandY][<int>KLPBackward] = &P.crossings[neighbor]             # <<<<<<<<<<<<<<
 *         neighbor = cr_dict['Yforward_neighbor']
 *         P.crossings[i].neighbor[<int>KLPStrandY][<int>KLPForward] = &P.crossings[neighbor]
 */
    __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_neighbor); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 772, __pyx_L1_error)
    (((__pyx_v_P.crossings[__pyx_v_i]).neighbor[((int)KLPStrandY)])[((int)KLPBackward)]) = (&(__pyx_v_P.crossings[__pyx_t_11]));

    /* "cython/core/tail.pyx":773
 *         neighbor = cr_dict['Ybackward_neighbor']
 *         P.crossings[i].neighbor[<int>KLPStrandY][<int>KLPBackward] = &P.crossings[neighbor]
 *         neighbor = cr_dict['Yforward_neighbor']             # <<<<<<<<<<<<<<
 *         P.crossings[i].neighbor[<int>KLPStrandY][<int>KLPForward] = &P.crossings[neighbor]
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_cr_dict, __pyx_n_s_Yforward_neighbor); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 773, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_neighbor, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/tail.pyx":774
 *         P.crossings[i].neighbor[<int>KLPStrandY][<int>KLPBackward] = &P.crossings[neighbor]
 *         neighbor = cr_dict['Yforward_neighbor']
 *         P.crossings[i].neighbor[<int>KLPStrandY][<int>KLPForward] = &P.crossings[neighbor]             # <<<<<<<<<<<<<<
 * 
 *         strand = cr_dict['Xbackward_strand']
 */
    __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_v_neighbor); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 774, __pyx_L1_error)
    (((__pyx_v_P.crossings[__pyx_v_i]).neighbor[((int)KLPStrandY)])[((int)KLPForward)]) = (&(__pyx_v_P.crossings[__pyx_t_11]));

    /* "cython/core/tail.pyx":776
 *         P.crossings[i].neighbor[<int>KLPStrandY][<int>KLPForward] = &P.crossings[neighbor]
 * 
 *         strand = cr_dict['Xbackward_strand']             # <<<<<<<<<<<<<<
 *         P.crossings[i].strand[<int>KLPStrandX][<int>KLPBackward] = strandtype[strand]
 *         strand = cr_dict['Xforward_strand']
 */
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_cr_dict, __pyx_n_s_Xbackward_strand); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 776, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_strand, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/tail.pyx":777
 * 
 *         strand = cr_dict['Xbackward_strand']
 *         P.crossings[i].strand[<int>KLPStrandX][<int>KLPBackward] = strandtype[strand]             # <<<<<<<<<<<<<<
 *         strand = cr_dict['Xforward_strand']
 *         P.crossings[i].strand[<int>KLPStrandX][<int>KLPForward] = strandtype[strand]
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_strandtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 777, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_12 = ((KLPStrandType)__Pyx_PyInt_As_KLPStrandType(__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 777, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (((__pyx_v_P.crossings[__pyx_v_i]).strand[((int)KLPStrandX)])[((int)KLPBackward)]) = __pyx_t_12;

    /* "cython/core/tail.pyx":778
 *         strand = cr_dict['Xbackward_strand']
 *         P.crossings[i].strand[<int>KLPStrandX][<int>KLPBackward] = strandtype[strand]
 *         strand = cr_dict['Xforward_strand']             # <<<<<<<<<<<<<<
 *         P.crossings[i].strand[<int>KLPStrandX][<int>KLPForward] = strandtype[strand]
 *         strand = cr_dict['Ybackward_strand']
 */
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_cr_dict, __pyx_n_s_Xforward_strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 778, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_strand, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cython/core/tail.pyx":779
 *         P.crossings[i].strand[<int>KLPStrandX][<int>KLPBackward] = strandtype[strand]
 *         strand = cr_dict['Xforward_strand']
 *         P.crossings[i].strand[<int>KLPStrandX][<int>KLPForward] = strandtype[strand]             # <<<<<<<<<<<<<<
 *         strand = cr_dict['Ybackward_strand']
 *         P.crossings[i].strand[<int>KLPStrandY][<int>KLPBackward] = strandtype[strand]
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_strandtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_strand); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 779, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_12 = ((KLPStrandType)__Pyx_PyInt_As_KLPStrandType(__pyx_t_4)); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 779, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    (((__pyx_v_P.crossings[__pyx_v_i]).strand[((int)KLPStrandX)])[((int)KLPForward)]) = __pyx_t_12;

    /* "cython/core/tail.pyx":780
 *         strand = cr_dict['Xforward_strand']
 *         P.crossings[i].strand[<int>KLPStrandX][<int>KLPForward] = strandtype[strand]
 *         strand = cr_dict['Ybackward_strand']             # <<<<<<<<<<<<<<
 *         P.crossings[i].strand[<int>KLPStrandY][<int>KLPBackward] = strandtype[strand]
 *         strand = cr_dict['Yforward_strand']
 */
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_cr_dict, __pyx_n_s_Ybackward_strand); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 780, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_strand, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/tail.pyx":781
 *         P.crossings[i].strand[<int>KLPStrandX][<int>KLPForward] = strandtype[strand]
 *         strand = cr_dict['Ybackward_strand']
 *         P.crossings[i].strand[<int>KLPStrandY][<int>KLPBackward] = strandtype[strand]             # <<<<<<<<<<<<<<
 *         strand = cr_dict['Yforward_strand']
 *         P.crossings[i].strand[<int>KLPStrandY][<int>KLPForward] = strandtype[strand]
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_strandtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 781, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_12 = ((KLPStrandType)__Pyx_PyInt_As_KLPStrandType(__pyx_t_3)); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 781, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (((__pyx_v_P.crossings[__pyx_v_i]).strand[((int)KLPStrandY)])[((int)KLPBackward)]) = __pyx_t_12;

    /* "cython/core/tail.pyx":782
 *         strand = cr_dict['Ybackward_strand']
 *         P.crossings[i].strand[<int>KLPStrandY][<int>KLPBackward] = strandtype[strand]
 *         strand = cr_dict['Yforward_strand']             # <<<<<<<<<<<<<<
 *         P.crossings[i].strand[<int>KLPStrandY][<int>KLPForward] = strandtype[strand]
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_cr_dict, __pyx_n_s_Yforward_strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 782, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_strand, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cython/core/tail.pyx":783
 *         P.crossings[i].strand[<int>KLPStrandY][<int>KLPBackward] = strandtype[strand]
 *         strand = cr_dict['Yforward_strand']
 *         P.crossings[i].strand[<int>KLPStrandY][<int>KLPForward] = strandtype[strand]             # <<<<<<<<<<<<<<
 * 
 *         sign = cr_dict['sign']
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_strandtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_strand); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 783, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_12 = ((KLPStrandType)__Pyx_PyInt_As_KLPStrandType(__pyx_t_4)); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 783, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    (((__pyx_v_P.crossings[__pyx_v_i]).strand[((int)KLPStrandY)])[((int)KLPForward)]) = __pyx_t_12;

    /* "cython/core/tail.pyx":785
 *         P.crossings[i].strand[<int>KLPStrandY][<int>KLPForward] = strandtype[strand]
 * 
 *         sign = cr_dict['sign']             # <<<<<<<<<<<<<<
 *         P.crossings[i].handedness = signtype[sign[0]]
 *         P.crossings[i].component[<int>KLPStrandX] = cr_dict['Xcomponent']
 */
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_cr_dict, __pyx_n_s_sign); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 785, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_XDECREF_SET(__pyx_v_sign, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cython/core/tail.pyx":786
 * 
 *         sign = cr_dict['sign']
 *         P.crossings[i].handedness = signtype[sign[0]]             # <<<<<<<<<<<<<<
 *         P.crossings[i].component[<int>KLPStrandX] = cr_dict['Xcomponent']
 *         P.crossings[i].component[<int>KLPStrandY] = cr_dict['Ycomponent']
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_signtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_sign, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 786, __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_13 = ((KLPCrossingType)__Pyx_PyInt_As_KLPCrossingType(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 786, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    (__pyx_v_P.crossings[__pyx_v_i]).handedness = __pyx_t_13;

    /* "cython/core/tail.pyx":787
 *         sign = cr_dict['sign']
 *         P.crossings[i].handedness = signtype[sign[0]]
 *         P.crossings[i].component[<int>KLPStrandX] = cr_dict['Xcomponent']             # <<<<<<<<<<<<<<
 *         P.crossings[i].component[<int>KLPStrandY] = cr_dict['Ycomponent']
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_cr_dict, __pyx_n_s_Xcomponent); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 787, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    ((__pyx_v_P.crossings[__pyx_v_i]).component[((int)KLPStrandX)]) = __pyx_t_14;

    /* "cython/core/tail.pyx":788
 *         P.crossings[i].handedness = signtype[sign[0]]
 *         P.crossings[i].component[<int>KLPStrandX] = cr_dict['Xcomponent']
 *         P.crossings[i].component[<int>KLPStrandY] = cr_dict['Ycomponent']             # <<<<<<<<<<<<<<
 * 
 *     c_triangulation = triangulate_link_complement(&P, remove_finite_vertices)
 */
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_cr_dict, __pyx_n_s_Ycomponent); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 788, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 788, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    ((__pyx_v_P.crossings[__pyx_v_i]).component[((int)KLPStrandY)]) = __pyx_t_14;
  }

  /* "cython/core/tail.pyx":790
 *         P.crossings[i].component[<int>KLPStrandY] = cr_dict['Ycomponent']
 * 
 *     c_triangulation = triangulate_link_complement(&P, remove_finite_vertices)             # <<<<<<<<<<<<<<
 *     free(P.crossings)
 * 
 */
  __pyx_t_15 = __Pyx_PyInt_As_Boolean(__pyx_v_remove_finite_vertices); if (unlikely((__pyx_t_15 == ((Boolean)-1)) && PyErr_Occurred())) __PYX_ERR(2, 790, __pyx_L1_error)
  __pyx_t_16 = triangulate_link_complement((&__pyx_v_P), __pyx_t_15); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 790, __pyx_L1_error)
  __pyx_v_c_triangulation = __pyx_t_16;

  /* "cython/core/tail.pyx":791
 * 
 *     c_triangulation = triangulate_link_complement(&P, remove_finite_vertices)
 *     free(P.crossings)             # <<<<<<<<<<<<<<
 * 
 *     if c_triangulation == NULL:
 */
  free(__pyx_v_P.crossings);

  /* "cython/core/tail.pyx":793
 *     free(P.crossings)
 * 
 *     if c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError('Could not create the triangulation.')
 * 
 */
  __pyx_t_10 = (__pyx_v_c_triangulation == NULL);
  if (unlikely(__pyx_t_10)) {

    /* "cython/core/tail.pyx":794
 * 
 *     if c_triangulation == NULL:
 *         raise RuntimeError('Could not create the triangulation.')             # <<<<<<<<<<<<<<
 * 
 *     # The triangulation must have a name or SnapPea will segfault when
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__168, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 794, __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(2, 794, __pyx_L1_error)

    /* "cython/core/tail.pyx":793
 *     free(P.crossings)
 * 
 *     if c_triangulation == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError('Could not create the triangulation.')
 * 
 */
  }

  /* "cython/core/tail.pyx":798
 *     # The triangulation must have a name or SnapPea will segfault when
 *     #   trying to copy the triangulation.
 *     tri_name = to_byte_str('unnamed link')             # <<<<<<<<<<<<<<
 *     set_triangulation_name(c_triangulation, tri_name)
 *     return c_triangulation
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_to_byte_str); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  __pyx_t_9 = 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_9 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_s_unnamed_link};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 798, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_tri_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cython/core/tail.pyx":799
 *     #   trying to copy the triangulation.
 *     tri_name = to_byte_str('unnamed link')
 *     set_triangulation_name(c_triangulation, tri_name)             # <<<<<<<<<<<<<<
 *     return c_triangulation
 */
  __pyx_t_17 = __Pyx_PyObject_AsWritableString(__pyx_v_tri_name); if (unlikely((!__pyx_t_17) && PyErr_Occurred())) __PYX_ERR(2, 799, __pyx_L1_error)
  set_triangulation_name(__pyx_v_c_triangulation, __pyx_t_17); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 799, __pyx_L1_error)

  /* "cython/core/tail.pyx":800
 *     tri_name = to_byte_str('unnamed link')
 *     set_triangulation_name(c_triangulation, tri_name)
 *     return c_triangulation             # <<<<<<<<<<<<<<
 */
  __pyx_r = __pyx_v_c_triangulation;
  goto __pyx_L0;

  /* "cython/core/tail.pyx":756
 * signtype = {'R': KLPHalfTwistCL, 'L': KLPHalfTwistCCL}
 * 
 * cdef c_Triangulation* get_triangulation_from_PythonKLP(pythonklp, remove_finite_vertices=True) except *:             # <<<<<<<<<<<<<<
 *     cdef KLPProjection P
 *     cdef c_Triangulation *c_triangulation
 */

  /* 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("SnapPy.get_triangulation_from_PythonKLP", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_Pycrossings);
  __Pyx_XDECREF(__pyx_v_cr_dict);
  __Pyx_XDECREF(__pyx_v_neighbor);
  __Pyx_XDECREF(__pyx_v_strand);
  __Pyx_XDECREF(__pyx_v_sign);
  __Pyx_XDECREF(__pyx_v_tri_name);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_PresentationMatrix(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_6SnapPy_61__pyx_unpickle_PresentationMatrix(PyObject *__pyx_self, 
#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_6SnapPy_60__pyx_unpickle_PresentationMatrix, "__pyx_unpickle_PresentationMatrix(__pyx_type, long __pyx_checksum, __pyx_state)");
static PyMethodDef __pyx_mdef_6SnapPy_61__pyx_unpickle_PresentationMatrix = {"__pyx_unpickle_PresentationMatrix", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_61__pyx_unpickle_PresentationMatrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_60__pyx_unpickle_PresentationMatrix};
static PyObject *__pyx_pw_6SnapPy_61__pyx_unpickle_PresentationMatrix(PyObject *__pyx_self, 
#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_PresentationMatrix (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(7, 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(7, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PresentationMatrix", 1, 3, 3, 1); __PYX_ERR(7, 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(7, 1, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PresentationMatrix", 1, 3, 3, 2); __PYX_ERR(7, 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_PresentationMatrix") < 0)) __PYX_ERR(7, 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(7, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_PresentationMatrix", 1, 3, 3, __pyx_nargs); __PYX_ERR(7, 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("SnapPy.__pyx_unpickle_PresentationMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_6SnapPy_60__pyx_unpickle_PresentationMatrix(__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_6SnapPy_60__pyx_unpickle_PresentationMatrix(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_PresentationMatrix", 1);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x59cf8a3, 0x3a22a1e, 0x3df3bb8):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x59cf8a3, 0x3a22a1e, 0x3df3bb8) = (_col_support, _entries, _row_support, _units, cols, dead_columns, rows))" % __pyx_checksum
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__169, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(7, 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 (0x59cf8a3, 0x3a22a1e, 0x3df3bb8):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x59cf8a3, 0x3a22a1e, 0x3df3bb8) = (_col_support, _entries, _row_support, _units, cols, dead_columns, rows))" % __pyx_checksum
 *     __pyx_result = PresentationMatrix.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 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(7, 5, __pyx_L1_error);
    __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle_2, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 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(7, 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 (0x59cf8a3, 0x3a22a1e, 0x3df3bb8):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x59cf8a3, 0x3a22a1e, 0x3df3bb8) = (_col_support, _entries, _row_support, _units, cols, dead_columns, rows))" % __pyx_checksum             # <<<<<<<<<<<<<<
 *     __pyx_result = PresentationMatrix.__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(7, 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(7, 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(7, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x59cf8a3, 0x3a22a1e, 0x3df3bb8):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x59cf8a3, 0x3a22a1e, 0x3df3bb8) = (_col_support, _entries, _row_support, _units, cols, dead_columns, rows))" % __pyx_checksum
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x59cf8a3, 0x3a22a1e, 0x3df3bb8) = (_col_support, _entries, _row_support, _units, cols, dead_columns, rows))" % __pyx_checksum
 *     __pyx_result = PresentationMatrix.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_PresentationMatrix__set_state(<PresentationMatrix> __pyx_result, __pyx_state)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_6SnapPy_PresentationMatrix), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 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(7, 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 (0x59cf8a3, 0x3a22a1e, 0x3df3bb8) = (_col_support, _entries, _row_support, _units, cols, dead_columns, rows))" % __pyx_checksum
 *     __pyx_result = PresentationMatrix.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_PresentationMatrix__set_state(<PresentationMatrix> __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 = PresentationMatrix.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_PresentationMatrix__set_state(<PresentationMatrix> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_PresentationMatrix__set_state(PresentationMatrix __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(7, 9, __pyx_L1_error)
    __pyx_t_1 = __pyx_f_6SnapPy___pyx_unpickle_PresentationMatrix__set_state(((struct __pyx_obj_6SnapPy_PresentationMatrix *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 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 (0x59cf8a3, 0x3a22a1e, 0x3df3bb8) = (_col_support, _entries, _row_support, _units, cols, dead_columns, rows))" % __pyx_checksum
 *     __pyx_result = PresentationMatrix.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_PresentationMatrix__set_state(<PresentationMatrix> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_PresentationMatrix__set_state(<PresentationMatrix> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_PresentationMatrix__set_state(PresentationMatrix __pyx_result, tuple __pyx_state):
 *     __pyx_result._col_support = __pyx_state[0]; __pyx_result._entries = __pyx_state[1]; __pyx_result._row_support = __pyx_state[2]; __pyx_result._units = __pyx_state[3]; __pyx_result.cols = __pyx_state[4]; __pyx_result.dead_columns = __pyx_state[5]; __pyx_result.rows = __pyx_state[6]
 */
  __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_PresentationMatrix(__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("SnapPy.__pyx_unpickle_PresentationMatrix", __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_PresentationMatrix__set_state(<PresentationMatrix> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_PresentationMatrix__set_state(PresentationMatrix __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._col_support = __pyx_state[0]; __pyx_result._entries = __pyx_state[1]; __pyx_result._row_support = __pyx_state[2]; __pyx_result._units = __pyx_state[3]; __pyx_result.cols = __pyx_state[4]; __pyx_result.dead_columns = __pyx_state[5]; __pyx_result.rows = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_6SnapPy___pyx_unpickle_PresentationMatrix__set_state(struct __pyx_obj_6SnapPy_PresentationMatrix *__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;
  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_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_PresentationMatrix__set_state", 1);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_PresentationMatrix__set_state(PresentationMatrix __pyx_result, tuple __pyx_state):
 *     __pyx_result._col_support = __pyx_state[0]; __pyx_result._entries = __pyx_state[1]; __pyx_result._row_support = __pyx_state[2]; __pyx_result._units = __pyx_state[3]; __pyx_result.cols = __pyx_state[4]; __pyx_result.dead_columns = __pyx_state[5]; __pyx_result.rows = __pyx_state[6]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(7, 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(7, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(7, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_col_support);
  __Pyx_DECREF(__pyx_v___pyx_result->_col_support);
  __pyx_v___pyx_result->_col_support = ((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(7, 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(7, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(7, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_entries);
  __Pyx_DECREF(__pyx_v___pyx_result->_entries);
  __pyx_v___pyx_result->_entries = ((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(7, 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(7, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_1))) __PYX_ERR(7, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_row_support);
  __Pyx_DECREF(__pyx_v___pyx_result->_row_support);
  __pyx_v___pyx_result->_row_support = ((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(7, 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(7, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PySet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_1))) __PYX_ERR(7, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_units);
  __Pyx_DECREF(__pyx_v___pyx_result->_units);
  __pyx_v___pyx_result->_units = ((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(7, 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(7, 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(7, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->cols = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(7, 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(7, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PySet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("set", __pyx_t_1))) __PYX_ERR(7, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->dead_columns);
  __Pyx_DECREF(__pyx_v___pyx_result->dead_columns);
  __pyx_v___pyx_result->dead_columns = ((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(7, 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(7, 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(7, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->rows = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_PresentationMatrix__set_state(PresentationMatrix __pyx_result, tuple __pyx_state):
 *     __pyx_result._col_support = __pyx_state[0]; __pyx_result._entries = __pyx_state[1]; __pyx_result._row_support = __pyx_state[2]; __pyx_result._units = __pyx_state[3]; __pyx_result.cols = __pyx_state[4]; __pyx_result.dead_columns = __pyx_state[5]; __pyx_result.rows = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(7, 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(7, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 > 7);
  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(7, 13, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_3) {

    /* "(tree fragment)":14
 *     __pyx_result._col_support = __pyx_state[0]; __pyx_result._entries = __pyx_state[1]; __pyx_result._row_support = __pyx_state[2]; __pyx_result._units = __pyx_state[3]; __pyx_result.cols = __pyx_state[4]; __pyx_result.dead_columns = __pyx_state[5]; __pyx_result.rows = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[7])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 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(7, 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(7, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    __pyx_t_2 = 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_2 = 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_2, 1+__pyx_t_2);
      __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(7, 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_PresentationMatrix__set_state(PresentationMatrix __pyx_result, tuple __pyx_state):
 *     __pyx_result._col_support = __pyx_state[0]; __pyx_result._entries = __pyx_state[1]; __pyx_result._row_support = __pyx_state[2]; __pyx_result._units = __pyx_state[3]; __pyx_result.cols = __pyx_state[4]; __pyx_result.dead_columns = __pyx_state[5]; __pyx_result.rows = __pyx_state[6]
 *     if len(__pyx_state) > 7 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[7])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_PresentationMatrix__set_state(<PresentationMatrix> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_PresentationMatrix__set_state(PresentationMatrix __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._col_support = __pyx_state[0]; __pyx_result._entries = __pyx_state[1]; __pyx_result._row_support = __pyx_state[2]; __pyx_result._units = __pyx_state[3]; __pyx_result.cols = __pyx_state[4]; __pyx_result.dead_columns = __pyx_state[5]; __pyx_result.rows = __pyx_state[6]
 *     if len(__pyx_state) > 7 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("SnapPy.__pyx_unpickle_PresentationMatrix__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_6SnapPy_Triangulation __pyx_vtable_6SnapPy_Triangulation;

static PyObject *__pyx_tp_new_6SnapPy_Triangulation(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6SnapPy_Triangulation *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_6SnapPy_Triangulation *)o);
  p->__pyx_vtab = __pyx_vtabptr_6SnapPy_Triangulation;
  p->_DTcode = Py_None; Py_INCREF(Py_None);
  p->_PDcode = Py_None; Py_INCREF(Py_None);
  p->_cover_info = Py_None; Py_INCREF(Py_None);
  p->_cache = Py_None; Py_INCREF(Py_None);
  p->LE = Py_None; Py_INCREF(Py_None);
  p->_link_file_full_path = Py_None; Py_INCREF(Py_None);
  p->hyperbolic_structure_initialized = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6SnapPy_13Triangulation_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6SnapPy_Triangulation(PyObject *o) {
  struct __pyx_obj_6SnapPy_Triangulation *p = (struct __pyx_obj_6SnapPy_Triangulation *)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_6SnapPy_Triangulation) {
      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_6SnapPy_13Triangulation_65__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_DTcode);
  Py_CLEAR(p->_PDcode);
  Py_CLEAR(p->_cover_info);
  Py_CLEAR(p->_cache);
  Py_CLEAR(p->LE);
  Py_CLEAR(p->_link_file_full_path);
  Py_CLEAR(p->hyperbolic_structure_initialized);
  #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_6SnapPy_Triangulation(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6SnapPy_Triangulation *p = (struct __pyx_obj_6SnapPy_Triangulation *)o;
  if (p->_DTcode) {
    e = (*v)(p->_DTcode, a); if (e) return e;
  }
  if (p->_PDcode) {
    e = (*v)(p->_PDcode, a); if (e) return e;
  }
  if (p->_cover_info) {
    e = (*v)(p->_cover_info, a); if (e) return e;
  }
  if (p->_cache) {
    e = (*v)(p->_cache, a); if (e) return e;
  }
  if (p->LE) {
    e = (*v)(p->LE, a); if (e) return e;
  }
  if (p->_link_file_full_path) {
    e = (*v)(p->_link_file_full_path, a); if (e) return e;
  }
  if (p->hyperbolic_structure_initialized) {
    e = (*v)(p->hyperbolic_structure_initialized, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6SnapPy_Triangulation(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6SnapPy_Triangulation *p = (struct __pyx_obj_6SnapPy_Triangulation *)o;
  tmp = ((PyObject*)p->_DTcode);
  p->_DTcode = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_PDcode);
  p->_PDcode = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_cover_info);
  p->_cover_info = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_cache);
  p->_cache = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->LE);
  p->LE = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_link_file_full_path);
  p->_link_file_full_path = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->hyperbolic_structure_initialized);
  p->hyperbolic_structure_initialized = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6SnapPy_13Triangulation__cache(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6SnapPy_13Triangulation_6_cache_1__get__(o);
}

static PyObject *__pyx_getprop_6SnapPy_13Triangulation_LE(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6SnapPy_13Triangulation_2LE_1__get__(o);
}

static PyObject *__pyx_specialmethod___pyx_pw_6SnapPy_13Triangulation_69__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_6SnapPy_13Triangulation_69__repr__(self);
}

static PyMethodDef __pyx_methods_6SnapPy_Triangulation[] = {
  {"_get_from_link_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_3_get_from_link_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_2_get_from_link_data},
  {"_remove_finite_vertices", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_5_remove_finite_vertices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_4_remove_finite_vertices},
  {"cover_info", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_7cover_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_6cover_info},
  {"plink", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_9plink, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_8plink},
  {"link", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_11link, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_10link},
  {"num_cusps", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_13num_cusps, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_12num_cusps},
  {"_num_fake_cusps", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_15_num_fake_cusps, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_14_num_fake_cusps},
  {"orientation_cover", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_17orientation_cover, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_16orientation_cover},
  {"is_orientable", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_19is_orientable, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_18is_orientable},
  {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_21copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_20copy},
  {"randomize", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_23randomize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_22randomize},
  {"simplify", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_25simplify, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_24simplify},
  {"_two_to_three", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_27_two_to_three, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_26_two_to_three},
  {"_three_to_two", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_29_three_to_two, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_28_three_to_two},
  {"with_hyperbolic_structure", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_31with_hyperbolic_structure, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_30with_hyperbolic_structure},
  {"_polish_hyperbolic_structures", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_33_polish_hyperbolic_structures, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_32_polish_hyperbolic_structures},
  {"_empty_save", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_35_empty_save, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_34_empty_save},
  {"save", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_37save, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_36save},
  {"_to_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_39_to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_38_to_string},
  {"_from_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_41_from_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_40_from_string},
  {"_to_bytes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_43_to_bytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_42_to_bytes},
  {"_from_bytes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_45_from_bytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_44_from_bytes},
  {"_from_pickle", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_47_from_pickle, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_46_from_pickle},
  {"_from_tetrahedra_gluing_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_49_from_tetrahedra_gluing_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_48_from_tetrahedra_gluing_data},
  {"_from_isosig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_51_from_isosig, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_50_from_isosig},
  {"__reduce__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_53__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_52__reduce__},
  {"pickle", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_55pickle, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_54pickle},
  {"_reindex_cusps", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_57_reindex_cusps, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_56_reindex_cusps},
  {"_get_cusp_indices_and_peripheral_curve_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_59_get_cusp_indices_and_peripheral_curve_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_58_get_cusp_indices_and_peripheral_curve_data},
  {"_get_tetrahedra_gluing_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_61_get_tetrahedra_gluing_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_60_get_tetrahedra_gluing_data},
  {"isomorphisms_to", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_63isomorphisms_to, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_62isomorphisms_to},
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6SnapPy_13Triangulation_69__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"name", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_71name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_70name},
  {"set_name", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_73set_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_72set_name},
  {"DT_code", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_75DT_code, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_74DT_code},
  {"_set_DTcode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_77_set_DTcode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_76_set_DTcode},
  {"_set_PDcode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_79_set_PDcode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_78_set_PDcode},
  {"num_tetrahedra", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_81num_tetrahedra, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_80num_tetrahedra},
  {"dehn_fill", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_83dehn_fill, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_82dehn_fill},
  {"cusp_info", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_85cusp_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_84cusp_info},
  {"reverse_orientation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_87reverse_orientation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_86reverse_orientation},
  {"filled_triangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_89filled_triangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_88filled_triangulation},
  {"_unsimplified_filled_triangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_91_unsimplified_filled_triangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_90_unsimplified_filled_triangulation},
  {"_marked_tetrahedra", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_93_marked_tetrahedra, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_92_marked_tetrahedra},
  {"edge_valences", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_95edge_valences, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_94edge_valences},
  {"gluing_equations_pgl", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_97gluing_equations_pgl, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_96gluing_equations_pgl},
  {"_ptolemy_equations_identified_face_classes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_99_ptolemy_equations_identified_face_classes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_98_ptolemy_equations_identified_face_classes},
  {"_ptolemy_equations_identified_coordinates", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_101_ptolemy_equations_identified_coordinates, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_100_ptolemy_equations_identified_coordinates},
  {"_ptolemy_equations_action_by_decoration_change", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_103_ptolemy_equations_action_by_decoration_change, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_102_ptolemy_equations_action_by_decoration_change},
  {"_ptolemy_equations_boundary_map_3", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_105_ptolemy_equations_boundary_map_3, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_104_ptolemy_equations_boundary_map_3},
  {"_ptolemy_equations_boundary_map_2", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_107_ptolemy_equations_boundary_map_2, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_106_ptolemy_equations_boundary_map_2},
  {"_ptolemy_equations_boundary_map_1", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_109_ptolemy_equations_boundary_map_1, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_108_ptolemy_equations_boundary_map_1},
  {"ptolemy_obstruction_classes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_111ptolemy_obstruction_classes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_110ptolemy_obstruction_classes},
  {"ptolemy_generalized_obstruction_classes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_113ptolemy_generalized_obstruction_classes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_112ptolemy_generalized_obstruction_classes},
  {"ptolemy_variety", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_115ptolemy_variety, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_114ptolemy_variety},
  {"gluing_equations", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_117gluing_equations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_116gluing_equations},
  {"_presentation_matrix", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_119_presentation_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_118_presentation_matrix},
  {"homology", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_121homology, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_120homology},
  {"fundamental_group", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_123fundamental_group, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_122fundamental_group},
  {"cover", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_125cover, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_124cover},
  {"covers", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_127covers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_126covers},
  {"_covers_low_index", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_129_covers_low_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_128_covers_low_index},
  {"_covers_gap", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_131_covers_gap, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_130_covers_gap},
  {"_covers_magma", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_133_covers_magma, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_132_covers_magma},
  {"_covers_snappea", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_135_covers_snappea, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_134_covers_snappea},
  {"set_peripheral_curves", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_137set_peripheral_curves, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_136set_peripheral_curves},
  {"has_finite_vertices", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_139has_finite_vertices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_138has_finite_vertices},
  {"triangulation_isosig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_141triangulation_isosig, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_140triangulation_isosig},
  {"_symplectic_form", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_143_symplectic_form, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_142_symplectic_form},
  {"_is_symplectic", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_145_is_symplectic, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_144_is_symplectic},
  {"symplectic_basis", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13Triangulation_147symplectic_basis, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13Triangulation_146symplectic_basis},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6SnapPy_Triangulation[] = {
  {(char *)"_cache", __pyx_getprop_6SnapPy_13Triangulation__cache, 0, (char *)0, 0},
  {(char *)"LE", __pyx_getprop_6SnapPy_13Triangulation_LE, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6SnapPy_Triangulation_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6SnapPy_Triangulation},
  {Py_tp_repr, (void *)__pyx_pw_6SnapPy_13Triangulation_69__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    A Triangulation object represents a compact 3-manifold with torus\n    boundary components, given as an ideal triangulation of the\n    manifold's interior.  A Dehn-filling can be specified for each\n    boundary component, allowing the description of closed 3-manifolds\n    and some orbifolds.  For non-orientable 3-manifolds, the boundary\n    components can also be Klein bottles. Two Triangulations are equal\n    ('==') if they represent combinatorially isomorphic\n    triangulations.  A Triangulation does *not* have any geometric\n    structure, and usually one works with the subclass Manifold which\n    adds this.  Here's a quick example:\n\n    >>> M = Triangulation('9_42')\n    >>> M.num_tetrahedra()\n    5\n    >>> M.is_orientable()\n    True\n\n    A Triangulation can be specified in a number of ways, e.g.\n\n    - Triangulation('9_42') : The complement of the knot 9_42 in S^3.\n    - Triangulation('m125(1,2)(4,5)') : The SnapPea census manifold m125\n      where the first cusp has Dehn filling (1,2) and the second cusp has\n      filling (4,5).\n    - Triangulation() : Opens a link editor window where can you\n      specify a link complement.\n\n    In general, the specification can be from among the below, with\n    information on Dehn fillings added.\n\n    - SnapPea cusped census manifolds: e.g. 'm123', 's123', 'v123'.\n\n    - Link complements:\n        + Rolfsen's table: e.g. '4_1', '04_1', '5^2_6', '6_4^7', 'L20935', 'l104001'.\n        + Knots and links up to 14 crossings from tabulations by Hoste\n          and Thistlethwaite: e.g. 'K12a456' or 'L13n579'.\n        + Hoste-Thistlethwaite Knotscape table:  e.g. '11a17' or '12n345'\n        + Dowker-Thistlethwaite code: e.g. 'DT:[(6,8,2,4)]', 'DT:dadbcda'\n\n    - Once-punctured torus bundles: e.g. 'b++LLR', 'b+-llR', 'bo-RRL', 'bn+LRLR'\n\n    - Fibered manifold associated to a braid: 'Braid:[1,2,-3,4]'\n\n      Here, the braid is thought of as a mapping class of the\n      punctured disc, and t""his manifold is the corresponding\n      mapping torus.  If you want the braid closure, do (1,0) filling\n      of the last cusp.\n\n    - From mapping class group data using Twister:\n\n      'Bundle(S_{1,1}, [a0, B1])' or 'Splitting(S_{1,0}, [b1, A0], [a0,B1])'\n\n      See the help for the 'twister' module for more.\n\n    - A SnapPea triangulation or link projection file: 'filename'\n\n      The file will be loaded if found in the current directory or the\n      path given by the shell variable SNAPPEA_MANIFOLD_DIRECTORY.\n\n    - A Regina-style isomorphism signature, such as 'dLQbcccdxwb'.\n\n    - A string containing the contents of a SnapPea triangulation or link\n      projection file.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6SnapPy_Triangulation},
  {Py_tp_clear, (void *)__pyx_tp_clear_6SnapPy_Triangulation},
  {Py_tp_richcompare, (void *)__pyx_pw_6SnapPy_13Triangulation_67__richcmp__},
  {Py_tp_methods, (void *)__pyx_methods_6SnapPy_Triangulation},
  {Py_tp_getset, (void *)__pyx_getsets_6SnapPy_Triangulation},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy_Triangulation},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy_Triangulation_spec = {
  "SnapPy.Triangulation",
  sizeof(struct __pyx_obj_6SnapPy_Triangulation),
  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_6SnapPy_Triangulation_slots,
};
#else

static PyTypeObject __pyx_type_6SnapPy_Triangulation = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""Triangulation", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy_Triangulation), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy_Triangulation, /*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_6SnapPy_13Triangulation_69__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    A Triangulation object represents a compact 3-manifold with torus\n    boundary components, given as an ideal triangulation of the\n    manifold's interior.  A Dehn-filling can be specified for each\n    boundary component, allowing the description of closed 3-manifolds\n    and some orbifolds.  For non-orientable 3-manifolds, the boundary\n    components can also be Klein bottles. Two Triangulations are equal\n    ('==') if they represent combinatorially isomorphic\n    triangulations.  A Triangulation does *not* have any geometric\n    structure, and usually one works with the subclass Manifold which\n    adds this.  Here's a quick example:\n\n    >>> M = Triangulation('9_42')\n    >>> M.num_tetrahedra()\n    5\n    >>> M.is_orientable()\n    True\n\n    A Triangulation can be specified in a number of ways, e.g.\n\n    - Triangulation('9_42') : The complement of the knot 9_42 in S^3.\n    - Triangulation('m125(1,2)(4,5)') : The SnapPea census manifold m125\n      where the first cusp has Dehn filling (1,2) and the second cusp has\n      filling (4,5).\n    - Triangulation() : Opens a link editor window where can you\n      specify a link complement.\n\n    In general, the specification can be from among the below, with\n    information on Dehn fillings added.\n\n    - SnapPea cusped census manifolds: e.g. 'm123', 's123', 'v123'.\n\n    - Link complements:\n        + Rolfsen's table: e.g. '4_1', '04_1', '5^2_6', '6_4^7', 'L20935', 'l104001'.\n        + Knots and links up to 14 crossings from tabulations by Hoste\n          and Thistlethwaite: e.g. 'K12a456' or 'L13n579'.\n        + Hoste-Thistlethwaite Knotscape table:  e.g. '11a17' or '12n345'\n        + Dowker-Thistlethwaite code: e.g. 'DT:[(6,8,2,4)]', 'DT:dadbcda'\n\n    - Once-punctured torus bundles: e.g. 'b++LLR', 'b+-llR', 'bo-RRL', 'bn+LRLR'\n\n    - Fibered manifold associated to a braid: 'Braid:[1,2,-3,4]'\n\n      Here, the braid is thought of as a mapping class of the\n      punctured disc, and t""his manifold is the corresponding\n      mapping torus.  If you want the braid closure, do (1,0) filling\n      of the last cusp.\n\n    - From mapping class group data using Twister:\n\n      'Bundle(S_{1,1}, [a0, B1])' or 'Splitting(S_{1,0}, [b1, A0], [a0,B1])'\n\n      See the help for the 'twister' module for more.\n\n    - A SnapPea triangulation or link projection file: 'filename'\n\n      The file will be loaded if found in the current directory or the\n      path given by the shell variable SNAPPEA_MANIFOLD_DIRECTORY.\n\n    - A Regina-style isomorphism signature, such as 'dLQbcccdxwb'.\n\n    - A string containing the contents of a SnapPea triangulation or link\n      projection file.\n    "), /*tp_doc*/
  __pyx_tp_traverse_6SnapPy_Triangulation, /*tp_traverse*/
  __pyx_tp_clear_6SnapPy_Triangulation, /*tp_clear*/
  __pyx_pw_6SnapPy_13Triangulation_67__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6SnapPy_Triangulation, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6SnapPy_Triangulation, /*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_6SnapPy_Triangulation, /*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_6SnapPy_Manifold __pyx_vtable_6SnapPy_Manifold;

static PyObject *__pyx_tp_new_6SnapPy_Manifold(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6SnapPy_Manifold *p;
  PyObject *o = __pyx_tp_new_6SnapPy_Triangulation(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_6SnapPy_Manifold *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_6SnapPy_Triangulation*)__pyx_vtabptr_6SnapPy_Manifold;
  return o;
}

static PyMethodDef __pyx_methods_6SnapPy_Manifold[] = {
  {"_number_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_3_number_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_2_number_},
  {"use_field_conversion", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_5use_field_conversion, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_4use_field_conversion},
  {"init_hyperbolic_structure", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_7init_hyperbolic_structure, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_6init_hyperbolic_structure},
  {"canonize", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_9canonize, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_8canonize},
  {"_canonical_retriangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_11_canonical_retriangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_10_canonical_retriangulation},
  {"_canonical_cells_are_tetrahedra", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_13_canonical_cells_are_tetrahedra, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_12_canonical_cells_are_tetrahedra},
  {"_from_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_15_from_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_14_from_string},
  {"_from_bytes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_17_from_bytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_16_from_bytes},
  {"_from_isosig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_19_from_isosig, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_18_from_isosig},
  {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_21copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_20copy},
  {"cusp_neighborhood", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_23cusp_neighborhood, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_22cusp_neighborhood},
  {"dirichlet_domain", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_25dirichlet_domain, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_24dirichlet_domain},
  {"browse", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_27browse, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_26browse},
  {"filled_triangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_29filled_triangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_28filled_triangulation},
  {"fundamental_group", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_31fundamental_group, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_30fundamental_group},
  {"symmetry_group", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_33symmetry_group, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_32symmetry_group},
  {"symmetric_triangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_35symmetric_triangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_34symmetric_triangulation},
  {"cover", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_37cover, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_36cover},
  {"covers", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_39covers, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_38covers},
  {"_complex_volume", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_41_complex_volume, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_40_complex_volume},
  {"volume", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_43volume, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_42volume},
  {"chern_simons", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_45chern_simons, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_44chern_simons},
  {"without_hyperbolic_structure", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_47without_hyperbolic_structure, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_46without_hyperbolic_structure},
  {"_polish_hyperbolic_structures", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_49_polish_hyperbolic_structures, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_48_polish_hyperbolic_structures},
  {"tetrahedra_shapes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_51tetrahedra_shapes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_50tetrahedra_shapes},
  {"_get_tetrahedra_shapes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_53_get_tetrahedra_shapes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_52_get_tetrahedra_shapes},
  {"set_tetrahedra_shapes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_55set_tetrahedra_shapes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_54set_tetrahedra_shapes},
  {"solution_type", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_57solution_type, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_56solution_type},
  {"set_target_holonomy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_59set_target_holonomy, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_58set_target_holonomy},
  {"cusp_info", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_61cusp_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_60cusp_info},
  {"dehn_fill", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_63dehn_fill, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_62dehn_fill},
  {"set_peripheral_curves", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_65set_peripheral_curves, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_64set_peripheral_curves},
  {"dual_curves", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_67dual_curves, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_66dual_curves},
  {"length_spectrum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_69length_spectrum, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_68length_spectrum},
  {"drill", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_71drill, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_70drill},
  {"is_isometric_to", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_73is_isometric_to, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_72is_isometric_to},
  {"is_two_bridge", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_75is_two_bridge, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_74is_two_bridge},
  {"_choose_generators", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_77_choose_generators, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_76_choose_generators},
  {"_choose_generators_info", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_79_choose_generators_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_78_choose_generators_info},
  {"splitting_surfaces", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_81splitting_surfaces, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_80splitting_surfaces},
  {"split", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_83split, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_82split},
  {"_identify", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_85_identify, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_84_identify},
  {"_cusp_cross_section_info", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_8Manifold_87_cusp_cross_section_info, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_8Manifold_86_cusp_cross_section_info},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6SnapPy_Manifold_slots[] = {
  {Py_tp_doc, (void *)PyDoc_STR("Manifold(spec=None)\n\n    A Manifold is a Triangulation together with a geometric structure.\n    That is, a Manifold is an ideal triangulation of the interior of a\n    compact 3-manifold with torus boundary components, where each\n    tetrahedron has been assigned the geometry of an ideal tetrahedron\n    in hyperbolic 3-space. A Dehn-filling can be specified for each\n    boundary component, allowing the description of closed 3-manifolds,\n    some orbifolds and cone 3-manifolds. Here's a quick example:\n\n    >>> M = Manifold('9_42')\n    >>> M.volume()  # doctest: +NUMERIC6\n    4.05686022\n    >>> M.cusp_info('shape') # doctest: +NUMERIC6\n    [-4.278936315 + 1.95728679*I]\n\n    This is an example for running SnapPy inside Sage::\n\n      sage: import snappy\n      sage: M = snappy.Manifold('m125(1,2)(4,5)')\n      sage: M.is_orientable()\n      True\n\n    An alternative way of running SnapPy inside Sage::\n\n      sage: from snappy import *\n      sage: M = Manifold('m123')\n      sage: M.num_cusps()\n      1\n\n\n    A Manifold can be specified in a number of ways, e.g.\n\n    - Manifold('9_42') : The complement of the knot 9_42 in S^3.\n    - Manifold('m125(1,2)(4,5)') : The SnapPea census manifold m125\n      where the first cusp has Dehn filling (1,2) and the second cusp has\n      filling (4,5).\n    - Manifold() : Opens a link editor window where can you\n      specify a link complement.\n\n    In general, the specification can be from among the below, with\n    information on Dehn fillings added.\n\n    - SnapPea cusped census manifolds: e.g. 'm123', 's123', 'v123'.\n\n    - Link complements:\n       + Rolfsen's table: e.g. '4_1', '04_1', '5^2_6', '6_4^7', 'L20935', 'l104001'.\n       + Hoste-Thistlethwaite Knotscape table:  e.g. '11a17' or '12n345'\n       + Callahan-Dean-Weeks-Champanerkar-Kofman-Patterson knots: e.g. 'K6_21'.\n       + Dowker-Thistlethwaite code: e.g. 'DT:[(6,8,2,4)]'\n\n    - Once-punctured torus bundles: e.g. 'b++LLR', 'b+-llR'"", 'bo-RRL', 'bn+LRLR'\n\n    - Fibered manifold associated to a braid: 'Braid[1,2,-3,4]'\n\n      Here, the braid is thought of as a mapping class of the\n      punctured disc, and this manifold is the corresponding\n      mapping torus.  If you want the braid closure, do (1,0) filling\n      of the last cusp.\n\n    - From mapping class group data using Twister:\n\n      'Bundle(S_{1,1}, [a0, B1])' or 'Splitting(S_{1,0}, [b1, A0], [a0,B1])'\n\n      See the help for the 'twister' module for more.\n\n    - A SnapPea triangulation or link projection file: 'filename'\n\n      The file will be loaded if found in the current directory or the\n      path given by the shell variable SNAPPEA_MANIFOLD_DIRECTORY.\n      See :py:meth:`Manifold.save` for details.\n\n   - A string containing the contents of a SnapPea triangulation or link\n      projection file.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6SnapPy_Triangulation},
  {Py_tp_clear, (void *)__pyx_tp_clear_6SnapPy_Triangulation},
  {Py_tp_methods, (void *)__pyx_methods_6SnapPy_Manifold},
  {Py_tp_init, (void *)__pyx_pw_6SnapPy_8Manifold_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy_Manifold},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy_Manifold_spec = {
  "SnapPy.Manifold",
  sizeof(struct __pyx_obj_6SnapPy_Manifold),
  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_6SnapPy_Manifold_slots,
};
#else

static PyTypeObject __pyx_type_6SnapPy_Manifold = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""Manifold", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy_Manifold), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy_Triangulation, /*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
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6SnapPy_13Triangulation_69__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  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("Manifold(spec=None)\n\n    A Manifold is a Triangulation together with a geometric structure.\n    That is, a Manifold is an ideal triangulation of the interior of a\n    compact 3-manifold with torus boundary components, where each\n    tetrahedron has been assigned the geometry of an ideal tetrahedron\n    in hyperbolic 3-space. A Dehn-filling can be specified for each\n    boundary component, allowing the description of closed 3-manifolds,\n    some orbifolds and cone 3-manifolds. Here's a quick example:\n\n    >>> M = Manifold('9_42')\n    >>> M.volume()  # doctest: +NUMERIC6\n    4.05686022\n    >>> M.cusp_info('shape') # doctest: +NUMERIC6\n    [-4.278936315 + 1.95728679*I]\n\n    This is an example for running SnapPy inside Sage::\n\n      sage: import snappy\n      sage: M = snappy.Manifold('m125(1,2)(4,5)')\n      sage: M.is_orientable()\n      True\n\n    An alternative way of running SnapPy inside Sage::\n\n      sage: from snappy import *\n      sage: M = Manifold('m123')\n      sage: M.num_cusps()\n      1\n\n\n    A Manifold can be specified in a number of ways, e.g.\n\n    - Manifold('9_42') : The complement of the knot 9_42 in S^3.\n    - Manifold('m125(1,2)(4,5)') : The SnapPea census manifold m125\n      where the first cusp has Dehn filling (1,2) and the second cusp has\n      filling (4,5).\n    - Manifold() : Opens a link editor window where can you\n      specify a link complement.\n\n    In general, the specification can be from among the below, with\n    information on Dehn fillings added.\n\n    - SnapPea cusped census manifolds: e.g. 'm123', 's123', 'v123'.\n\n    - Link complements:\n       + Rolfsen's table: e.g. '4_1', '04_1', '5^2_6', '6_4^7', 'L20935', 'l104001'.\n       + Hoste-Thistlethwaite Knotscape table:  e.g. '11a17' or '12n345'\n       + Callahan-Dean-Weeks-Champanerkar-Kofman-Patterson knots: e.g. 'K6_21'.\n       + Dowker-Thistlethwaite code: e.g. 'DT:[(6,8,2,4)]'\n\n    - Once-punctured torus bundles: e.g. 'b++LLR', 'b+-llR'"", 'bo-RRL', 'bn+LRLR'\n\n    - Fibered manifold associated to a braid: 'Braid[1,2,-3,4]'\n\n      Here, the braid is thought of as a mapping class of the\n      punctured disc, and this manifold is the corresponding\n      mapping torus.  If you want the braid closure, do (1,0) filling\n      of the last cusp.\n\n    - From mapping class group data using Twister:\n\n      'Bundle(S_{1,1}, [a0, B1])' or 'Splitting(S_{1,0}, [b1, A0], [a0,B1])'\n\n      See the help for the 'twister' module for more.\n\n    - A SnapPea triangulation or link projection file: 'filename'\n\n      The file will be loaded if found in the current directory or the\n      path given by the shell variable SNAPPEA_MANIFOLD_DIRECTORY.\n      See :py:meth:`Manifold.save` for details.\n\n   - A string containing the contents of a SnapPea triangulation or link\n      projection file.\n    "), /*tp_doc*/
  __pyx_tp_traverse_6SnapPy_Triangulation, /*tp_traverse*/
  __pyx_tp_clear_6SnapPy_Triangulation, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6SnapPy_Manifold, /*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
  __pyx_pw_6SnapPy_8Manifold_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6SnapPy_Manifold, /*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_6SnapPy_AbelianGroup(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6SnapPy_AbelianGroup *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_6SnapPy_AbelianGroup *)o);
  p->divisors = Py_None; Py_INCREF(Py_None);
  p->coefficients = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6SnapPy_AbelianGroup(PyObject *o) {
  struct __pyx_obj_6SnapPy_AbelianGroup *p = (struct __pyx_obj_6SnapPy_AbelianGroup *)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_6SnapPy_AbelianGroup) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->divisors);
  Py_CLEAR(p->coefficients);
  #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_6SnapPy_AbelianGroup(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6SnapPy_AbelianGroup *p = (struct __pyx_obj_6SnapPy_AbelianGroup *)o;
  if (p->divisors) {
    e = (*v)(p->divisors, a); if (e) return e;
  }
  if (p->coefficients) {
    e = (*v)(p->coefficients, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6SnapPy_AbelianGroup(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6SnapPy_AbelianGroup *p = (struct __pyx_obj_6SnapPy_AbelianGroup *)o;
  tmp = ((PyObject*)p->divisors);
  p->divisors = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->coefficients);
  p->coefficients = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static PyObject *__pyx_sq_item_6SnapPy_AbelianGroup(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static PyObject *__pyx_getprop_6SnapPy_12AbelianGroup_coefficients(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6SnapPy_12AbelianGroup_12coefficients_1__get__(o);
}

static int __pyx_setprop_6SnapPy_12AbelianGroup_coefficients(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_6SnapPy_12AbelianGroup_12coefficients_3__set__(o, v);
  }
  else {
    return __pyx_pw_6SnapPy_12AbelianGroup_12coefficients_5__del__(o);
  }
}

static PyObject *__pyx_specialmethod___pyx_pw_6SnapPy_12AbelianGroup_3__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_6SnapPy_12AbelianGroup_3__repr__(self);
}

static PyMethodDef __pyx_methods_6SnapPy_AbelianGroup[] = {
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6SnapPy_12AbelianGroup_3__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"__reduce__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_12AbelianGroup_9__reduce__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_12AbelianGroup_8__reduce__},
  {"elementary_divisors", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_12AbelianGroup_15elementary_divisors, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_12AbelianGroup_14elementary_divisors},
  {"rank", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_12AbelianGroup_17rank, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_12AbelianGroup_16rank},
  {"betti_number", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_12AbelianGroup_19betti_number, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_12AbelianGroup_18betti_number},
  {"order", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_12AbelianGroup_21order, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_12AbelianGroup_20order},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6SnapPy_AbelianGroup[] = {
  {(char *)"coefficients", __pyx_getprop_6SnapPy_12AbelianGroup_coefficients, __pyx_setprop_6SnapPy_12AbelianGroup_coefficients, (char *)PyDoc_STR("coefficients: object"), 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6SnapPy_AbelianGroup_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6SnapPy_AbelianGroup},
  {Py_tp_repr, (void *)__pyx_pw_6SnapPy_12AbelianGroup_3__repr__},
  {Py_sq_length, (void *)__pyx_pw_6SnapPy_12AbelianGroup_5__len__},
  {Py_sq_item, (void *)__pyx_sq_item_6SnapPy_AbelianGroup},
  {Py_mp_length, (void *)__pyx_pw_6SnapPy_12AbelianGroup_5__len__},
  {Py_mp_subscript, (void *)__pyx_pw_6SnapPy_12AbelianGroup_7__getitem__},
  {Py_tp_call, (void *)__pyx_pw_6SnapPy_12AbelianGroup_13__call__},
  {Py_tp_doc, (void *)PyDoc_STR("AbelianGroup(presentation=None, elementary_divisors=[])\n\n    An AbelianGroup object represents a finitely generated abelian group,\n    usually the first homology group of a snappy Manifold.\n\n    Instantiate an abelian group by its elementary divisors:\n\n    >>> A = AbelianGroup(elementary_divisors=[5,15,0,0])\n    >>> A\n    Z/5 + Z/15 + Z + Z\n    >>> A[0]\n    5\n\n    Alternatively, instantiate an abelian group as AbelianGroup(P) where P is a\n    presentation matrix given as a list of lists of integers.\n    Snappy stores an abelian group as a list of elementary divisors:\n\n    >>> B = AbelianGroup([[1,3,2],[2,0,6]])\n    >>> B\n    Z/2 + Z\n    >>> B.elementary_divisors()\n    [2, 0]\n    >>> B[1]\n    0\n    >>> len(B)\n    2\n    >>> B.rank()\n    2\n    >>> B.betti_number()\n    1\n    >>> B.order()\n    'infinite'\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6SnapPy_AbelianGroup},
  {Py_tp_clear, (void *)__pyx_tp_clear_6SnapPy_AbelianGroup},
  {Py_tp_richcompare, (void *)__pyx_pw_6SnapPy_12AbelianGroup_11__richcmp__},
  {Py_tp_methods, (void *)__pyx_methods_6SnapPy_AbelianGroup},
  {Py_tp_getset, (void *)__pyx_getsets_6SnapPy_AbelianGroup},
  {Py_tp_init, (void *)__pyx_pw_6SnapPy_12AbelianGroup_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy_AbelianGroup},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy_AbelianGroup_spec = {
  "SnapPy.AbelianGroup",
  sizeof(struct __pyx_obj_6SnapPy_AbelianGroup),
  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_6SnapPy_AbelianGroup_slots,
};
#else

static PySequenceMethods __pyx_tp_as_sequence_AbelianGroup = {
  __pyx_pw_6SnapPy_12AbelianGroup_5__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_6SnapPy_AbelianGroup, /*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_AbelianGroup = {
  __pyx_pw_6SnapPy_12AbelianGroup_5__len__, /*mp_length*/
  __pyx_pw_6SnapPy_12AbelianGroup_7__getitem__, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_6SnapPy_AbelianGroup = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""AbelianGroup", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy_AbelianGroup), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy_AbelianGroup, /*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_6SnapPy_12AbelianGroup_3__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_AbelianGroup, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_AbelianGroup, /*tp_as_mapping*/
  0, /*tp_hash*/
  __pyx_pw_6SnapPy_12AbelianGroup_13__call__, /*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("AbelianGroup(presentation=None, elementary_divisors=[])\n\n    An AbelianGroup object represents a finitely generated abelian group,\n    usually the first homology group of a snappy Manifold.\n\n    Instantiate an abelian group by its elementary divisors:\n\n    >>> A = AbelianGroup(elementary_divisors=[5,15,0,0])\n    >>> A\n    Z/5 + Z/15 + Z + Z\n    >>> A[0]\n    5\n\n    Alternatively, instantiate an abelian group as AbelianGroup(P) where P is a\n    presentation matrix given as a list of lists of integers.\n    Snappy stores an abelian group as a list of elementary divisors:\n\n    >>> B = AbelianGroup([[1,3,2],[2,0,6]])\n    >>> B\n    Z/2 + Z\n    >>> B.elementary_divisors()\n    [2, 0]\n    >>> B[1]\n    0\n    >>> len(B)\n    2\n    >>> B.rank()\n    2\n    >>> B.betti_number()\n    1\n    >>> B.order()\n    'infinite'\n    "), /*tp_doc*/
  __pyx_tp_traverse_6SnapPy_AbelianGroup, /*tp_traverse*/
  __pyx_tp_clear_6SnapPy_AbelianGroup, /*tp_clear*/
  __pyx_pw_6SnapPy_12AbelianGroup_11__richcmp__, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6SnapPy_AbelianGroup, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6SnapPy_AbelianGroup, /*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_6SnapPy_12AbelianGroup_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6SnapPy_AbelianGroup, /*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_6SnapPy_PresentationMatrix __pyx_vtable_6SnapPy_PresentationMatrix;

static PyObject *__pyx_tp_new_6SnapPy_PresentationMatrix(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_6SnapPy_PresentationMatrix *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_6SnapPy_PresentationMatrix *)o);
  p->__pyx_vtab = __pyx_vtabptr_6SnapPy_PresentationMatrix;
  p->_row_support = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_col_support = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_entries = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->_units = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->dead_columns = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_6SnapPy_PresentationMatrix(PyObject *o) {
  struct __pyx_obj_6SnapPy_PresentationMatrix *p = (struct __pyx_obj_6SnapPy_PresentationMatrix *)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_6SnapPy_PresentationMatrix) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_row_support);
  Py_CLEAR(p->_col_support);
  Py_CLEAR(p->_entries);
  Py_CLEAR(p->_units);
  Py_CLEAR(p->dead_columns);
  #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_6SnapPy_PresentationMatrix(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6SnapPy_PresentationMatrix *p = (struct __pyx_obj_6SnapPy_PresentationMatrix *)o;
  if (p->_row_support) {
    e = (*v)(p->_row_support, a); if (e) return e;
  }
  if (p->_col_support) {
    e = (*v)(p->_col_support, a); if (e) return e;
  }
  if (p->_entries) {
    e = (*v)(p->_entries, a); if (e) return e;
  }
  if (p->_units) {
    e = (*v)(p->_units, a); if (e) return e;
  }
  if (p->dead_columns) {
    e = (*v)(p->dead_columns, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6SnapPy_PresentationMatrix(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6SnapPy_PresentationMatrix *p = (struct __pyx_obj_6SnapPy_PresentationMatrix *)o;
  tmp = ((PyObject*)p->_row_support);
  p->_row_support = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_col_support);
  p->_col_support = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_entries);
  p->_entries = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_units);
  p->_units = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->dead_columns);
  p->dead_columns = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static PyObject *__pyx_sq_item_6SnapPy_PresentationMatrix(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_6SnapPy_PresentationMatrix(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_6SnapPy_18PresentationMatrix_5__setitem__(o, i, v);
  }
  else {
    __Pyx_TypeName o_type_name;
    o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
    __Pyx_DECREF_TypeName(o_type_name);
    return -1;
  }
}

static PyObject *__pyx_specialmethod___pyx_pw_6SnapPy_18PresentationMatrix_9__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_6SnapPy_18PresentationMatrix_9__repr__(self);
}

static PyMethodDef __pyx_methods_6SnapPy_PresentationMatrix[] = {
  {"get_data", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_18PresentationMatrix_3get_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18PresentationMatrix_2get_data},
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6SnapPy_18PresentationMatrix_9__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"add_rows", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_18PresentationMatrix_11add_rows, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18PresentationMatrix_10add_rows},
  {"row_op", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_18PresentationMatrix_13row_op, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18PresentationMatrix_12row_op},
  {"explode", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_18PresentationMatrix_15explode, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18PresentationMatrix_14explode},
  {"simplify", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_18PresentationMatrix_17simplify, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18PresentationMatrix_16simplify},
  {"simplified_matrix", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_18PresentationMatrix_19simplified_matrix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18PresentationMatrix_18simplified_matrix},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_18PresentationMatrix_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18PresentationMatrix_20__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_18PresentationMatrix_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_18PresentationMatrix_22__setstate_cython__},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6SnapPy_PresentationMatrix_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6SnapPy_PresentationMatrix},
  {Py_tp_repr, (void *)__pyx_pw_6SnapPy_18PresentationMatrix_9__repr__},
  {Py_sq_item, (void *)__pyx_sq_item_6SnapPy_PresentationMatrix},
  {Py_mp_subscript, (void *)__pyx_pw_6SnapPy_18PresentationMatrix_7__getitem__},
  {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_6SnapPy_PresentationMatrix},
  {Py_tp_doc, (void *)PyDoc_STR("PresentationMatrix(rows, cols)\n\n    A sparse representation of the presentation matrix of an abelian group.\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6SnapPy_PresentationMatrix},
  {Py_tp_clear, (void *)__pyx_tp_clear_6SnapPy_PresentationMatrix},
  {Py_tp_methods, (void *)__pyx_methods_6SnapPy_PresentationMatrix},
  {Py_tp_init, (void *)__pyx_pw_6SnapPy_18PresentationMatrix_1__init__},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy_PresentationMatrix},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy_PresentationMatrix_spec = {
  "SnapPy.PresentationMatrix",
  sizeof(struct __pyx_obj_6SnapPy_PresentationMatrix),
  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_6SnapPy_PresentationMatrix_slots,
};
#else

static PySequenceMethods __pyx_tp_as_sequence_PresentationMatrix = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_6SnapPy_PresentationMatrix, /*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_PresentationMatrix = {
  0, /*mp_length*/
  __pyx_pw_6SnapPy_18PresentationMatrix_7__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_6SnapPy_PresentationMatrix, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_6SnapPy_PresentationMatrix = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""PresentationMatrix", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy_PresentationMatrix), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy_PresentationMatrix, /*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_6SnapPy_18PresentationMatrix_9__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_PresentationMatrix, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_PresentationMatrix, /*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("PresentationMatrix(rows, cols)\n\n    A sparse representation of the presentation matrix of an abelian group.\n    "), /*tp_doc*/
  __pyx_tp_traverse_6SnapPy_PresentationMatrix, /*tp_traverse*/
  __pyx_tp_clear_6SnapPy_PresentationMatrix, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6SnapPy_PresentationMatrix, /*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
  __pyx_pw_6SnapPy_18PresentationMatrix_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_6SnapPy_PresentationMatrix, /*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_6SnapPy_CFundamentalGroup(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6SnapPy_CFundamentalGroup *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_6SnapPy_CFundamentalGroup *)o);
  p->num_cusps = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6SnapPy_17CFundamentalGroup_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6SnapPy_CFundamentalGroup(PyObject *o) {
  struct __pyx_obj_6SnapPy_CFundamentalGroup *p = (struct __pyx_obj_6SnapPy_CFundamentalGroup *)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_6SnapPy_CFundamentalGroup) {
      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_6SnapPy_17CFundamentalGroup_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->num_cusps);
  #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_6SnapPy_CFundamentalGroup(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6SnapPy_CFundamentalGroup *p = (struct __pyx_obj_6SnapPy_CFundamentalGroup *)o;
  if (p->num_cusps) {
    e = (*v)(p->num_cusps, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6SnapPy_CFundamentalGroup(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6SnapPy_CFundamentalGroup *p = (struct __pyx_obj_6SnapPy_CFundamentalGroup *)o;
  tmp = ((PyObject*)p->num_cusps);
  p->num_cusps = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6SnapPy_17CFundamentalGroup_num_cusps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6SnapPy_17CFundamentalGroup_9num_cusps_1__get__(o);
}

static PyObject *__pyx_specialmethod___pyx_pw_6SnapPy_17CFundamentalGroup_5__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_6SnapPy_17CFundamentalGroup_5__repr__(self);
}

static PyMethodDef __pyx_methods_6SnapPy_CFundamentalGroup[] = {
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6SnapPy_17CFundamentalGroup_5__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"num_generators", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_7num_generators, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_6num_generators},
  {"num_relators", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_9num_relators, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_8num_relators},
  {"num_original_generators", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_11num_original_generators, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_10num_original_generators},
  {"original_generators", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_13original_generators, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_12original_generators},
  {"generators_in_originals", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_15generators_in_originals, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_14generators_in_originals},
  {"_word_moves", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_17_word_moves, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_16_word_moves},
  {"generators", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_19generators, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_18generators},
  {"relators", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_21relators, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_20relators},
  {"meridian", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_23meridian, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_22meridian},
  {"longitude", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_25longitude, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_24longitude},
  {"peripheral_curves", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_27peripheral_curves, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_26peripheral_curves},
  {"magma_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_29magma_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_28magma_string},
  {"gap_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_31gap_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_30gap_string},
  {"_gap_init_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_33_gap_init_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_32_gap_init_},
  {"_magma_init_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_35_magma_init_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_34_magma_init_},
  {"sage", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_37sage, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_36sage},
  {"character_variety_vars_and_polys", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_39character_variety_vars_and_polys, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_38character_variety_vars_and_polys},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_41__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_40__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CFundamentalGroup_43__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CFundamentalGroup_42__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6SnapPy_CFundamentalGroup[] = {
  {(char *)"num_cusps", __pyx_getprop_6SnapPy_17CFundamentalGroup_num_cusps, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6SnapPy_CFundamentalGroup_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6SnapPy_CFundamentalGroup},
  {Py_tp_repr, (void *)__pyx_pw_6SnapPy_17CFundamentalGroup_5__repr__},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6SnapPy_CFundamentalGroup},
  {Py_tp_clear, (void *)__pyx_tp_clear_6SnapPy_CFundamentalGroup},
  {Py_tp_methods, (void *)__pyx_methods_6SnapPy_CFundamentalGroup},
  {Py_tp_getset, (void *)__pyx_getsets_6SnapPy_CFundamentalGroup},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy_CFundamentalGroup},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy_CFundamentalGroup_spec = {
  "SnapPy.CFundamentalGroup",
  sizeof(struct __pyx_obj_6SnapPy_CFundamentalGroup),
  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_6SnapPy_CFundamentalGroup_slots,
};
#else

static PyTypeObject __pyx_type_6SnapPy_CFundamentalGroup = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""CFundamentalGroup", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy_CFundamentalGroup), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy_CFundamentalGroup, /*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_6SnapPy_17CFundamentalGroup_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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6SnapPy_CFundamentalGroup, /*tp_traverse*/
  __pyx_tp_clear_6SnapPy_CFundamentalGroup, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6SnapPy_CFundamentalGroup, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6SnapPy_CFundamentalGroup, /*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_6SnapPy_CFundamentalGroup, /*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_6SnapPy_CHolonomyGroup[] = {
  {"_matrices", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14CHolonomyGroup_1_matrices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14CHolonomyGroup__matrices},
  {"SL2C", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14CHolonomyGroup_3SL2C, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14CHolonomyGroup_2SL2C},
  {"O31", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14CHolonomyGroup_5O31, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14CHolonomyGroup_4O31},
  {"complex_length", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14CHolonomyGroup_7complex_length, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14CHolonomyGroup_6complex_length},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14CHolonomyGroup_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14CHolonomyGroup_8__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_14CHolonomyGroup_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_14CHolonomyGroup_10__setstate_cython__},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6SnapPy_CHolonomyGroup_slots[] = {
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6SnapPy_CFundamentalGroup},
  {Py_tp_clear, (void *)__pyx_tp_clear_6SnapPy_CFundamentalGroup},
  {Py_tp_methods, (void *)__pyx_methods_6SnapPy_CHolonomyGroup},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy_CFundamentalGroup},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy_CHolonomyGroup_spec = {
  "SnapPy.CHolonomyGroup",
  sizeof(struct __pyx_obj_6SnapPy_CHolonomyGroup),
  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_6SnapPy_CHolonomyGroup_slots,
};
#else

static PyTypeObject __pyx_type_6SnapPy_CHolonomyGroup = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""CHolonomyGroup", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy_CHolonomyGroup), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy_CFundamentalGroup, /*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
  #if CYTHON_COMPILING_IN_PYPY || 0
  __pyx_pw_6SnapPy_17CFundamentalGroup_5__repr__, /*tp_repr*/
  #else
  0, /*tp_repr*/
  #endif
  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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6SnapPy_CFundamentalGroup, /*tp_traverse*/
  __pyx_tp_clear_6SnapPy_CFundamentalGroup, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6SnapPy_CHolonomyGroup, /*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_6SnapPy_CFundamentalGroup, /*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_6SnapPy_SymmetryGroup __pyx_vtable_6SnapPy_SymmetryGroup;

static PyObject *__pyx_tp_new_6SnapPy_SymmetryGroup(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6SnapPy_SymmetryGroup *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_6SnapPy_SymmetryGroup *)o);
  p->__pyx_vtab = __pyx_vtabptr_6SnapPy_SymmetryGroup;
  p->_is_full_group = Py_None; Py_INCREF(Py_None);
  p->_owns_c_symmetry_group = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6SnapPy_13SymmetryGroup_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6SnapPy_SymmetryGroup(PyObject *o) {
  struct __pyx_obj_6SnapPy_SymmetryGroup *p = (struct __pyx_obj_6SnapPy_SymmetryGroup *)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_6SnapPy_SymmetryGroup) {
      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_6SnapPy_13SymmetryGroup_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->_is_full_group);
  Py_CLEAR(p->_owns_c_symmetry_group);
  #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_6SnapPy_SymmetryGroup(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6SnapPy_SymmetryGroup *p = (struct __pyx_obj_6SnapPy_SymmetryGroup *)o;
  if (p->_is_full_group) {
    e = (*v)(p->_is_full_group, a); if (e) return e;
  }
  if (p->_owns_c_symmetry_group) {
    e = (*v)(p->_owns_c_symmetry_group, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6SnapPy_SymmetryGroup(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6SnapPy_SymmetryGroup *p = (struct __pyx_obj_6SnapPy_SymmetryGroup *)o;
  tmp = ((PyObject*)p->_is_full_group);
  p->_is_full_group = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_owns_c_symmetry_group);
  p->_owns_c_symmetry_group = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_6SnapPy_13SymmetryGroup__is_full_group(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6SnapPy_13SymmetryGroup_14_is_full_group_1__get__(o);
}

static PyObject *__pyx_getprop_6SnapPy_13SymmetryGroup__owns_c_symmetry_group(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_6SnapPy_13SymmetryGroup_22_owns_c_symmetry_group_1__get__(o);
}

static PyObject *__pyx_specialmethod___pyx_pw_6SnapPy_13SymmetryGroup_7__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_6SnapPy_13SymmetryGroup_7__repr__(self);
}

static PyMethodDef __pyx_methods_6SnapPy_SymmetryGroup[] = {
  {"is_full_group", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_5is_full_group, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_4is_full_group},
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6SnapPy_13SymmetryGroup_7__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"order", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_9order, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_8order},
  {"is_abelian", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_11is_abelian, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_10is_abelian},
  {"abelian_description", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_13abelian_description, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_12abelian_description},
  {"is_dihedral", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_15is_dihedral, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_14is_dihedral},
  {"is_polyhedral", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_17is_polyhedral, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_16is_polyhedral},
  {"polyhedral_description", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_19polyhedral_description, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_18polyhedral_description},
  {"is_S5", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_21is_S5, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_20is_S5},
  {"is_direct_product", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_23is_direct_product, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_22is_direct_product},
  {"direct_product_description", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_25direct_product_description, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_24direct_product_description},
  {"is_amphicheiral", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_27is_amphicheiral, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_26is_amphicheiral},
  {"is_invertible_knot", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_29is_invertible_knot, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_28is_invertible_knot},
  {"commutator_subgroup", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_31commutator_subgroup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_30commutator_subgroup},
  {"abelianization", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_33abelianization, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_32abelianization},
  {"center", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_35center, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_34center},
  {"multiply_elements", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_37multiply_elements, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_36multiply_elements},
  {"isometries", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_39isometries, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_38isometries},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_41__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_40__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_13SymmetryGroup_43__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_13SymmetryGroup_42__setstate_cython__},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_6SnapPy_SymmetryGroup[] = {
  {(char *)"_is_full_group", __pyx_getprop_6SnapPy_13SymmetryGroup__is_full_group, 0, (char *)0, 0},
  {(char *)"_owns_c_symmetry_group", __pyx_getprop_6SnapPy_13SymmetryGroup__owns_c_symmetry_group, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6SnapPy_SymmetryGroup_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6SnapPy_SymmetryGroup},
  {Py_tp_repr, (void *)__pyx_pw_6SnapPy_13SymmetryGroup_7__repr__},
  {Py_tp_doc, (void *)PyDoc_STR("\n    A SymmetryGroup is a group of self-isometries of hyperbolic\n    3-manifold.  Instantiate as follows:\n\n    >>> M = Manifold('m004')\n    >>> M.symmetry_group()\n    D4\n    ")},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6SnapPy_SymmetryGroup},
  {Py_tp_clear, (void *)__pyx_tp_clear_6SnapPy_SymmetryGroup},
  {Py_tp_methods, (void *)__pyx_methods_6SnapPy_SymmetryGroup},
  {Py_tp_getset, (void *)__pyx_getsets_6SnapPy_SymmetryGroup},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy_SymmetryGroup},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy_SymmetryGroup_spec = {
  "SnapPy.SymmetryGroup",
  sizeof(struct __pyx_obj_6SnapPy_SymmetryGroup),
  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_6SnapPy_SymmetryGroup_slots,
};
#else

static PyTypeObject __pyx_type_6SnapPy_SymmetryGroup = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""SymmetryGroup", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy_SymmetryGroup), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy_SymmetryGroup, /*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_6SnapPy_13SymmetryGroup_7__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    A SymmetryGroup is a group of self-isometries of hyperbolic\n    3-manifold.  Instantiate as follows:\n\n    >>> M = Manifold('m004')\n    >>> M.symmetry_group()\n    D4\n    "), /*tp_doc*/
  __pyx_tp_traverse_6SnapPy_SymmetryGroup, /*tp_traverse*/
  __pyx_tp_clear_6SnapPy_SymmetryGroup, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6SnapPy_SymmetryGroup, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_6SnapPy_SymmetryGroup, /*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_6SnapPy_SymmetryGroup, /*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_6SnapPy_CDirichletDomain __pyx_vtable_6SnapPy_CDirichletDomain;

static PyObject *__pyx_tp_new_6SnapPy_CDirichletDomain(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6SnapPy_CDirichletDomain *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_6SnapPy_CDirichletDomain *)o);
  p->__pyx_vtab = __pyx_vtabptr_6SnapPy_CDirichletDomain;
  if (unlikely(__pyx_pw_6SnapPy_16CDirichletDomain_3__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6SnapPy_CDirichletDomain(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_6SnapPy_CDirichletDomain) {
      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_6SnapPy_16CDirichletDomain_5__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_specialmethod___pyx_pw_6SnapPy_16CDirichletDomain_7__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_6SnapPy_16CDirichletDomain_7__repr__(self);
}

static PyMethodDef __pyx_methods_6SnapPy_CDirichletDomain[] = {
  {"_number_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_1_number_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain__number_},
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6SnapPy_16CDirichletDomain_7__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"num_vertices", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_9num_vertices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_8num_vertices},
  {"num_finite_vertices", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_11num_finite_vertices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_10num_finite_vertices},
  {"num_ideal_vertices", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_13num_ideal_vertices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_12num_ideal_vertices},
  {"num_edges", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_15num_edges, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_14num_edges},
  {"num_faces", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_17num_faces, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_16num_faces},
  {"in_radius", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_19in_radius, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_18in_radius},
  {"out_radius", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_21out_radius, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_20out_radius},
  {"spine_radius", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_23spine_radius, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_22spine_radius},
  {"length_spectrum_dicts", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_25length_spectrum_dicts, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_24length_spectrum_dicts},
  {"vertex_list", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_27vertex_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_26vertex_list},
  {"_vertex_list", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_29_vertex_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_28_vertex_list},
  {"_vertex_data_list", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_31_vertex_data_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_30_vertex_data_list},
  {"_vertex_to_index_dict", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_33_vertex_to_index_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_32_vertex_to_index_dict},
  {"_edge_to_index_dict", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_35_edge_to_index_dict, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_34_edge_to_index_dict},
  {"face_list", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_37face_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_36face_list},
  {"edge_list", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_39edge_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_38edge_list},
  {"view", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_41view, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_40view},
  {"manifold", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_43manifold, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_42manifold},
  {"triangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_45triangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_44triangulation},
  {"volume", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_47volume, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_46volume},
  {"pairing_matrices", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_49pairing_matrices, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_48pairing_matrices},
  {"pairing_words", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_51pairing_words, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_50pairing_words},
  {"_to_string", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_53_to_string, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_52_to_string},
  {"__reduce_ex__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_55__reduce_ex__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_54__reduce_ex__},
  {"save", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_57save, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_56save},
  {"export_stl", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_16CDirichletDomain_59export_stl, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_16CDirichletDomain_58export_stl},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6SnapPy_CDirichletDomain_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6SnapPy_CDirichletDomain},
  {Py_tp_repr, (void *)__pyx_pw_6SnapPy_16CDirichletDomain_7__repr__},
  {Py_tp_methods, (void *)__pyx_methods_6SnapPy_CDirichletDomain},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy_CDirichletDomain},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy_CDirichletDomain_spec = {
  "SnapPy.CDirichletDomain",
  sizeof(struct __pyx_obj_6SnapPy_CDirichletDomain),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
  __pyx_type_6SnapPy_CDirichletDomain_slots,
};
#else

static PyTypeObject __pyx_type_6SnapPy_CDirichletDomain = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""CDirichletDomain", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy_CDirichletDomain), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy_CDirichletDomain, /*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_6SnapPy_16CDirichletDomain_7__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_6SnapPy_CDirichletDomain, /*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_6SnapPy_CDirichletDomain, /*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_6SnapPy_CCuspNeighborhood(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_6SnapPy_CCuspNeighborhood *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_6SnapPy_CCuspNeighborhood *)o);
  p->original_indices = Py_None; Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_6SnapPy_17CCuspNeighborhood_3__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_6SnapPy_CCuspNeighborhood(PyObject *o) {
  struct __pyx_obj_6SnapPy_CCuspNeighborhood *p = (struct __pyx_obj_6SnapPy_CCuspNeighborhood *)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_6SnapPy_CCuspNeighborhood) {
      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_6SnapPy_17CCuspNeighborhood_5__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->original_indices);
  #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_6SnapPy_CCuspNeighborhood(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6SnapPy_CCuspNeighborhood *p = (struct __pyx_obj_6SnapPy_CCuspNeighborhood *)o;
  if (p->original_indices) {
    e = (*v)(p->original_indices, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6SnapPy_CCuspNeighborhood(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6SnapPy_CCuspNeighborhood *p = (struct __pyx_obj_6SnapPy_CCuspNeighborhood *)o;
  tmp = ((PyObject*)p->original_indices);
  p->original_indices = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_specialmethod___pyx_pw_6SnapPy_17CCuspNeighborhood_7__repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
  return __pyx_pw_6SnapPy_17CCuspNeighborhood_7__repr__(self);
}

static PyMethodDef __pyx_methods_6SnapPy_CCuspNeighborhood[] = {
  {"_number_", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_1_number_, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood__number_},
  {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_pw_6SnapPy_17CCuspNeighborhood_7__repr__, METH_NOARGS|METH_COEXIST, 0},
  {"manifold", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_9manifold, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_8manifold},
  {"original_index", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_11original_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_10original_index},
  {"check_index", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_13check_index, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_12check_index},
  {"num_cusps", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_15num_cusps, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_14num_cusps},
  {"topology", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_17topology, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_16topology},
  {"get_displacement", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_19get_displacement, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_18get_displacement},
  {"set_displacement", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_21set_displacement, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_20set_displacement},
  {"stopping_displacement", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_23stopping_displacement, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_22stopping_displacement},
  {"stopper", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_25stopper, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_24stopper},
  {"reach", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_27reach, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_26reach},
  {"max_reach", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_29max_reach, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_28max_reach},
  {"get_tie", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_31get_tie, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_30get_tie},
  {"set_tie", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_33set_tie, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_32set_tie},
  {"volume", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_35volume, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_34volume},
  {"translations", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_37translations, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_36translations},
  {"horoballs", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_39horoballs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_38horoballs},
  {"Ford_domain", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_41Ford_domain, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_40Ford_domain},
  {"triangulation", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_43triangulation, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_42triangulation},
  {"view", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_45view, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_44view},
  {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_47__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_46__reduce_cython__},
  {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6SnapPy_17CCuspNeighborhood_49__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6SnapPy_17CCuspNeighborhood_48__setstate_cython__},
  {0, 0, 0, 0}
};
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6SnapPy_CCuspNeighborhood_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6SnapPy_CCuspNeighborhood},
  {Py_tp_repr, (void *)__pyx_pw_6SnapPy_17CCuspNeighborhood_7__repr__},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6SnapPy_CCuspNeighborhood},
  {Py_tp_clear, (void *)__pyx_tp_clear_6SnapPy_CCuspNeighborhood},
  {Py_tp_methods, (void *)__pyx_methods_6SnapPy_CCuspNeighborhood},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy_CCuspNeighborhood},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy_CCuspNeighborhood_spec = {
  "SnapPy.CCuspNeighborhood",
  sizeof(struct __pyx_obj_6SnapPy_CCuspNeighborhood),
  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_6SnapPy_CCuspNeighborhood_slots,
};
#else

static PyTypeObject __pyx_type_6SnapPy_CCuspNeighborhood = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""CCuspNeighborhood", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy_CCuspNeighborhood), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy_CCuspNeighborhood, /*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_6SnapPy_17CCuspNeighborhood_7__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*/
  0, /*tp_doc*/
  __pyx_tp_traverse_6SnapPy_CCuspNeighborhood, /*tp_traverse*/
  __pyx_tp_clear_6SnapPy_CCuspNeighborhood, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_6SnapPy_CCuspNeighborhood, /*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_6SnapPy_CCuspNeighborhood, /*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

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_6SnapPy___pyx_scope_struct__genexpr *__pyx_freelist_6SnapPy___pyx_scope_struct__genexpr[8];
static int __pyx_freecount_6SnapPy___pyx_scope_struct__genexpr = 0;
#endif

static PyObject *__pyx_tp_new_6SnapPy___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_USE_FREELISTS
  if (likely((int)(__pyx_freecount_6SnapPy___pyx_scope_struct__genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct__genexpr)))) {
    o = (PyObject*)__pyx_freelist_6SnapPy___pyx_scope_struct__genexpr[--__pyx_freecount_6SnapPy___pyx_scope_struct__genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_6SnapPy___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_6SnapPy___pyx_scope_struct__genexpr(PyObject *o) {
  struct __pyx_obj_6SnapPy___pyx_scope_struct__genexpr *p = (struct __pyx_obj_6SnapPy___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_6SnapPy___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_e);
  Py_CLEAR(p->__pyx_t_0);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_6SnapPy___pyx_scope_struct__genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct__genexpr)))) {
    __pyx_freelist_6SnapPy___pyx_scope_struct__genexpr[__pyx_freecount_6SnapPy___pyx_scope_struct__genexpr++] = ((struct __pyx_obj_6SnapPy___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_6SnapPy___pyx_scope_struct__genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6SnapPy___pyx_scope_struct__genexpr *p = (struct __pyx_obj_6SnapPy___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_e) {
    e = (*v)(p->__pyx_v_e, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6SnapPy___pyx_scope_struct__genexpr_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6SnapPy___pyx_scope_struct__genexpr},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6SnapPy___pyx_scope_struct__genexpr},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy___pyx_scope_struct__genexpr},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy___pyx_scope_struct__genexpr_spec = {
  "SnapPy.__pyx_scope_struct__genexpr",
  sizeof(struct __pyx_obj_6SnapPy___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_6SnapPy___pyx_scope_struct__genexpr_slots,
};
#else

static PyTypeObject __pyx_type_6SnapPy___pyx_scope_struct__genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""__pyx_scope_struct__genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct__genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy___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_6SnapPy___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_6SnapPy___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

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation *__pyx_freelist_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation[8];
static int __pyx_freecount_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation = 0;
#endif

static PyObject *__pyx_tp_new_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation(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_USE_FREELISTS
  if (likely((int)(__pyx_freecount_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation)))) {
    o = (PyObject*)__pyx_freelist_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation[--__pyx_freecount_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation];
    memset(o, 0, sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation));
    (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_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation(PyObject *o) {
  struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation *)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_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation)))) {
    __pyx_freelist_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation[__pyx_freecount_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation++] = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation *)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_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6SnapPy_Triangulation *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation},
  {Py_tp_clear, (void *)__pyx_tp_clear_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation_spec = {
  "SnapPy.__pyx_scope_struct_1__unsimplified_filled_triangulation",
  sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation),
  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_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation_slots,
};
#else

static PyTypeObject __pyx_type_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""__pyx_scope_struct_1__unsimplified_filled_triangulation", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation, /*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_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation, /*tp_traverse*/
  __pyx_tp_clear_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation, /*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_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation, /*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

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_6SnapPy___pyx_scope_struct_2_genexpr *__pyx_freelist_6SnapPy___pyx_scope_struct_2_genexpr[8];
static int __pyx_freecount_6SnapPy___pyx_scope_struct_2_genexpr = 0;
#endif

static PyObject *__pyx_tp_new_6SnapPy___pyx_scope_struct_2_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_USE_FREELISTS
  if (likely((int)(__pyx_freecount_6SnapPy___pyx_scope_struct_2_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_2_genexpr)))) {
    o = (PyObject*)__pyx_freelist_6SnapPy___pyx_scope_struct_2_genexpr[--__pyx_freecount_6SnapPy___pyx_scope_struct_2_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_2_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_6SnapPy___pyx_scope_struct_2_genexpr(PyObject *o) {
  struct __pyx_obj_6SnapPy___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_2_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_6SnapPy___pyx_scope_struct_2_genexpr) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_genexpr_arg_0);
  Py_CLEAR(p->__pyx_v_c);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_6SnapPy___pyx_scope_struct_2_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_2_genexpr)))) {
    __pyx_freelist_6SnapPy___pyx_scope_struct_2_genexpr[__pyx_freecount_6SnapPy___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_2_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_6SnapPy___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6SnapPy___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_2_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  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_6SnapPy___pyx_scope_struct_2_genexpr_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6SnapPy___pyx_scope_struct_2_genexpr},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6SnapPy___pyx_scope_struct_2_genexpr},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy___pyx_scope_struct_2_genexpr},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy___pyx_scope_struct_2_genexpr_spec = {
  "SnapPy.__pyx_scope_struct_2_genexpr",
  sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_2_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_6SnapPy___pyx_scope_struct_2_genexpr_slots,
};
#else

static PyTypeObject __pyx_type_6SnapPy___pyx_scope_struct_2_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""__pyx_scope_struct_2_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_2_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy___pyx_scope_struct_2_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_6SnapPy___pyx_scope_struct_2_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_6SnapPy___pyx_scope_struct_2_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

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_6SnapPy___pyx_scope_struct_3_genexpr *__pyx_freelist_6SnapPy___pyx_scope_struct_3_genexpr[8];
static int __pyx_freecount_6SnapPy___pyx_scope_struct_3_genexpr = 0;
#endif

static PyObject *__pyx_tp_new_6SnapPy___pyx_scope_struct_3_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_USE_FREELISTS
  if (likely((int)(__pyx_freecount_6SnapPy___pyx_scope_struct_3_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_3_genexpr)))) {
    o = (PyObject*)__pyx_freelist_6SnapPy___pyx_scope_struct_3_genexpr[--__pyx_freecount_6SnapPy___pyx_scope_struct_3_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_3_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_6SnapPy___pyx_scope_struct_3_genexpr(PyObject *o) {
  struct __pyx_obj_6SnapPy___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_3_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_6SnapPy___pyx_scope_struct_3_genexpr) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_genexpr_arg_0);
  Py_CLEAR(p->__pyx_v_p);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_6SnapPy___pyx_scope_struct_3_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_3_genexpr)))) {
    __pyx_freelist_6SnapPy___pyx_scope_struct_3_genexpr[__pyx_freecount_6SnapPy___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_3_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_6SnapPy___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6SnapPy___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_3_genexpr *)o;
  if (p->__pyx_genexpr_arg_0) {
    e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
  }
  if (p->__pyx_v_p) {
    e = (*v)(p->__pyx_v_p, a); if (e) return e;
  }
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6SnapPy___pyx_scope_struct_3_genexpr_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6SnapPy___pyx_scope_struct_3_genexpr},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6SnapPy___pyx_scope_struct_3_genexpr},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy___pyx_scope_struct_3_genexpr},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy___pyx_scope_struct_3_genexpr_spec = {
  "SnapPy.__pyx_scope_struct_3_genexpr",
  sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_3_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_6SnapPy___pyx_scope_struct_3_genexpr_slots,
};
#else

static PyTypeObject __pyx_type_6SnapPy___pyx_scope_struct_3_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""__pyx_scope_struct_3_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_3_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy___pyx_scope_struct_3_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_6SnapPy___pyx_scope_struct_3_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_6SnapPy___pyx_scope_struct_3_genexpr, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  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

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word *__pyx_freelist_6SnapPy___pyx_scope_struct_4_list_as_word[8];
static int __pyx_freecount_6SnapPy___pyx_scope_struct_4_list_as_word = 0;
#endif

static PyObject *__pyx_tp_new_6SnapPy___pyx_scope_struct_4_list_as_word(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_USE_FREELISTS
  if (likely((int)(__pyx_freecount_6SnapPy___pyx_scope_struct_4_list_as_word > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word)))) {
    o = (PyObject*)__pyx_freelist_6SnapPy___pyx_scope_struct_4_list_as_word[--__pyx_freecount_6SnapPy___pyx_scope_struct_4_list_as_word];
    memset(o, 0, sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word));
    (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_6SnapPy___pyx_scope_struct_4_list_as_word(PyObject *o) {
  struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word *)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_6SnapPy___pyx_scope_struct_4_list_as_word) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_verbose_form);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_6SnapPy___pyx_scope_struct_4_list_as_word < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word)))) {
    __pyx_freelist_6SnapPy___pyx_scope_struct_4_list_as_word[__pyx_freecount_6SnapPy___pyx_scope_struct_4_list_as_word++] = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word *)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_6SnapPy___pyx_scope_struct_4_list_as_word(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word *)o;
  if (p->__pyx_v_verbose_form) {
    e = (*v)(p->__pyx_v_verbose_form, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6SnapPy___pyx_scope_struct_4_list_as_word(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word *)o;
  tmp = ((PyObject*)p->__pyx_v_verbose_form);
  p->__pyx_v_verbose_form = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6SnapPy___pyx_scope_struct_4_list_as_word_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6SnapPy___pyx_scope_struct_4_list_as_word},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6SnapPy___pyx_scope_struct_4_list_as_word},
  {Py_tp_clear, (void *)__pyx_tp_clear_6SnapPy___pyx_scope_struct_4_list_as_word},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy___pyx_scope_struct_4_list_as_word},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy___pyx_scope_struct_4_list_as_word_spec = {
  "SnapPy.__pyx_scope_struct_4_list_as_word",
  sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word),
  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_6SnapPy___pyx_scope_struct_4_list_as_word_slots,
};
#else

static PyTypeObject __pyx_type_6SnapPy___pyx_scope_struct_4_list_as_word = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""__pyx_scope_struct_4_list_as_word", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_4_list_as_word), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy___pyx_scope_struct_4_list_as_word, /*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_6SnapPy___pyx_scope_struct_4_list_as_word, /*tp_traverse*/
  __pyx_tp_clear_6SnapPy___pyx_scope_struct_4_list_as_word, /*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_6SnapPy___pyx_scope_struct_4_list_as_word, /*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

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_6SnapPy___pyx_scope_struct_5_genexpr *__pyx_freelist_6SnapPy___pyx_scope_struct_5_genexpr[8];
static int __pyx_freecount_6SnapPy___pyx_scope_struct_5_genexpr = 0;
#endif

static PyObject *__pyx_tp_new_6SnapPy___pyx_scope_struct_5_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_USE_FREELISTS
  if (likely((int)(__pyx_freecount_6SnapPy___pyx_scope_struct_5_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_5_genexpr)))) {
    o = (PyObject*)__pyx_freelist_6SnapPy___pyx_scope_struct_5_genexpr[--__pyx_freecount_6SnapPy___pyx_scope_struct_5_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_5_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_6SnapPy___pyx_scope_struct_5_genexpr(PyObject *o) {
  struct __pyx_obj_6SnapPy___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_5_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_6SnapPy___pyx_scope_struct_5_genexpr) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  Py_CLEAR(p->__pyx_genexpr_arg_0);
  Py_CLEAR(p->__pyx_v_g);
  Py_CLEAR(p->__pyx_t_0);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_6SnapPy___pyx_scope_struct_5_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_5_genexpr)))) {
    __pyx_freelist_6SnapPy___pyx_scope_struct_5_genexpr[__pyx_freecount_6SnapPy___pyx_scope_struct_5_genexpr++] = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_5_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_6SnapPy___pyx_scope_struct_5_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6SnapPy___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_5_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  if (p->__pyx_genexpr_arg_0) {
    e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
  }
  if (p->__pyx_v_g) {
    e = (*v)(p->__pyx_v_g, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6SnapPy___pyx_scope_struct_5_genexpr_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6SnapPy___pyx_scope_struct_5_genexpr},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6SnapPy___pyx_scope_struct_5_genexpr},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy___pyx_scope_struct_5_genexpr},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy___pyx_scope_struct_5_genexpr_spec = {
  "SnapPy.__pyx_scope_struct_5_genexpr",
  sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_5_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_6SnapPy___pyx_scope_struct_5_genexpr_slots,
};
#else

static PyTypeObject __pyx_type_6SnapPy___pyx_scope_struct_5_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""__pyx_scope_struct_5_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_5_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy___pyx_scope_struct_5_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_6SnapPy___pyx_scope_struct_5_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_6SnapPy___pyx_scope_struct_5_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

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list *__pyx_freelist_6SnapPy___pyx_scope_struct_6_face_list[8];
static int __pyx_freecount_6SnapPy___pyx_scope_struct_6_face_list = 0;
#endif

static PyObject *__pyx_tp_new_6SnapPy___pyx_scope_struct_6_face_list(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_USE_FREELISTS
  if (likely((int)(__pyx_freecount_6SnapPy___pyx_scope_struct_6_face_list > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list)))) {
    o = (PyObject*)__pyx_freelist_6SnapPy___pyx_scope_struct_6_face_list[--__pyx_freecount_6SnapPy___pyx_scope_struct_6_face_list];
    memset(o, 0, sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list));
    (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_6SnapPy___pyx_scope_struct_6_face_list(PyObject *o) {
  struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list *)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_6SnapPy___pyx_scope_struct_6_face_list) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_6SnapPy___pyx_scope_struct_6_face_list < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list)))) {
    __pyx_freelist_6SnapPy___pyx_scope_struct_6_face_list[__pyx_freecount_6SnapPy___pyx_scope_struct_6_face_list++] = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list *)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_6SnapPy___pyx_scope_struct_6_face_list(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_6SnapPy___pyx_scope_struct_6_face_list(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_6SnapPy_CDirichletDomain *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6SnapPy___pyx_scope_struct_6_face_list_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6SnapPy___pyx_scope_struct_6_face_list},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6SnapPy___pyx_scope_struct_6_face_list},
  {Py_tp_clear, (void *)__pyx_tp_clear_6SnapPy___pyx_scope_struct_6_face_list},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy___pyx_scope_struct_6_face_list},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy___pyx_scope_struct_6_face_list_spec = {
  "SnapPy.__pyx_scope_struct_6_face_list",
  sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list),
  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_6SnapPy___pyx_scope_struct_6_face_list_slots,
};
#else

static PyTypeObject __pyx_type_6SnapPy___pyx_scope_struct_6_face_list = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""__pyx_scope_struct_6_face_list", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_6_face_list), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy___pyx_scope_struct_6_face_list, /*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_6SnapPy___pyx_scope_struct_6_face_list, /*tp_traverse*/
  __pyx_tp_clear_6SnapPy___pyx_scope_struct_6_face_list, /*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_6SnapPy___pyx_scope_struct_6_face_list, /*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

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_6SnapPy___pyx_scope_struct_7_genexpr *__pyx_freelist_6SnapPy___pyx_scope_struct_7_genexpr[8];
static int __pyx_freecount_6SnapPy___pyx_scope_struct_7_genexpr = 0;
#endif

static PyObject *__pyx_tp_new_6SnapPy___pyx_scope_struct_7_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_USE_FREELISTS
  if (likely((int)(__pyx_freecount_6SnapPy___pyx_scope_struct_7_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_7_genexpr)))) {
    o = (PyObject*)__pyx_freelist_6SnapPy___pyx_scope_struct_7_genexpr[--__pyx_freecount_6SnapPy___pyx_scope_struct_7_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_7_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_6SnapPy___pyx_scope_struct_7_genexpr(PyObject *o) {
  struct __pyx_obj_6SnapPy___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_7_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_6SnapPy___pyx_scope_struct_7_genexpr) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_outer_scope);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_6SnapPy___pyx_scope_struct_7_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_7_genexpr)))) {
    __pyx_freelist_6SnapPy___pyx_scope_struct_7_genexpr[__pyx_freecount_6SnapPy___pyx_scope_struct_7_genexpr++] = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_7_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_6SnapPy___pyx_scope_struct_7_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6SnapPy___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_7_genexpr *)o;
  if (p->__pyx_outer_scope) {
    e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  }
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6SnapPy___pyx_scope_struct_7_genexpr_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6SnapPy___pyx_scope_struct_7_genexpr},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6SnapPy___pyx_scope_struct_7_genexpr},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy___pyx_scope_struct_7_genexpr},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy___pyx_scope_struct_7_genexpr_spec = {
  "SnapPy.__pyx_scope_struct_7_genexpr",
  sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_7_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_6SnapPy___pyx_scope_struct_7_genexpr_slots,
};
#else

static PyTypeObject __pyx_type_6SnapPy___pyx_scope_struct_7_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""__pyx_scope_struct_7_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_7_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy___pyx_scope_struct_7_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_6SnapPy___pyx_scope_struct_7_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_6SnapPy___pyx_scope_struct_7_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

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_6SnapPy___pyx_scope_struct_8_genexpr *__pyx_freelist_6SnapPy___pyx_scope_struct_8_genexpr[8];
static int __pyx_freecount_6SnapPy___pyx_scope_struct_8_genexpr = 0;
#endif

static PyObject *__pyx_tp_new_6SnapPy___pyx_scope_struct_8_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_USE_FREELISTS
  if (likely((int)(__pyx_freecount_6SnapPy___pyx_scope_struct_8_genexpr > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_8_genexpr)))) {
    o = (PyObject*)__pyx_freelist_6SnapPy___pyx_scope_struct_8_genexpr[--__pyx_freecount_6SnapPy___pyx_scope_struct_8_genexpr];
    memset(o, 0, sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_8_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_6SnapPy___pyx_scope_struct_8_genexpr(PyObject *o) {
  struct __pyx_obj_6SnapPy___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_8_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_6SnapPy___pyx_scope_struct_8_genexpr) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_genexpr_arg_0);
  Py_CLEAR(p->__pyx_v_x);
  Py_CLEAR(p->__pyx_t_0);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_6SnapPy___pyx_scope_struct_8_genexpr < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_8_genexpr)))) {
    __pyx_freelist_6SnapPy___pyx_scope_struct_8_genexpr[__pyx_freecount_6SnapPy___pyx_scope_struct_8_genexpr++] = ((struct __pyx_obj_6SnapPy___pyx_scope_struct_8_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_6SnapPy___pyx_scope_struct_8_genexpr(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_6SnapPy___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_6SnapPy___pyx_scope_struct_8_genexpr *)o;
  if (p->__pyx_genexpr_arg_0) {
    e = (*v)(p->__pyx_genexpr_arg_0, a); if (e) return e;
  }
  if (p->__pyx_v_x) {
    e = (*v)(p->__pyx_v_x, a); if (e) return e;
  }
  if (p->__pyx_t_0) {
    e = (*v)(p->__pyx_t_0, a); if (e) return e;
  }
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_6SnapPy___pyx_scope_struct_8_genexpr_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_6SnapPy___pyx_scope_struct_8_genexpr},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_6SnapPy___pyx_scope_struct_8_genexpr},
  {Py_tp_new, (void *)__pyx_tp_new_6SnapPy___pyx_scope_struct_8_genexpr},
  {0, 0},
};
static PyType_Spec __pyx_type_6SnapPy___pyx_scope_struct_8_genexpr_spec = {
  "SnapPy.__pyx_scope_struct_8_genexpr",
  sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_8_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_6SnapPy___pyx_scope_struct_8_genexpr_slots,
};
#else

static PyTypeObject __pyx_type_6SnapPy___pyx_scope_struct_8_genexpr = {
  PyVarObject_HEAD_INIT(0, 0)
  "SnapPy.""__pyx_scope_struct_8_genexpr", /*tp_name*/
  sizeof(struct __pyx_obj_6SnapPy___pyx_scope_struct_8_genexpr), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_6SnapPy___pyx_scope_struct_8_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_6SnapPy___pyx_scope_struct_8_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_6SnapPy___pyx_scope_struct_8_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_b_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 0, 0},
    {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
    {&__pyx_kp_s_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 0, 1, 0},
    {&__pyx_kp_s_0_0, __pyx_k_0_0, sizeof(__pyx_k_0_0), 0, 0, 1, 0},
    {&__pyx_kp_s_0_9_0_9, __pyx_k_0_9_0_9, sizeof(__pyx_k_0_9_0_9), 0, 0, 1, 0},
    {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
    {&__pyx_kp_s_12n123, __pyx_k_12n123, sizeof(__pyx_k_12n123), 0, 0, 1, 0},
    {&__pyx_kp_s_16_14f_I, __pyx_k_16_14f_I, sizeof(__pyx_k_16_14f_I), 0, 0, 1, 0},
    {&__pyx_kp_s_16n1235, __pyx_k_16n1235, sizeof(__pyx_k_16n1235), 0, 0, 1, 0},
    {&__pyx_kp_s_17_14f, __pyx_k_17_14f, sizeof(__pyx_k_17_14f), 0, 0, 1, 0},
    {&__pyx_kp_s_18f, __pyx_k_18f, sizeof(__pyx_k_18f), 0, 0, 1, 0},
    {&__pyx_kp_s_2_3_move, __pyx_k_2_3_move, sizeof(__pyx_k_2_3_move), 0, 0, 1, 0},
    {&__pyx_kp_s_3_2_move, __pyx_k_3_2_move, sizeof(__pyx_k_3_2_move), 0, 0, 1, 0},
    {&__pyx_kp_s_3d_s_curve_of_length_s, __pyx_k_3d_s_curve_of_length_s, sizeof(__pyx_k_3d_s_curve_of_length_s), 0, 0, 1, 0},
    {&__pyx_kp_s_4s_40s, __pyx_k_4s_40s, sizeof(__pyx_k_4s_40s), 0, 0, 1, 0},
    {&__pyx_kp_s_5_2_1_3_4_1_2, __pyx_k_5_2_1_3_4_1_2, sizeof(__pyx_k_5_2_1_3_4_1_2), 0, 0, 1, 0},
    {&__pyx_kp_s_6_1, __pyx_k_6_1, sizeof(__pyx_k_6_1), 0, 0, 1, 0},
    {&__pyx_kp_s_6s_s, __pyx_k_6s_s, sizeof(__pyx_k_6s_s), 0, 0, 1, 0},
    {&__pyx_kp_s_8_3_3, __pyx_k_8_3_3, sizeof(__pyx_k_8_3_3), 0, 0, 1, 0},
    {&__pyx_n_s_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1},
    {&__pyx_kp_s_A_CuspNeighborhood_object_repre, __pyx_k_A_CuspNeighborhood_object_repre, sizeof(__pyx_k_A_CuspNeighborhood_object_repre), 0, 0, 1, 0},
    {&__pyx_kp_s_A_DirichletDomain_object_repres, __pyx_k_A_DirichletDomain_object_repres, sizeof(__pyx_k_A_DirichletDomain_object_repres), 0, 0, 1, 0},
    {&__pyx_kp_s_A_FundamentalGroup_represents_a, __pyx_k_A_FundamentalGroup_represents_a, sizeof(__pyx_k_A_FundamentalGroup_represents_a), 0, 0, 1, 0},
    {&__pyx_kp_s_A_FundamentalGroup_represents_a_2, __pyx_k_A_FundamentalGroup_represents_a_2, sizeof(__pyx_k_A_FundamentalGroup_represents_a_2), 0, 0, 1, 0},
    {&__pyx_kp_s_A_non_existent_shape_data_type_w, __pyx_k_A_non_existent_shape_data_type_w, sizeof(__pyx_k_A_non_existent_shape_data_type_w), 0, 0, 1, 0},
    {&__pyx_kp_s_A_s_is_specified_by_a_string_or, __pyx_k_A_s_is_specified_by_a_string_or, sizeof(__pyx_k_A_s_is_specified_by_a_string_or), 0, 0, 1, 0},
    {&__pyx_n_s_AbelianGroup, __pyx_k_AbelianGroup, sizeof(__pyx_k_AbelianGroup), 0, 0, 1, 1},
    {&__pyx_n_s_AbelianGroup___reduce, __pyx_k_AbelianGroup___reduce, sizeof(__pyx_k_AbelianGroup___reduce), 0, 0, 1, 1},
    {&__pyx_kp_u_AbelianGroup___reduce___line_80, __pyx_k_AbelianGroup___reduce___line_80, sizeof(__pyx_k_AbelianGroup___reduce___line_80), 0, 1, 0, 0},
    {&__pyx_n_s_AbelianGroup_betti_number, __pyx_k_AbelianGroup_betti_number, sizeof(__pyx_k_AbelianGroup_betti_number), 0, 0, 1, 1},
    {&__pyx_n_s_AbelianGroup_elementary_divisors, __pyx_k_AbelianGroup_elementary_divisors, sizeof(__pyx_k_AbelianGroup_elementary_divisors), 0, 0, 1, 1},
    {&__pyx_n_s_AbelianGroup_order, __pyx_k_AbelianGroup_order, sizeof(__pyx_k_AbelianGroup_order), 0, 0, 1, 1},
    {&__pyx_n_s_AbelianGroup_rank, __pyx_k_AbelianGroup_rank, sizeof(__pyx_k_AbelianGroup_rank), 0, 0, 1, 1},
    {&__pyx_kp_s_Acceptable_cusp_types_are_all_or, __pyx_k_Acceptable_cusp_types_are_all_or, sizeof(__pyx_k_Acceptable_cusp_types_are_all_or), 0, 0, 1, 0},
    {&__pyx_kp_u_Add_a_possibly_degenerate_hyper, __pyx_k_Add_a_possibly_degenerate_hyper, sizeof(__pyx_k_Add_a_possibly_degenerate_hyper), 0, 1, 0, 0},
    {&__pyx_kp_s_All_Dehn_filling_coefficients_mu, __pyx_k_All_Dehn_filling_coefficients_mu, sizeof(__pyx_k_All_Dehn_filling_coefficients_mu), 0, 0, 1, 0},
    {&__pyx_kp_s_All_cusps_must_be_fillable, __pyx_k_All_cusps_must_be_fillable, sizeof(__pyx_k_All_cusps_must_be_fillable), 0, 0, 1, 0},
    {&__pyx_kp_s_All_files, __pyx_k_All_files, sizeof(__pyx_k_All_files), 0, 0, 1, 0},
    {&__pyx_kp_s_All_text_files, __pyx_k_All_text_files, sizeof(__pyx_k_All_text_files), 0, 0, 1, 0},
    {&__pyx_n_s_Alphabet, __pyx_k_Alphabet, sizeof(__pyx_k_Alphabet), 0, 0, 1, 1},
    {&__pyx_n_s_AlternatingKnotExteriors, __pyx_k_AlternatingKnotExteriors, sizeof(__pyx_k_AlternatingKnotExteriors), 0, 0, 1, 1},
    {&__pyx_n_s_Alternating_numbers, __pyx_k_Alternating_numbers, sizeof(__pyx_k_Alternating_numbers), 0, 0, 1, 1},
    {&__pyx_n_s_Alternating_offsets, __pyx_k_Alternating_offsets, sizeof(__pyx_k_Alternating_offsets), 0, 0, 1, 1},
    {&__pyx_n_s_Alternating_table, __pyx_k_Alternating_table, sizeof(__pyx_k_Alternating_table), 0, 0, 1, 1},
    {&__pyx_kp_s_An_empty_triangulation_was_gener, __pyx_k_An_empty_triangulation_was_gener, sizeof(__pyx_k_An_empty_triangulation_was_gener), 0, 0, 1, 0},
    {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1},
    {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
    {&__pyx_n_s_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 0, 1, 1},
    {&__pyx_kp_s_Base_class_for_Iterators_Sequen, __pyx_k_Base_class_for_Iterators_Sequen, sizeof(__pyx_k_Base_class_for_Iterators_Sequen), 0, 0, 1, 0},
    {&__pyx_kp_s_Base_class_for_Iterators_Sequen_2, __pyx_k_Base_class_for_Iterators_Sequen_2, sizeof(__pyx_k_Base_class_for_Iterators_Sequen_2), 0, 0, 1, 0},
    {&__pyx_kp_s_Base_class_for_manifold_Iterato, __pyx_k_Base_class_for_manifold_Iterato, sizeof(__pyx_k_Base_class_for_manifold_Iterato), 0, 0, 1, 0},
    {&__pyx_kp_s_Bb_raid_0_9, __pyx_k_Bb_raid_0_9, sizeof(__pyx_k_Bb_raid_0_9), 0, 0, 1, 0},
    {&__pyx_kp_s_Braid, __pyx_k_Braid, sizeof(__pyx_k_Braid), 0, 0, 1, 0},
    {&__pyx_kp_s_Braid_1_2_1_2, __pyx_k_Braid_1_2_1_2, sizeof(__pyx_k_Braid_1_2_1_2), 0, 0, 1, 0},
    {&__pyx_kp_s_Braids_must_have_at_least_2_stra, __pyx_k_Braids_must_have_at_least_2_stra, sizeof(__pyx_k_Braids_must_have_at_least_2_stra), 0, 0, 1, 0},
    {&__pyx_kp_u_Brings_up_a_link_editor_window, __pyx_k_Brings_up_a_link_editor_window, sizeof(__pyx_k_Brings_up_a_link_editor_window), 0, 1, 0, 0},
    {&__pyx_n_s_Browser, __pyx_k_Browser, sizeof(__pyx_k_Browser), 0, 0, 1, 1},
    {&__pyx_kp_s_Browser_not_imported_Tk_CyOpenGL, __pyx_k_Browser_not_imported_Tk_CyOpenGL, sizeof(__pyx_k_Browser_not_imported_Tk_CyOpenGL), 0, 0, 1, 0},
    {&__pyx_kp_s_Bundle_S__1_1_a0_B1, __pyx_k_Bundle_S__1_1_a0_B1, sizeof(__pyx_k_Bundle_S__1_1_a0_B1), 0, 0, 1, 0},
    {&__pyx_kp_s_Bundle_S__d_d, __pyx_k_Bundle_S__d_d, sizeof(__pyx_k_Bundle_S__d_d), 0, 0, 1, 0},
    {&__pyx_kp_s_Byte_encoding_requires_complete, __pyx_k_Byte_encoding_requires_complete, sizeof(__pyx_k_Byte_encoding_requires_complete), 0, 0, 1, 0},
    {&__pyx_n_s_CCuspNeighborhood, __pyx_k_CCuspNeighborhood, sizeof(__pyx_k_CCuspNeighborhood), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_Ford_domain, __pyx_k_CCuspNeighborhood_Ford_domain, sizeof(__pyx_k_CCuspNeighborhood_Ford_domain), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood___reduce_cytho, __pyx_k_CCuspNeighborhood___reduce_cytho, sizeof(__pyx_k_CCuspNeighborhood___reduce_cytho), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood___setstate_cyt, __pyx_k_CCuspNeighborhood___setstate_cyt, sizeof(__pyx_k_CCuspNeighborhood___setstate_cyt), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood__number, __pyx_k_CCuspNeighborhood__number, sizeof(__pyx_k_CCuspNeighborhood__number), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_check_index, __pyx_k_CCuspNeighborhood_check_index, sizeof(__pyx_k_CCuspNeighborhood_check_index), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_get_displaceme, __pyx_k_CCuspNeighborhood_get_displaceme, sizeof(__pyx_k_CCuspNeighborhood_get_displaceme), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_get_tie, __pyx_k_CCuspNeighborhood_get_tie, sizeof(__pyx_k_CCuspNeighborhood_get_tie), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_horoballs, __pyx_k_CCuspNeighborhood_horoballs, sizeof(__pyx_k_CCuspNeighborhood_horoballs), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_manifold, __pyx_k_CCuspNeighborhood_manifold, sizeof(__pyx_k_CCuspNeighborhood_manifold), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_max_reach, __pyx_k_CCuspNeighborhood_max_reach, sizeof(__pyx_k_CCuspNeighborhood_max_reach), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_num_cusps, __pyx_k_CCuspNeighborhood_num_cusps, sizeof(__pyx_k_CCuspNeighborhood_num_cusps), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_original_index, __pyx_k_CCuspNeighborhood_original_index, sizeof(__pyx_k_CCuspNeighborhood_original_index), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_reach, __pyx_k_CCuspNeighborhood_reach, sizeof(__pyx_k_CCuspNeighborhood_reach), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_set_displaceme, __pyx_k_CCuspNeighborhood_set_displaceme, sizeof(__pyx_k_CCuspNeighborhood_set_displaceme), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_set_tie, __pyx_k_CCuspNeighborhood_set_tie, sizeof(__pyx_k_CCuspNeighborhood_set_tie), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_stopper, __pyx_k_CCuspNeighborhood_stopper, sizeof(__pyx_k_CCuspNeighborhood_stopper), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_stopping_displ, __pyx_k_CCuspNeighborhood_stopping_displ, sizeof(__pyx_k_CCuspNeighborhood_stopping_displ), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_topology, __pyx_k_CCuspNeighborhood_topology, sizeof(__pyx_k_CCuspNeighborhood_topology), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_translations, __pyx_k_CCuspNeighborhood_translations, sizeof(__pyx_k_CCuspNeighborhood_translations), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_triangulation, __pyx_k_CCuspNeighborhood_triangulation, sizeof(__pyx_k_CCuspNeighborhood_triangulation), 0, 0, 1, 1},
    {&__pyx_n_s_CCuspNeighborhood_view, __pyx_k_CCuspNeighborhood_view, sizeof(__pyx_k_CCuspNeighborhood_view), 0, 0, 1, 1},
    {&__pyx_kp_u_CCuspNeighborhood_view_line_289, __pyx_k_CCuspNeighborhood_view_line_289, sizeof(__pyx_k_CCuspNeighborhood_view_line_289), 0, 1, 0, 0},
    {&__pyx_n_s_CCuspNeighborhood_volume, __pyx_k_CCuspNeighborhood_volume, sizeof(__pyx_k_CCuspNeighborhood_volume), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain, __pyx_k_CDirichletDomain, sizeof(__pyx_k_CDirichletDomain), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain___reduce_ex, __pyx_k_CDirichletDomain___reduce_ex, sizeof(__pyx_k_CDirichletDomain___reduce_ex), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain__edge_to_index, __pyx_k_CDirichletDomain__edge_to_index, sizeof(__pyx_k_CDirichletDomain__edge_to_index), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain__number, __pyx_k_CDirichletDomain__number, sizeof(__pyx_k_CDirichletDomain__number), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain__to_string, __pyx_k_CDirichletDomain__to_string, sizeof(__pyx_k_CDirichletDomain__to_string), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain__vertex_data_li, __pyx_k_CDirichletDomain__vertex_data_li, sizeof(__pyx_k_CDirichletDomain__vertex_data_li), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain__vertex_list, __pyx_k_CDirichletDomain__vertex_list, sizeof(__pyx_k_CDirichletDomain__vertex_list), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain__vertex_to_inde, __pyx_k_CDirichletDomain__vertex_to_inde, sizeof(__pyx_k_CDirichletDomain__vertex_to_inde), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain_edge_list, __pyx_k_CDirichletDomain_edge_list, sizeof(__pyx_k_CDirichletDomain_edge_list), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain_export_stl, __pyx_k_CDirichletDomain_export_stl, sizeof(__pyx_k_CDirichletDomain_export_stl), 0, 0, 1, 1},
    {&__pyx_kp_u_CDirichletDomain_export_stl_line, __pyx_k_CDirichletDomain_export_stl_line, sizeof(__pyx_k_CDirichletDomain_export_stl_line), 0, 1, 0, 0},
    {&__pyx_n_s_CDirichletDomain_face_list, __pyx_k_CDirichletDomain_face_list, sizeof(__pyx_k_CDirichletDomain_face_list), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain_in_radius, __pyx_k_CDirichletDomain_in_radius, sizeof(__pyx_k_CDirichletDomain_in_radius), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain_length_spectrum, __pyx_k_CDirichletDomain_length_spectrum, sizeof(__pyx_k_CDirichletDomain_length_spectrum), 0, 0, 1, 1},
    {&__pyx_kp_u_CDirichletDomain_length_spectrum_2, __pyx_k_CDirichletDomain_length_spectrum_2, sizeof(__pyx_k_CDirichletDomain_length_spectrum_2), 0, 1, 0, 0},
    {&__pyx_n_s_CDirichletDomain_manifold, __pyx_k_CDirichletDomain_manifold, sizeof(__pyx_k_CDirichletDomain_manifold), 0, 0, 1, 1},
    {&__pyx_kp_u_CDirichletDomain_manifold_line_5, __pyx_k_CDirichletDomain_manifold_line_5, sizeof(__pyx_k_CDirichletDomain_manifold_line_5), 0, 1, 0, 0},
    {&__pyx_n_s_CDirichletDomain_num_edges, __pyx_k_CDirichletDomain_num_edges, sizeof(__pyx_k_CDirichletDomain_num_edges), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain_num_faces, __pyx_k_CDirichletDomain_num_faces, sizeof(__pyx_k_CDirichletDomain_num_faces), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain_num_finite_vert, __pyx_k_CDirichletDomain_num_finite_vert, sizeof(__pyx_k_CDirichletDomain_num_finite_vert), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain_num_ideal_verti, __pyx_k_CDirichletDomain_num_ideal_verti, sizeof(__pyx_k_CDirichletDomain_num_ideal_verti), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain_num_vertices, __pyx_k_CDirichletDomain_num_vertices, sizeof(__pyx_k_CDirichletDomain_num_vertices), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain_out_radius, __pyx_k_CDirichletDomain_out_radius, sizeof(__pyx_k_CDirichletDomain_out_radius), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain_pairing_matrice, __pyx_k_CDirichletDomain_pairing_matrice, sizeof(__pyx_k_CDirichletDomain_pairing_matrice), 0, 0, 1, 1},
    {&__pyx_kp_u_CDirichletDomain_pairing_matrice_2, __pyx_k_CDirichletDomain_pairing_matrice_2, sizeof(__pyx_k_CDirichletDomain_pairing_matrice_2), 0, 1, 0, 0},
    {&__pyx_n_s_CDirichletDomain_pairing_words, __pyx_k_CDirichletDomain_pairing_words, sizeof(__pyx_k_CDirichletDomain_pairing_words), 0, 0, 1, 1},
    {&__pyx_kp_u_CDirichletDomain_pairing_words_l, __pyx_k_CDirichletDomain_pairing_words_l, sizeof(__pyx_k_CDirichletDomain_pairing_words_l), 0, 1, 0, 0},
    {&__pyx_n_s_CDirichletDomain_save, __pyx_k_CDirichletDomain_save, sizeof(__pyx_k_CDirichletDomain_save), 0, 0, 1, 1},
    {&__pyx_kp_u_CDirichletDomain_save_line_643, __pyx_k_CDirichletDomain_save_line_643, sizeof(__pyx_k_CDirichletDomain_save_line_643), 0, 1, 0, 0},
    {&__pyx_n_s_CDirichletDomain_spine_radius, __pyx_k_CDirichletDomain_spine_radius, sizeof(__pyx_k_CDirichletDomain_spine_radius), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain_triangulation, __pyx_k_CDirichletDomain_triangulation, sizeof(__pyx_k_CDirichletDomain_triangulation), 0, 0, 1, 1},
    {&__pyx_kp_u_CDirichletDomain_triangulation_l, __pyx_k_CDirichletDomain_triangulation_l, sizeof(__pyx_k_CDirichletDomain_triangulation_l), 0, 1, 0, 0},
    {&__pyx_n_s_CDirichletDomain_vertex_list, __pyx_k_CDirichletDomain_vertex_list, sizeof(__pyx_k_CDirichletDomain_vertex_list), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain_view, __pyx_k_CDirichletDomain_view, sizeof(__pyx_k_CDirichletDomain_view), 0, 0, 1, 1},
    {&__pyx_n_s_CDirichletDomain_volume, __pyx_k_CDirichletDomain_volume, sizeof(__pyx_k_CDirichletDomain_volume), 0, 0, 1, 1},
    {&__pyx_n_s_CFundamentalGroup, __pyx_k_CFundamentalGroup, sizeof(__pyx_k_CFundamentalGroup), 0, 0, 1, 1},
    {&__pyx_n_s_CFundamentalGroup___reduce_cytho, __pyx_k_CFundamentalGroup___reduce_cytho, sizeof(__pyx_k_CFundamentalGroup___reduce_cytho), 0, 0, 1, 1},
    {&__pyx_n_s_CFundamentalGroup___setstate_cyt, __pyx_k_CFundamentalGroup___setstate_cyt, sizeof(__pyx_k_CFundamentalGroup___setstate_cyt), 0, 0, 1, 1},
    {&__pyx_n_s_CFundamentalGroup__gap_init, __pyx_k_CFundamentalGroup__gap_init, sizeof(__pyx_k_CFundamentalGroup__gap_init), 0, 0, 1, 1},
    {&__pyx_n_s_CFundamentalGroup__magma_init, __pyx_k_CFundamentalGroup__magma_init, sizeof(__pyx_k_CFundamentalGroup__magma_init), 0, 0, 1, 1},
    {&__pyx_n_s_CFundamentalGroup__word_moves, __pyx_k_CFundamentalGroup__word_moves, sizeof(__pyx_k_CFundamentalGroup__word_moves), 0, 0, 1, 1},
    {&__pyx_n_s_CFundamentalGroup_character_vari, __pyx_k_CFundamentalGroup_character_vari, sizeof(__pyx_k_CFundamentalGroup_character_vari), 0, 0, 1, 1},
    {&__pyx_kp_u_CFundamentalGroup_character_vari_2, __pyx_k_CFundamentalGroup_character_vari_2, sizeof(__pyx_k_CFundamentalGroup_character_vari_2), 0, 1, 0, 0},
    {&__pyx_n_s_CFundamentalGroup_gap_string, __pyx_k_CFundamentalGroup_gap_string, sizeof(__pyx_k_CFundamentalGroup_gap_string), 0, 0, 1, 1},
    {&__pyx_kp_u_CFundamentalGroup_gap_string_lin, __pyx_k_CFundamentalGroup_gap_string_lin, sizeof(__pyx_k_CFundamentalGroup_gap_string_lin), 0, 1, 0, 0},
    {&__pyx_n_s_CFundamentalGroup_generators, __pyx_k_CFundamentalGroup_generators, sizeof(__pyx_k_CFundamentalGroup_generators), 0, 0, 1, 1},
    {&__pyx_n_s_CFundamentalGroup_generators_in, __pyx_k_CFundamentalGroup_generators_in, sizeof(__pyx_k_CFundamentalGroup_generators_in), 0, 0, 1, 1},
    {&__pyx_kp_u_CFundamentalGroup_generators_in_2, __pyx_k_CFundamentalGroup_generators_in_2, sizeof(__pyx_k_CFundamentalGroup_generators_in_2), 0, 1, 0, 0},
    {&__pyx_kp_u_CFundamentalGroup_generators_lin, __pyx_k_CFundamentalGroup_generators_lin, sizeof(__pyx_k_CFundamentalGroup_generators_lin), 0, 1, 0, 0},
    {&__pyx_n_s_CFundamentalGroup_longitude, __pyx_k_CFundamentalGroup_longitude, sizeof(__pyx_k_CFundamentalGroup_longitude), 0, 0, 1, 1},
    {&__pyx_kp_u_CFundamentalGroup_longitude_line, __pyx_k_CFundamentalGroup_longitude_line, sizeof(__pyx_k_CFundamentalGroup_longitude_line), 0, 1, 0, 0},
    {&__pyx_n_s_CFundamentalGroup_magma_string, __pyx_k_CFundamentalGroup_magma_string, sizeof(__pyx_k_CFundamentalGroup_magma_string), 0, 0, 1, 1},
    {&__pyx_n_s_CFundamentalGroup_meridian, __pyx_k_CFundamentalGroup_meridian, sizeof(__pyx_k_CFundamentalGroup_meridian), 0, 0, 1, 1},
    {&__pyx_kp_u_CFundamentalGroup_meridian_line, __pyx_k_CFundamentalGroup_meridian_line, sizeof(__pyx_k_CFundamentalGroup_meridian_line), 0, 1, 0, 0},
    {&__pyx_n_s_CFundamentalGroup_num_generators, __pyx_k_CFundamentalGroup_num_generators, sizeof(__pyx_k_CFundamentalGroup_num_generators), 0, 0, 1, 1},
    {&__pyx_n_s_CFundamentalGroup_num_original_g, __pyx_k_CFundamentalGroup_num_original_g, sizeof(__pyx_k_CFundamentalGroup_num_original_g), 0, 0, 1, 1},
    {&__pyx_n_s_CFundamentalGroup_num_relators, __pyx_k_CFundamentalGroup_num_relators, sizeof(__pyx_k_CFundamentalGroup_num_relators), 0, 0, 1, 1},
    {&__pyx_n_s_CFundamentalGroup_original_gener, __pyx_k_CFundamentalGroup_original_gener, sizeof(__pyx_k_CFundamentalGroup_original_gener), 0, 0, 1, 1},
    {&__pyx_kp_u_CFundamentalGroup_original_gener_2, __pyx_k_CFundamentalGroup_original_gener_2, sizeof(__pyx_k_CFundamentalGroup_original_gener_2), 0, 1, 0, 0},
    {&__pyx_n_s_CFundamentalGroup_peripheral_cur, __pyx_k_CFundamentalGroup_peripheral_cur, sizeof(__pyx_k_CFundamentalGroup_peripheral_cur), 0, 0, 1, 1},
    {&__pyx_kp_u_CFundamentalGroup_peripheral_cur_2, __pyx_k_CFundamentalGroup_peripheral_cur_2, sizeof(__pyx_k_CFundamentalGroup_peripheral_cur_2), 0, 1, 0, 0},
    {&__pyx_n_s_CFundamentalGroup_relators, __pyx_k_CFundamentalGroup_relators, sizeof(__pyx_k_CFundamentalGroup_relators), 0, 0, 1, 1},
    {&__pyx_n_s_CFundamentalGroup_sage, __pyx_k_CFundamentalGroup_sage, sizeof(__pyx_k_CFundamentalGroup_sage), 0, 0, 1, 1},
    {&__pyx_n_s_CHolonomyGroup, __pyx_k_CHolonomyGroup, sizeof(__pyx_k_CHolonomyGroup), 0, 0, 1, 1},
    {&__pyx_n_s_CHolonomyGroup_O31, __pyx_k_CHolonomyGroup_O31, sizeof(__pyx_k_CHolonomyGroup_O31), 0, 0, 1, 1},
    {&__pyx_n_s_CHolonomyGroup_SL2C, __pyx_k_CHolonomyGroup_SL2C, sizeof(__pyx_k_CHolonomyGroup_SL2C), 0, 0, 1, 1},
    {&__pyx_n_s_CHolonomyGroup___reduce_cython, __pyx_k_CHolonomyGroup___reduce_cython, sizeof(__pyx_k_CHolonomyGroup___reduce_cython), 0, 0, 1, 1},
    {&__pyx_n_s_CHolonomyGroup___setstate_cython, __pyx_k_CHolonomyGroup___setstate_cython, sizeof(__pyx_k_CHolonomyGroup___setstate_cython), 0, 0, 1, 1},
    {&__pyx_n_s_CHolonomyGroup__matrices, __pyx_k_CHolonomyGroup__matrices, sizeof(__pyx_k_CHolonomyGroup__matrices), 0, 0, 1, 1},
    {&__pyx_n_s_CHolonomyGroup_complex_length, __pyx_k_CHolonomyGroup_complex_length, sizeof(__pyx_k_CHolonomyGroup_complex_length), 0, 0, 1, 1},
    {&__pyx_kp_s_CallFuncList_function_local_F_s, __pyx_k_CallFuncList_function_local_F_s, sizeof(__pyx_k_CallFuncList_function_local_F_s), 0, 0, 1, 0},
    {&__pyx_kp_s_Can_t_compare_triangulations_of, __pyx_k_Can_t_compare_triangulations_of, sizeof(__pyx_k_Can_t_compare_triangulations_of), 0, 0, 1, 0},
    {&__pyx_kp_s_Can_t_get_the_list_of_isometries, __pyx_k_Can_t_get_the_list_of_isometries, sizeof(__pyx_k_Can_t_get_the_list_of_isometries), 0, 0, 1, 0},
    {&__pyx_kp_s_Cannot_convert_s_to_a_Real, __pyx_k_Cannot_convert_s_to_a_Real, sizeof(__pyx_k_Cannot_convert_s_to_a_Real), 0, 0, 1, 0},
    {&__pyx_n_s_Census, __pyx_k_Census, sizeof(__pyx_k_Census), 0, 0, 1, 1},
    {&__pyx_kp_s_CensusKnots_s, __pyx_k_CensusKnots_s, sizeof(__pyx_k_CensusKnots_s), 0, 0, 1, 0},
    {&__pyx_kp_s_CensusKnots_tgz, __pyx_k_CensusKnots_tgz, sizeof(__pyx_k_CensusKnots_tgz), 0, 0, 1, 0},
    {&__pyx_n_s_Census_Knots, __pyx_k_Census_Knots, sizeof(__pyx_k_Census_Knots), 0, 0, 1, 1},
    {&__pyx_n_s_Census_Morwen8, __pyx_k_Census_Morwen8, sizeof(__pyx_k_Census_Morwen8), 0, 0, 1, 1},
    {&__pyx_n_s_Census___contains, __pyx_k_Census___contains, sizeof(__pyx_k_Census___contains), 0, 0, 1, 1},
    {&__pyx_n_s_Census___getitem, __pyx_k_Census___getitem, sizeof(__pyx_k_Census___getitem), 0, 0, 1, 1},
    {&__pyx_n_s_Census___init, __pyx_k_Census___init, sizeof(__pyx_k_Census___init), 0, 0, 1, 1},
    {&__pyx_n_s_Census___iter, __pyx_k_Census___iter, sizeof(__pyx_k_Census___iter), 0, 0, 1, 1},
    {&__pyx_n_s_Census___len, __pyx_k_Census___len, sizeof(__pyx_k_Census___len), 0, 0, 1, 1},
    {&__pyx_n_s_Census_next, __pyx_k_Census_next, sizeof(__pyx_k_Census_next), 0, 0, 1, 1},
    {&__pyx_n_s_CertifiedShapesEngine, __pyx_k_CertifiedShapesEngine, sizeof(__pyx_k_CertifiedShapesEngine), 0, 0, 1, 1},
    {&__pyx_kp_u_Change_the_triangulation_to_an, __pyx_k_Change_the_triangulation_to_an, sizeof(__pyx_k_Change_the_triangulation_to_an), 0, 1, 0, 0},
    {&__pyx_n_s_ChristyLinks, __pyx_k_ChristyLinks, sizeof(__pyx_k_ChristyLinks), 0, 0, 1, 1},
    {&__pyx_kp_s_ChristyLinks_s, __pyx_k_ChristyLinks_s, sizeof(__pyx_k_ChristyLinks_s), 0, 0, 1, 0},
    {&__pyx_kp_s_ChristyLinks_tgz, __pyx_k_ChristyLinks_tgz, sizeof(__pyx_k_ChristyLinks_tgz), 0, 0, 1, 0},
    {&__pyx_kp_s_Christy_census_of_s_component_li, __pyx_k_Christy_census_of_s_component_li, sizeof(__pyx_k_Christy_census_of_s_component_li), 0, 0, 1, 0},
    {&__pyx_n_s_Christy_links, __pyx_k_Christy_links, sizeof(__pyx_k_Christy_links), 0, 0, 1, 1},
    {&__pyx_n_s_ClosedCensusData, __pyx_k_ClosedCensusData, sizeof(__pyx_k_ClosedCensusData), 0, 0, 1, 1},
    {&__pyx_kp_s_ClosedNonorientableDistinct_txt, __pyx_k_ClosedNonorientableDistinct_txt, sizeof(__pyx_k_ClosedNonorientableDistinct_txt), 0, 0, 1, 0},
    {&__pyx_kp_s_ClosedOrientableDistinct_txt, __pyx_k_ClosedOrientableDistinct_txt, sizeof(__pyx_k_ClosedOrientableDistinct_txt), 0, 0, 1, 0},
    {&__pyx_kp_s_Communication_with_PLink_failed, __pyx_k_Communication_with_PLink_failed, sizeof(__pyx_k_Communication_with_PLink_failed), 0, 0, 1, 0},
    {&__pyx_kp_u_Constructs_a_reasonable_selecti, __pyx_k_Constructs_a_reasonable_selecti, sizeof(__pyx_k_Constructs_a_reasonable_selecti), 0, 1, 0, 0},
    {&__pyx_n_s_CosetAction, __pyx_k_CosetAction, sizeof(__pyx_k_CosetAction), 0, 0, 1, 1},
    {&__pyx_kp_s_Could_not_allocate_a_crossing_ta, __pyx_k_Could_not_allocate_a_crossing_ta, sizeof(__pyx_k_Could_not_allocate_a_crossing_ta), 0, 0, 1, 0},
    {&__pyx_kp_s_Could_not_certify_shape_interval, __pyx_k_Could_not_certify_shape_interval, sizeof(__pyx_k_Could_not_certify_shape_interval), 0, 0, 1, 0},
    {&__pyx_kp_s_Could_not_create_the_triangulati, __pyx_k_Could_not_create_the_triangulati, sizeof(__pyx_k_Could_not_create_the_triangulati), 0, 0, 1, 0},
    {&__pyx_kp_s_Cover_degree_should_be_at_least, __pyx_k_Cover_degree_should_be_at_least, sizeof(__pyx_k_Cover_degree_should_be_at_least), 0, 0, 1, 0},
    {&__pyx_kp_u_Create_a_3D_picture_of_the_horo, __pyx_k_Create_a_3D_picture_of_the_horo, sizeof(__pyx_k_Create_a_3D_picture_of_the_horo), 0, 1, 0, 0},
    {&__pyx_n_s_CuspInfo, __pyx_k_CuspInfo, sizeof(__pyx_k_CuspInfo), 0, 0, 1, 1},
    {&__pyx_n_s_CuspInfo___repr, __pyx_k_CuspInfo___repr, sizeof(__pyx_k_CuspInfo___repr), 0, 0, 1, 1},
    {&__pyx_n_s_CuspNeighborhood, __pyx_k_CuspNeighborhood, sizeof(__pyx_k_CuspNeighborhood), 0, 0, 1, 1},
    {&__pyx_n_s_CuspTopology, __pyx_k_CuspTopology, sizeof(__pyx_k_CuspTopology), 0, 0, 1, 1},
    {&__pyx_kp_s_Cusp_2d_complete_s_of_shape_s, __pyx_k_Cusp_2d_complete_s_of_shape_s, sizeof(__pyx_k_Cusp_2d_complete_s_of_shape_s), 0, 0, 1, 0},
    {&__pyx_kp_s_Cusp_2d_s_not_filled, __pyx_k_Cusp_2d_s_not_filled, sizeof(__pyx_k_Cusp_2d_s_not_filled), 0, 0, 1, 0},
    {&__pyx_kp_s_Cusp_2d_s_with_Dehn_filling_coef, __pyx_k_Cusp_2d_s_with_Dehn_filling_coef, sizeof(__pyx_k_Cusp_2d_s_with_Dehn_filling_coef), 0, 0, 1, 0},
    {&__pyx_kp_s_Cusp_Neighborhood_with_d_cusp_s, __pyx_k_Cusp_Neighborhood_with_d_cusp_s, sizeof(__pyx_k_Cusp_Neighborhood_with_d_cusp_s), 0, 0, 1, 0},
    {&__pyx_kp_s_Cusp_neighborhood_s_of_s, __pyx_k_Cusp_neighborhood_s_of_s, sizeof(__pyx_k_Cusp_neighborhood_s_of_s), 0, 0, 1, 0},
    {&__pyx_n_s_CuspedCensus, __pyx_k_CuspedCensus, sizeof(__pyx_k_CuspedCensus), 0, 0, 1, 1},
    {&__pyx_n_s_CuspedCensus___getitem, __pyx_k_CuspedCensus___getitem, sizeof(__pyx_k_CuspedCensus___getitem), 0, 0, 1, 1},
    {&__pyx_n_s_CuspedCensus___init, __pyx_k_CuspedCensus___init, sizeof(__pyx_k_CuspedCensus___init), 0, 0, 1, 1},
    {&__pyx_n_s_CuspedCensus_lookup, __pyx_k_CuspedCensus_lookup, sizeof(__pyx_k_CuspedCensus_lookup), 0, 0, 1, 1},
    {&__pyx_n_s_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 0, 1, 1},
    {&__pyx_kp_s_DT, __pyx_k_DT, sizeof(__pyx_k_DT), 0, 0, 1, 0},
    {&__pyx_kp_s_DT_0_9_01, __pyx_k_DT_0_9_01, sizeof(__pyx_k_DT_0_9_01), 0, 0, 1, 0},
    {&__pyx_kp_s_DT_2, __pyx_k_DT_2, sizeof(__pyx_k_DT_2), 0, 0, 1, 0},
    {&__pyx_n_s_DT_3, __pyx_k_DT_3, sizeof(__pyx_k_DT_3), 0, 0, 1, 1},
    {&__pyx_kp_s_DT_4_6_2, __pyx_k_DT_4_6_2, sizeof(__pyx_k_DT_4_6_2), 0, 0, 1, 0},
    {&__pyx_kp_s_DT_a_zA_Z_01, __pyx_k_DT_a_zA_Z_01, sizeof(__pyx_k_DT_a_zA_Z_01), 0, 0, 1, 0},
    {&__pyx_n_s_DT_code, __pyx_k_DT_code, sizeof(__pyx_k_DT_code), 0, 0, 1, 1},
    {&__pyx_n_s_DT_codes, __pyx_k_DT_codes, sizeof(__pyx_k_DT_codes), 0, 0, 1, 1},
    {&__pyx_kp_s_DT_s, __pyx_k_DT_s, sizeof(__pyx_k_DT_s), 0, 0, 1, 0},
    {&__pyx_n_s_DTcodec, __pyx_k_DTcodec, sizeof(__pyx_k_DTcodec), 0, 0, 1, 1},
    {&__pyx_kp_s_D_d, __pyx_k_D_d, sizeof(__pyx_k_D_d), 0, 0, 1, 0},
    {&__pyx_n_s_DirichletDomain, __pyx_k_DirichletDomain, sizeof(__pyx_k_DirichletDomain), 0, 0, 1, 1},
    {&__pyx_kp_u_Dirichlet_Domain_of, __pyx_k_Dirichlet_Domain_of, sizeof(__pyx_k_Dirichlet_Domain_of), 0, 1, 0, 0},
    {&__pyx_kp_s_Does_not_extend_to_link, __pyx_k_Does_not_extend_to_link, sizeof(__pyx_k_Does_not_extend_to_link), 0, 0, 1, 0},
    {&__pyx_kp_u_Drills_out_the_specified_dual_c, __pyx_k_Drills_out_the_specified_dual_c, sizeof(__pyx_k_Drills_out_the_specified_dual_c), 0, 1, 0, 0},
    {&__pyx_n_s_DualCurveInfo, __pyx_k_DualCurveInfo, sizeof(__pyx_k_DualCurveInfo), 0, 0, 1, 1},
    {&__pyx_n_s_DualCurveInfo___repr, __pyx_k_DualCurveInfo___repr, sizeof(__pyx_k_DualCurveInfo___repr), 0, 0, 1, 1},
    {&__pyx_kp_u_Each_cusp_has_a_preferred_marki, __pyx_k_Each_cusp_has_a_preferred_marki, sizeof(__pyx_k_Each_cusp_has_a_preferred_marki), 0, 1, 0, 0},
    {&__pyx_kp_s_Elementary_divisors_must_be_give, __pyx_k_Elementary_divisors_must_be_give, sizeof(__pyx_k_Elementary_divisors_must_be_give), 0, 0, 1, 0},
    {&__pyx_kp_s_Elementary_divisors_must_be_non, __pyx_k_Elementary_divisors_must_be_non, sizeof(__pyx_k_Elementary_divisors_must_be_non), 0, 0, 1, 0},
    {&__pyx_kp_s_Empty_Triangulation, __pyx_k_Empty_Triangulation, sizeof(__pyx_k_Empty_Triangulation), 0, 0, 1, 0},
    {&__pyx_kp_s_Equations_are_available_in_log_a, __pyx_k_Equations_are_available_in_log_a, sizeof(__pyx_k_Equations_are_available_in_log_a), 0, 0, 1, 0},
    {&__pyx_kp_u_Export_the_Dirichlet_domain_as, __pyx_k_Export_the_Dirichlet_domain_as, sizeof(__pyx_k_Export_the_Dirichlet_domain_as), 0, 1, 0, 0},
    {&__pyx_kp_u_Extend_the_Neumann_Zagier_Matri, __pyx_k_Extend_the_Neumann_Zagier_Matri, sizeof(__pyx_k_Extend_the_Neumann_Zagier_Matri), 0, 1, 0, 0},
    {&__pyx_kp_s_Extends_to_link, __pyx_k_Extends_to_link, sizeof(__pyx_k_Extends_to_link), 0, 0, 1, 0},
    {&__pyx_n_s_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 1, 1},
    {&__pyx_n_s_FactorCosetAction, __pyx_k_FactorCosetAction, sizeof(__pyx_k_FactorCosetAction), 0, 0, 1, 1},
    {&__pyx_kp_s_Failed_to_allocate_memory_for_cu, __pyx_k_Failed_to_allocate_memory_for_cu, sizeof(__pyx_k_Failed_to_allocate_memory_for_cu), 0, 0, 1, 0},
    {&__pyx_kp_s_Failed_to_allocate_memory_for_te, __pyx_k_Failed_to_allocate_memory_for_te, sizeof(__pyx_k_Failed_to_allocate_memory_for_te), 0, 0, 1, 0},
    {&__pyx_kp_s_Failed_to_construct_permutation, __pyx_k_Failed_to_construct_permutation, sizeof(__pyx_k_Failed_to_construct_permutation), 0, 0, 1, 0},
    {&__pyx_kp_u_Fill_an_empty_manifold_from_a_b, __pyx_k_Fill_an_empty_manifold_from_a_b, sizeof(__pyx_k_Fill_an_empty_manifold_from_a_b), 0, 1, 0, 0},
    {&__pyx_kp_u_Fill_an_empty_triangulation_fro, __pyx_k_Fill_an_empty_triangulation_fro, sizeof(__pyx_k_Fill_an_empty_triangulation_fro), 0, 1, 0, 0},
    {&__pyx_kp_u_For_a_Triangulation_that_descri, __pyx_k_For_a_Triangulation_that_descri, sizeof(__pyx_k_For_a_Triangulation_that_descri), 0, 1, 0, 0},
    {&__pyx_kp_u_For_a_non_orientable_Triangulat, __pyx_k_For_a_non_orientable_Triangulat, sizeof(__pyx_k_For_a_non_orientable_Triangulat), 0, 1, 0, 0},
    {&__pyx_n_s_Ford_domain, __pyx_k_Ford_domain, sizeof(__pyx_k_Ford_domain), 0, 0, 1, 1},
    {&__pyx_n_s_FormatHomForSnapPea, __pyx_k_FormatHomForSnapPea, sizeof(__pyx_k_FormatHomForSnapPea), 0, 0, 1, 1},
    {&__pyx_kp_s_FormatHomForSnapPea_function_f, __pyx_k_FormatHomForSnapPea_function_f, sizeof(__pyx_k_FormatHomForSnapPea_function_f), 0, 0, 1, 0},
    {&__pyx_n_s_FreeGroup, __pyx_k_FreeGroup, sizeof(__pyx_k_FreeGroup), 0, 0, 1, 1},
    {&__pyx_n_s_FuncResult, __pyx_k_FuncResult, sizeof(__pyx_k_FuncResult), 0, 0, 1, 1},
    {&__pyx_n_s_FundamentalGroup, __pyx_k_FundamentalGroup, sizeof(__pyx_k_FundamentalGroup), 0, 0, 1, 1},
    {&__pyx_n_s_G, __pyx_k_G, sizeof(__pyx_k_G), 0, 0, 1, 1},
    {&__pyx_n_s_GG, __pyx_k_GG, sizeof(__pyx_k_GG), 0, 0, 1, 1},
    {&__pyx_n_s_GapElement, __pyx_k_GapElement, sizeof(__pyx_k_GapElement), 0, 0, 1, 1},
    {&__pyx_kp_b_Generators, __pyx_k_Generators, sizeof(__pyx_k_Generators), 0, 0, 0, 0},
    {&__pyx_n_s_GeneratorsOfGroup, __pyx_k_GeneratorsOfGroup, sizeof(__pyx_k_GeneratorsOfGroup), 0, 0, 1, 1},
    {&__pyx_kp_s_Generators_s, __pyx_k_Generators_s, sizeof(__pyx_k_Generators_s), 0, 0, 1, 0},
    {&__pyx_kp_s_Generators_s_Relators_s, __pyx_k_Generators_s_Relators_s, sizeof(__pyx_k_Generators_s_Relators_s), 0, 0, 1, 0},
    {&__pyx_kp_u_Give_the_triangulation_a_new_na, __pyx_k_Give_the_triangulation_a_new_na, sizeof(__pyx_k_Give_the_triangulation_a_new_na), 0, 1, 0, 0},
    {&__pyx_kp_u_Gives_the_shapes_of_the_tetrahe, __pyx_k_Gives_the_shapes_of_the_tetrahe, sizeof(__pyx_k_Gives_the_shapes_of_the_tetrahe), 0, 1, 0, 0},
    {&__pyx_kp_s_Got_the_empty_link_from_PLink_a, __pyx_k_Got_the_empty_link_from_PLink_a, sizeof(__pyx_k_Got_the_empty_link_from_PLink_a), 0, 0, 1, 0},
    {&__pyx_kp_s_Group, __pyx_k_Group, sizeof(__pyx_k_Group), 0, 0, 1, 0},
    {&__pyx_kp_u_Group_elements_which_pair_the_f, __pyx_k_Group_elements_which_pair_the_f, sizeof(__pyx_k_Group_elements_which_pair_the_f), 0, 1, 0, 0},
    {&__pyx_n_s_GrpFP, __pyx_k_GrpFP, sizeof(__pyx_k_GrpFP), 0, 0, 1, 1},
    {&__pyx_n_s_GrpPerm, __pyx_k_GrpPerm, sizeof(__pyx_k_GrpPerm), 0, 0, 1, 1},
    {&__pyx_n_s_H, __pyx_k_H, sizeof(__pyx_k_H), 0, 0, 1, 1},
    {&__pyx_n_s_HTLinkExteriors, __pyx_k_HTLinkExteriors, sizeof(__pyx_k_HTLinkExteriors), 0, 0, 1, 1},
    {&__pyx_n_s_HTWKnots, __pyx_k_HTWKnots, sizeof(__pyx_k_HTWKnots), 0, 0, 1, 1},
    {&__pyx_kp_s_High_precision_shapes_must_be_co, __pyx_k_High_precision_shapes_must_be_co, sizeof(__pyx_k_High_precision_shapes_must_be_co), 0, 0, 1, 0},
    {&__pyx_n_s_HolonomyGroup, __pyx_k_HolonomyGroup, sizeof(__pyx_k_HolonomyGroup), 0, 0, 1, 1},
    {&__pyx_n_s_HolonomyGroup__number, __pyx_k_HolonomyGroup__number, sizeof(__pyx_k_HolonomyGroup__number), 0, 0, 1, 1},
    {&__pyx_n_s_HomGrp, __pyx_k_HomGrp, sizeof(__pyx_k_HomGrp), 0, 0, 1, 1},
    {&__pyx_n_s_HoroballViewer, __pyx_k_HoroballViewer, sizeof(__pyx_k_HoroballViewer), 0, 0, 1, 1},
    {&__pyx_n_s_I, __pyx_k_I, sizeof(__pyx_k_I), 0, 0, 1, 1},
    {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
    {&__pyx_kp_u_If_the_SymmetryGroup_is_a_nontr, __pyx_k_If_the_SymmetryGroup_is_a_nontr, sizeof(__pyx_k_If_the_SymmetryGroup_is_a_nontr), 0, 1, 0, 0},
    {&__pyx_kp_u_If_the_manifold_is_the_compleme, __pyx_k_If_the_manifold_is_the_compleme, sizeof(__pyx_k_If_the_manifold_is_the_compleme), 0, 1, 0, 0},
    {&__pyx_kp_u_If_the_symmetry_group_is_abelia, __pyx_k_If_the_symmetry_group_is_abelia, sizeof(__pyx_k_If_the_symmetry_group_is_abelia), 0, 1, 0, 0},
    {&__pyx_kp_s_If_there_is_more_than_one_cusp_y, __pyx_k_If_there_is_more_than_one_cusp_y, sizeof(__pyx_k_If_there_is_more_than_one_cusp_y), 0, 0, 1, 0},
    {&__pyx_kp_u_If_this_triangulation_is_a_subd, __pyx_k_If_this_triangulation_is_a_subd, sizeof(__pyx_k_If_this_triangulation_is_a_subd), 0, 1, 0, 0},
    {&__pyx_n_s_Image, __pyx_k_Image, sizeof(__pyx_k_Image), 0, 0, 1, 1},
    {&__pyx_kp_s_Immutable_dictionary_whose_data, __pyx_k_Immutable_dictionary_whose_data, sizeof(__pyx_k_Immutable_dictionary_whose_data), 0, 0, 1, 0},
    {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
    {&__pyx_kp_u_In_the_default_mode_this_functi, __pyx_k_In_the_default_mode_this_functi, sizeof(__pyx_k_In_the_default_mode_this_functi), 0, 1, 0, 0},
    {&__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_n_s_Index, __pyx_k_Index, sizeof(__pyx_k_Index), 0, 0, 1, 1},
    {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
    {&__pyx_kp_s_Index_is_out_of_range, __pyx_k_Index_is_out_of_range, sizeof(__pyx_k_Index_is_out_of_range), 0, 0, 1, 0},
    {&__pyx_n_s_Info, __pyx_k_Info, sizeof(__pyx_k_Info), 0, 0, 1, 1},
    {&__pyx_n_s_Info___init, __pyx_k_Info___init, sizeof(__pyx_k_Info___init), 0, 0, 1, 1},
    {&__pyx_n_s_Info__immutable, __pyx_k_Info__immutable, sizeof(__pyx_k_Info__immutable), 0, 0, 1, 1},
    {&__pyx_n_s_Info_keys, __pyx_k_Info_keys, sizeof(__pyx_k_Info_keys), 0, 0, 1, 1},
    {&__pyx_kp_s_Info_objects_are_immutable, __pyx_k_Info_objects_are_immutable, sizeof(__pyx_k_Info_objects_are_immutable), 0, 0, 1, 0},
    {&__pyx_n_s_Integer, __pyx_k_Integer, sizeof(__pyx_k_Integer), 0, 0, 1, 1},
    {&__pyx_kp_s_Invalid_generator_status, __pyx_k_Invalid_generator_status, sizeof(__pyx_k_Invalid_generator_status), 0, 0, 1, 0},
    {&__pyx_kp_s_Invalid_permutation_data, __pyx_k_Invalid_permutation_data, sizeof(__pyx_k_Invalid_permutation_data), 0, 0, 1, 0},
    {&__pyx_kp_s_Invalid_pickle_byte_sequence, __pyx_k_Invalid_pickle_byte_sequence, sizeof(__pyx_k_Invalid_pickle_byte_sequence), 0, 0, 1, 0},
    {&__pyx_n_s_IsSubgroupFpGroup, __pyx_k_IsSubgroupFpGroup, sizeof(__pyx_k_IsSubgroupFpGroup), 0, 0, 1, 1},
    {&__pyx_n_s_IsToPermGroupHomomorphismByImage, __pyx_k_IsToPermGroupHomomorphismByImage, sizeof(__pyx_k_IsToPermGroupHomomorphismByImage), 0, 0, 1, 1},
    {&__pyx_n_s_Isometry, __pyx_k_Isometry, sizeof(__pyx_k_Isometry), 0, 0, 1, 1},
    {&__pyx_n_s_Isometry___init, __pyx_k_Isometry___init, sizeof(__pyx_k_Isometry___init), 0, 0, 1, 1},
    {&__pyx_n_s_Isometry___repr, __pyx_k_Isometry___repr, sizeof(__pyx_k_Isometry___repr), 0, 0, 1, 1},
    {&__pyx_n_s_Isometry_cusp_images, __pyx_k_Isometry_cusp_images, sizeof(__pyx_k_Isometry_cusp_images), 0, 0, 1, 1},
    {&__pyx_n_s_Isometry_cusp_maps, __pyx_k_Isometry_cusp_maps, sizeof(__pyx_k_Isometry_cusp_maps), 0, 0, 1, 1},
    {&__pyx_n_s_Isometry_extends_to_link, __pyx_k_Isometry_extends_to_link, sizeof(__pyx_k_Isometry_extends_to_link), 0, 0, 1, 1},
    {&__pyx_n_s_Isometry_num_cusps, __pyx_k_Isometry_num_cusps, sizeof(__pyx_k_Isometry_num_cusps), 0, 0, 1, 1},
    {&__pyx_kp_s_Iterator_Sequence_for_Alternati, __pyx_k_Iterator_Sequence_for_Alternati, sizeof(__pyx_k_Iterator_Sequence_for_Alternati), 0, 0, 1, 0},
    {&__pyx_kp_s_Iterator_Sequence_for_nonAltern, __pyx_k_Iterator_Sequence_for_nonAltern, sizeof(__pyx_k_Iterator_Sequence_for_nonAltern), 0, 0, 1, 0},
    {&__pyx_n_s_K7_1, __pyx_k_K7_1, sizeof(__pyx_k_K7_1), 0, 0, 1, 1},
    {&__pyx_n_s_KLPProjection, __pyx_k_KLPProjection, sizeof(__pyx_k_KLPProjection), 0, 0, 1, 1},
    {&__pyx_kp_s_K_s__s, __pyx_k_K_s__s, sizeof(__pyx_k_K_s__s), 0, 0, 1, 0},
    {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
    {&__pyx_n_s_Klein, __pyx_k_Klein, sizeof(__pyx_k_Klein), 0, 0, 1, 1},
    {&__pyx_kp_s_Klein_bottle_cusp, __pyx_k_Klein_bottle_cusp, sizeof(__pyx_k_Klein_bottle_cusp), 0, 0, 1, 0},
    {&__pyx_n_s_KnotExteriors, __pyx_k_KnotExteriors, sizeof(__pyx_k_KnotExteriors), 0, 0, 1, 1},
    {&__pyx_n_s_KnotExteriors___getitem, __pyx_k_KnotExteriors___getitem, sizeof(__pyx_k_KnotExteriors___getitem), 0, 0, 1, 1},
    {&__pyx_n_s_KnotExteriors___init, __pyx_k_KnotExteriors___init, sizeof(__pyx_k_KnotExteriors___init), 0, 0, 1, 1},
    {&__pyx_kp_s_Knots_in_S_3_which_appear_in_the, __pyx_k_Knots_in_S_3_which_appear_in_the, sizeof(__pyx_k_Knots_in_S_3_which_appear_in_the), 0, 0, 1, 0},
    {&__pyx_n_s_L, __pyx_k_L, sizeof(__pyx_k_L), 0, 0, 1, 1},
    {&__pyx_n_s_L104001, __pyx_k_L104001, sizeof(__pyx_k_L104001), 0, 0, 1, 1},
    {&__pyx_n_s_L13n9331, __pyx_k_L13n9331, sizeof(__pyx_k_L13n9331), 0, 0, 1, 1},
    {&__pyx_kp_s_L13n9331_3_4_2_3_2_1, __pyx_k_L13n9331_3_4_2_3_2_1, sizeof(__pyx_k_L13n9331_3_4_2_3_2_1), 0, 0, 1, 0},
    {&__pyx_n_s_LE, __pyx_k_LE, sizeof(__pyx_k_LE), 0, 0, 1, 1},
    {&__pyx_kp_s_L_d_2d_3d, __pyx_k_L_d_2d_3d, sizeof(__pyx_k_L_d_2d_3d), 0, 0, 1, 0},
    {&__pyx_n_s_LengthSpectrum, __pyx_k_LengthSpectrum, sizeof(__pyx_k_LengthSpectrum), 0, 0, 1, 1},
    {&__pyx_n_s_LengthSpectrumFormatString, __pyx_k_LengthSpectrumFormatString, sizeof(__pyx_k_LengthSpectrumFormatString), 0, 0, 1, 1},
    {&__pyx_n_s_LengthSpectrumFormatStringBase, __pyx_k_LengthSpectrumFormatStringBase, sizeof(__pyx_k_LengthSpectrumFormatStringBase), 0, 0, 1, 1},
    {&__pyx_n_s_LengthSpectrumFormatStringWithWo, __pyx_k_LengthSpectrumFormatStringWithWo, sizeof(__pyx_k_LengthSpectrumFormatStringWithWo), 0, 0, 1, 1},
    {&__pyx_n_s_LengthSpectrumInfo, __pyx_k_LengthSpectrumInfo, sizeof(__pyx_k_LengthSpectrumInfo), 0, 0, 1, 1},
    {&__pyx_n_s_LengthSpectrumInfo___repr, __pyx_k_LengthSpectrumInfo___repr, sizeof(__pyx_k_LengthSpectrumInfo___repr), 0, 0, 1, 1},
    {&__pyx_n_s_LengthSpectrum___repr, __pyx_k_LengthSpectrum___repr, sizeof(__pyx_k_LengthSpectrum___repr), 0, 0, 1, 1},
    {&__pyx_n_s_Link, __pyx_k_Link, sizeof(__pyx_k_Link), 0, 0, 1, 1},
    {&__pyx_n_s_LinkEditor, __pyx_k_LinkEditor, sizeof(__pyx_k_LinkEditor), 0, 0, 1, 1},
    {&__pyx_n_s_LinkExteriors, __pyx_k_LinkExteriors, sizeof(__pyx_k_LinkExteriors), 0, 0, 1, 1},
    {&__pyx_n_s_LinkManager, __pyx_k_LinkManager, sizeof(__pyx_k_LinkManager), 0, 0, 1, 1},
    {&__pyx_kp_s_Link_Projection, __pyx_k_Link_Projection, sizeof(__pyx_k_Link_Projection), 0, 0, 1, 0},
    {&__pyx_n_s_ListOnePerLine, __pyx_k_ListOnePerLine, sizeof(__pyx_k_ListOnePerLine), 0, 0, 1, 1},
    {&__pyx_n_s_ListOnePerLine___repr, __pyx_k_ListOnePerLine___repr, sizeof(__pyx_k_ListOnePerLine___repr), 0, 0, 1, 1},
    {&__pyx_n_s_LowIndexSubgroups, __pyx_k_LowIndexSubgroups, sizeof(__pyx_k_LowIndexSubgroups), 0, 0, 1, 1},
    {&__pyx_n_s_LowIndexSubgroupsFpGroup, __pyx_k_LowIndexSubgroupsFpGroup, sizeof(__pyx_k_LowIndexSubgroupsFpGroup), 0, 0, 1, 1},
    {&__pyx_n_s_M, __pyx_k_M, sizeof(__pyx_k_M), 0, 0, 1, 1},
    {&__pyx_n_s_M0, __pyx_k_M0, sizeof(__pyx_k_M0), 0, 0, 1, 1},
    {&__pyx_n_s_M1, __pyx_k_M1, sizeof(__pyx_k_M1), 0, 0, 1, 1},
    {&__pyx_n_s_MTLinks, __pyx_k_MTLinks, sizeof(__pyx_k_MTLinks), 0, 0, 1, 1},
    {&__pyx_kp_u_M_cover_permutation_rep_Returns, __pyx_k_M_cover_permutation_rep_Returns, sizeof(__pyx_k_M_cover_permutation_rep_Returns), 0, 1, 0, 0},
    {&__pyx_kp_u_M_covers_degree_method_None_cov, __pyx_k_M_covers_degree_method_None_cov, sizeof(__pyx_k_M_covers_degree_method_None_cov), 0, 1, 0, 0},
    {&__pyx_kp_u_M_covers_degree_method_None_cov_2, __pyx_k_M_covers_degree_method_None_cov_2, sizeof(__pyx_k_M_covers_degree_method_None_cov_2), 0, 1, 0, 0},
    {&__pyx_kp_u_M_gluing_equations_pgl_N_2_equa, __pyx_k_M_gluing_equations_pgl_N_2_equa, sizeof(__pyx_k_M_gluing_equations_pgl_N_2_equa), 0, 1, 0, 0},
    {&__pyx_kp_u_M_ptolemy_generalized_obstructi, __pyx_k_M_ptolemy_generalized_obstructi, sizeof(__pyx_k_M_ptolemy_generalized_obstructi), 0, 1, 0, 0},
    {&__pyx_kp_u_M_ptolemy_variety_N_obstruction, __pyx_k_M_ptolemy_variety_N_obstruction, sizeof(__pyx_k_M_ptolemy_variety_N_obstruction), 0, 1, 0, 0},
    {&__pyx_n_s_MagmaElement, __pyx_k_MagmaElement, sizeof(__pyx_k_MagmaElement), 0, 0, 1, 1},
    {&__pyx_n_s_Manifold, __pyx_k_Manifold, sizeof(__pyx_k_Manifold), 0, 0, 1, 1},
    {&__pyx_n_s_Manifold__canonical_cells_are_te, __pyx_k_Manifold__canonical_cells_are_te, sizeof(__pyx_k_Manifold__canonical_cells_are_te), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold__canonical_cells_are_te_2, __pyx_k_Manifold__canonical_cells_are_te_2, sizeof(__pyx_k_Manifold__canonical_cells_are_te_2), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold__canonical_retriangulat, __pyx_k_Manifold__canonical_retriangulat, sizeof(__pyx_k_Manifold__canonical_retriangulat), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold__canonical_retriangulat_2, __pyx_k_Manifold__canonical_retriangulat_2, sizeof(__pyx_k_Manifold__canonical_retriangulat_2), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold__choose_generators, __pyx_k_Manifold__choose_generators, sizeof(__pyx_k_Manifold__choose_generators), 0, 0, 1, 1},
    {&__pyx_n_s_Manifold__choose_generators_info, __pyx_k_Manifold__choose_generators_info, sizeof(__pyx_k_Manifold__choose_generators_info), 0, 0, 1, 1},
    {&__pyx_n_s_Manifold__complex_volume, __pyx_k_Manifold__complex_volume, sizeof(__pyx_k_Manifold__complex_volume), 0, 0, 1, 1},
    {&__pyx_n_s_Manifold__cusp_cross_section_inf, __pyx_k_Manifold__cusp_cross_section_inf, sizeof(__pyx_k_Manifold__cusp_cross_section_inf), 0, 0, 1, 1},
    {&__pyx_n_s_Manifold__from_bytes, __pyx_k_Manifold__from_bytes, sizeof(__pyx_k_Manifold__from_bytes), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold__from_bytes_line_272, __pyx_k_Manifold__from_bytes_line_272, sizeof(__pyx_k_Manifold__from_bytes_line_272), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold__from_isosig, __pyx_k_Manifold__from_isosig, sizeof(__pyx_k_Manifold__from_isosig), 0, 0, 1, 1},
    {&__pyx_n_s_Manifold__from_string, __pyx_k_Manifold__from_string, sizeof(__pyx_k_Manifold__from_string), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold__from_string_line_256, __pyx_k_Manifold__from_string_line_256, sizeof(__pyx_k_Manifold__from_string_line_256), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold__get_tetrahedra_shapes, __pyx_k_Manifold__get_tetrahedra_shapes, sizeof(__pyx_k_Manifold__get_tetrahedra_shapes), 0, 0, 1, 1},
    {&__pyx_n_s_Manifold__identify, __pyx_k_Manifold__identify, sizeof(__pyx_k_Manifold__identify), 0, 0, 1, 1},
    {&__pyx_n_s_Manifold__number, __pyx_k_Manifold__number, sizeof(__pyx_k_Manifold__number), 0, 0, 1, 1},
    {&__pyx_n_s_Manifold__polish_hyperbolic_stru, __pyx_k_Manifold__polish_hyperbolic_stru, sizeof(__pyx_k_Manifold__polish_hyperbolic_stru), 0, 0, 1, 1},
    {&__pyx_n_s_Manifold_browse, __pyx_k_Manifold_browse, sizeof(__pyx_k_Manifold_browse), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_browse_line_375, __pyx_k_Manifold_browse_line_375, sizeof(__pyx_k_Manifold_browse_line_375), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_canonize, __pyx_k_Manifold_canonize, sizeof(__pyx_k_Manifold_canonize), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_canonize_line_145, __pyx_k_Manifold_canonize_line_145, sizeof(__pyx_k_Manifold_canonize_line_145), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_chern_simons, __pyx_k_Manifold_chern_simons, sizeof(__pyx_k_Manifold_chern_simons), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_chern_simons_line_807, __pyx_k_Manifold_chern_simons_line_807, sizeof(__pyx_k_Manifold_chern_simons_line_807), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_copy, __pyx_k_Manifold_copy, sizeof(__pyx_k_Manifold_copy), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_copy_line_297, __pyx_k_Manifold_copy_line_297, sizeof(__pyx_k_Manifold_copy_line_297), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_cover, __pyx_k_Manifold_cover, sizeof(__pyx_k_Manifold_cover), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_cover_line_535, __pyx_k_Manifold_cover_line_535, sizeof(__pyx_k_Manifold_cover_line_535), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_covers, __pyx_k_Manifold_covers, sizeof(__pyx_k_Manifold_covers), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_covers_line_607, __pyx_k_Manifold_covers_line_607, sizeof(__pyx_k_Manifold_covers_line_607), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_cusp_info, __pyx_k_Manifold_cusp_info, sizeof(__pyx_k_Manifold_cusp_info), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_cusp_info_line_1108, __pyx_k_Manifold_cusp_info_line_1108, sizeof(__pyx_k_Manifold_cusp_info_line_1108), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_cusp_neighborhood, __pyx_k_Manifold_cusp_neighborhood, sizeof(__pyx_k_Manifold_cusp_neighborhood), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_cusp_neighborhood_line, __pyx_k_Manifold_cusp_neighborhood_line, sizeof(__pyx_k_Manifold_cusp_neighborhood_line), 0, 1, 0, 0},
    {&__pyx_kp_s_Manifold_dehn_fill, __pyx_k_Manifold_dehn_fill, sizeof(__pyx_k_Manifold_dehn_fill), 0, 0, 1, 0},
    {&__pyx_kp_u_Manifold_dehn_fill_line_1231, __pyx_k_Manifold_dehn_fill_line_1231, sizeof(__pyx_k_Manifold_dehn_fill_line_1231), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_dirichlet_domain, __pyx_k_Manifold_dirichlet_domain, sizeof(__pyx_k_Manifold_dirichlet_domain), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_dirichlet_domain_line_3, __pyx_k_Manifold_dirichlet_domain_line_3, sizeof(__pyx_k_Manifold_dirichlet_domain_line_3), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_drill, __pyx_k_Manifold_drill, sizeof(__pyx_k_Manifold_drill), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_drill_line_1485, __pyx_k_Manifold_drill_line_1485, sizeof(__pyx_k_Manifold_drill_line_1485), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_dual_curves, __pyx_k_Manifold_dual_curves, sizeof(__pyx_k_Manifold_dual_curves), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_dual_curves_line_1383, __pyx_k_Manifold_dual_curves_line_1383, sizeof(__pyx_k_Manifold_dual_curves_line_1383), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_filled_triangulation, __pyx_k_Manifold_filled_triangulation, sizeof(__pyx_k_Manifold_filled_triangulation), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_filled_triangulation_li, __pyx_k_Manifold_filled_triangulation_li, sizeof(__pyx_k_Manifold_filled_triangulation_li), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_from_Triangulation, __pyx_k_Manifold_from_Triangulation, sizeof(__pyx_k_Manifold_from_Triangulation), 0, 0, 1, 1},
    {&__pyx_n_s_Manifold_fundamental_group, __pyx_k_Manifold_fundamental_group, sizeof(__pyx_k_Manifold_fundamental_group), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_fundamental_group_line, __pyx_k_Manifold_fundamental_group_line, sizeof(__pyx_k_Manifold_fundamental_group_line), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_init_hyperbolic_structu, __pyx_k_Manifold_init_hyperbolic_structu, sizeof(__pyx_k_Manifold_init_hyperbolic_structu), 0, 0, 1, 1},
    {&__pyx_n_s_Manifold_is_isometric_to, __pyx_k_Manifold_is_isometric_to, sizeof(__pyx_k_Manifold_is_isometric_to), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_is_isometric_to_line_15, __pyx_k_Manifold_is_isometric_to_line_15, sizeof(__pyx_k_Manifold_is_isometric_to_line_15), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_is_two_bridge, __pyx_k_Manifold_is_two_bridge, sizeof(__pyx_k_Manifold_is_two_bridge), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_is_two_bridge_line_1616, __pyx_k_Manifold_is_two_bridge_line_1616, sizeof(__pyx_k_Manifold_is_two_bridge_line_1616), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_length_spectrum, __pyx_k_Manifold_length_spectrum, sizeof(__pyx_k_Manifold_length_spectrum), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_length_spectrum_line_14, __pyx_k_Manifold_length_spectrum_line_14, sizeof(__pyx_k_Manifold_length_spectrum_line_14), 0, 1, 0, 0},
    {&__pyx_kp_s_Manifold_must_be_pickled_with__t, __pyx_k_Manifold_must_be_pickled_with__t, sizeof(__pyx_k_Manifold_must_be_pickled_with__t), 0, 0, 1, 0},
    {&__pyx_kp_s_Manifold_set_peripheral_curves, __pyx_k_Manifold_set_peripheral_curves, sizeof(__pyx_k_Manifold_set_peripheral_curves), 0, 0, 1, 0},
    {&__pyx_kp_u_Manifold_set_peripheral_curves_l, __pyx_k_Manifold_set_peripheral_curves_l, sizeof(__pyx_k_Manifold_set_peripheral_curves_l), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_set_target_holonomy, __pyx_k_Manifold_set_target_holonomy, sizeof(__pyx_k_Manifold_set_target_holonomy), 0, 0, 1, 1},
    {&__pyx_kp_s_Manifold_set_tetrahedra_shapes, __pyx_k_Manifold_set_tetrahedra_shapes, sizeof(__pyx_k_Manifold_set_tetrahedra_shapes), 0, 0, 1, 0},
    {&__pyx_n_s_Manifold_solution_type, __pyx_k_Manifold_solution_type, sizeof(__pyx_k_Manifold_solution_type), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_solution_type_line_1048, __pyx_k_Manifold_solution_type_line_1048, sizeof(__pyx_k_Manifold_solution_type_line_1048), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_split, __pyx_k_Manifold_split, sizeof(__pyx_k_Manifold_split), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_split_line_1736, __pyx_k_Manifold_split_line_1736, sizeof(__pyx_k_Manifold_split_line_1736), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_splitting_surfaces, __pyx_k_Manifold_splitting_surfaces, sizeof(__pyx_k_Manifold_splitting_surfaces), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_splitting_surfaces_line, __pyx_k_Manifold_splitting_surfaces_line, sizeof(__pyx_k_Manifold_splitting_surfaces_line), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_symmetric_triangulation, __pyx_k_Manifold_symmetric_triangulation, sizeof(__pyx_k_Manifold_symmetric_triangulation), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_symmetric_triangulation_2, __pyx_k_Manifold_symmetric_triangulation_2, sizeof(__pyx_k_Manifold_symmetric_triangulation_2), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_symmetry_group, __pyx_k_Manifold_symmetry_group, sizeof(__pyx_k_Manifold_symmetry_group), 0, 0, 1, 1},
    {&__pyx_n_s_Manifold_tetrahedra_shapes, __pyx_k_Manifold_tetrahedra_shapes, sizeof(__pyx_k_Manifold_tetrahedra_shapes), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_tetrahedra_shapes_line, __pyx_k_Manifold_tetrahedra_shapes_line, sizeof(__pyx_k_Manifold_tetrahedra_shapes_line), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_use_field_conversion, __pyx_k_Manifold_use_field_conversion, sizeof(__pyx_k_Manifold_use_field_conversion), 0, 0, 1, 1},
    {&__pyx_n_s_Manifold_volume, __pyx_k_Manifold_volume, sizeof(__pyx_k_Manifold_volume), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_volume_line_714, __pyx_k_Manifold_volume_line_714, sizeof(__pyx_k_Manifold_volume_line_714), 0, 1, 0, 0},
    {&__pyx_n_s_Manifold_without_hyperbolic_stru, __pyx_k_Manifold_without_hyperbolic_stru, sizeof(__pyx_k_Manifold_without_hyperbolic_stru), 0, 0, 1, 1},
    {&__pyx_kp_u_Manifold_without_hyperbolic_stru_2, __pyx_k_Manifold_without_hyperbolic_stru_2, sizeof(__pyx_k_Manifold_without_hyperbolic_stru_2), 0, 1, 0, 0},
    {&__pyx_kp_s_Manifolds_must_be_non_empty, __pyx_k_Manifolds_must_be_non_empty, sizeof(__pyx_k_Manifolds_must_be_non_empty), 0, 0, 1, 0},
    {&__pyx_n_s_MatrixParity, __pyx_k_MatrixParity, sizeof(__pyx_k_MatrixParity), 0, 0, 1, 1},
    {&__pyx_n_s_MatrixWithExplanations, __pyx_k_MatrixWithExplanations, sizeof(__pyx_k_MatrixWithExplanations), 0, 0, 1, 1},
    {&__pyx_n_s_MatrixWithExplanations___init, __pyx_k_MatrixWithExplanations___init, sizeof(__pyx_k_MatrixWithExplanations___init), 0, 0, 1, 1},
    {&__pyx_n_s_MatrixWithExplanations___repr, __pyx_k_MatrixWithExplanations___repr, sizeof(__pyx_k_MatrixWithExplanations___repr), 0, 0, 1, 1},
    {&__pyx_n_s_MatrixWithExplanations___repr_2, __pyx_k_MatrixWithExplanations___repr_2, sizeof(__pyx_k_MatrixWithExplanations___repr_2), 0, 0, 1, 1},
    {&__pyx_n_s_MorwenLinks, __pyx_k_MorwenLinks, sizeof(__pyx_k_MorwenLinks), 0, 0, 1, 1},
    {&__pyx_n_s_MorwenLinks___init, __pyx_k_MorwenLinks___init, sizeof(__pyx_k_MorwenLinks___init), 0, 0, 1, 1},
    {&__pyx_n_s_MsgIO, __pyx_k_MsgIO, sizeof(__pyx_k_MsgIO), 0, 0, 1, 1},
    {&__pyx_n_s_MsgIO___init, __pyx_k_MsgIO___init, sizeof(__pyx_k_MsgIO___init), 0, 0, 1, 1},
    {&__pyx_n_s_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 0, 1, 1},
    {&__pyx_kp_s_N_has_to_be_2_15, __pyx_k_N_has_to_be_2_15, sizeof(__pyx_k_N_has_to_be_2_15), 0, 0, 1, 0},
    {&__pyx_n_s_NeumannZagierTypeEquations, __pyx_k_NeumannZagierTypeEquations, sizeof(__pyx_k_NeumannZagierTypeEquations), 0, 0, 1, 1},
    {&__pyx_n_s_NeumannZagierTypeEquations___ini, __pyx_k_NeumannZagierTypeEquations___ini, sizeof(__pyx_k_NeumannZagierTypeEquations___ini), 0, 0, 1, 1},
    {&__pyx_n_s_NeumannZagierTypeEquations___rep, __pyx_k_NeumannZagierTypeEquations___rep, sizeof(__pyx_k_NeumannZagierTypeEquations___rep), 0, 0, 1, 1},
    {&__pyx_kp_s_New_triangulation_received_from, __pyx_k_New_triangulation_received_from, sizeof(__pyx_k_New_triangulation_received_from), 0, 0, 1, 0},
    {&__pyx_kp_s_No_associated_link_known, __pyx_k_No_associated_link_known, sizeof(__pyx_k_No_associated_link_known), 0, 0, 1, 0},
    {&__pyx_kp_s_No_tetrahedra_data_provided, __pyx_k_No_tetrahedra_data_provided, sizeof(__pyx_k_No_tetrahedra_data_provided), 0, 0, 1, 0},
    {&__pyx_kp_s_Non_orientable, __pyx_k_Non_orientable, sizeof(__pyx_k_Non_orientable), 0, 0, 1, 0},
    {&__pyx_n_s_NonalternatingKnotExteriors, __pyx_k_NonalternatingKnotExteriors, sizeof(__pyx_k_NonalternatingKnotExteriors), 0, 0, 1, 1},
    {&__pyx_n_s_NonalternatingKnotExteriors___in, __pyx_k_NonalternatingKnotExteriors___in, sizeof(__pyx_k_NonalternatingKnotExteriors___in), 0, 0, 1, 1},
    {&__pyx_n_s_Nonalternating_numbers, __pyx_k_Nonalternating_numbers, sizeof(__pyx_k_Nonalternating_numbers), 0, 0, 1, 1},
    {&__pyx_n_s_Nonalternating_offsets, __pyx_k_Nonalternating_offsets, sizeof(__pyx_k_Nonalternating_offsets), 0, 0, 1, 1},
    {&__pyx_n_s_Nonalternating_table, __pyx_k_Nonalternating_table, sizeof(__pyx_k_Nonalternating_table), 0, 0, 1, 1},
    {&__pyx_n_s_Nonorientable_lengths, __pyx_k_Nonorientable_lengths, sizeof(__pyx_k_Nonorientable_lengths), 0, 0, 1, 1},
    {&__pyx_n_s_NormalSurfaceInfo, __pyx_k_NormalSurfaceInfo, sizeof(__pyx_k_NormalSurfaceInfo), 0, 0, 1, 1},
    {&__pyx_n_s_NormalSurfaceInfo___repr, __pyx_k_NormalSurfaceInfo___repr, sizeof(__pyx_k_NormalSurfaceInfo___repr), 0, 0, 1, 1},
    {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1},
    {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
    {&__pyx_kp_s_Not_a_valid_permutation, __pyx_k_Not_a_valid_permutation, sizeof(__pyx_k_Not_a_valid_permutation), 0, 0, 1, 0},
    {&__pyx_kp_s_Not_within_Sage, __pyx_k_Not_within_Sage, sizeof(__pyx_k_Not_within_Sage), 0, 0, 1, 0},
    {&__pyx_n_s_Num_Alternating, __pyx_k_Num_Alternating, sizeof(__pyx_k_Num_Alternating), 0, 0, 1, 1},
    {&__pyx_n_s_Num_Nonalternating, __pyx_k_Num_Nonalternating, sizeof(__pyx_k_Num_Nonalternating), 0, 0, 1, 1},
    {&__pyx_n_s_Number, __pyx_k_Number, sizeof(__pyx_k_Number), 0, 0, 1, 1},
    {&__pyx_kp_s_Number_of_opacities_does_not_mat, __pyx_k_Number_of_opacities_does_not_mat, sizeof(__pyx_k_Number_of_opacities_does_not_mat), 0, 0, 1, 0},
    {&__pyx_kp_s_Number_of_permutations_is_not_th, __pyx_k_Number_of_permutations_is_not_th, sizeof(__pyx_k_Number_of_permutations_is_not_th), 0, 0, 1, 0},
    {&__pyx_n_s_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 1, 1},
    {&__pyx_n_s_O31, __pyx_k_O31, sizeof(__pyx_k_O31), 0, 0, 1, 1},
    {&__pyx_n_s_O31_generators, __pyx_k_O31_generators, sizeof(__pyx_k_O31_generators), 0, 0, 1, 1},
    {&__pyx_n_s_ObsCensusKnots, __pyx_k_ObsCensusKnots, sizeof(__pyx_k_ObsCensusKnots), 0, 0, 1, 1},
    {&__pyx_n_s_ObsCensusKnots___getitem, __pyx_k_ObsCensusKnots___getitem, sizeof(__pyx_k_ObsCensusKnots___getitem), 0, 0, 1, 1},
    {&__pyx_n_s_ObsCensusKnots___init, __pyx_k_ObsCensusKnots___init, sizeof(__pyx_k_ObsCensusKnots___init), 0, 0, 1, 1},
    {&__pyx_n_s_ObsCensusKnots___repr, __pyx_k_ObsCensusKnots___repr, sizeof(__pyx_k_ObsCensusKnots___repr), 0, 0, 1, 1},
    {&__pyx_n_s_ObsLinkExteriors, __pyx_k_ObsLinkExteriors, sizeof(__pyx_k_ObsLinkExteriors), 0, 0, 1, 1},
    {&__pyx_n_s_ObsLinkExteriors___getitem, __pyx_k_ObsLinkExteriors___getitem, sizeof(__pyx_k_ObsLinkExteriors___getitem), 0, 0, 1, 1},
    {&__pyx_n_s_ObsLinkExteriors___init, __pyx_k_ObsLinkExteriors___init, sizeof(__pyx_k_ObsLinkExteriors___init), 0, 0, 1, 1},
    {&__pyx_n_s_ObsLinkExteriors___repr, __pyx_k_ObsLinkExteriors___repr, sizeof(__pyx_k_ObsLinkExteriors___repr), 0, 0, 1, 1},
    {&__pyx_n_s_ObsMorwenLinks, __pyx_k_ObsMorwenLinks, sizeof(__pyx_k_ObsMorwenLinks), 0, 0, 1, 1},
    {&__pyx_n_s_ObsMorwenLinks___getitem, __pyx_k_ObsMorwenLinks___getitem, sizeof(__pyx_k_ObsMorwenLinks___getitem), 0, 0, 1, 1},
    {&__pyx_n_s_ObsMorwenLinks___init, __pyx_k_ObsMorwenLinks___init, sizeof(__pyx_k_ObsMorwenLinks___init), 0, 0, 1, 1},
    {&__pyx_n_s_ObsNonorientableClosedCensus, __pyx_k_ObsNonorientableClosedCensus, sizeof(__pyx_k_ObsNonorientableClosedCensus), 0, 0, 1, 1},
    {&__pyx_n_s_ObsNonorientableClosedCensus___g, __pyx_k_ObsNonorientableClosedCensus___g, sizeof(__pyx_k_ObsNonorientableClosedCensus___g), 0, 0, 1, 1},
    {&__pyx_n_s_ObsNonorientableClosedCensus___i, __pyx_k_ObsNonorientableClosedCensus___i, sizeof(__pyx_k_ObsNonorientableClosedCensus___i), 0, 0, 1, 1},
    {&__pyx_n_s_ObsNonorientableCuspedCensus, __pyx_k_ObsNonorientableCuspedCensus, sizeof(__pyx_k_ObsNonorientableCuspedCensus), 0, 0, 1, 1},
    {&__pyx_n_s_ObsNonorientableCuspedCensus___i, __pyx_k_ObsNonorientableCuspedCensus___i, sizeof(__pyx_k_ObsNonorientableCuspedCensus___i), 0, 0, 1, 1},
    {&__pyx_n_s_ObsNonorientableCuspedCensus_loo, __pyx_k_ObsNonorientableCuspedCensus_loo, sizeof(__pyx_k_ObsNonorientableCuspedCensus_loo), 0, 0, 1, 1},
    {&__pyx_n_s_ObsOrientableClosedCensus, __pyx_k_ObsOrientableClosedCensus, sizeof(__pyx_k_ObsOrientableClosedCensus), 0, 0, 1, 1},
    {&__pyx_n_s_ObsOrientableClosedCensus___geti, __pyx_k_ObsOrientableClosedCensus___geti, sizeof(__pyx_k_ObsOrientableClosedCensus___geti), 0, 0, 1, 1},
    {&__pyx_n_s_ObsOrientableClosedCensus___init, __pyx_k_ObsOrientableClosedCensus___init, sizeof(__pyx_k_ObsOrientableClosedCensus___init), 0, 0, 1, 1},
    {&__pyx_n_s_ObsOrientableCuspedCensus, __pyx_k_ObsOrientableCuspedCensus, sizeof(__pyx_k_ObsOrientableCuspedCensus), 0, 0, 1, 1},
    {&__pyx_kp_s_Obsolete, __pyx_k_Obsolete, sizeof(__pyx_k_Obsolete), 0, 0, 1, 0},
    {&__pyx_kp_s_Obsolete_2, __pyx_k_Obsolete_2, sizeof(__pyx_k_Obsolete_2), 0, 0, 1, 0},
    {&__pyx_kp_s_Obstruction_class_has_wrong_leng, __pyx_k_Obstruction_class_has_wrong_leng, sizeof(__pyx_k_Obstruction_class_has_wrong_leng), 0, 0, 1, 0},
    {&__pyx_kp_u_Opens_browser_window_with_a_gra, __pyx_k_Opens_browser_window_with_a_gra, sizeof(__pyx_k_Opens_browser_window_with_a_gra), 0, 1, 0, 0},
    {&__pyx_n_s_Orbifold1, __pyx_k_Orbifold1, sizeof(__pyx_k_Orbifold1), 0, 0, 1, 1},
    {&__pyx_n_s_Orientability, __pyx_k_Orientability, sizeof(__pyx_k_Orientability), 0, 0, 1, 1},
    {&__pyx_n_s_Orientable, __pyx_k_Orientable, sizeof(__pyx_k_Orientable), 0, 0, 1, 1},
    {&__pyx_n_s_Orientable_lengths, __pyx_k_Orientable_lengths, sizeof(__pyx_k_Orientable_lengths), 0, 0, 1, 1},
    {&__pyx_kp_s_Out_of_memory, __pyx_k_Out_of_memory, sizeof(__pyx_k_Out_of_memory), 0, 0, 1, 0},
    {&__pyx_n_s_PD_code, __pyx_k_PD_code, sizeof(__pyx_k_PD_code), 0, 0, 1, 1},
    {&__pyx_kp_s_PLink_was_not_imported, __pyx_k_PLink_was_not_imported, sizeof(__pyx_k_PLink_was_not_imported), 0, 0, 1, 0},
    {&__pyx_kp_s_P_crossings_0_9_P_alternation_a, __pyx_k_P_crossings_0_9_P_alternation_a, sizeof(__pyx_k_P_crossings_0_9_P_alternation_a), 0, 0, 1, 0},
    {&__pyx_kp_s_P_crossings_0_9_P_components_0, __pyx_k_P_crossings_0_9_P_components_0, sizeof(__pyx_k_P_crossings_0_9_P_components_0), 0, 0, 1, 0},
    {&__pyx_kp_s_P_crossings_0_9___P_index_0_9_P, __pyx_k_P_crossings_0_9___P_index_0_9_P, sizeof(__pyx_k_P_crossings_0_9___P_index_0_9_P), 0, 0, 1, 0},
    {&__pyx_kp_u_Perform_random_Pachner_moves_on, __pyx_k_Perform_random_Pachner_moves_on, sizeof(__pyx_k_Perform_random_Pachner_moves_on), 0, 1, 0, 0},
    {&__pyx_n_s_PermutationGroup, __pyx_k_PermutationGroup, sizeof(__pyx_k_PermutationGroup), 0, 0, 1, 1},
    {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
    {&__pyx_kp_s_Please_specify_a_file_name, __pyx_k_Please_specify_a_file_name, sizeof(__pyx_k_Please_specify_a_file_name), 0, 0, 1, 0},
    {&__pyx_kp_s_Please_specify_filled_or_complet, __pyx_k_Please_specify_filled_or_complet, sizeof(__pyx_k_Please_specify_filled_or_complet), 0, 0, 1, 0},
    {&__pyx_n_s_PolyhedronViewer, __pyx_k_PolyhedronViewer, sizeof(__pyx_k_PolyhedronViewer), 0, 0, 1, 1},
    {&__pyx_n_s_PreImage, __pyx_k_PreImage, sizeof(__pyx_k_PreImage), 0, 0, 1, 1},
    {&__pyx_n_s_PresentationMatrix, __pyx_k_PresentationMatrix, sizeof(__pyx_k_PresentationMatrix), 0, 0, 1, 1},
    {&__pyx_n_s_PresentationMatrix___reduce_cyth, __pyx_k_PresentationMatrix___reduce_cyth, sizeof(__pyx_k_PresentationMatrix___reduce_cyth), 0, 0, 1, 1},
    {&__pyx_n_s_PresentationMatrix___setstate_cy, __pyx_k_PresentationMatrix___setstate_cy, sizeof(__pyx_k_PresentationMatrix___setstate_cy), 0, 0, 1, 1},
    {&__pyx_n_s_PresentationMatrix_add_rows, __pyx_k_PresentationMatrix_add_rows, sizeof(__pyx_k_PresentationMatrix_add_rows), 0, 0, 1, 1},
    {&__pyx_n_s_PresentationMatrix_explode, __pyx_k_PresentationMatrix_explode, sizeof(__pyx_k_PresentationMatrix_explode), 0, 0, 1, 1},
    {&__pyx_n_s_PresentationMatrix_get_data, __pyx_k_PresentationMatrix_get_data, sizeof(__pyx_k_PresentationMatrix_get_data), 0, 0, 1, 1},
    {&__pyx_n_s_PresentationMatrix_row_op, __pyx_k_PresentationMatrix_row_op, sizeof(__pyx_k_PresentationMatrix_row_op), 0, 0, 1, 1},
    {&__pyx_n_s_PresentationMatrix_simplified_ma, __pyx_k_PresentationMatrix_simplified_ma, sizeof(__pyx_k_PresentationMatrix_simplified_ma), 0, 0, 1, 1},
    {&__pyx_n_s_PresentationMatrix_simplify, __pyx_k_PresentationMatrix_simplify, sizeof(__pyx_k_PresentationMatrix_simplify), 0, 0, 1, 1},
    {&__pyx_n_s_Q, __pyx_k_Q, sizeof(__pyx_k_Q), 0, 0, 1, 1},
    {&__pyx_kp_s_Q_s_A_s, __pyx_k_Q_s_A_s, sizeof(__pyx_k_Q_s_A_s), 0, 0, 1, 0},
    {&__pyx_n_s_R, __pyx_k_R, sizeof(__pyx_k_R), 0, 0, 1, 1},
    {&__pyx_n_s_RawNumber, __pyx_k_RawNumber, sizeof(__pyx_k_RawNumber), 0, 0, 1, 1},
    {&__pyx_kp_u_Removing_any_finite_vertices_by, __pyx_k_Removing_any_finite_vertices_by, sizeof(__pyx_k_Removing_any_finite_vertices_by), 0, 1, 0, 0},
    {&__pyx_kp_s_Represents_an_isometry_from_one, __pyx_k_Represents_an_isometry_from_one, sizeof(__pyx_k_Represents_an_isometry_from_one), 0, 0, 1, 0},
    {&__pyx_kp_s_Result_is_symplectic_up_to_facto, __pyx_k_Result_is_symplectic_up_to_facto, sizeof(__pyx_k_Result_is_symplectic_up_to_facto), 0, 0, 1, 0},
    {&__pyx_kp_u_Return_a_HolonomyGroup_represen, __pyx_k_Return_a_HolonomyGroup_represen, sizeof(__pyx_k_Return_a_HolonomyGroup_represen), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_a_detailed_list_of_all_t, __pyx_k_Return_a_detailed_list_of_all_t, sizeof(__pyx_k_Return_a_detailed_list_of_all_t), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_a_list_of_info_objects_d, __pyx_k_Return_a_list_of_info_objects_d, sizeof(__pyx_k_Return_a_list_of_info_objects_d), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_a_new_Manifold_where_the, __pyx_k_Return_a_new_Manifold_where_the, sizeof(__pyx_k_Return_a_new_Manifold_where_the), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_a_new_manifold_where_the, __pyx_k_Return_a_new_manifold_where_the, sizeof(__pyx_k_Return_a_new_manifold_where_the), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_a_reasonably_short_byte, __pyx_k_Return_a_reasonably_short_byte, sizeof(__pyx_k_Return_a_reasonably_short_byte), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_a_string_containing_the, __pyx_k_Return_a_string_containing_the, sizeof(__pyx_k_Return_a_string_containing_the), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_the_Dowker_Thistlethwait, __pyx_k_Return_the_Dowker_Thistlethwait, sizeof(__pyx_k_Return_the_Dowker_Thistlethwait), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_the_abelianization_of_th, __pyx_k_Return_the_abelianization_of_th, sizeof(__pyx_k_Return_the_abelianization_of_th), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_the_center_of_the_symmet, __pyx_k_Return_the_center_of_the_symmet, sizeof(__pyx_k_Return_the_center_of_the_symmet), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_the_commutator_subgroup, __pyx_k_Return_the_commutator_subgroup, sizeof(__pyx_k_Return_the_commutator_subgroup), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_the_current_generators_i, __pyx_k_Return_the_current_generators_i, sizeof(__pyx_k_Return_the_current_generators_i), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_the_letters_representing, __pyx_k_Return_the_letters_representing, sizeof(__pyx_k_Return_the_letters_representing), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_the_name_of_the_triangul, __pyx_k_Return_the_name_of_the_triangul, sizeof(__pyx_k_Return_the_name_of_the_triangul), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_the_number_of_tetrahedra, __pyx_k_Return_the_number_of_tetrahedra, sizeof(__pyx_k_Return_the_number_of_tetrahedra), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_the_order_of_the_symmetr, __pyx_k_Return_the_order_of_the_symmetr, sizeof(__pyx_k_Return_the_order_of_the_symmetr), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_the_original_geometric_g, __pyx_k_Return_the_original_geometric_g, sizeof(__pyx_k_Return_the_original_geometric_g), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_the_total_number_of_cusp, __pyx_k_Return_the_total_number_of_cusp, sizeof(__pyx_k_Return_the_total_number_of_cusp), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_whether_a_one_cusped_has, __pyx_k_Return_whether_a_one_cusped_has, sizeof(__pyx_k_Return_whether_a_one_cusped_has), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_whether_the_SymmetryGrou, __pyx_k_Return_whether_the_SymmetryGrou, sizeof(__pyx_k_Return_whether_the_SymmetryGrou), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_whether_the_full_symmetr, __pyx_k_Return_whether_the_full_symmetr, sizeof(__pyx_k_Return_whether_the_full_symmetr), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_whether_the_manifold_has, __pyx_k_Return_whether_the_manifold_has, sizeof(__pyx_k_Return_whether_the_manifold_has), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_whether_the_symmetry_gro, __pyx_k_Return_whether_the_symmetry_gro, sizeof(__pyx_k_Return_whether_the_symmetry_gro), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_whether_the_symmetry_gro_2, __pyx_k_Return_whether_the_symmetry_gro_2, sizeof(__pyx_k_Return_whether_the_symmetry_gro_2), 0, 1, 0, 0},
    {&__pyx_kp_u_Return_whether_the_underlying_3, __pyx_k_Return_whether_the_underlying_3, sizeof(__pyx_k_Return_whether_the_underlying_3), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_True_if_M_and_N_are_iso, __pyx_k_Returns_True_if_M_and_N_are_iso, sizeof(__pyx_k_Returns_True_if_M_and_N_are_iso), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_True_if_and_only_if_the, __pyx_k_Returns_True_if_and_only_if_the, sizeof(__pyx_k_Returns_True_if_and_only_if_the), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_True_if_and_only_if_the_2, __pyx_k_Returns_True_if_and_only_if_the_2, sizeof(__pyx_k_Returns_True_if_and_only_if_the_2), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_Dehn_filling_descript, __pyx_k_Returns_a_Dehn_filling_descript, sizeof(__pyx_k_Returns_a_Dehn_filling_descript), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_DirichletDomain_objec, __pyx_k_Returns_a_DirichletDomain_objec, sizeof(__pyx_k_Returns_a_DirichletDomain_objec), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_FundamentalGroup_obje, __pyx_k_Returns_a_FundamentalGroup_obje, sizeof(__pyx_k_Returns_a_FundamentalGroup_obje), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_Manifold_computed_dir, __pyx_k_Returns_a_Manifold_computed_dir, sizeof(__pyx_k_Returns_a_Manifold_computed_dir), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_Triangulation_compute, __pyx_k_Returns_a_Triangulation_compute, sizeof(__pyx_k_Returns_a_Triangulation_compute), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_Triangulation_represe, __pyx_k_Returns_a_Triangulation_represe, sizeof(__pyx_k_Returns_a_Triangulation_represe), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_compact_text_represen, __pyx_k_Returns_a_compact_text_represen, sizeof(__pyx_k_Returns_a_compact_text_represen), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_complete_list_of_comb, __pyx_k_Returns_a_complete_list_of_comb, sizeof(__pyx_k_Returns_a_complete_list_of_comb), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_copy_of_the_manifold, __pyx_k_Returns_a_copy_of_the_manifold, sizeof(__pyx_k_Returns_a_copy_of_the_manifold), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_copy_of_the_triangula, __pyx_k_Returns_a_copy_of_the_triangula, sizeof(__pyx_k_Returns_a_copy_of_the_triangula), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_dictionary_whose_keys, __pyx_k_Returns_a_dictionary_whose_keys, sizeof(__pyx_k_Returns_a_dictionary_whose_keys), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_list_of_geodesics_wit, __pyx_k_Returns_a_list_of_geodesics_wit, sizeof(__pyx_k_Returns_a_list_of_geodesics_wit), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_list_of_meridian_long, __pyx_k_Returns_a_list_of_meridian_long, sizeof(__pyx_k_Returns_a_list_of_meridian_long), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_list_of_the_O31Matric, __pyx_k_Returns_a_list_of_the_O31Matric, sizeof(__pyx_k_Returns_a_list_of_the_O31Matric), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_list_of_variables_and, __pyx_k_Returns_a_list_of_variables_and, sizeof(__pyx_k_Returns_a_list_of_variables_and), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_string_which_will_def, __pyx_k_Returns_a_string_which_will_def, sizeof(__pyx_k_Returns_a_string_which_will_def), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_word_representing_a_c, __pyx_k_Returns_a_word_representing_a_c, sizeof(__pyx_k_Returns_a_word_representing_a_c), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_a_word_representing_a_c_2, __pyx_k_Returns_a_word_representing_a_c_2, sizeof(__pyx_k_Returns_a_word_representing_a_c_2), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_an_AbelianGroup_represe, __pyx_k_Returns_an_AbelianGroup_represe, sizeof(__pyx_k_Returns_an_AbelianGroup_represe), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_an_info_object_containi, __pyx_k_Returns_an_info_object_containi, sizeof(__pyx_k_Returns_an_info_object_containi), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_an_info_object_containi_2, __pyx_k_Returns_an_info_object_containi_2, sizeof(__pyx_k_Returns_an_info_object_containi_2), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_information_about_the_c, __pyx_k_Returns_information_about_the_c, sizeof(__pyx_k_Returns_information_about_the_c), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_self_as_a_Triangulation, __pyx_k_Returns_self_as_a_Triangulation, sizeof(__pyx_k_Returns_self_as_a_Triangulation), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_the_Chern_Simons_invari, __pyx_k_Returns_the_Chern_Simons_invari, sizeof(__pyx_k_Returns_the_Chern_Simons_invari), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_the_number_of_fake_cusp, __pyx_k_Returns_the_number_of_fake_cusp, sizeof(__pyx_k_Returns_the_number_of_fake_cusp), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_the_obstruction_classes, __pyx_k_Returns_the_obstruction_classes, sizeof(__pyx_k_Returns_the_obstruction_classes), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_the_product_of_group_el, __pyx_k_Returns_the_product_of_group_el, sizeof(__pyx_k_Returns_the_product_of_group_el), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_the_type_of_the_current, __pyx_k_Returns_the_type_of_the_current, sizeof(__pyx_k_Returns_the_type_of_the_current), 0, 1, 0, 0},
    {&__pyx_kp_u_Returns_the_volume_of_the_curre, __pyx_k_Returns_the_volume_of_the_curre, sizeof(__pyx_k_Returns_the_volume_of_the_curre), 0, 1, 0, 0},
    {&__pyx_kp_u_Reverses_the_orientation_of_the, __pyx_k_Reverses_the_orientation_of_the, sizeof(__pyx_k_Reverses_the_orientation_of_the), 0, 1, 0, 0},
    {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
    {&__pyx_n_s_S5, __pyx_k_S5, sizeof(__pyx_k_S5), 0, 0, 1, 1},
    {&__pyx_n_s_SC, __pyx_k_SC, sizeof(__pyx_k_SC), 0, 0, 1, 1},
    {&__pyx_n_s_SL2C, __pyx_k_SL2C, sizeof(__pyx_k_SL2C), 0, 0, 1, 1},
    {&__pyx_n_s_SNAPPEA_MANIFOLD_DIRECTORY, __pyx_k_SNAPPEA_MANIFOLD_DIRECTORY, sizeof(__pyx_k_SNAPPEA_MANIFOLD_DIRECTORY), 0, 0, 1, 1},
    {&__pyx_n_s_SageNotAvailable, __pyx_k_SageNotAvailable, sizeof(__pyx_k_SageNotAvailable), 0, 0, 1, 1},
    {&__pyx_n_s_SageObject, __pyx_k_SageObject, sizeof(__pyx_k_SageObject), 0, 0, 1, 1},
    {&__pyx_kp_s_Save_Triangulation, __pyx_k_Save_Triangulation, sizeof(__pyx_k_Save_Triangulation), 0, 0, 1, 0},
    {&__pyx_kp_u_Save_the_Dirichlet_domain_as_a, __pyx_k_Save_the_Dirichlet_domain_as_a, sizeof(__pyx_k_Save_the_Dirichlet_domain_as_a), 0, 1, 0, 0},
    {&__pyx_kp_u_Save_the_triangulation_as_a_Sna, __pyx_k_Save_the_triangulation_as_a_Sna, sizeof(__pyx_k_Save_the_triangulation_as_a_Sna), 0, 1, 0, 0},
    {&__pyx_kp_u_Searches_for_connected_closed_n, __pyx_k_Searches_for_connected_closed_n, sizeof(__pyx_k_Searches_for_connected_closed_n), 0, 1, 0, 0},
    {&__pyx_kp_s_Send_to_SnapPy, __pyx_k_Send_to_SnapPy, sizeof(__pyx_k_Send_to_SnapPy), 0, 0, 1, 0},
    {&__pyx_kp_u_Set_the_Dehn_filling_coefficien, __pyx_k_Set_the_Dehn_filling_coefficien, sizeof(__pyx_k_Set_the_Dehn_filling_coefficien), 0, 1, 0, 0},
    {&__pyx_kp_u_Set_the_Dehn_filling_coefficien_2, __pyx_k_Set_the_Dehn_filling_coefficien_2, sizeof(__pyx_k_Set_the_Dehn_filling_coefficien_2), 0, 1, 0, 0},
    {&__pyx_n_s_ShapeInfo, __pyx_k_ShapeInfo, sizeof(__pyx_k_ShapeInfo), 0, 0, 1, 1},
    {&__pyx_n_s_ShapeInfo___repr, __pyx_k_ShapeInfo___repr, sizeof(__pyx_k_ShapeInfo___repr), 0, 0, 1, 1},
    {&__pyx_n_s_ShortMatrixParity, __pyx_k_ShortMatrixParity, sizeof(__pyx_k_ShortMatrixParity), 0, 0, 1, 1},
    {&__pyx_n_s_SnapPeaFatalError, __pyx_k_SnapPeaFatalError, sizeof(__pyx_k_SnapPeaFatalError), 0, 0, 1, 1},
    {&__pyx_n_s_SnapPea_KLPProjection, __pyx_k_SnapPea_KLPProjection, sizeof(__pyx_k_SnapPea_KLPProjection), 0, 0, 1, 1},
    {&__pyx_kp_s_SnapPea_crashed_in_function_s_de, __pyx_k_SnapPea_crashed_in_function_s_de, sizeof(__pyx_k_SnapPea_crashed_in_function_s_de), 0, 0, 1, 0},
    {&__pyx_kp_s_SnapPea_failed_to_compute_any_pa, __pyx_k_SnapPea_failed_to_compute_any_pa, sizeof(__pyx_k_SnapPea_failed_to_compute_any_pa), 0, 0, 1, 0},
    {&__pyx_kp_s_SnapPea_failed_to_find_the_canon, __pyx_k_SnapPea_failed_to_find_the_canon, sizeof(__pyx_k_SnapPea_failed_to_find_the_canon), 0, 0, 1, 0},
    {&__pyx_kp_s_SnapPea_failed_to_read_the_censu, __pyx_k_SnapPea_failed_to_read_the_censu, sizeof(__pyx_k_SnapPea_failed_to_read_the_censu), 0, 0, 1, 0},
    {&__pyx_n_s_SnapPea_interrupt, __pyx_k_SnapPea_interrupt, sizeof(__pyx_k_SnapPea_interrupt), 0, 0, 1, 1},
    {&__pyx_kp_s_SnapPea_kernel_failed_when_compu, __pyx_k_SnapPea_kernel_failed_when_compu, sizeof(__pyx_k_SnapPea_kernel_failed_when_compu), 0, 0, 1, 0},
    {&__pyx_kp_s_SnapPea_kernel_failed_when_compu_2, __pyx_k_SnapPea_kernel_failed_when_compu_2, sizeof(__pyx_k_SnapPea_kernel_failed_when_compu_2), 0, 0, 1, 0},
    {&__pyx_kp_s_SnapPea_kernel_failed_when_split, __pyx_k_SnapPea_kernel_failed_when_split, sizeof(__pyx_k_SnapPea_kernel_failed_when_split), 0, 0, 1, 0},
    {&__pyx_kp_s_SnapPea_kernel_style_estimation, __pyx_k_SnapPea_kernel_style_estimation, sizeof(__pyx_k_SnapPea_kernel_style_estimation), 0, 0, 1, 0},
    {&__pyx_kp_s_SnapPea_only_found_d_surfaces_bu, __pyx_k_SnapPea_only_found_d_surfaces_bu, sizeof(__pyx_k_SnapPea_only_found_d_surfaces_bu), 0, 0, 1, 0},
    {&__pyx_n_s_SnapPy, __pyx_k_SnapPy, sizeof(__pyx_k_SnapPy), 0, 0, 1, 1},
    {&__pyx_n_s_SnapPyCache, __pyx_k_SnapPyCache, sizeof(__pyx_k_SnapPyCache), 0, 0, 1, 1},
    {&__pyx_kp_s_SnapPy_has_no_data_on_links_with, __pyx_k_SnapPy_has_no_data_on_links_with, sizeof(__pyx_k_SnapPy_has_no_data_on_links_with), 0, 0, 1, 0},
    {&__pyx_n_s_SolutionType, __pyx_k_SolutionType, sizeof(__pyx_k_SolutionType), 0, 0, 1, 1},
    {&__pyx_kp_s_Solution_type_is_s, __pyx_k_Solution_type_is_s, sizeof(__pyx_k_Solution_type_is_s), 0, 0, 1, 0},
    {&__pyx_kp_u_Split_the_manifold_open_along_a, __pyx_k_Split_the_manifold_open_along_a, sizeof(__pyx_k_Split_the_manifold_open_along_a), 0, 1, 0, 0},
    {&__pyx_kp_s_Splitting_S__1_0_b1_A0_a0_B1, __pyx_k_Splitting_S__1_0_b1_A0_a0_B1, sizeof(__pyx_k_Splitting_S__1_0_b1_A0_a0_B1), 0, 0, 1, 0},
    {&__pyx_kp_s_Splitting_S__d_d, __pyx_k_Splitting_S__d_d, sizeof(__pyx_k_Splitting_S__d_d), 0, 0, 1, 0},
    {&__pyx_n_s_Stabilizer, __pyx_k_Stabilizer, sizeof(__pyx_k_Stabilizer), 0, 0, 1, 1},
    {&__pyx_kp_s_Starting_the_link_editor_Select, __pyx_k_Starting_the_link_editor_Select, sizeof(__pyx_k_Starting_the_link_editor_Select), 0, 0, 1, 0},
    {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
    {&__pyx_n_s_StrLongestLen, __pyx_k_StrLongestLen, sizeof(__pyx_k_StrLongestLen), 0, 0, 1, 1},
    {&__pyx_n_s_StrLongestLen_locals_genexpr, __pyx_k_StrLongestLen_locals_genexpr, sizeof(__pyx_k_StrLongestLen_locals_genexpr), 0, 0, 1, 1},
    {&__pyx_kp_s_Supply_a_manifold_or_generators, __pyx_k_Supply_a_manifold_or_generators, sizeof(__pyx_k_Supply_a_manifold_or_generators), 0, 0, 1, 0},
    {&__pyx_kp_s_Supported_cover_types_are_all_an, __pyx_k_Supported_cover_types_are_all_an, sizeof(__pyx_k_Supported_cover_types_are_all_an), 0, 0, 1, 0},
    {&__pyx_kp_s_Supported_methods_are_low_index, __pyx_k_Supported_methods_are_low_index, sizeof(__pyx_k_Supported_methods_are_low_index), 0, 0, 1, 0},
    {&__pyx_n_s_Surface, __pyx_k_Surface, sizeof(__pyx_k_Surface), 0, 0, 1, 1},
    {&__pyx_n_s_SymmetryGroup, __pyx_k_SymmetryGroup, sizeof(__pyx_k_SymmetryGroup), 0, 0, 1, 1},
    {&__pyx_n_s_SymmetryGroup___reduce_cython, __pyx_k_SymmetryGroup___reduce_cython, sizeof(__pyx_k_SymmetryGroup___reduce_cython), 0, 0, 1, 1},
    {&__pyx_n_s_SymmetryGroup___setstate_cython, __pyx_k_SymmetryGroup___setstate_cython, sizeof(__pyx_k_SymmetryGroup___setstate_cython), 0, 0, 1, 1},
    {&__pyx_n_s_SymmetryGroup_abelian_descriptio, __pyx_k_SymmetryGroup_abelian_descriptio, sizeof(__pyx_k_SymmetryGroup_abelian_descriptio), 0, 0, 1, 1},
    {&__pyx_kp_u_SymmetryGroup_abelian_descriptio_2, __pyx_k_SymmetryGroup_abelian_descriptio_2, sizeof(__pyx_k_SymmetryGroup_abelian_descriptio_2), 0, 1, 0, 0},
    {&__pyx_n_s_SymmetryGroup_abelianization, __pyx_k_SymmetryGroup_abelianization, sizeof(__pyx_k_SymmetryGroup_abelianization), 0, 0, 1, 1},
    {&__pyx_kp_u_SymmetryGroup_abelianization_lin, __pyx_k_SymmetryGroup_abelianization_lin, sizeof(__pyx_k_SymmetryGroup_abelianization_lin), 0, 1, 0, 0},
    {&__pyx_n_s_SymmetryGroup_center, __pyx_k_SymmetryGroup_center, sizeof(__pyx_k_SymmetryGroup_center), 0, 0, 1, 1},
    {&__pyx_kp_u_SymmetryGroup_center_line_256, __pyx_k_SymmetryGroup_center_line_256, sizeof(__pyx_k_SymmetryGroup_center_line_256), 0, 1, 0, 0},
    {&__pyx_n_s_SymmetryGroup_commutator_subgrou, __pyx_k_SymmetryGroup_commutator_subgrou, sizeof(__pyx_k_SymmetryGroup_commutator_subgrou), 0, 0, 1, 1},
    {&__pyx_kp_u_SymmetryGroup_commutator_subgrou_2, __pyx_k_SymmetryGroup_commutator_subgrou_2, sizeof(__pyx_k_SymmetryGroup_commutator_subgrou_2), 0, 1, 0, 0},
    {&__pyx_n_s_SymmetryGroup_direct_product_des, __pyx_k_SymmetryGroup_direct_product_des, sizeof(__pyx_k_SymmetryGroup_direct_product_des), 0, 0, 1, 1},
    {&__pyx_kp_u_SymmetryGroup_direct_product_des_2, __pyx_k_SymmetryGroup_direct_product_des_2, sizeof(__pyx_k_SymmetryGroup_direct_product_des_2), 0, 1, 0, 0},
    {&__pyx_n_s_SymmetryGroup_is_S5, __pyx_k_SymmetryGroup_is_S5, sizeof(__pyx_k_SymmetryGroup_is_S5), 0, 0, 1, 1},
    {&__pyx_n_s_SymmetryGroup_is_abelian, __pyx_k_SymmetryGroup_is_abelian, sizeof(__pyx_k_SymmetryGroup_is_abelian), 0, 0, 1, 1},
    {&__pyx_kp_u_SymmetryGroup_is_abelian_line_72, __pyx_k_SymmetryGroup_is_abelian_line_72, sizeof(__pyx_k_SymmetryGroup_is_abelian_line_72), 0, 1, 0, 0},
    {&__pyx_n_s_SymmetryGroup_is_amphicheiral, __pyx_k_SymmetryGroup_is_amphicheiral, sizeof(__pyx_k_SymmetryGroup_is_amphicheiral), 0, 0, 1, 1},
    {&__pyx_kp_u_SymmetryGroup_is_amphicheiral_li, __pyx_k_SymmetryGroup_is_amphicheiral_li, sizeof(__pyx_k_SymmetryGroup_is_amphicheiral_li), 0, 1, 0, 0},
    {&__pyx_n_s_SymmetryGroup_is_dihedral, __pyx_k_SymmetryGroup_is_dihedral, sizeof(__pyx_k_SymmetryGroup_is_dihedral), 0, 0, 1, 1},
    {&__pyx_kp_u_SymmetryGroup_is_dihedral_line_1, __pyx_k_SymmetryGroup_is_dihedral_line_1, sizeof(__pyx_k_SymmetryGroup_is_dihedral_line_1), 0, 1, 0, 0},
    {&__pyx_n_s_SymmetryGroup_is_direct_product, __pyx_k_SymmetryGroup_is_direct_product, sizeof(__pyx_k_SymmetryGroup_is_direct_product), 0, 0, 1, 1},
    {&__pyx_kp_u_SymmetryGroup_is_direct_product_2, __pyx_k_SymmetryGroup_is_direct_product_2, sizeof(__pyx_k_SymmetryGroup_is_direct_product_2), 0, 1, 0, 0},
    {&__pyx_n_s_SymmetryGroup_is_full_group, __pyx_k_SymmetryGroup_is_full_group, sizeof(__pyx_k_SymmetryGroup_is_full_group), 0, 0, 1, 1},
    {&__pyx_kp_u_SymmetryGroup_is_full_group_line, __pyx_k_SymmetryGroup_is_full_group_line, sizeof(__pyx_k_SymmetryGroup_is_full_group_line), 0, 1, 0, 0},
    {&__pyx_n_s_SymmetryGroup_is_invertible_knot, __pyx_k_SymmetryGroup_is_invertible_knot, sizeof(__pyx_k_SymmetryGroup_is_invertible_knot), 0, 0, 1, 1},
    {&__pyx_kp_u_SymmetryGroup_is_invertible_knot_2, __pyx_k_SymmetryGroup_is_invertible_knot_2, sizeof(__pyx_k_SymmetryGroup_is_invertible_knot_2), 0, 1, 0, 0},
    {&__pyx_n_s_SymmetryGroup_is_polyhedral, __pyx_k_SymmetryGroup_is_polyhedral, sizeof(__pyx_k_SymmetryGroup_is_polyhedral), 0, 0, 1, 1},
    {&__pyx_n_s_SymmetryGroup_isometries, __pyx_k_SymmetryGroup_isometries, sizeof(__pyx_k_SymmetryGroup_isometries), 0, 0, 1, 1},
    {&__pyx_kp_u_SymmetryGroup_isometries_line_29, __pyx_k_SymmetryGroup_isometries_line_29, sizeof(__pyx_k_SymmetryGroup_isometries_line_29), 0, 1, 0, 0},
    {&__pyx_n_s_SymmetryGroup_multiply_elements, __pyx_k_SymmetryGroup_multiply_elements, sizeof(__pyx_k_SymmetryGroup_multiply_elements), 0, 0, 1, 1},
    {&__pyx_kp_u_SymmetryGroup_multiply_elements_2, __pyx_k_SymmetryGroup_multiply_elements_2, sizeof(__pyx_k_SymmetryGroup_multiply_elements_2), 0, 1, 0, 0},
    {&__pyx_n_s_SymmetryGroup_order, __pyx_k_SymmetryGroup_order, sizeof(__pyx_k_SymmetryGroup_order), 0, 0, 1, 1},
    {&__pyx_kp_u_SymmetryGroup_order_line_62, __pyx_k_SymmetryGroup_order_line_62, sizeof(__pyx_k_SymmetryGroup_order_line_62), 0, 1, 0, 0},
    {&__pyx_n_s_SymmetryGroup_polyhedral_descrip, __pyx_k_SymmetryGroup_polyhedral_descrip, sizeof(__pyx_k_SymmetryGroup_polyhedral_descrip), 0, 0, 1, 1},
    {&__pyx_n_s_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 1, 1},
    {&__pyx_n_s_TEXT, __pyx_k_TEXT, sizeof(__pyx_k_TEXT), 0, 0, 1, 1},
    {&__pyx_kp_s_Tetrahedra_data_appears_invalid, __pyx_k_Tetrahedra_data_appears_invalid, sizeof(__pyx_k_Tetrahedra_data_appears_invalid), 0, 0, 1, 0},
    {&__pyx_kp_s_That_Magma_type_not_recognized, __pyx_k_That_Magma_type_not_recognized, sizeof(__pyx_k_That_Magma_type_not_recognized), 0, 0, 1, 0},
    {&__pyx_kp_s_The_Chern_Simons_invariant_isn_t, __pyx_k_The_Chern_Simons_invariant_isn_t, sizeof(__pyx_k_The_Chern_Simons_invariant_isn_t), 0, 0, 1, 0},
    {&__pyx_kp_s_The_Dehn_filling_coefficients_mu, __pyx_k_The_Dehn_filling_coefficients_mu, sizeof(__pyx_k_The_Dehn_filling_coefficients_mu), 0, 0, 1, 0},
    {&__pyx_kp_s_The_Dirichlet_Domain_was_compute, __pyx_k_The_Dirichlet_Domain_was_compute, sizeof(__pyx_k_The_Dirichlet_Domain_was_compute), 0, 0, 1, 0},
    {&__pyx_kp_s_The_Dirichlet_Domain_was_not_com, __pyx_k_The_Dirichlet_Domain_was_not_com, sizeof(__pyx_k_The_Dirichlet_Domain_was_not_com), 0, 0, 1, 0},
    {&__pyx_kp_s_The_Dirichlet_construction_faile, __pyx_k_The_Dirichlet_construction_faile, sizeof(__pyx_k_The_Dirichlet_construction_faile), 0, 0, 1, 0},
    {&__pyx_kp_s_The_Dirichlet_domain_could_not_b, __pyx_k_The_Dirichlet_domain_could_not_b, sizeof(__pyx_k_The_Dirichlet_domain_could_not_b), 0, 0, 1, 0},
    {&__pyx_kp_s_The_Ford_domain_construction_fai, __pyx_k_The_Ford_domain_construction_fai, sizeof(__pyx_k_The_Ford_domain_construction_fai), 0, 0, 1, 0},
    {&__pyx_kp_s_The_HoroballViewer_class_was_not, __pyx_k_The_HoroballViewer_class_was_not, sizeof(__pyx_k_The_HoroballViewer_class_was_not), 0, 0, 1, 0},
    {&__pyx_kp_s_The_Manifold_is_not_orientable_s, __pyx_k_The_Manifold_is_not_orientable_s, sizeof(__pyx_k_The_Manifold_is_not_orientable_s), 0, 0, 1, 0},
    {&__pyx_kp_s_The_MorwenLinks_class_has_been_r, __pyx_k_The_MorwenLinks_class_has_been_r, sizeof(__pyx_k_The_MorwenLinks_class_has_been_r), 0, 0, 1, 0},
    {&__pyx_kp_s_The_Morwen_8_tetrahedra_manifold, __pyx_k_The_Morwen_8_tetrahedra_manifold, sizeof(__pyx_k_The_Morwen_8_tetrahedra_manifold), 0, 0, 1, 0},
    {&__pyx_kp_s_The_PolyhedronViewer_class_was_n, __pyx_k_The_PolyhedronViewer_class_was_n, sizeof(__pyx_k_The_PolyhedronViewer_class_was_n), 0, 0, 1, 0},
    {&__pyx_kp_s_The_SnapPea_kernel_couldn_t_comp, __pyx_k_The_SnapPea_kernel_couldn_t_comp, sizeof(__pyx_k_The_SnapPea_kernel_couldn_t_comp), 0, 0, 1, 0},
    {&__pyx_kp_s_The_SnapPea_kernel_was_not_able, __pyx_k_The_SnapPea_kernel_was_not_able, sizeof(__pyx_k_The_SnapPea_kernel_was_not_able), 0, 0, 1, 0},
    {&__pyx_kp_s_The_Triangulation_is_already_ori, __pyx_k_The_Triangulation_is_already_ori, sizeof(__pyx_k_The_Triangulation_is_already_ori), 0, 0, 1, 0},
    {&__pyx_kp_s_The_Triangulation_is_empty, __pyx_k_The_Triangulation_is_empty, sizeof(__pyx_k_The_Triangulation_is_empty), 0, 0, 1, 0},
    {&__pyx_kp_s_The_Triangulation_is_empty_2, __pyx_k_The_Triangulation_is_empty_2, sizeof(__pyx_k_The_Triangulation_is_empty_2), 0, 0, 1, 0},
    {&__pyx_kp_s_The_Triangulation_must_be_empty, __pyx_k_The_Triangulation_must_be_empty, sizeof(__pyx_k_The_Triangulation_must_be_empty), 0, 0, 1, 0},
    {&__pyx_kp_s_The_amount_of_data_given_is_not, __pyx_k_The_amount_of_data_given_is_not, sizeof(__pyx_k_The_amount_of_data_given_is_not), 0, 0, 1, 0},
    {&__pyx_kp_s_The_braid_word_is_invalid, __pyx_k_The_braid_word_is_invalid, sizeof(__pyx_k_The_braid_word_is_invalid), 0, 0, 1, 0},
    {&__pyx_kp_s_The_census_knot_s_was_not_found, __pyx_k_The_census_knot_s_was_not_found, sizeof(__pyx_k_The_census_knot_s_was_not_found), 0, 0, 1, 0},
    {&__pyx_kp_s_The_curve_is_not_isotopic_to_a_g, __pyx_k_The_curve_is_not_isotopic_to_a_g, sizeof(__pyx_k_The_curve_is_not_isotopic_to_a_g), 0, 0, 1, 0},
    {&__pyx_kp_s_The_cusp_neighborhood_constructi, __pyx_k_The_cusp_neighborhood_constructi, sizeof(__pyx_k_The_cusp_neighborhood_constructi), 0, 0, 1, 0},
    {&__pyx_kp_s_The_data_given_do_not_have_the_r, __pyx_k_The_data_given_do_not_have_the_r, sizeof(__pyx_k_The_data_given_do_not_have_the_r), 0, 0, 1, 0},
    {&__pyx_kp_s_The_data_provided_are_invalid_fo, __pyx_k_The_data_provided_are_invalid_fo, sizeof(__pyx_k_The_data_provided_are_invalid_fo), 0, 0, 1, 0},
    {&__pyx_kp_s_The_data_provided_does_not_give, __pyx_k_The_data_provided_does_not_give, sizeof(__pyx_k_The_data_provided_does_not_give), 0, 0, 1, 0},
    {&__pyx_kp_s_The_data_provided_does_not_give_2, __pyx_k_The_data_provided_does_not_give_2, sizeof(__pyx_k_The_data_provided_does_not_give_2), 0, 0, 1, 0},
    {&__pyx_kp_s_The_drilling_curve_requested_is, __pyx_k_The_drilling_curve_requested_is, sizeof(__pyx_k_The_drilling_curve_requested_is), 0, 0, 1, 0},
    {&__pyx_kp_s_The_elementary_divisors_must_for, __pyx_k_The_elementary_divisors_must_for, sizeof(__pyx_k_The_elementary_divisors_must_for), 0, 0, 1, 0},
    {&__pyx_kp_s_The_empty_triangulation_has_no_n, __pyx_k_The_empty_triangulation_has_no_n, sizeof(__pyx_k_The_empty_triangulation_has_no_n), 0, 0, 1, 0},
    {&__pyx_kp_s_The_full_symmetry_group_is_not_k, __pyx_k_The_full_symmetry_group_is_not_k, sizeof(__pyx_k_The_full_symmetry_group_is_not_k), 0, 0, 1, 0},
    {&__pyx_kp_s_The_full_symmetry_group_not_know, __pyx_k_The_full_symmetry_group_not_know, sizeof(__pyx_k_The_full_symmetry_group_not_know), 0, 0, 1, 0},
    {&__pyx_kp_s_The_generator_data_does_not_star, __pyx_k_The_generator_data_does_not_star, sizeof(__pyx_k_The_generator_data_does_not_star), 0, 0, 1, 0},
    {&__pyx_kp_s_The_homomorphism_image_is_not_a, __pyx_k_The_homomorphism_image_is_not_a, sizeof(__pyx_k_The_homomorphism_image_is_not_a), 0, 0, 1, 0},
    {&__pyx_kp_s_The_horoball_construction_failed, __pyx_k_The_horoball_construction_failed, sizeof(__pyx_k_The_horoball_construction_failed), 0, 0, 1, 0},
    {&__pyx_kp_s_The_link_complement_s_was_not_fo, __pyx_k_The_link_complement_s_was_not_fo, sizeof(__pyx_k_The_link_complement_s_was_not_fo), 0, 0, 1, 0},
    {&__pyx_kp_s_The_manifold_file_s_was_not_foun, __pyx_k_The_manifold_file_s_was_not_foun, sizeof(__pyx_k_The_manifold_file_s_was_not_foun), 0, 0, 1, 0},
    {&__pyx_kp_s_The_method_must_be_fold_or_layer, __pyx_k_The_method_must_be_fold_or_layer, sizeof(__pyx_k_The_method_must_be_fold_or_layer), 0, 0, 1, 0},
    {&__pyx_kp_s_The_number_of_fillings_specified, __pyx_k_The_number_of_fillings_specified, sizeof(__pyx_k_The_number_of_fillings_specified), 0, 0, 1, 0},
    {&__pyx_kp_s_The_peripheral_data_d_d_d_d_is_n, __pyx_k_The_peripheral_data_d_d_d_d_is_n, sizeof(__pyx_k_The_peripheral_data_d_d_d_d_is_n), 0, 0, 1, 0},
    {&__pyx_kp_s_The_peripheral_data_s_is_not_acc, __pyx_k_The_peripheral_data_s_is_not_acc, sizeof(__pyx_k_The_peripheral_data_s_is_not_acc), 0, 0, 1, 0},
    {&__pyx_kp_s_The_permutation_list_is_invalid, __pyx_k_The_permutation_list_is_invalid, sizeof(__pyx_k_The_permutation_list_is_invalid), 0, 0, 1, 0},
    {&__pyx_kp_s_The_solution_type_is_s, __pyx_k_The_solution_type_is_s, sizeof(__pyx_k_The_solution_type_is_s), 0, 0, 1, 0},
    {&__pyx_kp_s_The_specified_cusp_s_does_not_ex, __pyx_k_The_specified_cusp_s_does_not_ex, sizeof(__pyx_k_The_specified_cusp_s_does_not_ex), 0, 0, 1, 0},
    {&__pyx_kp_s_The_specified_edge_index_s_is_in, __pyx_k_The_specified_edge_index_s_is_in, sizeof(__pyx_k_The_specified_edge_index_s_is_in), 0, 0, 1, 0},
    {&__pyx_kp_s_The_specified_face_index_s_is_in, __pyx_k_The_specified_face_index_s_is_in, sizeof(__pyx_k_The_specified_face_index_s_is_in), 0, 0, 1, 0},
    {&__pyx_kp_s_The_specified_indices_to_be_fill, __pyx_k_The_specified_indices_to_be_fill, sizeof(__pyx_k_The_specified_indices_to_be_fill), 0, 0, 1, 0},
    {&__pyx_kp_s_The_specified_tetrahedron_s_does, __pyx_k_The_specified_tetrahedron_s_does, sizeof(__pyx_k_The_specified_tetrahedron_s_does), 0, 0, 1, 0},
    {&__pyx_kp_s_The_symmetry_group_has_only_d_el, __pyx_k_The_symmetry_group_has_only_d_el, sizeof(__pyx_k_The_symmetry_group_has_only_d_el), 0, 0, 1, 0},
    {&__pyx_kp_s_The_symmetry_group_is_not_a_nont, __pyx_k_The_symmetry_group_is_not_a_nont, sizeof(__pyx_k_The_symmetry_group_is_not_a_nont), 0, 0, 1, 0},
    {&__pyx_kp_s_The_symmetry_group_is_not_abelia, __pyx_k_The_symmetry_group_is_not_abelia, sizeof(__pyx_k_The_symmetry_group_is_not_abelia), 0, 0, 1, 0},
    {&__pyx_kp_s_The_symmetry_group_is_not_polyhe, __pyx_k_The_symmetry_group_is_not_polyhe, sizeof(__pyx_k_The_symmetry_group_is_not_polyhe), 0, 0, 1, 0},
    {&__pyx_kp_s_The_triangulation_construction_f, __pyx_k_The_triangulation_construction_f, sizeof(__pyx_k_The_triangulation_construction_f), 0, 0, 1, 0},
    {&__pyx_kp_s_The_word_contains_a_non_generato, __pyx_k_The_word_contains_a_non_generato, sizeof(__pyx_k_The_word_contains_a_non_generato), 0, 0, 1, 0},
    {&__pyx_kp_s_There_are_only_201_census_knots, __pyx_k_There_are_only_201_census_knots, sizeof(__pyx_k_There_are_only_201_census_knots), 0, 0, 1, 0},
    {&__pyx_kp_s_This_census_does_not_support_man, __pyx_k_This_census_does_not_support_man, sizeof(__pyx_k_This_census_does_not_support_man), 0, 0, 1, 0},
    {&__pyx_kp_s_To_permanently_fill_a_cusp_the_D, __pyx_k_To_permanently_fill_a_cusp_the_D, sizeof(__pyx_k_To_permanently_fill_a_cusp_the_D), 0, 0, 1, 0},
    {&__pyx_kp_b_Triangulation, __pyx_k_Triangulation, sizeof(__pyx_k_Triangulation), 0, 0, 0, 0},
    {&__pyx_kp_s_Triangulation, __pyx_k_Triangulation, sizeof(__pyx_k_Triangulation), 0, 0, 1, 0},
    {&__pyx_n_s_Triangulation_2, __pyx_k_Triangulation_2, sizeof(__pyx_k_Triangulation_2), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation_DT_code, __pyx_k_Triangulation_DT_code, sizeof(__pyx_k_Triangulation_DT_code), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_DT_code_line_1076, __pyx_k_Triangulation_DT_code_line_1076, sizeof(__pyx_k_Triangulation_DT_code_line_1076), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation___reduce, __pyx_k_Triangulation___reduce, sizeof(__pyx_k_Triangulation___reduce), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation___reduce___line_86, __pyx_k_Triangulation___reduce___line_86, sizeof(__pyx_k_Triangulation___reduce___line_86), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation__covers_gap, __pyx_k_Triangulation__covers_gap, sizeof(__pyx_k_Triangulation__covers_gap), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__covers_low_index, __pyx_k_Triangulation__covers_low_index, sizeof(__pyx_k_Triangulation__covers_low_index), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__covers_magma, __pyx_k_Triangulation__covers_magma, sizeof(__pyx_k_Triangulation__covers_magma), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__covers_snappea, __pyx_k_Triangulation__covers_snappea, sizeof(__pyx_k_Triangulation__covers_snappea), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__empty_save, __pyx_k_Triangulation__empty_save, sizeof(__pyx_k_Triangulation__empty_save), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__from_bytes, __pyx_k_Triangulation__from_bytes, sizeof(__pyx_k_Triangulation__from_bytes), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation__from_bytes_line_7, __pyx_k_Triangulation__from_bytes_line_7, sizeof(__pyx_k_Triangulation__from_bytes_line_7), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation__from_isosig, __pyx_k_Triangulation__from_isosig, sizeof(__pyx_k_Triangulation__from_isosig), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation__from_isosig_line, __pyx_k_Triangulation__from_isosig_line, sizeof(__pyx_k_Triangulation__from_isosig_line), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation__from_pickle, __pyx_k_Triangulation__from_pickle, sizeof(__pyx_k_Triangulation__from_pickle), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__from_string, __pyx_k_Triangulation__from_string, sizeof(__pyx_k_Triangulation__from_string), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation__from_string_line, __pyx_k_Triangulation__from_string_line, sizeof(__pyx_k_Triangulation__from_string_line), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation__from_tetrahedra_g, __pyx_k_Triangulation__from_tetrahedra_g, sizeof(__pyx_k_Triangulation__from_tetrahedra_g), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation__from_tetrahedra_g_2, __pyx_k_Triangulation__from_tetrahedra_g_2, sizeof(__pyx_k_Triangulation__from_tetrahedra_g_2), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation__get_cusp_indices, __pyx_k_Triangulation__get_cusp_indices, sizeof(__pyx_k_Triangulation__get_cusp_indices), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__get_from_link_dat, __pyx_k_Triangulation__get_from_link_dat, sizeof(__pyx_k_Triangulation__get_from_link_dat), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__get_tetrahedra_gl, __pyx_k_Triangulation__get_tetrahedra_gl, sizeof(__pyx_k_Triangulation__get_tetrahedra_gl), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__is_symplectic, __pyx_k_Triangulation__is_symplectic, sizeof(__pyx_k_Triangulation__is_symplectic), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__marked_tetrahedra, __pyx_k_Triangulation__marked_tetrahedra, sizeof(__pyx_k_Triangulation__marked_tetrahedra), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__num_fake_cusps, __pyx_k_Triangulation__num_fake_cusps, sizeof(__pyx_k_Triangulation__num_fake_cusps), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation__num_fake_cusps_li, __pyx_k_Triangulation__num_fake_cusps_li, sizeof(__pyx_k_Triangulation__num_fake_cusps_li), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation__polish_hyperbolic, __pyx_k_Triangulation__polish_hyperbolic, sizeof(__pyx_k_Triangulation__polish_hyperbolic), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__presentation_matr, __pyx_k_Triangulation__presentation_matr, sizeof(__pyx_k_Triangulation__presentation_matr), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__ptolemy_equations, __pyx_k_Triangulation__ptolemy_equations, sizeof(__pyx_k_Triangulation__ptolemy_equations), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__ptolemy_equations_2, __pyx_k_Triangulation__ptolemy_equations_2, sizeof(__pyx_k_Triangulation__ptolemy_equations_2), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__ptolemy_equations_3, __pyx_k_Triangulation__ptolemy_equations_3, sizeof(__pyx_k_Triangulation__ptolemy_equations_3), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__ptolemy_equations_4, __pyx_k_Triangulation__ptolemy_equations_4, sizeof(__pyx_k_Triangulation__ptolemy_equations_4), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__ptolemy_equations_5, __pyx_k_Triangulation__ptolemy_equations_5, sizeof(__pyx_k_Triangulation__ptolemy_equations_5), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__ptolemy_equations_6, __pyx_k_Triangulation__ptolemy_equations_6, sizeof(__pyx_k_Triangulation__ptolemy_equations_6), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__reindex_cusps, __pyx_k_Triangulation__reindex_cusps, sizeof(__pyx_k_Triangulation__reindex_cusps), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation__reindex_cusps_lin, __pyx_k_Triangulation__reindex_cusps_lin, sizeof(__pyx_k_Triangulation__reindex_cusps_lin), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation__remove_finite_ver, __pyx_k_Triangulation__remove_finite_ver, sizeof(__pyx_k_Triangulation__remove_finite_ver), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation__remove_finite_ver_2, __pyx_k_Triangulation__remove_finite_ver_2, sizeof(__pyx_k_Triangulation__remove_finite_ver_2), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation__set_DTcode, __pyx_k_Triangulation__set_DTcode, sizeof(__pyx_k_Triangulation__set_DTcode), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__set_PDcode, __pyx_k_Triangulation__set_PDcode, sizeof(__pyx_k_Triangulation__set_PDcode), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__symplectic_form, __pyx_k_Triangulation__symplectic_form, sizeof(__pyx_k_Triangulation__symplectic_form), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__three_to_two, __pyx_k_Triangulation__three_to_two, sizeof(__pyx_k_Triangulation__three_to_two), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__to_bytes, __pyx_k_Triangulation__to_bytes, sizeof(__pyx_k_Triangulation__to_bytes), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation__to_bytes_line_699, __pyx_k_Triangulation__to_bytes_line_699, sizeof(__pyx_k_Triangulation__to_bytes_line_699), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation__to_string, __pyx_k_Triangulation__to_string, sizeof(__pyx_k_Triangulation__to_string), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation__to_string_line_65, __pyx_k_Triangulation__to_string_line_65, sizeof(__pyx_k_Triangulation__to_string_line_65), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation__two_to_three, __pyx_k_Triangulation__two_to_three, sizeof(__pyx_k_Triangulation__two_to_three), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation__unsimplified_fill, __pyx_k_Triangulation__unsimplified_fill, sizeof(__pyx_k_Triangulation__unsimplified_fill), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation__unsimplified_fill_2, __pyx_k_Triangulation__unsimplified_fill_2, sizeof(__pyx_k_Triangulation__unsimplified_fill_2), 0, 1, 0, 0},
    {&__pyx_kp_s_Triangulation_and_text_files, __pyx_k_Triangulation_and_text_files, sizeof(__pyx_k_Triangulation_and_text_files), 0, 0, 1, 0},
    {&__pyx_kp_s_Triangulation_contains_cusps_onl, __pyx_k_Triangulation_contains_cusps_onl, sizeof(__pyx_k_Triangulation_contains_cusps_onl), 0, 0, 1, 0},
    {&__pyx_n_s_Triangulation_copy, __pyx_k_Triangulation_copy, sizeof(__pyx_k_Triangulation_copy), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_copy_line_442, __pyx_k_Triangulation_copy_line_442, sizeof(__pyx_k_Triangulation_copy_line_442), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_cover, __pyx_k_Triangulation_cover, sizeof(__pyx_k_Triangulation_cover), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation_cover_info, __pyx_k_Triangulation_cover_info, sizeof(__pyx_k_Triangulation_cover_info), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_cover_line_2360, __pyx_k_Triangulation_cover_line_2360, sizeof(__pyx_k_Triangulation_cover_line_2360), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_covers, __pyx_k_Triangulation_covers, sizeof(__pyx_k_Triangulation_covers), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_covers_line_2460, __pyx_k_Triangulation_covers_line_2460, sizeof(__pyx_k_Triangulation_covers_line_2460), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_cusp_info, __pyx_k_Triangulation_cusp_info, sizeof(__pyx_k_Triangulation_cusp_info), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_cusp_info_line_119, __pyx_k_Triangulation_cusp_info_line_119, sizeof(__pyx_k_Triangulation_cusp_info_line_119), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_dehn_fill, __pyx_k_Triangulation_dehn_fill, sizeof(__pyx_k_Triangulation_dehn_fill), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_dehn_fill_line_112, __pyx_k_Triangulation_dehn_fill_line_112, sizeof(__pyx_k_Triangulation_dehn_fill_line_112), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_edge_valences, __pyx_k_Triangulation_edge_valences, sizeof(__pyx_k_Triangulation_edge_valences), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_edge_valences_line, __pyx_k_Triangulation_edge_valences_line, sizeof(__pyx_k_Triangulation_edge_valences_line), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_filled_triangulati, __pyx_k_Triangulation_filled_triangulati, sizeof(__pyx_k_Triangulation_filled_triangulati), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_filled_triangulati_2, __pyx_k_Triangulation_filled_triangulati_2, sizeof(__pyx_k_Triangulation_filled_triangulati_2), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_from_Manifold, __pyx_k_Triangulation_from_Manifold, sizeof(__pyx_k_Triangulation_from_Manifold), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation_fundamental_group, __pyx_k_Triangulation_fundamental_group, sizeof(__pyx_k_Triangulation_fundamental_group), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_fundamental_group_2, __pyx_k_Triangulation_fundamental_group_2, sizeof(__pyx_k_Triangulation_fundamental_group_2), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_gluing_equations, __pyx_k_Triangulation_gluing_equations, sizeof(__pyx_k_Triangulation_gluing_equations), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_gluing_equations_l, __pyx_k_Triangulation_gluing_equations_l, sizeof(__pyx_k_Triangulation_gluing_equations_l), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_gluing_equations_p, __pyx_k_Triangulation_gluing_equations_p, sizeof(__pyx_k_Triangulation_gluing_equations_p), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_gluing_equations_p_2, __pyx_k_Triangulation_gluing_equations_p_2, sizeof(__pyx_k_Triangulation_gluing_equations_p_2), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_has_finite_vertice, __pyx_k_Triangulation_has_finite_vertice, sizeof(__pyx_k_Triangulation_has_finite_vertice), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_has_finite_vertice_2, __pyx_k_Triangulation_has_finite_vertice_2, sizeof(__pyx_k_Triangulation_has_finite_vertice_2), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_homology, __pyx_k_Triangulation_homology, sizeof(__pyx_k_Triangulation_homology), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_homology_line_2278, __pyx_k_Triangulation_homology_line_2278, sizeof(__pyx_k_Triangulation_homology_line_2278), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_is_orientable, __pyx_k_Triangulation_is_orientable, sizeof(__pyx_k_Triangulation_is_orientable), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_is_orientable_line, __pyx_k_Triangulation_is_orientable_line, sizeof(__pyx_k_Triangulation_is_orientable_line), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_isomorphisms_to, __pyx_k_Triangulation_isomorphisms_to, sizeof(__pyx_k_Triangulation_isomorphisms_to), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_isomorphisms_to_li, __pyx_k_Triangulation_isomorphisms_to_li, sizeof(__pyx_k_Triangulation_isomorphisms_to_li), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_link, __pyx_k_Triangulation_link, sizeof(__pyx_k_Triangulation_link), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation_name, __pyx_k_Triangulation_name, sizeof(__pyx_k_Triangulation_name), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_name_line_1049, __pyx_k_Triangulation_name_line_1049, sizeof(__pyx_k_Triangulation_name_line_1049), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_num_cusps, __pyx_k_Triangulation_num_cusps, sizeof(__pyx_k_Triangulation_num_cusps), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_num_cusps_line_363, __pyx_k_Triangulation_num_cusps_line_363, sizeof(__pyx_k_Triangulation_num_cusps_line_363), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_num_tetrahedra, __pyx_k_Triangulation_num_tetrahedra, sizeof(__pyx_k_Triangulation_num_tetrahedra), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_num_tetrahedra_lin, __pyx_k_Triangulation_num_tetrahedra_lin, sizeof(__pyx_k_Triangulation_num_tetrahedra_lin), 0, 1, 0, 0},
    {&__pyx_kp_s_Triangulation_or_Manifold, __pyx_k_Triangulation_or_Manifold, sizeof(__pyx_k_Triangulation_or_Manifold), 0, 0, 1, 0},
    {&__pyx_n_s_Triangulation_orientation_cover, __pyx_k_Triangulation_orientation_cover, sizeof(__pyx_k_Triangulation_orientation_cover), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_orientation_cover_2, __pyx_k_Triangulation_orientation_cover_2, sizeof(__pyx_k_Triangulation_orientation_cover_2), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_pickle, __pyx_k_Triangulation_pickle, sizeof(__pyx_k_Triangulation_pickle), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation_plink, __pyx_k_Triangulation_plink, sizeof(__pyx_k_Triangulation_plink), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_plink_line_319, __pyx_k_Triangulation_plink_line_319, sizeof(__pyx_k_Triangulation_plink_line_319), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_ptolemy_generalize, __pyx_k_Triangulation_ptolemy_generalize, sizeof(__pyx_k_Triangulation_ptolemy_generalize), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_ptolemy_generalize_2, __pyx_k_Triangulation_ptolemy_generalize_2, sizeof(__pyx_k_Triangulation_ptolemy_generalize_2), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_ptolemy_obstructio, __pyx_k_Triangulation_ptolemy_obstructio, sizeof(__pyx_k_Triangulation_ptolemy_obstructio), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_ptolemy_obstructio_2, __pyx_k_Triangulation_ptolemy_obstructio_2, sizeof(__pyx_k_Triangulation_ptolemy_obstructio_2), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_ptolemy_variety, __pyx_k_Triangulation_ptolemy_variety, sizeof(__pyx_k_Triangulation_ptolemy_variety), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_ptolemy_variety_li, __pyx_k_Triangulation_ptolemy_variety_li, sizeof(__pyx_k_Triangulation_ptolemy_variety_li), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_randomize, __pyx_k_Triangulation_randomize, sizeof(__pyx_k_Triangulation_randomize), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_randomize_line_459, __pyx_k_Triangulation_randomize_line_459, sizeof(__pyx_k_Triangulation_randomize_line_459), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_reverse_orientatio, __pyx_k_Triangulation_reverse_orientatio, sizeof(__pyx_k_Triangulation_reverse_orientatio), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_reverse_orientatio_2, __pyx_k_Triangulation_reverse_orientatio_2, sizeof(__pyx_k_Triangulation_reverse_orientatio_2), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_save, __pyx_k_Triangulation_save, sizeof(__pyx_k_Triangulation_save), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_save_line_629, __pyx_k_Triangulation_save_line_629, sizeof(__pyx_k_Triangulation_save_line_629), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_set_name, __pyx_k_Triangulation_set_name, sizeof(__pyx_k_Triangulation_set_name), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_set_name_line_1061, __pyx_k_Triangulation_set_name_line_1061, sizeof(__pyx_k_Triangulation_set_name_line_1061), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_set_peripheral_cur, __pyx_k_Triangulation_set_peripheral_cur, sizeof(__pyx_k_Triangulation_set_peripheral_cur), 0, 0, 1, 1},
    {&__pyx_n_s_Triangulation_simplify, __pyx_k_Triangulation_simplify, sizeof(__pyx_k_Triangulation_simplify), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_simplify_line_473, __pyx_k_Triangulation_simplify_line_473, sizeof(__pyx_k_Triangulation_simplify_line_473), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_symplectic_basis, __pyx_k_Triangulation_symplectic_basis, sizeof(__pyx_k_Triangulation_symplectic_basis), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_symplectic_basis_l, __pyx_k_Triangulation_symplectic_basis_l, sizeof(__pyx_k_Triangulation_symplectic_basis_l), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_triangulation_isos, __pyx_k_Triangulation_triangulation_isos, sizeof(__pyx_k_Triangulation_triangulation_isos), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_triangulation_isos_2, __pyx_k_Triangulation_triangulation_isos_2, sizeof(__pyx_k_Triangulation_triangulation_isos_2), 0, 1, 0, 0},
    {&__pyx_n_s_Triangulation_with_hyperbolic_st, __pyx_k_Triangulation_with_hyperbolic_st, sizeof(__pyx_k_Triangulation_with_hyperbolic_st), 0, 0, 1, 1},
    {&__pyx_kp_u_Triangulation_with_hyperbolic_st_2, __pyx_k_Triangulation_with_hyperbolic_st_2, sizeof(__pyx_k_Triangulation_with_hyperbolic_st_2), 0, 1, 0, 0},
    {&__pyx_kp_u_Try_to_simplify_the_triangulati, __pyx_k_Try_to_simplify_the_triangulati, sizeof(__pyx_k_Try_to_simplify_the_triangulati), 0, 1, 0, 0},
    {&__pyx_n_s_Type, __pyx_k_Type, sizeof(__pyx_k_Type), 0, 0, 1, 1},
    {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
    {&__pyx_n_s_UI_callback, __pyx_k_UI_callback, sizeof(__pyx_k_UI_callback), 0, 0, 1, 1},
    {&__pyx_kp_u_Used_by_pickle_dumps_from_pickl, __pyx_k_Used_by_pickle_dumps_from_pickl, sizeof(__pyx_k_Used_by_pickle_dumps_from_pickl), 0, 1, 0, 0},
    {&__pyx_kp_u_Used_by_the_pickle_module_to_pi, __pyx_k_Used_by_the_pickle_module_to_pi, sizeof(__pyx_k_Used_by_the_pickle_module_to_pi), 0, 1, 0, 0},
    {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
    {&__pyx_kp_s_Verified_and_arbitrary_precision, __pyx_k_Verified_and_arbitrary_precision, sizeof(__pyx_k_Verified_and_arbitrary_precision), 0, 0, 1, 0},
    {&__pyx_n_s_ViewerWindow, __pyx_k_ViewerWindow, sizeof(__pyx_k_ViewerWindow), 0, 0, 1, 1},
    {&__pyx_kp_u_WARNING_Users_should_not_use_th, __pyx_k_WARNING_Users_should_not_use_th, sizeof(__pyx_k_WARNING_Users_should_not_use_th), 0, 1, 0, 0},
    {&__pyx_kp_u_WARNING_Users_should_not_use_th_2, __pyx_k_WARNING_Users_should_not_use_th_2, sizeof(__pyx_k_WARNING_Users_should_not_use_th_2), 0, 1, 0, 0},
    {&__pyx_kp_u_WARNING_Users_should_not_use_th_3, __pyx_k_WARNING_Users_should_not_use_th_3, sizeof(__pyx_k_WARNING_Users_should_not_use_th_3), 0, 1, 0, 0},
    {&__pyx_kp_s_Warning_Result_is_not_symplectic, __pyx_k_Warning_Result_is_not_symplectic, sizeof(__pyx_k_Warning_Result_is_not_symplectic), 0, 0, 1, 0},
    {&__pyx_kp_s_Words_must_be_represented_as_Pyt, __pyx_k_Words_must_be_represented_as_Pyt, sizeof(__pyx_k_Words_must_be_represented_as_Pyt), 0, 0, 1, 0},
    {&__pyx_kp_s_Wrong_equation_type, __pyx_k_Wrong_equation_type, sizeof(__pyx_k_Wrong_equation_type), 0, 0, 1, 0},
    {&__pyx_n_s_X, __pyx_k_X, sizeof(__pyx_k_X), 0, 0, 1, 1},
    {&__pyx_n_s_Xbackward_neighbor, __pyx_k_Xbackward_neighbor, sizeof(__pyx_k_Xbackward_neighbor), 0, 0, 1, 1},
    {&__pyx_n_s_Xbackward_strand, __pyx_k_Xbackward_strand, sizeof(__pyx_k_Xbackward_strand), 0, 0, 1, 1},
    {&__pyx_n_s_Xcomponent, __pyx_k_Xcomponent, sizeof(__pyx_k_Xcomponent), 0, 0, 1, 1},
    {&__pyx_n_s_Xforward_neighbor, __pyx_k_Xforward_neighbor, sizeof(__pyx_k_Xforward_neighbor), 0, 0, 1, 1},
    {&__pyx_n_s_Xforward_strand, __pyx_k_Xforward_strand, sizeof(__pyx_k_Xforward_strand), 0, 0, 1, 1},
    {&__pyx_n_s_Y, __pyx_k_Y, sizeof(__pyx_k_Y), 0, 0, 1, 1},
    {&__pyx_n_s_Ybackward_neighbor, __pyx_k_Ybackward_neighbor, sizeof(__pyx_k_Ybackward_neighbor), 0, 0, 1, 1},
    {&__pyx_n_s_Ybackward_strand, __pyx_k_Ybackward_strand, sizeof(__pyx_k_Ybackward_strand), 0, 0, 1, 1},
    {&__pyx_n_s_Ycomponent, __pyx_k_Ycomponent, sizeof(__pyx_k_Ycomponent), 0, 0, 1, 1},
    {&__pyx_n_s_Yforward_neighbor, __pyx_k_Yforward_neighbor, sizeof(__pyx_k_Yforward_neighbor), 0, 0, 1, 1},
    {&__pyx_n_s_Yforward_strand, __pyx_k_Yforward_strand, sizeof(__pyx_k_Yforward_strand), 0, 0, 1, 1},
    {&__pyx_kp_s_You_have_specified_a_Hoste_Thist, __pyx_k_You_have_specified_a_Hoste_Thist, sizeof(__pyx_k_You_have_specified_a_Hoste_Thist), 0, 0, 1, 0},
    {&__pyx_kp_s_You_must_apply_fillings_to_all_o, __pyx_k_You_must_apply_fillings_to_all_o, sizeof(__pyx_k_You_must_apply_fillings_to_all_o), 0, 0, 1, 0},
    {&__pyx_kp_s_You_must_apply_shortest_to_all_o, __pyx_k_You_must_apply_shortest_to_all_o, sizeof(__pyx_k_You_must_apply_shortest_to_all_o), 0, 0, 1, 0},
    {&__pyx_kp_s_You_provided_filling_data_for_to, __pyx_k_You_provided_filling_data_for_to, sizeof(__pyx_k_You_provided_filling_data_for_to), 0, 0, 1, 0},
    {&__pyx_kp_s_You_provided_more_peripheral_dat, __pyx_k_You_provided_more_peripheral_dat, sizeof(__pyx_k_You_provided_more_peripheral_dat), 0, 0, 1, 0},
    {&__pyx_kp_s_You_tried_to_create_an_empty_Sym, __pyx_k_You_tried_to_create_an_empty_Sym, sizeof(__pyx_k_You_tried_to_create_an_empty_Sym), 0, 0, 1, 0},
    {&__pyx_n_s_Z, __pyx_k_Z, sizeof(__pyx_k_Z), 0, 0, 1, 1},
    {&__pyx_kp_s_Z_d, __pyx_k_Z_d, sizeof(__pyx_k_Z_d), 0, 0, 1, 0},
    {&__pyx_kp_s__111, __pyx_k__111, sizeof(__pyx_k__111), 0, 0, 1, 0},
    {&__pyx_kp_s__114, __pyx_k__114, sizeof(__pyx_k__114), 0, 0, 1, 0},
    {&__pyx_kp_s__115, __pyx_k__115, sizeof(__pyx_k__115), 0, 0, 1, 0},
    {&__pyx_kp_s__116, __pyx_k__116, sizeof(__pyx_k__116), 0, 0, 1, 0},
    {&__pyx_kp_s__117, __pyx_k__117, sizeof(__pyx_k__117), 0, 0, 1, 0},
    {&__pyx_kp_s__118, __pyx_k__118, sizeof(__pyx_k__118), 0, 0, 1, 0},
    {&__pyx_kp_s__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 1, 0},
    {&__pyx_kp_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 0},
    {&__pyx_kp_b__144, __pyx_k__144, sizeof(__pyx_k__144), 0, 0, 0, 0},
    {&__pyx_n_s__150, __pyx_k__150, sizeof(__pyx_k__150), 0, 0, 1, 1},
    {&__pyx_kp_s__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 1, 0},
    {&__pyx_kp_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 0},
    {&__pyx_kp_s__170, __pyx_k__170, sizeof(__pyx_k__170), 0, 0, 1, 0},
    {&__pyx_kp_u__170, __pyx_k__170, sizeof(__pyx_k__170), 0, 1, 0, 0},
    {&__pyx_kp_s__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 0, 1, 0},
    {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
    {&__pyx_kp_s__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 1, 0},
    {&__pyx_kp_s__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 0, 1, 0},
    {&__pyx_kp_s__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 0, 1, 0},
    {&__pyx_kp_s__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 0, 1, 0},
    {&__pyx_kp_s__33, __pyx_k__33, sizeof(__pyx_k__33), 0, 0, 1, 0},
    {&__pyx_kp_s__38, __pyx_k__38, sizeof(__pyx_k__38), 0, 0, 1, 0},
    {&__pyx_kp_s__653, __pyx_k__653, sizeof(__pyx_k__653), 0, 0, 1, 0},
    {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0},
    {&__pyx_n_s__726, __pyx_k__726, sizeof(__pyx_k__726), 0, 0, 1, 1},
    {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0},
    {&__pyx_kp_b__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 0, 0},
    {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
    {&__pyx_kp_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 0},
    {&__pyx_n_s_a_2, __pyx_k_a_2, sizeof(__pyx_k_a_2), 0, 0, 1, 1},
    {&__pyx_n_s_a_il, __pyx_k_a_il, sizeof(__pyx_k_a_il), 0, 0, 1, 1},
    {&__pyx_kp_s_a_zA_Z0_9, __pyx_k_a_zA_Z0_9, sizeof(__pyx_k_a_zA_Z0_9), 0, 0, 1, 0},
    {&__pyx_kp_s_abcABC__d_abcABC__d, __pyx_k_abcABC__d_abcABC__d, sizeof(__pyx_k_abcABC__d_abcABC__d), 0, 0, 1, 0},
    {&__pyx_kp_s_abcdefghijklmnopqrstuvwxyzZYXWV, __pyx_k_abcdefghijklmnopqrstuvwxyzZYXWV, sizeof(__pyx_k_abcdefghijklmnopqrstuvwxyzZYXWV), 0, 0, 1, 0},
    {&__pyx_n_s_abelian_description, __pyx_k_abelian_description, sizeof(__pyx_k_abelian_description), 0, 0, 1, 1},
    {&__pyx_n_s_abelianization, __pyx_k_abelianization, sizeof(__pyx_k_abelianization), 0, 0, 1, 1},
    {&__pyx_n_s_absImag, __pyx_k_absImag, sizeof(__pyx_k_absImag), 0, 0, 1, 1},
    {&__pyx_n_s_abspath, __pyx_k_abspath, sizeof(__pyx_k_abspath), 0, 0, 1, 1},
    {&__pyx_n_s_acc_log_im, __pyx_k_acc_log_im, sizeof(__pyx_k_acc_log_im), 0, 0, 1, 1},
    {&__pyx_n_s_acc_log_re, __pyx_k_acc_log_re, sizeof(__pyx_k_acc_log_re), 0, 0, 1, 1},
    {&__pyx_n_s_acc_rec_im, __pyx_k_acc_rec_im, sizeof(__pyx_k_acc_rec_im), 0, 0, 1, 1},
    {&__pyx_n_s_acc_rec_re, __pyx_k_acc_rec_re, sizeof(__pyx_k_acc_rec_re), 0, 0, 1, 1},
    {&__pyx_n_s_accuracies, __pyx_k_accuracies, sizeof(__pyx_k_accuracies), 0, 0, 1, 1},
    {&__pyx_n_s_accuracy, __pyx_k_accuracy, sizeof(__pyx_k_accuracy), 0, 0, 1, 1},
    {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
    {&__pyx_n_s_add_rows, __pyx_k_add_rows, sizeof(__pyx_k_add_rows), 0, 0, 1, 1},
    {&__pyx_n_s_algorithm, __pyx_k_algorithm, sizeof(__pyx_k_algorithm), 0, 0, 1, 1},
    {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
    {&__pyx_n_s_all_tables, __pyx_k_all_tables, sizeof(__pyx_k_all_tables), 0, 0, 1, 1},
    {&__pyx_kp_s_all_tetrahedra_positively_orient, __pyx_k_all_tetrahedra_positively_orient, sizeof(__pyx_k_all_tetrahedra_positively_orient), 0, 0, 1, 0},
    {&__pyx_n_s_alpha, __pyx_k_alpha, sizeof(__pyx_k_alpha), 0, 0, 1, 1},
    {&__pyx_kp_s_alternating_gz, __pyx_k_alternating_gz, sizeof(__pyx_k_alternating_gz), 0, 0, 1, 0},
    {&__pyx_n_s_alternation, __pyx_k_alternation, sizeof(__pyx_k_alternation), 0, 0, 1, 1},
    {&__pyx_n_s_ans, __pyx_k_ans, sizeof(__pyx_k_ans), 0, 0, 1, 1},
    {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
    {&__pyx_n_s_are_isometric, __pyx_k_are_isometric, sizeof(__pyx_k_are_isometric), 0, 0, 1, 1},
    {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
    {&__pyx_n_s_as_ideal, __pyx_k_as_ideal, sizeof(__pyx_k_as_ideal), 0, 0, 1, 1},
    {&__pyx_n_s_as_int_list, __pyx_k_as_int_list, sizeof(__pyx_k_as_int_list), 0, 0, 1, 1},
    {&__pyx_n_s_as_string, __pyx_k_as_string, sizeof(__pyx_k_as_string), 0, 0, 1, 1},
    {&__pyx_n_s_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 0, 1, 1},
    {&__pyx_n_s_ascii_lowercase, __pyx_k_ascii_lowercase, sizeof(__pyx_k_ascii_lowercase), 0, 0, 1, 1},
    {&__pyx_n_s_asksaveasfile, __pyx_k_asksaveasfile, sizeof(__pyx_k_asksaveasfile), 0, 0, 1, 1},
    {&__pyx_n_s_assignments, __pyx_k_assignments, sizeof(__pyx_k_assignments), 0, 0, 1, 1},
    {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
    {&__pyx_kp_s_at_least, __pyx_k_at_least, sizeof(__pyx_k_at_least), 0, 0, 1, 0},
    {&__pyx_n_s_atexit, __pyx_k_atexit, sizeof(__pyx_k_atexit), 0, 0, 1, 1},
    {&__pyx_kp_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 0},
    {&__pyx_n_s_b_2, __pyx_k_b_2, sizeof(__pyx_k_b_2), 0, 0, 1, 1},
    {&__pyx_kp_s_b_RL, __pyx_k_b_RL, sizeof(__pyx_k_b_RL), 0, 0, 1, 0},
    {&__pyx_kp_s_b_RL_2, __pyx_k_b_RL_2, sizeof(__pyx_k_b_RL_2), 0, 0, 1, 0},
    {&__pyx_kp_s_b_RRL, __pyx_k_b_RRL, sizeof(__pyx_k_b_RRL), 0, 0, 1, 0},
    {&__pyx_kp_s_b_RRL_2, __pyx_k_b_RRL_2, sizeof(__pyx_k_b_RRL_2), 0, 0, 1, 0},
    {&__pyx_n_s_b_file_name, __pyx_k_b_file_name, sizeof(__pyx_k_b_file_name), 0, 0, 1, 1},
    {&__pyx_n_s_b_new_name, __pyx_k_b_new_name, sizeof(__pyx_k_b_new_name), 0, 0, 1, 1},
    {&__pyx_kp_s_b_no_lLrR, __pyx_k_b_no_lLrR, sizeof(__pyx_k_b_no_lLrR), 0, 0, 1, 0},
    {&__pyx_n_s_b_string, __pyx_k_b_string, sizeof(__pyx_k_b_string), 0, 0, 1, 1},
    {&__pyx_n_s_ball, __pyx_k_ball, sizeof(__pyx_k_ball), 0, 0, 1, 1},
    {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
    {&__pyx_n_s_bases, __pyx_k_bases, sizeof(__pyx_k_bases), 0, 0, 1, 1},
    {&__pyx_n_s_basis, __pyx_k_basis, sizeof(__pyx_k_basis), 0, 0, 1, 1},
    {&__pyx_n_s_betti_number, __pyx_k_betti_number, sizeof(__pyx_k_betti_number), 0, 0, 1, 1},
    {&__pyx_kp_s_binary, __pyx_k_binary, sizeof(__pyx_k_binary), 0, 0, 1, 0},
    {&__pyx_kp_s_binary_dihedral_group_2_2_d, __pyx_k_binary_dihedral_group_2_2_d, sizeof(__pyx_k_binary_dihedral_group_2_2_d), 0, 0, 1, 0},
    {&__pyx_n_s_bit, __pyx_k_bit, sizeof(__pyx_k_bit), 0, 0, 1, 1},
    {&__pyx_n_s_bits_prec, __pyx_k_bits_prec, sizeof(__pyx_k_bits_prec), 0, 0, 1, 1},
    {&__pyx_n_s_blowup_multiple, __pyx_k_blowup_multiple, sizeof(__pyx_k_blowup_multiple), 0, 0, 1, 1},
    {&__pyx_n_s_browse, __pyx_k_browse, sizeof(__pyx_k_browse), 0, 0, 1, 1},
    {&__pyx_n_s_browser, __pyx_k_browser, sizeof(__pyx_k_browser), 0, 0, 1, 1},
    {&__pyx_n_s_bundle, __pyx_k_bundle, sizeof(__pyx_k_bundle), 0, 0, 1, 1},
    {&__pyx_n_s_bundle_from_string, __pyx_k_bundle_from_string, sizeof(__pyx_k_bundle_from_string), 0, 0, 1, 1},
    {&__pyx_n_s_byte, __pyx_k_byte, sizeof(__pyx_k_byte), 0, 0, 1, 1},
    {&__pyx_n_s_bytearray_to_bytes, __pyx_k_bytearray_to_bytes, sizeof(__pyx_k_bytearray_to_bytes), 0, 0, 1, 1},
    {&__pyx_n_s_byteseq, __pyx_k_byteseq, sizeof(__pyx_k_byteseq), 0, 0, 1, 1},
    {&__pyx_n_s_bytestring, __pyx_k_bytestring, sizeof(__pyx_k_bytestring), 0, 0, 1, 1},
    {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
    {&__pyx_n_s_c0, __pyx_k_c0, sizeof(__pyx_k_c0), 0, 0, 1, 1},
    {&__pyx_n_s_c1, __pyx_k_c1, sizeof(__pyx_k_c1), 0, 0, 1, 1},
    {&__pyx_n_s_c2, __pyx_k_c2, sizeof(__pyx_k_c2), 0, 0, 1, 1},
    {&__pyx_n_s_c3, __pyx_k_c3, sizeof(__pyx_k_c3), 0, 0, 1, 1},
    {&__pyx_n_s_c_abelianization, __pyx_k_c_abelianization, sizeof(__pyx_k_c_abelianization), 0, 0, 1, 1},
    {&__pyx_n_s_c_canonized_triangulation, __pyx_k_c_canonized_triangulation, sizeof(__pyx_k_c_canonized_triangulation), 0, 0, 1, 1},
    {&__pyx_n_s_c_center, __pyx_k_c_center, sizeof(__pyx_k_c_center), 0, 0, 1, 1},
    {&__pyx_n_s_c_comm_subgroup, __pyx_k_c_comm_subgroup, sizeof(__pyx_k_c_comm_subgroup), 0, 0, 1, 1},
    {&__pyx_n_s_c_core_length, __pyx_k_c_core_length, sizeof(__pyx_k_c_core_length), 0, 0, 1, 1},
    {&__pyx_n_s_c_cover_type, __pyx_k_c_cover_type, sizeof(__pyx_k_c_cover_type), 0, 0, 1, 1},
    {&__pyx_n_s_c_eqns, __pyx_k_c_eqns, sizeof(__pyx_k_c_eqns), 0, 0, 1, 1},
    {&__pyx_n_s_c_factor_0, __pyx_k_c_factor_0, sizeof(__pyx_k_c_factor_0), 0, 0, 1, 1},
    {&__pyx_n_s_c_factor_1, __pyx_k_c_factor_1, sizeof(__pyx_k_c_factor_1), 0, 0, 1, 1},
    {&__pyx_n_s_c_filled_tri, __pyx_k_c_filled_tri, sizeof(__pyx_k_c_filled_tri), 0, 0, 1, 1},
    {&__pyx_n_s_c_longitude, __pyx_k_c_longitude, sizeof(__pyx_k_c_longitude), 0, 0, 1, 1},
    {&__pyx_n_s_c_matrix, __pyx_k_c_matrix, sizeof(__pyx_k_c_matrix), 0, 0, 1, 1},
    {&__pyx_n_s_c_meridian, __pyx_k_c_meridian, sizeof(__pyx_k_c_meridian), 0, 0, 1, 1},
    {&__pyx_n_s_c_moves, __pyx_k_c_moves, sizeof(__pyx_k_c_moves), 0, 0, 1, 1},
    {&__pyx_n_s_c_new_name, __pyx_k_c_new_name, sizeof(__pyx_k_c_new_name), 0, 0, 1, 1},
    {&__pyx_n_s_c_new_tri, __pyx_k_c_new_tri, sizeof(__pyx_k_c_new_tri), 0, 0, 1, 1},
    {&__pyx_n_s_c_obstruction_class, __pyx_k_c_obstruction_class, sizeof(__pyx_k_c_obstruction_class), 0, 0, 1, 1},
    {&__pyx_n_s_c_opacities, __pyx_k_c_opacities, sizeof(__pyx_k_c_opacities), 0, 0, 1, 1},
    {&__pyx_n_s_c_representation, __pyx_k_c_representation, sizeof(__pyx_k_c_representation), 0, 0, 1, 1},
    {&__pyx_n_s_c_retriangulated_triangulation, __pyx_k_c_retriangulated_triangulation, sizeof(__pyx_k_c_retriangulated_triangulation), 0, 0, 1, 1},
    {&__pyx_n_s_c_string, __pyx_k_c_string, sizeof(__pyx_k_c_string), 0, 0, 1, 1},
    {&__pyx_n_s_c_symmetric_triangulation, __pyx_k_c_symmetric_triangulation, sizeof(__pyx_k_c_symmetric_triangulation), 0, 0, 1, 1},
    {&__pyx_n_s_c_target, __pyx_k_c_target, sizeof(__pyx_k_c_target), 0, 0, 1, 1},
    {&__pyx_n_s_c_terse, __pyx_k_c_terse, sizeof(__pyx_k_c_terse), 0, 0, 1, 1},
    {&__pyx_n_s_c_triangulation, __pyx_k_c_triangulation, sizeof(__pyx_k_c_triangulation), 0, 0, 1, 1},
    {&__pyx_n_s_c_vars, __pyx_k_c_vars, sizeof(__pyx_k_c_vars), 0, 0, 1, 1},
    {&__pyx_n_s_c_word, __pyx_k_c_word, sizeof(__pyx_k_c_word), 0, 0, 1, 1},
    {&__pyx_n_s_cache, __pyx_k_cache, sizeof(__pyx_k_cache), 0, 0, 1, 1},
    {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1},
    {&__pyx_n_s_canonical, __pyx_k_canonical, sizeof(__pyx_k_canonical), 0, 0, 1, 1},
    {&__pyx_n_s_canonical_cells_are_tetrahedra, __pyx_k_canonical_cells_are_tetrahedra, sizeof(__pyx_k_canonical_cells_are_tetrahedra), 0, 0, 1, 1},
    {&__pyx_n_s_canonical_retriangulation, __pyx_k_canonical_retriangulation, sizeof(__pyx_k_canonical_retriangulation), 0, 0, 1, 1},
    {&__pyx_n_s_canonize, __pyx_k_canonize, sizeof(__pyx_k_canonize), 0, 0, 1, 1},
    {&__pyx_n_s_cb_menu, __pyx_k_cb_menu, sizeof(__pyx_k_cb_menu), 0, 0, 1, 1},
    {&__pyx_n_s_census_index, __pyx_k_census_index, sizeof(__pyx_k_census_index), 0, 0, 1, 1},
    {&__pyx_n_s_census_knot_archive, __pyx_k_census_knot_archive, sizeof(__pyx_k_census_knot_archive), 0, 0, 1, 1},
    {&__pyx_n_s_census_knot_numbers, __pyx_k_census_knot_numbers, sizeof(__pyx_k_census_knot_numbers), 0, 0, 1, 1},
    {&__pyx_n_s_center, __pyx_k_center, sizeof(__pyx_k_center), 0, 0, 1, 1},
    {&__pyx_n_s_centroid_at_origin, __pyx_k_centroid_at_origin, sizeof(__pyx_k_centroid_at_origin), 0, 0, 1, 1},
    {&__pyx_n_s_certified_shapes, __pyx_k_certified_shapes, sizeof(__pyx_k_certified_shapes), 0, 0, 1, 1},
    {&__pyx_n_s_character_variety, __pyx_k_character_variety, sizeof(__pyx_k_character_variety), 0, 0, 1, 1},
    {&__pyx_n_s_character_variety_ideal, __pyx_k_character_variety_ideal, sizeof(__pyx_k_character_variety_ideal), 0, 0, 1, 1},
    {&__pyx_n_s_character_variety_vars_and_polys, __pyx_k_character_variety_vars_and_polys, sizeof(__pyx_k_character_variety_vars_and_polys), 0, 0, 1, 1},
    {&__pyx_n_s_check_SnapPea_memory, __pyx_k_check_SnapPea_memory, sizeof(__pyx_k_check_SnapPea_memory), 0, 0, 1, 1},
    {&__pyx_n_s_check_index, __pyx_k_check_index, sizeof(__pyx_k_check_index), 0, 0, 1, 1},
    {&__pyx_n_s_chern_simons, __pyx_k_chern_simons, sizeof(__pyx_k_chern_simons), 0, 0, 1, 1},
    {&__pyx_n_s_choose_generators, __pyx_k_choose_generators, sizeof(__pyx_k_choose_generators), 0, 0, 1, 1},
    {&__pyx_n_s_choose_generators_info, __pyx_k_choose_generators_info, sizeof(__pyx_k_choose_generators_info), 0, 0, 1, 1},
    {&__pyx_n_s_circle, __pyx_k_circle, sizeof(__pyx_k_circle), 0, 0, 1, 1},
    {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
    {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
    {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1},
    {&__pyx_n_s_clear_marks, __pyx_k_clear_marks, sizeof(__pyx_k_clear_marks), 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_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
    {&__pyx_n_s_closed_census_directory, __pyx_k_closed_census_directory, sizeof(__pyx_k_closed_census_directory), 0, 0, 1, 1},
    {&__pyx_n_s_closed_nonorientable, __pyx_k_closed_nonorientable, sizeof(__pyx_k_closed_nonorientable), 0, 0, 1, 1},
    {&__pyx_n_s_closed_orientable, __pyx_k_closed_orientable, sizeof(__pyx_k_closed_orientable), 0, 0, 1, 1},
    {&__pyx_n_s_closest, __pyx_k_closest, sizeof(__pyx_k_closest), 0, 0, 1, 1},
    {&__pyx_n_s_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1},
    {&__pyx_n_s_cobs, __pyx_k_cobs, sizeof(__pyx_k_cobs), 0, 0, 1, 1},
    {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
    {&__pyx_n_s_codec, __pyx_k_codec, sizeof(__pyx_k_codec), 0, 0, 1, 1},
    {&__pyx_n_s_coefficient_list, __pyx_k_coefficient_list, sizeof(__pyx_k_coefficient_list), 0, 0, 1, 1},
    {&__pyx_n_s_coeffs, __pyx_k_coeffs, sizeof(__pyx_k_coeffs), 0, 0, 1, 1},
    {&__pyx_n_s_col_support, __pyx_k_col_support, sizeof(__pyx_k_col_support), 0, 0, 1, 1},
    {&__pyx_n_s_cols, __pyx_k_cols, sizeof(__pyx_k_cols), 0, 0, 1, 1},
    {&__pyx_n_s_columns, __pyx_k_columns, sizeof(__pyx_k_columns), 0, 0, 1, 1},
    {&__pyx_n_s_combinatorial, __pyx_k_combinatorial, sizeof(__pyx_k_combinatorial), 0, 0, 1, 1},
    {&__pyx_n_s_comm_subgroup, __pyx_k_comm_subgroup, sizeof(__pyx_k_comm_subgroup), 0, 0, 1, 1},
    {&__pyx_n_s_commutator_subgroup, __pyx_k_commutator_subgroup, sizeof(__pyx_k_commutator_subgroup), 0, 0, 1, 1},
    {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1},
    {&__pyx_n_s_complete, __pyx_k_complete, sizeof(__pyx_k_complete), 0, 0, 1, 1},
    {&__pyx_kp_s_complete_2, __pyx_k_complete_2, sizeof(__pyx_k_complete_2), 0, 0, 1, 0},
    {&__pyx_n_s_complete_length, __pyx_k_complete_length, sizeof(__pyx_k_complete_length), 0, 0, 1, 1},
    {&__pyx_kp_s_complete_length_2, __pyx_k_complete_length_2, sizeof(__pyx_k_complete_length_2), 0, 0, 1, 0},
    {&__pyx_n_s_complete_shape_array, __pyx_k_complete_shape_array, sizeof(__pyx_k_complete_shape_array), 0, 0, 1, 1},
    {&__pyx_n_s_complete_shapes, __pyx_k_complete_shapes, sizeof(__pyx_k_complete_shapes), 0, 0, 1, 1},
    {&__pyx_n_s_complex, __pyx_k_complex, sizeof(__pyx_k_complex), 0, 0, 1, 1},
    {&__pyx_n_s_complex_length, __pyx_k_complex_length, sizeof(__pyx_k_complex_length), 0, 0, 1, 1},
    {&__pyx_n_s_complex_volume, __pyx_k_complex_volume, sizeof(__pyx_k_complex_volume), 0, 0, 1, 1},
    {&__pyx_n_s_complex_volume_2, __pyx_k_complex_volume_2, sizeof(__pyx_k_complex_volume_2), 0, 0, 1, 1},
    {&__pyx_n_s_components, __pyx_k_components, sizeof(__pyx_k_components), 0, 0, 1, 1},
    {&__pyx_n_s_compute_corners, __pyx_k_compute_corners, sizeof(__pyx_k_compute_corners), 0, 0, 1, 1},
    {&__pyx_n_s_compute_cusp_shapes, __pyx_k_compute_cusp_shapes, sizeof(__pyx_k_compute_cusp_shapes), 0, 0, 1, 1},
    {&__pyx_n_s_compute_volume, __pyx_k_compute_volume, sizeof(__pyx_k_compute_volume), 0, 0, 1, 1},
    {&__pyx_n_s_contains, __pyx_k_contains, sizeof(__pyx_k_contains), 0, 0, 1, 1},
    {&__pyx_kp_s_contains_degenerate_tetrahedra, __pyx_k_contains_degenerate_tetrahedra, sizeof(__pyx_k_contains_degenerate_tetrahedra), 0, 0, 1, 0},
    {&__pyx_kp_s_contains_flat_tetrahedra, __pyx_k_contains_flat_tetrahedra, sizeof(__pyx_k_contains_flat_tetrahedra), 0, 0, 1, 0},
    {&__pyx_kp_s_contains_negatively_oriented_tet, __pyx_k_contains_negatively_oriented_tet, sizeof(__pyx_k_contains_negatively_oriented_tet), 0, 0, 1, 0},
    {&__pyx_n_s_content, __pyx_k_content, sizeof(__pyx_k_content), 0, 0, 1, 1},
    {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
    {&__pyx_n_s_copy_c_triangulation, __pyx_k_copy_c_triangulation, sizeof(__pyx_k_copy_c_triangulation), 0, 0, 1, 1},
    {&__pyx_n_s_core_length, __pyx_k_core_length, sizeof(__pyx_k_core_length), 0, 0, 1, 1},
    {&__pyx_n_s_corners, __pyx_k_corners, sizeof(__pyx_k_corners), 0, 0, 1, 1},
    {&__pyx_n_s_coset_action, __pyx_k_coset_action, sizeof(__pyx_k_coset_action), 0, 0, 1, 1},
    {&__pyx_n_s_cover, __pyx_k_cover, sizeof(__pyx_k_cover), 0, 0, 1, 1},
    {&__pyx_n_s_cover_c_triangulation, __pyx_k_cover_c_triangulation, sizeof(__pyx_k_cover_c_triangulation), 0, 0, 1, 1},
    {&__pyx_n_s_cover_count, __pyx_k_cover_count, sizeof(__pyx_k_cover_count), 0, 0, 1, 1},
    {&__pyx_n_s_cover_info, __pyx_k_cover_info, sizeof(__pyx_k_cover_info), 0, 0, 1, 1},
    {&__pyx_n_s_cover_locals_genexpr, __pyx_k_cover_locals_genexpr, sizeof(__pyx_k_cover_locals_genexpr), 0, 0, 1, 1},
    {&__pyx_n_s_cover_type, __pyx_k_cover_type, sizeof(__pyx_k_cover_type), 0, 0, 1, 1},
    {&__pyx_n_s_cover_types, __pyx_k_cover_types, sizeof(__pyx_k_cover_types), 0, 0, 1, 1},
    {&__pyx_n_s_covers, __pyx_k_covers, sizeof(__pyx_k_covers), 0, 0, 1, 1},
    {&__pyx_n_s_covers_gap, __pyx_k_covers_gap, sizeof(__pyx_k_covers_gap), 0, 0, 1, 1},
    {&__pyx_n_s_covers_low_index, __pyx_k_covers_low_index, sizeof(__pyx_k_covers_low_index), 0, 0, 1, 1},
    {&__pyx_n_s_covers_low_index_locals_index, __pyx_k_covers_low_index_locals_index, sizeof(__pyx_k_covers_low_index_locals_index), 0, 0, 1, 1},
    {&__pyx_n_s_covers_magma, __pyx_k_covers_magma, sizeof(__pyx_k_covers_magma), 0, 0, 1, 1},
    {&__pyx_n_s_covers_snappea, __pyx_k_covers_snappea, sizeof(__pyx_k_covers_snappea), 0, 0, 1, 1},
    {&__pyx_n_s_crossings, __pyx_k_crossings, sizeof(__pyx_k_crossings), 0, 0, 1, 1},
    {&__pyx_n_s_cs, __pyx_k_cs, sizeof(__pyx_k_cs), 0, 0, 1, 1},
    {&__pyx_n_s_curdir, __pyx_k_curdir, sizeof(__pyx_k_curdir), 0, 0, 1, 1},
    {&__pyx_n_s_current_modulus, __pyx_k_current_modulus, sizeof(__pyx_k_current_modulus), 0, 0, 1, 1},
    {&__pyx_n_s_current_shape, __pyx_k_current_shape, sizeof(__pyx_k_current_shape), 0, 0, 1, 1},
    {&__pyx_n_s_current_shape_accuracy, __pyx_k_current_shape_accuracy, sizeof(__pyx_k_current_shape_accuracy), 0, 0, 1, 1},
    {&__pyx_n_s_curve_list, __pyx_k_curve_list, sizeof(__pyx_k_curve_list), 0, 0, 1, 1},
    {&__pyx_n_s_cusp_cross_section_info, __pyx_k_cusp_cross_section_info, sizeof(__pyx_k_cusp_cross_section_info), 0, 0, 1, 1},
    {&__pyx_n_s_cusp_images, __pyx_k_cusp_images, sizeof(__pyx_k_cusp_images), 0, 0, 1, 1},
    {&__pyx_n_s_cusp_images_2, __pyx_k_cusp_images_2, sizeof(__pyx_k_cusp_images_2), 0, 0, 1, 1},
    {&__pyx_n_s_cusp_index, __pyx_k_cusp_index, sizeof(__pyx_k_cusp_index), 0, 0, 1, 1},
    {&__pyx_n_s_cusp_indices, __pyx_k_cusp_indices, sizeof(__pyx_k_cusp_indices), 0, 0, 1, 1},
    {&__pyx_n_s_cusp_info, __pyx_k_cusp_info, sizeof(__pyx_k_cusp_info), 0, 0, 1, 1},
    {&__pyx_n_s_cusp_maps, __pyx_k_cusp_maps, sizeof(__pyx_k_cusp_maps), 0, 0, 1, 1},
    {&__pyx_n_s_cusp_maps_2, __pyx_k_cusp_maps_2, sizeof(__pyx_k_cusp_maps_2), 0, 0, 1, 1},
    {&__pyx_n_s_cusp_neighborhood, __pyx_k_cusp_neighborhood, sizeof(__pyx_k_cusp_neighborhood), 0, 0, 1, 1},
    {&__pyx_n_s_cusp_type, __pyx_k_cusp_type, sizeof(__pyx_k_cusp_type), 0, 0, 1, 1},
    {&__pyx_n_s_cusps, __pyx_k_cusps, sizeof(__pyx_k_cusps), 0, 0, 1, 1},
    {&__pyx_n_s_cusps_to_fill, __pyx_k_cusps_to_fill, sizeof(__pyx_k_cusps_to_fill), 0, 0, 1, 1},
    {&__pyx_n_s_cutoff, __pyx_k_cutoff, sizeof(__pyx_k_cutoff), 0, 0, 1, 1},
    {&__pyx_n_s_cutoff_length, __pyx_k_cutoff_length, sizeof(__pyx_k_cutoff_length), 0, 0, 1, 1},
    {&__pyx_n_s_cutoff_radius, __pyx_k_cutoff_radius, sizeof(__pyx_k_cutoff_radius), 0, 0, 1, 1},
    {&__pyx_n_s_cutout, __pyx_k_cutout, sizeof(__pyx_k_cutout), 0, 0, 1, 1},
    {&__pyx_n_s_cy_eval, __pyx_k_cy_eval, sizeof(__pyx_k_cy_eval), 0, 0, 1, 1},
    {&__pyx_n_s_cyclic, __pyx_k_cyclic, sizeof(__pyx_k_cyclic), 0, 0, 1, 1},
    {&__pyx_kp_s_cython_core_abelian_group_pyx, __pyx_k_cython_core_abelian_group_pyx, sizeof(__pyx_k_cython_core_abelian_group_pyx), 0, 0, 1, 0},
    {&__pyx_kp_s_cython_core_basic_pyx, __pyx_k_cython_core_basic_pyx, sizeof(__pyx_k_cython_core_basic_pyx), 0, 0, 1, 0},
    {&__pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_k_cython_core_cusp_neighborhoods_p, sizeof(__pyx_k_cython_core_cusp_neighborhoods_p), 0, 0, 1, 0},
    {&__pyx_kp_s_cython_core_dirichlet_pyx, __pyx_k_cython_core_dirichlet_pyx, sizeof(__pyx_k_cython_core_dirichlet_pyx), 0, 0, 1, 0},
    {&__pyx_kp_s_cython_core_fundamental_group_py, __pyx_k_cython_core_fundamental_group_py, sizeof(__pyx_k_cython_core_fundamental_group_py), 0, 0, 1, 0},
    {&__pyx_kp_s_cython_core_manifold_pyx, __pyx_k_cython_core_manifold_pyx, sizeof(__pyx_k_cython_core_manifold_pyx), 0, 0, 1, 0},
    {&__pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_k_cython_core_symmetry_group_pyx, sizeof(__pyx_k_cython_core_symmetry_group_pyx), 0, 0, 1, 0},
    {&__pyx_kp_s_cython_core_tail_pyx, __pyx_k_cython_core_tail_pyx, sizeof(__pyx_k_cython_core_tail_pyx), 0, 0, 1, 0},
    {&__pyx_kp_s_cython_core_triangulation_pyx, __pyx_k_cython_core_triangulation_pyx, sizeof(__pyx_k_cython_core_triangulation_pyx), 0, 0, 1, 0},
    {&__pyx_kp_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 0},
    {&__pyx_kp_s_dB, __pyx_k_dB, sizeof(__pyx_k_dB), 0, 0, 1, 0},
    {&__pyx_n_s_dLQbcccdxwb, __pyx_k_dLQbcccdxwb, sizeof(__pyx_k_dLQbcccdxwb), 0, 0, 1, 1},
    {&__pyx_kp_s_d_2, __pyx_k_d_2, sizeof(__pyx_k_d_2), 0, 0, 1, 0},
    {&__pyx_kp_s_d_3, __pyx_k_d_3, sizeof(__pyx_k_d_3), 0, 0, 1, 0},
    {&__pyx_n_s_d_4, __pyx_k_d_4, sizeof(__pyx_k_d_4), 0, 0, 1, 1},
    {&__pyx_kp_s_d__d, __pyx_k_d__d, sizeof(__pyx_k_d__d), 0, 0, 1, 0},
    {&__pyx_kp_s_d_d, __pyx_k_d_d, sizeof(__pyx_k_d_d), 0, 0, 1, 0},
    {&__pyx_kp_s_d_d_2, __pyx_k_d_d_2, sizeof(__pyx_k_d_d_2), 0, 0, 1, 0},
    {&__pyx_kp_s_d_d__d, __pyx_k_d_d__d, sizeof(__pyx_k_d_d__d), 0, 0, 1, 0},
    {&__pyx_kp_s_d_finite_vertices_d_ideal_verti, __pyx_k_d_finite_vertices_d_ideal_verti, sizeof(__pyx_k_d_finite_vertices_d_ideal_verti), 0, 0, 1, 0},
    {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
    {&__pyx_kp_u_data_1_1_2_2_0_1_3_2_2_3_1_0_0, __pyx_k_data_1_1_2_2_0_1_3_2_2_3_1_0_0, sizeof(__pyx_k_data_1_1_2_2_0_1_3_2_2_3_1_0_0), 0, 1, 0, 0},
    {&__pyx_n_s_data_ijk, __pyx_k_data_ijk, sizeof(__pyx_k_data_ijk), 0, 0, 1, 1},
    {&__pyx_n_s_data_spec, __pyx_k_data_spec, sizeof(__pyx_k_data_spec), 0, 0, 1, 1},
    {&__pyx_n_s_database, __pyx_k_database, sizeof(__pyx_k_database), 0, 0, 1, 1},
    {&__pyx_n_s_datafile, __pyx_k_datafile, sizeof(__pyx_k_datafile), 0, 0, 1, 1},
    {&__pyx_n_s_dec_prec, __pyx_k_dec_prec, sizeof(__pyx_k_dec_prec), 0, 0, 1, 1},
    {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
    {&__pyx_n_s_decorated, __pyx_k_decorated, sizeof(__pyx_k_decorated), 0, 0, 1, 1},
    {&__pyx_n_s_decorated_isosig, __pyx_k_decorated_isosig, sizeof(__pyx_k_decorated_isosig), 0, 0, 1, 1},
    {&__pyx_n_s_decoration, __pyx_k_decoration, sizeof(__pyx_k_decoration), 0, 0, 1, 1},
    {&__pyx_n_s_default_precision, __pyx_k_default_precision, sizeof(__pyx_k_default_precision), 0, 0, 1, 1},
    {&__pyx_n_s_defaultextension, __pyx_k_defaultextension, sizeof(__pyx_k_defaultextension), 0, 0, 1, 1},
    {&__pyx_n_s_degree, __pyx_k_degree, sizeof(__pyx_k_degree), 0, 0, 1, 1},
    {&__pyx_n_s_dehn_fill, __pyx_k_dehn_fill, sizeof(__pyx_k_dehn_fill), 0, 0, 1, 1},
    {&__pyx_n_s_delattr, __pyx_k_delattr, sizeof(__pyx_k_delattr), 0, 0, 1, 1},
    {&__pyx_n_s_delitem, __pyx_k_delitem, sizeof(__pyx_k_delitem), 0, 0, 1, 1},
    {&__pyx_n_s_desc, __pyx_k_desc, sizeof(__pyx_k_desc), 0, 0, 1, 1},
    {&__pyx_n_s_det, __pyx_k_det, sizeof(__pyx_k_det), 0, 0, 1, 1},
    {&__pyx_n_s_details, __pyx_k_details, sizeof(__pyx_k_details), 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_n_s_dict_3, __pyx_k_dict_3, sizeof(__pyx_k_dict_3), 0, 0, 1, 1},
    {&__pyx_n_s_direct_product_description, __pyx_k_direct_product_description, sizeof(__pyx_k_direct_product_description), 0, 0, 1, 1},
    {&__pyx_n_s_dirichlet_domain, __pyx_k_dirichlet_domain, sizeof(__pyx_k_dirichlet_domain), 0, 0, 1, 1},
    {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
    {&__pyx_n_s_disp, __pyx_k_disp, sizeof(__pyx_k_disp), 0, 0, 1, 1},
    {&__pyx_n_s_displacement, __pyx_k_displacement, sizeof(__pyx_k_displacement), 0, 0, 1, 1},
    {&__pyx_n_s_distance, __pyx_k_distance, sizeof(__pyx_k_distance), 0, 0, 1, 1},
    {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
    {&__pyx_n_s_domain, __pyx_k_domain, sizeof(__pyx_k_domain), 0, 0, 1, 1},
    {&__pyx_n_s_drill, __pyx_k_drill, sizeof(__pyx_k_drill), 0, 0, 1, 1},
    {&__pyx_n_s_dual_curves, __pyx_k_dual_curves, sizeof(__pyx_k_dual_curves), 0, 0, 1, 1},
    {&__pyx_n_s_dual_rows, __pyx_k_dual_rows, sizeof(__pyx_k_dual_rows), 0, 0, 1, 1},
    {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
    {&__pyx_n_s_edge, __pyx_k_edge, sizeof(__pyx_k_edge), 0, 0, 1, 1},
    {&__pyx_n_s_edge_class, __pyx_k_edge_class, sizeof(__pyx_k_edge_class), 0, 0, 1, 1},
    {&__pyx_n_s_edge_image_indices, __pyx_k_edge_image_indices, sizeof(__pyx_k_edge_image_indices), 0, 0, 1, 1},
    {&__pyx_n_s_edge_index, __pyx_k_edge_index, sizeof(__pyx_k_edge_index), 0, 0, 1, 1},
    {&__pyx_n_s_edge_indices, __pyx_k_edge_indices, sizeof(__pyx_k_edge_indices), 0, 0, 1, 1},
    {&__pyx_n_s_edge_list, __pyx_k_edge_list, sizeof(__pyx_k_edge_list), 0, 0, 1, 1},
    {&__pyx_n_s_edge_orientations, __pyx_k_edge_orientations, sizeof(__pyx_k_edge_orientations), 0, 0, 1, 1},
    {&__pyx_n_s_edge_to_index, __pyx_k_edge_to_index, sizeof(__pyx_k_edge_to_index), 0, 0, 1, 1},
    {&__pyx_n_s_edge_to_index_dict, __pyx_k_edge_to_index_dict, sizeof(__pyx_k_edge_to_index_dict), 0, 0, 1, 1},
    {&__pyx_n_s_edge_valences, __pyx_k_edge_valences, sizeof(__pyx_k_edge_valences), 0, 0, 1, 1},
    {&__pyx_n_s_edges, __pyx_k_edges, sizeof(__pyx_k_edges), 0, 0, 1, 1},
    {&__pyx_n_s_eight_length, __pyx_k_eight_length, sizeof(__pyx_k_eight_length), 0, 0, 1, 1},
    {&__pyx_n_s_elementary_divisors, __pyx_k_elementary_divisors, sizeof(__pyx_k_elementary_divisors), 0, 0, 1, 1},
    {&__pyx_n_s_eliminate_fixed_ptolemys, __pyx_k_eliminate_fixed_ptolemys, sizeof(__pyx_k_eliminate_fixed_ptolemys), 0, 0, 1, 1},
    {&__pyx_n_s_elt, __pyx_k_elt, sizeof(__pyx_k_elt), 0, 0, 1, 1},
    {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
    {&__pyx_n_s_empty_save, __pyx_k_empty_save, sizeof(__pyx_k_empty_save), 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_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
    {&__pyx_n_s_endpoints, __pyx_k_endpoints, sizeof(__pyx_k_endpoints), 0, 0, 1, 1},
    {&__pyx_n_s_engine, __pyx_k_engine, sizeof(__pyx_k_engine), 0, 0, 1, 1},
    {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
    {&__pyx_n_s_entries, __pyx_k_entries, sizeof(__pyx_k_entries), 0, 0, 1, 1},
    {&__pyx_n_s_enum, __pyx_k_enum, sizeof(__pyx_k_enum), 0, 0, 1, 1},
    {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
    {&__pyx_n_s_environ, __pyx_k_environ, sizeof(__pyx_k_environ), 0, 0, 1, 1},
    {&__pyx_n_s_eqn, __pyx_k_eqn, sizeof(__pyx_k_eqn), 0, 0, 1, 1},
    {&__pyx_n_s_eqns, __pyx_k_eqns, sizeof(__pyx_k_eqns), 0, 0, 1, 1},
    {&__pyx_n_s_equation_type, __pyx_k_equation_type, sizeof(__pyx_k_equation_type), 0, 0, 1, 1},
    {&__pyx_n_s_equations, __pyx_k_equations, sizeof(__pyx_k_equations), 0, 0, 1, 1},
    {&__pyx_n_s_euler, __pyx_k_euler, sizeof(__pyx_k_euler), 0, 0, 1, 1},
    {&__pyx_n_s_eval, __pyx_k_eval, sizeof(__pyx_k_eval), 0, 0, 1, 1},
    {&__pyx_n_s_exceptions, __pyx_k_exceptions, sizeof(__pyx_k_exceptions), 0, 0, 1, 1},
    {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
    {&__pyx_n_s_exit_2, __pyx_k_exit_2, sizeof(__pyx_k_exit_2), 0, 0, 1, 1},
    {&__pyx_n_s_expand_until_certified, __pyx_k_expand_until_certified, sizeof(__pyx_k_expand_until_certified), 0, 0, 1, 1},
    {&__pyx_n_s_explain_cols, __pyx_k_explain_cols, sizeof(__pyx_k_explain_cols), 0, 0, 1, 1},
    {&__pyx_n_s_explain_columns, __pyx_k_explain_columns, sizeof(__pyx_k_explain_columns), 0, 0, 1, 1},
    {&__pyx_n_s_explain_rows, __pyx_k_explain_rows, sizeof(__pyx_k_explain_rows), 0, 0, 1, 1},
    {&__pyx_n_s_explode, __pyx_k_explode, sizeof(__pyx_k_explode), 0, 0, 1, 1},
    {&__pyx_n_s_export_stl, __pyx_k_export_stl, sizeof(__pyx_k_export_stl), 0, 0, 1, 1},
    {&__pyx_n_s_extends_to_link, __pyx_k_extends_to_link, sizeof(__pyx_k_extends_to_link), 0, 0, 1, 1},
    {&__pyx_n_s_extends_to_link_2, __pyx_k_extends_to_link_2, sizeof(__pyx_k_extends_to_link_2), 0, 0, 1, 1},
    {&__pyx_n_s_extract_HT_knot, __pyx_k_extract_HT_knot, sizeof(__pyx_k_extract_HT_knot), 0, 0, 1, 1},
    {&__pyx_n_s_extractfile, __pyx_k_extractfile, sizeof(__pyx_k_extractfile), 0, 0, 1, 1},
    {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
    {&__pyx_n_s_face, __pyx_k_face, sizeof(__pyx_k_face), 0, 0, 1, 1},
    {&__pyx_n_s_face0_gen, __pyx_k_face0_gen, sizeof(__pyx_k_face0_gen), 0, 0, 1, 1},
    {&__pyx_n_s_face1_gen, __pyx_k_face1_gen, sizeof(__pyx_k_face1_gen), 0, 0, 1, 1},
    {&__pyx_n_s_face2_gen, __pyx_k_face2_gen, sizeof(__pyx_k_face2_gen), 0, 0, 1, 1},
    {&__pyx_n_s_face3_gen, __pyx_k_face3_gen, sizeof(__pyx_k_face3_gen), 0, 0, 1, 1},
    {&__pyx_n_s_face_index, __pyx_k_face_index, sizeof(__pyx_k_face_index), 0, 0, 1, 1},
    {&__pyx_n_s_face_list, __pyx_k_face_list, sizeof(__pyx_k_face_list), 0, 0, 1, 1},
    {&__pyx_n_s_face_list_locals_genexpr, __pyx_k_face_list_locals_genexpr, sizeof(__pyx_k_face_list_locals_genexpr), 0, 0, 1, 1},
    {&__pyx_n_s_facedicts, __pyx_k_facedicts, sizeof(__pyx_k_facedicts), 0, 0, 1, 1},
    {&__pyx_n_s_faces, __pyx_k_faces, sizeof(__pyx_k_faces), 0, 0, 1, 1},
    {&__pyx_n_s_factor_0, __pyx_k_factor_0, sizeof(__pyx_k_factor_0), 0, 0, 1, 1},
    {&__pyx_n_s_factor_1, __pyx_k_factor_1, sizeof(__pyx_k_factor_1), 0, 0, 1, 1},
    {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
    {&__pyx_n_s_file_name, __pyx_k_file_name, sizeof(__pyx_k_file_name), 0, 0, 1, 1},
    {&__pyx_n_s_filedata, __pyx_k_filedata, sizeof(__pyx_k_filedata), 0, 0, 1, 1},
    {&__pyx_n_s_filedialog, __pyx_k_filedialog, sizeof(__pyx_k_filedialog), 0, 0, 1, 1},
    {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
    {&__pyx_n_s_files, __pyx_k_files, sizeof(__pyx_k_files), 0, 0, 1, 1},
    {&__pyx_n_s_filetypes, __pyx_k_filetypes, sizeof(__pyx_k_filetypes), 0, 0, 1, 1},
    {&__pyx_n_s_fill, __pyx_k_fill, sizeof(__pyx_k_fill), 0, 0, 1, 1},
    {&__pyx_n_s_fill_all, __pyx_k_fill_all, sizeof(__pyx_k_fill_all), 0, 0, 1, 1},
    {&__pyx_n_s_fill_by_fold, __pyx_k_fill_by_fold, sizeof(__pyx_k_fill_by_fold), 0, 0, 1, 1},
    {&__pyx_n_s_fill_cusp_spec, __pyx_k_fill_cusp_spec, sizeof(__pyx_k_fill_cusp_spec), 0, 0, 1, 1},
    {&__pyx_n_s_filled, __pyx_k_filled, sizeof(__pyx_k_filled), 0, 0, 1, 1},
    {&__pyx_n_s_filled_2, __pyx_k_filled_2, sizeof(__pyx_k_filled_2), 0, 0, 1, 1},
    {&__pyx_n_s_filled_length, __pyx_k_filled_length, sizeof(__pyx_k_filled_length), 0, 0, 1, 1},
    {&__pyx_kp_s_filled_length_2, __pyx_k_filled_length_2, sizeof(__pyx_k_filled_length_2), 0, 0, 1, 0},
    {&__pyx_n_s_filled_shape_array, __pyx_k_filled_shape_array, sizeof(__pyx_k_filled_shape_array), 0, 0, 1, 1},
    {&__pyx_n_s_filled_shapes, __pyx_k_filled_shapes, sizeof(__pyx_k_filled_shapes), 0, 0, 1, 1},
    {&__pyx_n_s_filled_tri, __pyx_k_filled_tri, sizeof(__pyx_k_filled_tri), 0, 0, 1, 1},
    {&__pyx_n_s_filled_triangulation, __pyx_k_filled_triangulation, sizeof(__pyx_k_filled_triangulation), 0, 0, 1, 1},
    {&__pyx_n_s_filling, __pyx_k_filling, sizeof(__pyx_k_filling), 0, 0, 1, 1},
    {&__pyx_kp_s_filling__d__d, __pyx_k_filling__d__d, sizeof(__pyx_k_filling__d__d), 0, 0, 1, 0},
    {&__pyx_n_s_filling_data, __pyx_k_filling_data, sizeof(__pyx_k_filling_data), 0, 0, 1, 1},
    {&__pyx_n_s_fillings, __pyx_k_fillings, sizeof(__pyx_k_fillings), 0, 0, 1, 1},
    {&__pyx_n_s_fillings_may_affect_generators, __pyx_k_fillings_may_affect_generators, sizeof(__pyx_k_fillings_may_affect_generators), 0, 0, 1, 1},
    {&__pyx_n_s_find, __pyx_k_find, sizeof(__pyx_k_find), 0, 0, 1, 1},
    {&__pyx_n_s_findall, __pyx_k_findall, sizeof(__pyx_k_findall), 0, 0, 1, 1},
    {&__pyx_n_s_first_nybble, __pyx_k_first_nybble, sizeof(__pyx_k_first_nybble), 0, 0, 1, 1},
    {&__pyx_n_s_five_length, __pyx_k_five_length, sizeof(__pyx_k_five_length), 0, 0, 1, 1},
    {&__pyx_n_s_five_tet_nonorientable, __pyx_k_five_tet_nonorientable, sizeof(__pyx_k_five_tet_nonorientable), 0, 0, 1, 1},
    {&__pyx_n_s_five_tet_orientable, __pyx_k_five_tet_orientable, sizeof(__pyx_k_five_tet_orientable), 0, 0, 1, 1},
    {&__pyx_n_s_fixed_alignment, __pyx_k_fixed_alignment, sizeof(__pyx_k_fixed_alignment), 0, 0, 1, 1},
    {&__pyx_n_s_flips, __pyx_k_flips, sizeof(__pyx_k_flips), 0, 0, 1, 1},
    {&__pyx_n_s_flush, __pyx_k_flush, sizeof(__pyx_k_flush), 0, 0, 1, 1},
    {&__pyx_n_s_fold, __pyx_k_fold, sizeof(__pyx_k_fold), 0, 0, 1, 1},
    {&__pyx_n_s_force_recompute, __pyx_k_force_recompute, sizeof(__pyx_k_force_recompute), 0, 0, 1, 1},
    {&__pyx_n_s_form, __pyx_k_form, sizeof(__pyx_k_form), 0, 0, 1, 1},
    {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
    {&__pyx_n_s_format_explain_list, __pyx_k_format_explain_list, sizeof(__pyx_k_format_explain_list), 0, 0, 1, 1},
    {&__pyx_n_s_format_str, __pyx_k_format_str, sizeof(__pyx_k_format_str), 0, 0, 1, 1},
    {&__pyx_n_s_format_two_by_two, __pyx_k_format_two_by_two, sizeof(__pyx_k_format_two_by_two), 0, 0, 1, 1},
    {&__pyx_n_s_from_bytes, __pyx_k_from_bytes, sizeof(__pyx_k_from_bytes), 0, 0, 1, 1},
    {&__pyx_n_b_from_data, __pyx_k_from_data, sizeof(__pyx_k_from_data), 0, 0, 0, 1},
    {&__pyx_n_s_from_isosig, __pyx_k_from_isosig, sizeof(__pyx_k_from_isosig), 0, 0, 1, 1},
    {&__pyx_n_s_from_pickle, __pyx_k_from_pickle, sizeof(__pyx_k_from_pickle), 0, 0, 1, 1},
    {&__pyx_n_s_from_string, __pyx_k_from_string, sizeof(__pyx_k_from_string), 0, 0, 1, 1},
    {&__pyx_n_s_from_tetrahedra_gluing_data, __pyx_k_from_tetrahedra_gluing_data, sizeof(__pyx_k_from_tetrahedra_gluing_data), 0, 0, 1, 1},
    {&__pyx_n_s_full_list, __pyx_k_full_list, sizeof(__pyx_k_full_list), 0, 0, 1, 1},
    {&__pyx_n_s_full_rigor, __pyx_k_full_rigor, sizeof(__pyx_k_full_rigor), 0, 0, 1, 1},
    {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1},
    {&__pyx_n_s_func_OK, __pyx_k_func_OK, sizeof(__pyx_k_func_OK), 0, 0, 1, 1},
    {&__pyx_n_s_func_bad_input, __pyx_k_func_bad_input, sizeof(__pyx_k_func_bad_input), 0, 0, 1, 1},
    {&__pyx_n_s_func_cancelled, __pyx_k_func_cancelled, sizeof(__pyx_k_func_cancelled), 0, 0, 1, 1},
    {&__pyx_n_s_func_failed, __pyx_k_func_failed, sizeof(__pyx_k_func_failed), 0, 0, 1, 1},
    {&__pyx_n_s_fundamental_group, __pyx_k_fundamental_group, sizeof(__pyx_k_fundamental_group), 0, 0, 1, 1},
    {&__pyx_n_s_g, __pyx_k_g, sizeof(__pyx_k_g), 0, 0, 1, 1},
    {&__pyx_n_s_g_eqns, __pyx_k_g_eqns, sizeof(__pyx_k_g_eqns), 0, 0, 1, 1},
    {&__pyx_kp_s_g_g, __pyx_k_g_g, sizeof(__pyx_k_g_g), 0, 0, 1, 0},
    {&__pyx_n_s_gap, __pyx_k_gap, sizeof(__pyx_k_gap), 0, 0, 1, 1},
    {&__pyx_n_s_gap_image_gens, __pyx_k_gap_image_gens, sizeof(__pyx_k_gap_image_gens), 0, 0, 1, 1},
    {&__pyx_n_s_gap_init, __pyx_k_gap_init, sizeof(__pyx_k_gap_init), 0, 0, 1, 1},
    {&__pyx_n_s_gap_string, __pyx_k_gap_string, sizeof(__pyx_k_gap_string), 0, 0, 1, 1},
    {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
    {&__pyx_n_s_gen, __pyx_k_gen, sizeof(__pyx_k_gen), 0, 0, 1, 1},
    {&__pyx_n_s_gen_names, __pyx_k_gen_names, sizeof(__pyx_k_gen_names), 0, 0, 1, 1},
    {&__pyx_n_s_generator_bytes, __pyx_k_generator_bytes, sizeof(__pyx_k_generator_bytes), 0, 0, 1, 1},
    {&__pyx_n_s_generator_file, __pyx_k_generator_file, sizeof(__pyx_k_generator_file), 0, 0, 1, 1},
    {&__pyx_n_s_generator_path, __pyx_k_generator_path, sizeof(__pyx_k_generator_path), 0, 0, 1, 1},
    {&__pyx_n_s_generators, __pyx_k_generators, sizeof(__pyx_k_generators), 0, 0, 1, 1},
    {&__pyx_n_s_generators_in_originals, __pyx_k_generators_in_originals, sizeof(__pyx_k_generators_in_originals), 0, 0, 1, 1},
    {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
    {&__pyx_n_s_gens, __pyx_k_gens, sizeof(__pyx_k_gens), 0, 0, 1, 1},
    {&__pyx_n_s_geodesics, __pyx_k_geodesics, sizeof(__pyx_k_geodesics), 0, 0, 1, 1},
    {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
    {&__pyx_n_s_get_HT_knot_DT, __pyx_k_get_HT_knot_DT, sizeof(__pyx_k_get_HT_knot_DT), 0, 0, 1, 1},
    {&__pyx_n_s_get_HT_knot_by_index, __pyx_k_get_HT_knot_by_index, sizeof(__pyx_k_get_HT_knot_by_index), 0, 0, 1, 1},
    {&__pyx_n_s_get_cusp_indices_and_peripheral, __pyx_k_get_cusp_indices_and_peripheral, sizeof(__pyx_k_get_cusp_indices_and_peripheral), 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_displacement, __pyx_k_get_displacement, sizeof(__pyx_k_get_displacement), 0, 0, 1, 1},
    {&__pyx_n_s_get_from_link_data, __pyx_k_get_from_link_data, sizeof(__pyx_k_get_from_link_data), 0, 0, 1, 1},
    {&__pyx_n_s_get_generalized_ptolemy_obstruct, __pyx_k_get_generalized_ptolemy_obstruct, sizeof(__pyx_k_get_generalized_ptolemy_obstruct), 0, 0, 1, 1},
    {&__pyx_n_s_get_ptolemy_obstruction_classes, __pyx_k_get_ptolemy_obstruction_classes, sizeof(__pyx_k_get_ptolemy_obstruction_classes), 0, 0, 1, 1},
    {&__pyx_n_s_get_ptolemy_variety, __pyx_k_get_ptolemy_variety, sizeof(__pyx_k_get_ptolemy_variety), 0, 0, 1, 1},
    {&__pyx_n_s_get_tetrahedra_gluing_data, __pyx_k_get_tetrahedra_gluing_data, sizeof(__pyx_k_get_tetrahedra_gluing_data), 0, 0, 1, 1},
    {&__pyx_n_s_get_tetrahedra_shapes, __pyx_k_get_tetrahedra_shapes, sizeof(__pyx_k_get_tetrahedra_shapes), 0, 0, 1, 1},
    {&__pyx_n_s_get_tie, __pyx_k_get_tie, sizeof(__pyx_k_get_tie), 0, 0, 1, 1},
    {&__pyx_n_s_get_triangulation_tester, __pyx_k_get_triangulation_tester, sizeof(__pyx_k_get_triangulation_tester), 0, 0, 1, 1},
    {&__pyx_kp_u_get_triangulation_tester_doctes, __pyx_k_get_triangulation_tester_doctes, sizeof(__pyx_k_get_triangulation_tester_doctes), 0, 1, 0, 0},
    {&__pyx_kp_u_get_triangulation_tester_line_11, __pyx_k_get_triangulation_tester_line_11, sizeof(__pyx_k_get_triangulation_tester_line_11), 0, 1, 0, 0},
    {&__pyx_n_s_getitem, __pyx_k_getitem, sizeof(__pyx_k_getitem), 0, 0, 1, 1},
    {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
    {&__pyx_n_s_gluing, __pyx_k_gluing, sizeof(__pyx_k_gluing), 0, 0, 1, 1},
    {&__pyx_n_s_gluing_equations, __pyx_k_gluing_equations, sizeof(__pyx_k_gluing_equations), 0, 0, 1, 1},
    {&__pyx_n_s_gluing_equations_pgl, __pyx_k_gluing_equations_pgl, sizeof(__pyx_k_gluing_equations_pgl), 0, 0, 1, 1},
    {&__pyx_n_s_gluings, __pyx_k_gluings, sizeof(__pyx_k_gluings), 0, 0, 1, 1},
    {&__pyx_n_s_group, __pyx_k_group, sizeof(__pyx_k_group), 0, 0, 1, 1},
    {&__pyx_n_s_grouped, __pyx_k_grouped, sizeof(__pyx_k_grouped), 0, 0, 1, 1},
    {&__pyx_n_s_groups, __pyx_k_groups, sizeof(__pyx_k_groups), 0, 0, 1, 1},
    {&__pyx_n_s_gui, __pyx_k_gui, sizeof(__pyx_k_gui), 0, 0, 1, 1},
    {&__pyx_n_s_gzip, __pyx_k_gzip, sizeof(__pyx_k_gzip), 0, 0, 1, 1},
    {&__pyx_n_s_handles, __pyx_k_handles, sizeof(__pyx_k_handles), 0, 0, 1, 1},
    {&__pyx_n_s_has_finite_vertices, __pyx_k_has_finite_vertices, sizeof(__pyx_k_has_finite_vertices), 0, 0, 1, 1},
    {&__pyx_n_s_header, __pyx_k_header, sizeof(__pyx_k_header), 0, 0, 1, 1},
    {&__pyx_n_s_high_precision, __pyx_k_high_precision, sizeof(__pyx_k_high_precision), 0, 0, 1, 1},
    {&__pyx_n_s_holonomies, __pyx_k_holonomies, sizeof(__pyx_k_holonomies), 0, 0, 1, 1},
    {&__pyx_n_s_holonomy_accuracy, __pyx_k_holonomy_accuracy, sizeof(__pyx_k_holonomy_accuracy), 0, 0, 1, 1},
    {&__pyx_kp_s_holonomy_precision, __pyx_k_holonomy_precision, sizeof(__pyx_k_holonomy_precision), 0, 0, 1, 0},
    {&__pyx_n_s_homology, __pyx_k_homology, sizeof(__pyx_k_homology), 0, 0, 1, 1},
    {&__pyx_n_s_horoball_list, __pyx_k_horoball_list, sizeof(__pyx_k_horoball_list), 0, 0, 1, 1},
    {&__pyx_n_s_horoballs, __pyx_k_horoballs, sizeof(__pyx_k_horoballs), 0, 0, 1, 1},
    {&__pyx_n_s_horoviewer, __pyx_k_horoviewer, sizeof(__pyx_k_horoviewer), 0, 0, 1, 1},
    {&__pyx_n_s_hue, __pyx_k_hue, sizeof(__pyx_k_hue), 0, 0, 1, 1},
    {&__pyx_kp_s_hyperbolic_data__sa_gz, __pyx_k_hyperbolic_data__sa_gz, sizeof(__pyx_k_hyperbolic_data__sa_gz), 0, 0, 1, 0},
    {&__pyx_kp_s_hyperbolic_data__sn_gz, __pyx_k_hyperbolic_data__sn_gz, sizeof(__pyx_k_hyperbolic_data__sn_gz), 0, 0, 1, 0},
    {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
    {&__pyx_kp_s_icosohedral_group, __pyx_k_icosohedral_group, sizeof(__pyx_k_icosohedral_group), 0, 0, 1, 0},
    {&__pyx_n_s_ideal, __pyx_k_ideal, sizeof(__pyx_k_ideal), 0, 0, 1, 1},
    {&__pyx_n_s_identify, __pyx_k_identify, sizeof(__pyx_k_identify), 0, 0, 1, 1},
    {&__pyx_n_s_identify_2, __pyx_k_identify_2, sizeof(__pyx_k_identify_2), 0, 0, 1, 1},
    {&__pyx_n_s_ignore_curve_orientations, __pyx_k_ignore_curve_orientations, sizeof(__pyx_k_ignore_curve_orientations), 0, 0, 1, 1},
    {&__pyx_n_s_ignore_cusp_ordering, __pyx_k_ignore_cusp_ordering, sizeof(__pyx_k_ignore_cusp_ordering), 0, 0, 1, 1},
    {&__pyx_n_s_ignore_orientation, __pyx_k_ignore_orientation, sizeof(__pyx_k_ignore_orientation), 0, 0, 1, 1},
    {&__pyx_n_s_ignore_solution_type, __pyx_k_ignore_solution_type, sizeof(__pyx_k_ignore_solution_type), 0, 0, 1, 1},
    {&__pyx_n_s_imag, __pyx_k_imag, sizeof(__pyx_k_imag), 0, 0, 1, 1},
    {&__pyx_n_s_images, __pyx_k_images, sizeof(__pyx_k_images), 0, 0, 1, 1},
    {&__pyx_n_s_immutable, __pyx_k_immutable, sizeof(__pyx_k_immutable), 0, 0, 1, 1},
    {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
    {&__pyx_kp_u_import_itertools_M_Manifold_L14, __pyx_k_import_itertools_M_Manifold_L14, sizeof(__pyx_k_import_itertools_M_Manifold_L14), 0, 1, 0, 0},
    {&__pyx_n_s_in_radius, __pyx_k_in_radius, sizeof(__pyx_k_in_radius), 0, 0, 1, 1},
    {&__pyx_n_s_include_words, __pyx_k_include_words, sizeof(__pyx_k_include_words), 0, 0, 1, 1},
    {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
    {&__pyx_n_s_index_within_crossings, __pyx_k_index_within_crossings, sizeof(__pyx_k_index_within_crossings), 0, 0, 1, 1},
    {&__pyx_n_s_indices, __pyx_k_indices, sizeof(__pyx_k_indices), 0, 0, 1, 1},
    {&__pyx_n_s_infinite, __pyx_k_infinite, sizeof(__pyx_k_infinite), 0, 0, 1, 1},
    {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
    {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
    {&__pyx_n_s_init_hyperbolic_structure, __pyx_k_init_hyperbolic_structure, sizeof(__pyx_k_init_hyperbolic_structure), 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_initial_modulus, __pyx_k_initial_modulus, sizeof(__pyx_k_initial_modulus), 0, 0, 1, 1},
    {&__pyx_n_s_initial_shape, __pyx_k_initial_shape, sizeof(__pyx_k_initial_shape), 0, 0, 1, 1},
    {&__pyx_n_s_initial_shape_accuracy, __pyx_k_initial_shape_accuracy, sizeof(__pyx_k_initial_shape_accuracy), 0, 0, 1, 1},
    {&__pyx_n_s_initialize_structure, __pyx_k_initialize_structure, sizeof(__pyx_k_initialize_structure), 0, 0, 1, 1},
    {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
    {&__pyx_n_s_input_type, __pyx_k_input_type, sizeof(__pyx_k_input_type), 0, 0, 1, 1},
    {&__pyx_n_s_int_list, __pyx_k_int_list, sizeof(__pyx_k_int_list), 0, 0, 1, 1},
    {&__pyx_n_s_integer, __pyx_k_integer, sizeof(__pyx_k_integer), 0, 0, 1, 1},
    {&__pyx_n_s_internal, __pyx_k_internal, sizeof(__pyx_k_internal), 0, 0, 1, 1},
    {&__pyx_n_s_interrupted, __pyx_k_interrupted, sizeof(__pyx_k_interrupted), 0, 0, 1, 1},
    {&__pyx_n_s_intervals, __pyx_k_intervals, sizeof(__pyx_k_intervals), 0, 0, 1, 1},
    {&__pyx_n_s_inverse_list_word, __pyx_k_inverse_list_word, sizeof(__pyx_k_inverse_list_word), 0, 0, 1, 1},
    {&__pyx_n_s_irregular, __pyx_k_irregular, sizeof(__pyx_k_irregular), 0, 0, 1, 1},
    {&__pyx_n_s_is_GapElement, __pyx_k_is_GapElement, sizeof(__pyx_k_is_GapElement), 0, 0, 1, 1},
    {&__pyx_n_s_is_HT_knot, __pyx_k_is_HT_knot, sizeof(__pyx_k_is_HT_knot), 0, 0, 1, 1},
    {&__pyx_n_s_is_MagmaElement, __pyx_k_is_MagmaElement, sizeof(__pyx_k_is_MagmaElement), 0, 0, 1, 1},
    {&__pyx_n_s_is_PermutationGroupElement, __pyx_k_is_PermutationGroupElement, sizeof(__pyx_k_is_PermutationGroupElement), 0, 0, 1, 1},
    {&__pyx_n_s_is_S5, __pyx_k_is_S5, sizeof(__pyx_k_is_S5), 0, 0, 1, 1},
    {&__pyx_n_s_is_abelian, __pyx_k_is_abelian, sizeof(__pyx_k_is_abelian), 0, 0, 1, 1},
    {&__pyx_n_s_is_alpha_DT_exterior, __pyx_k_is_alpha_DT_exterior, sizeof(__pyx_k_is_alpha_DT_exterior), 0, 0, 1, 1},
    {&__pyx_n_s_is_amphicheiral, __pyx_k_is_amphicheiral, sizeof(__pyx_k_is_amphicheiral), 0, 0, 1, 1},
    {&__pyx_n_s_is_binary_group, __pyx_k_is_binary_group, sizeof(__pyx_k_is_binary_group), 0, 0, 1, 1},
    {&__pyx_n_s_is_braid_complement, __pyx_k_is_braid_complement, sizeof(__pyx_k_is_braid_complement), 0, 0, 1, 1},
    {&__pyx_n_s_is_complete, __pyx_k_is_complete, sizeof(__pyx_k_is_complete), 0, 0, 1, 1},
    {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
    {&__pyx_n_s_is_decorated_isosig, __pyx_k_is_decorated_isosig, sizeof(__pyx_k_is_decorated_isosig), 0, 0, 1, 1},
    {&__pyx_n_s_is_dihedral, __pyx_k_is_dihedral, sizeof(__pyx_k_is_dihedral), 0, 0, 1, 1},
    {&__pyx_n_s_is_direct_product, __pyx_k_is_direct_product, sizeof(__pyx_k_is_direct_product), 0, 0, 1, 1},
    {&__pyx_n_s_is_full_group, __pyx_k_is_full_group, sizeof(__pyx_k_is_full_group), 0, 0, 1, 1},
    {&__pyx_n_s_is_geometric, __pyx_k_is_geometric, sizeof(__pyx_k_is_geometric), 0, 0, 1, 1},
    {&__pyx_n_s_is_int_DT_exterior, __pyx_k_is_int_DT_exterior, sizeof(__pyx_k_is_int_DT_exterior), 0, 0, 1, 1},
    {&__pyx_n_s_is_invertible_knot, __pyx_k_is_invertible_knot, sizeof(__pyx_k_is_invertible_knot), 0, 0, 1, 1},
    {&__pyx_n_s_is_isometric_to, __pyx_k_is_isometric_to, sizeof(__pyx_k_is_isometric_to), 0, 0, 1, 1},
    {&__pyx_n_s_is_isosig, __pyx_k_is_isosig, sizeof(__pyx_k_is_isosig), 0, 0, 1, 1},
    {&__pyx_n_s_is_link_complement1, __pyx_k_is_link_complement1, sizeof(__pyx_k_is_link_complement1), 0, 0, 1, 1},
    {&__pyx_n_s_is_link_complement1_pat, __pyx_k_is_link_complement1_pat, sizeof(__pyx_k_is_link_complement1_pat), 0, 0, 1, 1},
    {&__pyx_n_s_is_link_complement2, __pyx_k_is_link_complement2, sizeof(__pyx_k_is_link_complement2), 0, 0, 1, 1},
    {&__pyx_n_s_is_link_complement2_pat, __pyx_k_is_link_complement2_pat, sizeof(__pyx_k_is_link_complement2_pat), 0, 0, 1, 1},
    {&__pyx_n_s_is_link_complement3, __pyx_k_is_link_complement3, sizeof(__pyx_k_is_link_complement3), 0, 0, 1, 1},
    {&__pyx_n_s_is_link_complement3_pat, __pyx_k_is_link_complement3_pat, sizeof(__pyx_k_is_link_complement3_pat), 0, 0, 1, 1},
    {&__pyx_n_s_is_orientable, __pyx_k_is_orientable, sizeof(__pyx_k_is_orientable), 0, 0, 1, 1},
    {&__pyx_n_s_is_polyhedral, __pyx_k_is_polyhedral, sizeof(__pyx_k_is_polyhedral), 0, 0, 1, 1},
    {&__pyx_n_s_is_symplectic, __pyx_k_is_symplectic, sizeof(__pyx_k_is_symplectic), 0, 0, 1, 1},
    {&__pyx_n_s_is_torus_bundle, __pyx_k_is_torus_bundle, sizeof(__pyx_k_is_torus_bundle), 0, 0, 1, 1},
    {&__pyx_n_s_is_twister_bundle, __pyx_k_is_twister_bundle, sizeof(__pyx_k_is_twister_bundle), 0, 0, 1, 1},
    {&__pyx_n_s_is_twister_splitting, __pyx_k_is_twister_splitting, sizeof(__pyx_k_is_twister_splitting), 0, 0, 1, 1},
    {&__pyx_n_s_is_two_bridge, __pyx_k_is_two_bridge, sizeof(__pyx_k_is_two_bridge), 0, 0, 1, 1},
    {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
    {&__pyx_n_s_isfile, __pyx_k_isfile, sizeof(__pyx_k_isfile), 0, 0, 1, 1},
    {&__pyx_n_s_islower, __pyx_k_islower, sizeof(__pyx_k_islower), 0, 0, 1, 1},
    {&__pyx_n_s_isometries, __pyx_k_isometries, sizeof(__pyx_k_isometries), 0, 0, 1, 1},
    {&__pyx_n_s_isomorphisms_to, __pyx_k_isomorphisms_to, sizeof(__pyx_k_isomorphisms_to), 0, 0, 1, 1},
    {&__pyx_n_s_isosig, __pyx_k_isosig, sizeof(__pyx_k_isosig), 0, 0, 1, 1},
    {&__pyx_n_s_isosig_pattern, __pyx_k_isosig_pattern, sizeof(__pyx_k_isosig_pattern), 0, 0, 1, 1},
    {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
    {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
    {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
    {&__pyx_n_s_its_matrix, __pyx_k_its_matrix, sizeof(__pyx_k_its_matrix), 0, 0, 1, 1},
    {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
    {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
    {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1},
    {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
    {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
    {&__pyx_n_s_kl, __pyx_k_kl, sizeof(__pyx_k_kl), 0, 0, 1, 1},
    {&__pyx_n_s_klein, __pyx_k_klein, sizeof(__pyx_k_klein), 0, 0, 1, 1},
    {&__pyx_n_s_klp, __pyx_k_klp, sizeof(__pyx_k_klp), 0, 0, 1, 1},
    {&__pyx_n_s_kwargs, __pyx_k_kwargs, sizeof(__pyx_k_kwargs), 0, 0, 1, 1},
    {&__pyx_n_s_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 0, 1, 1},
    {&__pyx_n_s_l0, __pyx_k_l0, sizeof(__pyx_k_l0), 0, 0, 1, 1},
    {&__pyx_n_s_l1, __pyx_k_l1, sizeof(__pyx_k_l1), 0, 0, 1, 1},
    {&__pyx_n_s_l2, __pyx_k_l2, sizeof(__pyx_k_l2), 0, 0, 1, 1},
    {&__pyx_kp_s_lL_P_components_0_9_1_P_crossin, __pyx_k_lL_P_components_0_9_1_P_crossin, sizeof(__pyx_k_lL_P_components_0_9_1_P_crossin), 0, 0, 1, 0},
    {&__pyx_n_s_layered, __pyx_k_layered, sizeof(__pyx_k_layered), 0, 0, 1, 1},
    {&__pyx_n_s_layered_and_marked, __pyx_k_layered_and_marked, sizeof(__pyx_k_layered_and_marked), 0, 0, 1, 1},
    {&__pyx_n_s_lazy, __pyx_k_lazy, sizeof(__pyx_k_lazy), 0, 0, 1, 1},
    {&__pyx_n_s_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 0, 1, 1},
    {&__pyx_n_s_left_pad_string, __pyx_k_left_pad_string, sizeof(__pyx_k_left_pad_string), 0, 0, 1, 1},
    {&__pyx_n_s_len, __pyx_k_len, sizeof(__pyx_k_len), 0, 0, 1, 1},
    {&__pyx_n_s_lenStr, __pyx_k_lenStr, sizeof(__pyx_k_lenStr), 0, 0, 1, 1},
    {&__pyx_n_s_len_2, __pyx_k_len_2, sizeof(__pyx_k_len_2), 0, 0, 1, 1},
    {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
    {&__pyx_kp_s_length_2, __pyx_k_length_2, sizeof(__pyx_k_length_2), 0, 0, 1, 0},
    {&__pyx_n_s_length_spectrum, __pyx_k_length_spectrum, sizeof(__pyx_k_length_spectrum), 0, 0, 1, 1},
    {&__pyx_n_s_length_spectrum_dicts, __pyx_k_length_spectrum_dicts, sizeof(__pyx_k_length_spectrum_dicts), 0, 0, 1, 1},
    {&__pyx_n_s_letter, __pyx_k_letter, sizeof(__pyx_k_letter), 0, 0, 1, 1},
    {&__pyx_n_s_letter_seperator, __pyx_k_letter_seperator, sizeof(__pyx_k_letter_seperator), 0, 0, 1, 1},
    {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1},
    {&__pyx_n_s_line0, __pyx_k_line0, sizeof(__pyx_k_line0), 0, 0, 1, 1},
    {&__pyx_n_s_line1, __pyx_k_line1, sizeof(__pyx_k_line1), 0, 0, 1, 1},
    {&__pyx_n_s_line2, __pyx_k_line2, sizeof(__pyx_k_line2), 0, 0, 1, 1},
    {&__pyx_n_s_line3, __pyx_k_line3, sizeof(__pyx_k_line3), 0, 0, 1, 1},
    {&__pyx_n_s_link, __pyx_k_link, sizeof(__pyx_k_link), 0, 0, 1, 1},
    {&__pyx_n_s_link_archive, __pyx_k_link_archive, sizeof(__pyx_k_link_archive), 0, 0, 1, 1},
    {&__pyx_n_s_link_directory, __pyx_k_link_directory, sizeof(__pyx_k_link_directory), 0, 0, 1, 1},
    {&__pyx_n_s_list_as_word, __pyx_k_list_as_word, sizeof(__pyx_k_list_as_word), 0, 0, 1, 1},
    {&__pyx_n_s_list_as_word_locals_genexpr, __pyx_k_list_as_word_locals_genexpr, sizeof(__pyx_k_list_as_word_locals_genexpr), 0, 0, 1, 1},
    {&__pyx_n_s_ljust, __pyx_k_ljust, sizeof(__pyx_k_ljust), 0, 0, 1, 1},
    {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1},
    {&__pyx_n_s_log_im, __pyx_k_log_im, sizeof(__pyx_k_log_im), 0, 0, 1, 1},
    {&__pyx_n_s_log_re, __pyx_k_log_re, sizeof(__pyx_k_log_re), 0, 0, 1, 1},
    {&__pyx_n_s_log_shape, __pyx_k_log_shape, sizeof(__pyx_k_log_shape), 0, 0, 1, 1},
    {&__pyx_n_s_long_relators, __pyx_k_long_relators, sizeof(__pyx_k_long_relators), 0, 0, 1, 1},
    {&__pyx_n_s_longitude, __pyx_k_longitude, sizeof(__pyx_k_longitude), 0, 0, 1, 1},
    {&__pyx_kp_s_longitude__d__d, __pyx_k_longitude__d__d, sizeof(__pyx_k_longitude__d__d), 0, 0, 1, 0},
    {&__pyx_n_s_longitude_accuracy, __pyx_k_longitude_accuracy, sizeof(__pyx_k_longitude_accuracy), 0, 0, 1, 1},
    {&__pyx_n_s_lookup, __pyx_k_lookup, sizeof(__pyx_k_lookup), 0, 0, 1, 1},
    {&__pyx_n_s_low_index, __pyx_k_low_index, sizeof(__pyx_k_low_index), 0, 0, 1, 1},
    {&__pyx_n_s_low_index_version, __pyx_k_low_index_version, sizeof(__pyx_k_low_index_version), 0, 0, 1, 1},
    {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1},
    {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
    {&__pyx_n_s_m003, __pyx_k_m003, sizeof(__pyx_k_m003), 0, 0, 1, 1},
    {&__pyx_n_s_m004, __pyx_k_m004, sizeof(__pyx_k_m004), 0, 0, 1, 1},
    {&__pyx_n_s_magma, __pyx_k_magma, sizeof(__pyx_k_magma), 0, 0, 1, 1},
    {&__pyx_n_s_magma_init, __pyx_k_magma_init, sizeof(__pyx_k_magma_init), 0, 0, 1, 1},
    {&__pyx_n_s_magma_string, __pyx_k_magma_string, sizeof(__pyx_k_magma_string), 0, 0, 1, 1},
    {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
    {&__pyx_n_s_major, __pyx_k_major, sizeof(__pyx_k_major), 0, 0, 1, 1},
    {&__pyx_n_s_manifold, __pyx_k_manifold, sizeof(__pyx_k_manifold), 0, 0, 1, 1},
    {&__pyx_n_s_manifoldMethods, __pyx_k_manifoldMethods, sizeof(__pyx_k_manifoldMethods), 0, 0, 1, 1},
    {&__pyx_n_s_manifold_class, __pyx_k_manifold_class, sizeof(__pyx_k_manifold_class), 0, 0, 1, 1},
    {&__pyx_n_s_manifold_class_2, __pyx_k_manifold_class_2, sizeof(__pyx_k_manifold_class_2), 0, 0, 1, 1},
    {&__pyx_n_s_manifold_name, __pyx_k_manifold_name, sizeof(__pyx_k_manifold_name), 0, 0, 1, 1},
    {&__pyx_n_s_manifold_path, __pyx_k_manifold_path, sizeof(__pyx_k_manifold_path), 0, 0, 1, 1},
    {&__pyx_n_s_manifold_paths, __pyx_k_manifold_paths, sizeof(__pyx_k_manifold_paths), 0, 0, 1, 1},
    {&__pyx_n_s_manifolds, __pyx_k_manifolds, sizeof(__pyx_k_manifolds), 0, 0, 1, 1},
    {&__pyx_n_s_map, __pyx_k_map, sizeof(__pyx_k_map), 0, 0, 1, 1},
    {&__pyx_n_s_maps, __pyx_k_maps, sizeof(__pyx_k_maps), 0, 0, 1, 1},
    {&__pyx_n_s_mark_solid_tori, __pyx_k_mark_solid_tori, sizeof(__pyx_k_mark_solid_tori), 0, 0, 1, 1},
    {&__pyx_n_s_marked, __pyx_k_marked, sizeof(__pyx_k_marked), 0, 0, 1, 1},
    {&__pyx_n_s_marked_tetrahedra, __pyx_k_marked_tetrahedra, sizeof(__pyx_k_marked_tetrahedra), 0, 0, 1, 1},
    {&__pyx_n_s_mask, __pyx_k_mask, sizeof(__pyx_k_mask), 0, 0, 1, 1},
    {&__pyx_n_s_mat, __pyx_k_mat, sizeof(__pyx_k_mat), 0, 0, 1, 1},
    {&__pyx_n_s_match, __pyx_k_match, sizeof(__pyx_k_match), 0, 0, 1, 1},
    {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
    {&__pyx_n_s_matrices, __pyx_k_matrices, sizeof(__pyx_k_matrices), 0, 0, 1, 1},
    {&__pyx_n_s_matrices_2, __pyx_k_matrices_2, sizeof(__pyx_k_matrices_2), 0, 0, 1, 1},
    {&__pyx_n_s_matrix, __pyx_k_matrix, sizeof(__pyx_k_matrix), 0, 0, 1, 1},
    {&__pyx_n_s_matsnf, __pyx_k_matsnf, sizeof(__pyx_k_matsnf), 0, 0, 1, 1},
    {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
    {&__pyx_n_s_max_crossings, __pyx_k_max_crossings, sizeof(__pyx_k_max_crossings), 0, 0, 1, 1},
    {&__pyx_n_s_max_reach, __pyx_k_max_reach, sizeof(__pyx_k_max_reach), 0, 0, 1, 1},
    {&__pyx_n_s_max_segments, __pyx_k_max_segments, sizeof(__pyx_k_max_segments), 0, 0, 1, 1},
    {&__pyx_n_s_maximize_injectivity_radius, __pyx_k_maximize_injectivity_radius, sizeof(__pyx_k_maximize_injectivity_radius), 0, 0, 1, 1},
    {&__pyx_n_s_meridian, __pyx_k_meridian, sizeof(__pyx_k_meridian), 0, 0, 1, 1},
    {&__pyx_kp_s_meridian__d__d, __pyx_k_meridian__d__d, sizeof(__pyx_k_meridian__d__d), 0, 0, 1, 0},
    {&__pyx_n_s_meridian_accuracy, __pyx_k_meridian_accuracy, sizeof(__pyx_k_meridian_accuracy), 0, 0, 1, 1},
    {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1},
    {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
    {&__pyx_n_s_method, __pyx_k_method, sizeof(__pyx_k_method), 0, 0, 1, 1},
    {&__pyx_n_s_minimize_number_of_generators, __pyx_k_minimize_number_of_generators, sizeof(__pyx_k_minimize_number_of_generators), 0, 0, 1, 1},
    {&__pyx_kp_s_mirrored_arc, __pyx_k_mirrored_arc, sizeof(__pyx_k_mirrored_arc), 0, 0, 1, 0},
    {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
    {&__pyx_n_s_model, __pyx_k_model, sizeof(__pyx_k_model), 0, 0, 1, 1},
    {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
    {&__pyx_n_s_modulus, __pyx_k_modulus, sizeof(__pyx_k_modulus), 0, 0, 1, 1},
    {&__pyx_n_s_monodromy, __pyx_k_monodromy, sizeof(__pyx_k_monodromy), 0, 0, 1, 1},
    {&__pyx_kp_s_morwen8, __pyx_k_morwen8, sizeof(__pyx_k_morwen8), 0, 0, 1, 0},
    {&__pyx_kp_s_morwen8_tgz, __pyx_k_morwen8_tgz, sizeof(__pyx_k_morwen8_tgz), 0, 0, 1, 0},
    {&__pyx_n_s_morwen_link_directory, __pyx_k_morwen_link_directory, sizeof(__pyx_k_morwen_link_directory), 0, 0, 1, 1},
    {&__pyx_n_s_moves, __pyx_k_moves, sizeof(__pyx_k_moves), 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_msg_stream, __pyx_k_msg_stream, sizeof(__pyx_k_msg_stream), 0, 0, 1, 1},
    {&__pyx_n_s_mult, __pyx_k_mult, sizeof(__pyx_k_mult), 0, 0, 1, 1},
    {&__pyx_n_s_multiplicities, __pyx_k_multiplicities, sizeof(__pyx_k_multiplicities), 0, 0, 1, 1},
    {&__pyx_n_s_multiplicity, __pyx_k_multiplicity, sizeof(__pyx_k_multiplicity), 0, 0, 1, 1},
    {&__pyx_n_s_multiply_elements, __pyx_k_multiply_elements, sizeof(__pyx_k_multiply_elements), 0, 0, 1, 1},
    {&__pyx_n_s_myslice, __pyx_k_myslice, sizeof(__pyx_k_myslice), 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_ncols, __pyx_k_ncols, sizeof(__pyx_k_ncols), 0, 0, 1, 1},
    {&__pyx_n_s_neighbor, __pyx_k_neighbor, sizeof(__pyx_k_neighbor), 0, 0, 1, 1},
    {&__pyx_n_s_neighbor0_idx, __pyx_k_neighbor0_idx, sizeof(__pyx_k_neighbor0_idx), 0, 0, 1, 1},
    {&__pyx_n_s_neighbor1_idx, __pyx_k_neighbor1_idx, sizeof(__pyx_k_neighbor1_idx), 0, 0, 1, 1},
    {&__pyx_n_s_neighbor2_idx, __pyx_k_neighbor2_idx, sizeof(__pyx_k_neighbor2_idx), 0, 0, 1, 1},
    {&__pyx_n_s_neighbor3_idx, __pyx_k_neighbor3_idx, sizeof(__pyx_k_neighbor3_idx), 0, 0, 1, 1},
    {&__pyx_n_s_neighbor_end, __pyx_k_neighbor_end, sizeof(__pyx_k_neighbor_end), 0, 0, 1, 1},
    {&__pyx_n_s_neighbors, __pyx_k_neighbors, sizeof(__pyx_k_neighbors), 0, 0, 1, 1},
    {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
    {&__pyx_n_s_new_2, __pyx_k_new_2, sizeof(__pyx_k_new_2), 0, 0, 1, 1},
    {&__pyx_n_s_new_displacement, __pyx_k_new_displacement, sizeof(__pyx_k_new_displacement), 0, 0, 1, 1},
    {&__pyx_n_s_new_name, __pyx_k_new_name, sizeof(__pyx_k_new_name), 0, 0, 1, 1},
    {&__pyx_n_s_new_tie, __pyx_k_new_tie, sizeof(__pyx_k_new_tie), 0, 0, 1, 1},
    {&__pyx_n_s_new_tri, __pyx_k_new_tri, sizeof(__pyx_k_new_tri), 0, 0, 1, 1},
    {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1},
    {&__pyx_n_s_next_2, __pyx_k_next_2, sizeof(__pyx_k_next_2), 0, 0, 1, 1},
    {&__pyx_n_s_no_arcs, __pyx_k_no_arcs, sizeof(__pyx_k_no_arcs), 0, 0, 1, 1},
    {&__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_kp_s_no_solution_found, __pyx_k_no_solution_found, sizeof(__pyx_k_no_solution_found), 0, 0, 1, 0},
    {&__pyx_n_s_non_peripheral, __pyx_k_non_peripheral, sizeof(__pyx_k_non_peripheral), 0, 0, 1, 1},
    {&__pyx_kp_s_nonabelian_group_of_order_d, __pyx_k_nonabelian_group_of_order_d, sizeof(__pyx_k_nonabelian_group_of_order_d), 0, 0, 1, 0},
    {&__pyx_kp_s_nonalternating_gz, __pyx_k_nonalternating_gz, sizeof(__pyx_k_nonalternating_gz), 0, 0, 1, 0},
    {&__pyx_n_s_nonorientable, __pyx_k_nonorientable, sizeof(__pyx_k_nonorientable), 0, 0, 1, 1},
    {&__pyx_n_s_nonzeros, __pyx_k_nonzeros, sizeof(__pyx_k_nonzeros), 0, 0, 1, 1},
    {&__pyx_kp_s_not_attempted, __pyx_k_not_attempted, sizeof(__pyx_k_not_attempted), 0, 0, 1, 0},
    {&__pyx_n_s_nrows, __pyx_k_nrows, sizeof(__pyx_k_nrows), 0, 0, 1, 1},
    {&__pyx_n_s_num, __pyx_k_num, sizeof(__pyx_k_num), 0, 0, 1, 1},
    {&__pyx_n_s_num_cols, __pyx_k_num_cols, sizeof(__pyx_k_num_cols), 0, 0, 1, 1},
    {&__pyx_n_s_num_components, __pyx_k_num_components, sizeof(__pyx_k_num_components), 0, 0, 1, 1},
    {&__pyx_n_s_num_crossings, __pyx_k_num_crossings, sizeof(__pyx_k_num_crossings), 0, 0, 1, 1},
    {&__pyx_n_s_num_curves, __pyx_k_num_curves, sizeof(__pyx_k_num_curves), 0, 0, 1, 1},
    {&__pyx_n_s_num_cusps, __pyx_k_num_cusps, sizeof(__pyx_k_num_cusps), 0, 0, 1, 1},
    {&__pyx_n_s_num_edges, __pyx_k_num_edges, sizeof(__pyx_k_num_edges), 0, 0, 1, 1},
    {&__pyx_n_s_num_faces, __pyx_k_num_faces, sizeof(__pyx_k_num_faces), 0, 0, 1, 1},
    {&__pyx_n_s_num_fake_cusps, __pyx_k_num_fake_cusps, sizeof(__pyx_k_num_fake_cusps), 0, 0, 1, 1},
    {&__pyx_n_s_num_finite_vertices, __pyx_k_num_finite_vertices, sizeof(__pyx_k_num_finite_vertices), 0, 0, 1, 1},
    {&__pyx_n_s_num_gen, __pyx_k_num_gen, sizeof(__pyx_k_num_gen), 0, 0, 1, 1},
    {&__pyx_n_s_num_generators, __pyx_k_num_generators, sizeof(__pyx_k_num_generators), 0, 0, 1, 1},
    {&__pyx_n_s_num_gens, __pyx_k_num_gens, sizeof(__pyx_k_num_gens), 0, 0, 1, 1},
    {&__pyx_n_s_num_ideal_vertices, __pyx_k_num_ideal_vertices, sizeof(__pyx_k_num_ideal_vertices), 0, 0, 1, 1},
    {&__pyx_n_s_num_lengths, __pyx_k_num_lengths, sizeof(__pyx_k_num_lengths), 0, 0, 1, 1},
    {&__pyx_n_s_num_links, __pyx_k_num_links, sizeof(__pyx_k_num_links), 0, 0, 1, 1},
    {&__pyx_n_s_num_nonor_cusps, __pyx_k_num_nonor_cusps, sizeof(__pyx_k_num_nonor_cusps), 0, 0, 1, 1},
    {&__pyx_n_s_num_or_cusps, __pyx_k_num_or_cusps, sizeof(__pyx_k_num_or_cusps), 0, 0, 1, 1},
    {&__pyx_n_s_num_orig_gens, __pyx_k_num_orig_gens, sizeof(__pyx_k_num_orig_gens), 0, 0, 1, 1},
    {&__pyx_n_s_num_original_generators, __pyx_k_num_original_generators, sizeof(__pyx_k_num_original_generators), 0, 0, 1, 1},
    {&__pyx_n_s_num_relations, __pyx_k_num_relations, sizeof(__pyx_k_num_relations), 0, 0, 1, 1},
    {&__pyx_n_s_num_relators, __pyx_k_num_relators, sizeof(__pyx_k_num_relators), 0, 0, 1, 1},
    {&__pyx_n_s_num_rows, __pyx_k_num_rows, sizeof(__pyx_k_num_rows), 0, 0, 1, 1},
    {&__pyx_n_s_num_subdivisions, __pyx_k_num_subdivisions, sizeof(__pyx_k_num_subdivisions), 0, 0, 1, 1},
    {&__pyx_n_s_num_surfaces, __pyx_k_num_surfaces, sizeof(__pyx_k_num_surfaces), 0, 0, 1, 1},
    {&__pyx_n_s_num_tet, __pyx_k_num_tet, sizeof(__pyx_k_num_tet), 0, 0, 1, 1},
    {&__pyx_n_s_num_tetrahedra, __pyx_k_num_tetrahedra, sizeof(__pyx_k_num_tetrahedra), 0, 0, 1, 1},
    {&__pyx_n_s_num_threads, __pyx_k_num_threads, sizeof(__pyx_k_num_threads), 0, 0, 1, 1},
    {&__pyx_n_s_num_vertices, __pyx_k_num_vertices, sizeof(__pyx_k_num_vertices), 0, 0, 1, 1},
    {&__pyx_n_s_number, __pyx_k_number, sizeof(__pyx_k_number), 0, 0, 1, 1},
    {&__pyx_n_s_number_2, __pyx_k_number_2, sizeof(__pyx_k_number_2), 0, 0, 1, 1},
    {&__pyx_n_s_number_to_native_number, __pyx_k_number_to_native_number, sizeof(__pyx_k_number_to_native_number), 0, 0, 1, 1},
    {&__pyx_n_s_o31, __pyx_k_o31, sizeof(__pyx_k_o31), 0, 0, 1, 1},
    {&__pyx_n_s_obsolete, __pyx_k_obsolete, sizeof(__pyx_k_obsolete), 0, 0, 1, 1},
    {&__pyx_n_s_obstruction_class, __pyx_k_obstruction_class, sizeof(__pyx_k_obstruction_class), 0, 0, 1, 1},
    {&__pyx_kp_s_octahedral_group, __pyx_k_octahedral_group, sizeof(__pyx_k_octahedral_group), 0, 0, 1, 0},
    {&__pyx_n_s_of_link, __pyx_k_of_link, sizeof(__pyx_k_of_link), 0, 0, 1, 1},
    {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
    {&__pyx_n_s_old, __pyx_k_old, sizeof(__pyx_k_old), 0, 0, 1, 1},
    {&__pyx_n_s_omega, __pyx_k_omega, sizeof(__pyx_k_omega), 0, 0, 1, 1},
    {&__pyx_n_s_one_manifold, __pyx_k_one_manifold, sizeof(__pyx_k_one_manifold), 0, 0, 1, 1},
    {&__pyx_kp_s_one_sided, __pyx_k_one_sided, sizeof(__pyx_k_one_sided), 0, 0, 1, 0},
    {&__pyx_n_s_one_tet_lengths, __pyx_k_one_tet_lengths, sizeof(__pyx_k_one_tet_lengths), 0, 0, 1, 1},
    {&__pyx_n_s_one_tet_tilts, __pyx_k_one_tet_tilts, sizeof(__pyx_k_one_tet_tilts), 0, 0, 1, 1},
    {&__pyx_n_s_one_vertex_lengths, __pyx_k_one_vertex_lengths, sizeof(__pyx_k_one_vertex_lengths), 0, 0, 1, 1},
    {&__pyx_n_s_opacities, __pyx_k_opacities, sizeof(__pyx_k_opacities), 0, 0, 1, 1},
    {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
    {&__pyx_n_s_operator, __pyx_k_operator, sizeof(__pyx_k_operator), 0, 0, 1, 1},
    {&__pyx_n_s_order, __pyx_k_order, sizeof(__pyx_k_order), 0, 0, 1, 1},
    {&__pyx_n_s_orient, __pyx_k_orient, sizeof(__pyx_k_orient), 0, 0, 1, 1},
    {&__pyx_n_s_orientability, __pyx_k_orientability, sizeof(__pyx_k_orientability), 0, 0, 1, 1},
    {&__pyx_n_s_orientable, __pyx_k_orientable, sizeof(__pyx_k_orientable), 0, 0, 1, 1},
    {&__pyx_n_s_orientation_cover, __pyx_k_orientation_cover, sizeof(__pyx_k_orientation_cover), 0, 0, 1, 1},
    {&__pyx_kp_s_orientation_preserving, __pyx_k_orientation_preserving, sizeof(__pyx_k_orientation_preserving), 0, 0, 1, 0},
    {&__pyx_kp_s_orientation_reversing, __pyx_k_orientation_reversing, sizeof(__pyx_k_orientation_reversing), 0, 0, 1, 0},
    {&__pyx_n_s_orig_gens, __pyx_k_orig_gens, sizeof(__pyx_k_orig_gens), 0, 0, 1, 1},
    {&__pyx_n_s_original_generators, __pyx_k_original_generators, sizeof(__pyx_k_original_generators), 0, 0, 1, 1},
    {&__pyx_n_s_original_index, __pyx_k_original_index, sizeof(__pyx_k_original_index), 0, 0, 1, 1},
    {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
    {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
    {&__pyx_n_s_out_radius, __pyx_k_out_radius, sizeof(__pyx_k_out_radius), 0, 0, 1, 1},
    {&__pyx_n_s_output, __pyx_k_output, sizeof(__pyx_k_output), 0, 0, 1, 1},
    {&__pyx_n_s_output_file, __pyx_k_output_file, sizeof(__pyx_k_output_file), 0, 0, 1, 1},
    {&__pyx_n_s_owns_c_symmetry_group, __pyx_k_owns_c_symmetry_group, sizeof(__pyx_k_owns_c_symmetry_group), 0, 0, 1, 1},
    {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
    {&__pyx_n_s_pad, __pyx_k_pad, sizeof(__pyx_k_pad), 0, 0, 1, 1},
    {&__pyx_n_s_pair, __pyx_k_pair, sizeof(__pyx_k_pair), 0, 0, 1, 1},
    {&__pyx_n_s_pairing_matrices, __pyx_k_pairing_matrices, sizeof(__pyx_k_pairing_matrices), 0, 0, 1, 1},
    {&__pyx_n_s_pairing_words, __pyx_k_pairing_words, sizeof(__pyx_k_pairing_words), 0, 0, 1, 1},
    {&__pyx_n_s_pari, __pyx_k_pari, sizeof(__pyx_k_pari), 0, 0, 1, 1},
    {&__pyx_n_s_parity, __pyx_k_parity, sizeof(__pyx_k_parity), 0, 0, 1, 1},
    {&__pyx_n_s_part, __pyx_k_part, sizeof(__pyx_k_part), 0, 0, 1, 1},
    {&__pyx_n_s_parts, __pyx_k_parts, sizeof(__pyx_k_parts), 0, 0, 1, 1},
    {&__pyx_n_s_passes_at_fours, __pyx_k_passes_at_fours, sizeof(__pyx_k_passes_at_fours), 0, 0, 1, 1},
    {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
    {&__pyx_n_s_path_2, __pyx_k_path_2, sizeof(__pyx_k_path_2), 0, 0, 1, 1},
    {&__pyx_n_s_peripheral, __pyx_k_peripheral, sizeof(__pyx_k_peripheral), 0, 0, 1, 1},
    {&__pyx_n_s_peripheral_curves, __pyx_k_peripheral_curves, sizeof(__pyx_k_peripheral_curves), 0, 0, 1, 1},
    {&__pyx_n_s_peripheral_data, __pyx_k_peripheral_data, sizeof(__pyx_k_peripheral_data), 0, 0, 1, 1},
    {&__pyx_n_s_perm, __pyx_k_perm, sizeof(__pyx_k_perm), 0, 0, 1, 1},
    {&__pyx_n_s_perm0, __pyx_k_perm0, sizeof(__pyx_k_perm0), 0, 0, 1, 1},
    {&__pyx_n_s_perm1, __pyx_k_perm1, sizeof(__pyx_k_perm1), 0, 0, 1, 1},
    {&__pyx_n_s_perm2, __pyx_k_perm2, sizeof(__pyx_k_perm2), 0, 0, 1, 1},
    {&__pyx_n_s_perm3, __pyx_k_perm3, sizeof(__pyx_k_perm3), 0, 0, 1, 1},
    {&__pyx_n_s_perms, __pyx_k_perms, sizeof(__pyx_k_perms), 0, 0, 1, 1},
    {&__pyx_n_s_permutation, __pyx_k_permutation, sizeof(__pyx_k_permutation), 0, 0, 1, 1},
    {&__pyx_n_s_permutation_rep, __pyx_k_permutation_rep, sizeof(__pyx_k_permutation_rep), 0, 0, 1, 1},
    {&__pyx_n_s_permutation_reps, __pyx_k_permutation_reps, sizeof(__pyx_k_permutation_reps), 0, 0, 1, 1},
    {&__pyx_kp_b_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 0, 0},
    {&__pyx_n_b_pickle_2, __pyx_k_pickle_2, sizeof(__pyx_k_pickle_2), 0, 0, 0, 1},
    {&__pyx_n_s_pickle_2, __pyx_k_pickle_2, sizeof(__pyx_k_pickle_2), 0, 0, 1, 1},
    {&__pyx_n_s_pieces, __pyx_k_pieces, sizeof(__pyx_k_pieces), 0, 0, 1, 1},
    {&__pyx_n_s_plink, __pyx_k_plink, sizeof(__pyx_k_plink), 0, 0, 1, 1},
    {&__pyx_n_s_plink_callback, __pyx_k_plink_callback, sizeof(__pyx_k_plink_callback), 0, 0, 1, 1},
    {&__pyx_n_s_plink_callback_2, __pyx_k_plink_callback_2, sizeof(__pyx_k_plink_callback_2), 0, 0, 1, 1},
    {&__pyx_n_s_polish_hyperbolic_structures, __pyx_k_polish_hyperbolic_structures, sizeof(__pyx_k_polish_hyperbolic_structures), 0, 0, 1, 1},
    {&__pyx_n_s_polished_tetrahedra_shapes, __pyx_k_polished_tetrahedra_shapes, sizeof(__pyx_k_polished_tetrahedra_shapes), 0, 0, 1, 1},
    {&__pyx_n_s_polyhedral_description, __pyx_k_polyhedral_description, sizeof(__pyx_k_polyhedral_description), 0, 0, 1, 1},
    {&__pyx_n_s_polyviewer, __pyx_k_polyviewer, sizeof(__pyx_k_polyviewer), 0, 0, 1, 1},
    {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
    {&__pyx_n_s_popitem, __pyx_k_popitem, sizeof(__pyx_k_popitem), 0, 0, 1, 1},
    {&__pyx_n_s_position, __pyx_k_position, sizeof(__pyx_k_position), 0, 0, 1, 1},
    {&__pyx_n_s_precision, __pyx_k_precision, sizeof(__pyx_k_precision), 0, 0, 1, 1},
    {&__pyx_n_s_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 0, 0, 1, 1},
    {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
    {&__pyx_n_s_presentation, __pyx_k_presentation, sizeof(__pyx_k_presentation), 0, 0, 1, 1},
    {&__pyx_n_s_presentation_matrix, __pyx_k_presentation_matrix, sizeof(__pyx_k_presentation_matrix), 0, 0, 1, 1},
    {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
    {&__pyx_n_s_protocol, __pyx_k_protocol, sizeof(__pyx_k_protocol), 0, 0, 1, 1},
    {&__pyx_n_s_ptolemy, __pyx_k_ptolemy, sizeof(__pyx_k_ptolemy), 0, 0, 1, 1},
    {&__pyx_n_s_ptolemyManifoldMethods, __pyx_k_ptolemyManifoldMethods, sizeof(__pyx_k_ptolemyManifoldMethods), 0, 0, 1, 1},
    {&__pyx_n_s_ptolemy_equations_action_by_dec, __pyx_k_ptolemy_equations_action_by_dec, sizeof(__pyx_k_ptolemy_equations_action_by_dec), 0, 0, 1, 1},
    {&__pyx_n_s_ptolemy_equations_boundary_map, __pyx_k_ptolemy_equations_boundary_map, sizeof(__pyx_k_ptolemy_equations_boundary_map), 0, 0, 1, 1},
    {&__pyx_n_s_ptolemy_equations_boundary_map_2, __pyx_k_ptolemy_equations_boundary_map_2, sizeof(__pyx_k_ptolemy_equations_boundary_map_2), 0, 0, 1, 1},
    {&__pyx_n_s_ptolemy_equations_boundary_map_3, __pyx_k_ptolemy_equations_boundary_map_3, sizeof(__pyx_k_ptolemy_equations_boundary_map_3), 0, 0, 1, 1},
    {&__pyx_n_s_ptolemy_equations_identified_co, __pyx_k_ptolemy_equations_identified_co, sizeof(__pyx_k_ptolemy_equations_identified_co), 0, 0, 1, 1},
    {&__pyx_n_s_ptolemy_equations_identified_fa, __pyx_k_ptolemy_equations_identified_fa, sizeof(__pyx_k_ptolemy_equations_identified_fa), 0, 0, 1, 1},
    {&__pyx_n_s_ptolemy_generalized_obstruction, __pyx_k_ptolemy_generalized_obstruction, sizeof(__pyx_k_ptolemy_generalized_obstruction), 0, 0, 1, 1},
    {&__pyx_n_s_ptolemy_obstruction_classes, __pyx_k_ptolemy_obstruction_classes, sizeof(__pyx_k_ptolemy_obstruction_classes), 0, 0, 1, 1},
    {&__pyx_n_s_ptolemy_variety, __pyx_k_ptolemy_variety, sizeof(__pyx_k_ptolemy_variety), 0, 0, 1, 1},
    {&__pyx_n_s_python_major_version, __pyx_k_python_major_version, sizeof(__pyx_k_python_major_version), 0, 0, 1, 1},
    {&__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_PresentationMatri, __pyx_k_pyx_unpickle_PresentationMatri, sizeof(__pyx_k_pyx_unpickle_PresentationMatri), 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_q, __pyx_k_q, sizeof(__pyx_k_q), 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_kp_s_r_2, __pyx_k_r_2, sizeof(__pyx_k_r_2), 0, 0, 1, 0},
    {&__pyx_n_s_radius, __pyx_k_radius, sizeof(__pyx_k_radius), 0, 0, 1, 1},
    {&__pyx_n_s_randomize, __pyx_k_randomize, sizeof(__pyx_k_randomize), 0, 0, 1, 1},
    {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
    {&__pyx_n_s_rank, __pyx_k_rank, sizeof(__pyx_k_rank), 0, 0, 1, 1},
    {&__pyx_n_s_raw_form, __pyx_k_raw_form, sizeof(__pyx_k_raw_form), 0, 0, 1, 1},
    {&__pyx_n_s_rb, __pyx_k_rb, sizeof(__pyx_k_rb), 0, 0, 1, 1},
    {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1},
    {&__pyx_n_s_reach, __pyx_k_reach, sizeof(__pyx_k_reach), 0, 0, 1, 1},
    {&__pyx_n_s_read, __pyx_k_read, sizeof(__pyx_k_read), 0, 0, 1, 1},
    {&__pyx_n_s_readline, __pyx_k_readline, sizeof(__pyx_k_readline), 0, 0, 1, 1},
    {&__pyx_n_s_readlines, __pyx_k_readlines, sizeof(__pyx_k_readlines), 0, 0, 1, 1},
    {&__pyx_n_s_real, __pyx_k_real, sizeof(__pyx_k_real), 0, 0, 1, 1},
    {&__pyx_n_s_real_coerced_to_bits_prec, __pyx_k_real_coerced_to_bits_prec, sizeof(__pyx_k_real_coerced_to_bits_prec), 0, 0, 1, 1},
    {&__pyx_n_s_recompute, __pyx_k_recompute, sizeof(__pyx_k_recompute), 0, 0, 1, 1},
    {&__pyx_n_s_record, __pyx_k_record, sizeof(__pyx_k_record), 0, 0, 1, 1},
    {&__pyx_n_s_rect, __pyx_k_rect, sizeof(__pyx_k_rect), 0, 0, 1, 1},
    {&__pyx_n_s_rect_im, __pyx_k_rect_im, sizeof(__pyx_k_rect_im), 0, 0, 1, 1},
    {&__pyx_n_s_rect_re, __pyx_k_rect_re, sizeof(__pyx_k_rect_re), 0, 0, 1, 1},
    {&__pyx_n_s_rect_shape, __pyx_k_rect_shape, sizeof(__pyx_k_rect_shape), 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_reduce_list_word, __pyx_k_reduce_list_word, sizeof(__pyx_k_reduce_list_word), 0, 0, 1, 1},
    {&__pyx_n_s_regular, __pyx_k_regular, sizeof(__pyx_k_regular), 0, 0, 1, 1},
    {&__pyx_n_s_reindex_cusps, __pyx_k_reindex_cusps, sizeof(__pyx_k_reindex_cusps), 0, 0, 1, 1},
    {&__pyx_n_s_rel, __pyx_k_rel, sizeof(__pyx_k_rel), 0, 0, 1, 1},
    {&__pyx_n_s_relation, __pyx_k_relation, sizeof(__pyx_k_relation), 0, 0, 1, 1},
    {&__pyx_n_s_relation_list, __pyx_k_relation_list, sizeof(__pyx_k_relation_list), 0, 0, 1, 1},
    {&__pyx_n_s_relators, __pyx_k_relators, sizeof(__pyx_k_relators), 0, 0, 1, 1},
    {&__pyx_n_s_rels, __pyx_k_rels, sizeof(__pyx_k_rels), 0, 0, 1, 1},
    {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
    {&__pyx_n_s_remove_finite_vertices, __pyx_k_remove_finite_vertices, sizeof(__pyx_k_remove_finite_vertices), 0, 0, 1, 1},
    {&__pyx_n_s_remove_finite_vertices_2, __pyx_k_remove_finite_vertices_2, sizeof(__pyx_k_remove_finite_vertices_2), 0, 0, 1, 1},
    {&__pyx_n_s_reopen, __pyx_k_reopen, sizeof(__pyx_k_reopen), 0, 0, 1, 1},
    {&__pyx_n_s_rep, __pyx_k_rep, sizeof(__pyx_k_rep), 0, 0, 1, 1},
    {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
    {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1},
    {&__pyx_n_s_repr_2, __pyx_k_repr_2, sizeof(__pyx_k_repr_2), 0, 0, 1, 1},
    {&__pyx_n_s_reps, __pyx_k_reps, sizeof(__pyx_k_reps), 0, 0, 1, 1},
    {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
    {&__pyx_n_s_result_curves, __pyx_k_result_curves, sizeof(__pyx_k_result_curves), 0, 0, 1, 1},
    {&__pyx_n_s_result_cusp_indices, __pyx_k_result_cusp_indices, sizeof(__pyx_k_result_cusp_indices), 0, 0, 1, 1},
    {&__pyx_n_s_return_isometries, __pyx_k_return_isometries, sizeof(__pyx_k_return_isometries), 0, 0, 1, 1},
    {&__pyx_n_s_return_matrices, __pyx_k_return_matrices, sizeof(__pyx_k_return_matrices), 0, 0, 1, 1},
    {&__pyx_n_s_return_type, __pyx_k_return_type, sizeof(__pyx_k_return_type), 0, 0, 1, 1},
    {&__pyx_n_s_retval, __pyx_k_retval, sizeof(__pyx_k_retval), 0, 0, 1, 1},
    {&__pyx_n_s_rev_spec_dict, __pyx_k_rev_spec_dict, sizeof(__pyx_k_rev_spec_dict), 0, 0, 1, 1},
    {&__pyx_n_s_reverse_orientation, __pyx_k_reverse_orientation, sizeof(__pyx_k_reverse_orientation), 0, 0, 1, 1},
    {&__pyx_n_s_right, __pyx_k_right, sizeof(__pyx_k_right), 0, 0, 1, 1},
    {&__pyx_n_s_rings, __pyx_k_rings, sizeof(__pyx_k_rings), 0, 0, 1, 1},
    {&__pyx_n_s_rjust, __pyx_k_rjust, sizeof(__pyx_k_rjust), 0, 0, 1, 1},
    {&__pyx_n_s_rolfsen_link_regexs, __pyx_k_rolfsen_link_regexs, sizeof(__pyx_k_rolfsen_link_regexs), 0, 0, 1, 1},
    {&__pyx_n_s_round, __pyx_k_round, sizeof(__pyx_k_round), 0, 0, 1, 1},
    {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1},
    {&__pyx_n_s_row_entries, __pyx_k_row_entries, sizeof(__pyx_k_row_entries), 0, 0, 1, 1},
    {&__pyx_n_s_row_op, __pyx_k_row_op, sizeof(__pyx_k_row_op), 0, 0, 1, 1},
    {&__pyx_n_s_rows, __pyx_k_rows, sizeof(__pyx_k_rows), 0, 0, 1, 1},
    {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
    {&__pyx_kp_s_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 0, 1, 0},
    {&__pyx_kp_s_s_3, __pyx_k_s_3, sizeof(__pyx_k_s_3), 0, 0, 1, 0},
    {&__pyx_kp_s_s_4, __pyx_k_s_4, sizeof(__pyx_k_s_4), 0, 0, 1, 0},
    {&__pyx_kp_s_s_F_d, __pyx_k_s_F_d, sizeof(__pyx_k_s_F_d), 0, 0, 1, 0},
    {&__pyx_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0},
    {&__pyx_kp_s_s_s_explain_columns_s_explain_r, __pyx_k_s_s_explain_columns_s_explain_r, sizeof(__pyx_k_s_s_explain_columns_s_explain_r), 0, 0, 1, 0},
    {&__pyx_kp_s_s_s_with_euler_s, __pyx_k_s_s_with_euler_s, sizeof(__pyx_k_s_s_with_euler_s), 0, 0, 1, 0},
    {&__pyx_kp_s_s_x_s, __pyx_k_s_x_s, sizeof(__pyx_k_s_x_s), 0, 0, 1, 0},
    {&__pyx_n_s_sage, __pyx_k_sage, sizeof(__pyx_k_sage), 0, 0, 1, 1},
    {&__pyx_n_s_sage_all, __pyx_k_sage_all, sizeof(__pyx_k_sage_all), 0, 0, 1, 1},
    {&__pyx_n_s_sage_groups_free_group, __pyx_k_sage_groups_free_group, sizeof(__pyx_k_sage_groups_free_group), 0, 0, 1, 1},
    {&__pyx_n_s_sage_groups_perm_gps_permgroup, __pyx_k_sage_groups_perm_gps_permgroup, sizeof(__pyx_k_sage_groups_perm_gps_permgroup), 0, 0, 1, 1},
    {&__pyx_n_s_sage_groups_perm_gps_permgroup_e, __pyx_k_sage_groups_perm_gps_permgroup_e, sizeof(__pyx_k_sage_groups_perm_gps_permgroup_e), 0, 0, 1, 1},
    {&__pyx_n_s_sage_helper, __pyx_k_sage_helper, sizeof(__pyx_k_sage_helper), 0, 0, 1, 1},
    {&__pyx_n_s_sage_interfaces_abc, __pyx_k_sage_interfaces_abc, sizeof(__pyx_k_sage_interfaces_abc), 0, 0, 1, 1},
    {&__pyx_n_s_sage_interfaces_gap, __pyx_k_sage_interfaces_gap, sizeof(__pyx_k_sage_interfaces_gap), 0, 0, 1, 1},
    {&__pyx_n_s_sage_interfaces_magma, __pyx_k_sage_interfaces_magma, sizeof(__pyx_k_sage_interfaces_magma), 0, 0, 1, 1},
    {&__pyx_n_s_sage_matrix, __pyx_k_sage_matrix, sizeof(__pyx_k_sage_matrix), 0, 0, 1, 1},
    {&__pyx_n_s_sage_matrix_constructor, __pyx_k_sage_matrix_constructor, sizeof(__pyx_k_sage_matrix_constructor), 0, 0, 1, 1},
    {&__pyx_n_s_sage_object, __pyx_k_sage_object, sizeof(__pyx_k_sage_object), 0, 0, 1, 1},
    {&__pyx_n_s_sage_structure_sage_object, __pyx_k_sage_structure_sage_object, sizeof(__pyx_k_sage_structure_sage_object), 0, 0, 1, 1},
    {&__pyx_n_s_save, __pyx_k_save, sizeof(__pyx_k_save), 0, 0, 1, 1},
    {&__pyx_n_s_savefile, __pyx_k_savefile, sizeof(__pyx_k_savefile), 0, 0, 1, 1},
    {&__pyx_n_s_second_char, __pyx_k_second_char, sizeof(__pyx_k_second_char), 0, 0, 1, 1},
    {&__pyx_n_s_second_nybble, __pyx_k_second_nybble, sizeof(__pyx_k_second_nybble), 0, 0, 1, 1},
    {&__pyx_n_s_seed, __pyx_k_seed, sizeof(__pyx_k_seed), 0, 0, 1, 1},
    {&__pyx_n_s_seek, __pyx_k_seek, sizeof(__pyx_k_seek), 0, 0, 1, 1},
    {&__pyx_n_s_segment, __pyx_k_segment, sizeof(__pyx_k_segment), 0, 0, 1, 1},
    {&__pyx_n_s_segment_list, __pyx_k_segment_list, sizeof(__pyx_k_segment_list), 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_sep, __pyx_k_sep, sizeof(__pyx_k_sep), 0, 0, 1, 1},
    {&__pyx_n_s_set_DTcode, __pyx_k_set_DTcode, sizeof(__pyx_k_set_DTcode), 0, 0, 1, 1},
    {&__pyx_n_s_set_PDcode, __pyx_k_set_PDcode, sizeof(__pyx_k_set_PDcode), 0, 0, 1, 1},
    {&__pyx_n_s_set_displacement, __pyx_k_set_displacement, sizeof(__pyx_k_set_displacement), 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_set_name_2, __pyx_k_set_name_2, sizeof(__pyx_k_set_name_2), 0, 0, 1, 1},
    {&__pyx_n_s_set_peripheral_curves, __pyx_k_set_peripheral_curves, sizeof(__pyx_k_set_peripheral_curves), 0, 0, 1, 1},
    {&__pyx_n_s_set_peripheral_from_decoration, __pyx_k_set_peripheral_from_decoration, sizeof(__pyx_k_set_peripheral_from_decoration), 0, 0, 1, 1},
    {&__pyx_n_s_set_rand_seed, __pyx_k_set_rand_seed, sizeof(__pyx_k_set_rand_seed), 0, 0, 1, 1},
    {&__pyx_n_s_set_target_holonomy, __pyx_k_set_target_holonomy, sizeof(__pyx_k_set_target_holonomy), 0, 0, 1, 1},
    {&__pyx_n_s_set_test_flag, __pyx_k_set_test_flag, sizeof(__pyx_k_set_test_flag), 0, 0, 1, 1},
    {&__pyx_n_s_set_tetrahedra_shapes, __pyx_k_set_tetrahedra_shapes, sizeof(__pyx_k_set_tetrahedra_shapes), 0, 0, 1, 1},
    {&__pyx_n_s_set_tie, __pyx_k_set_tie, sizeof(__pyx_k_set_tie), 0, 0, 1, 1},
    {&__pyx_n_s_setattr, __pyx_k_setattr, sizeof(__pyx_k_setattr), 0, 0, 1, 1},
    {&__pyx_n_s_setitem, __pyx_k_setitem, sizeof(__pyx_k_setitem), 0, 0, 1, 1},
    {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
    {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
    {&__pyx_n_s_seven_length, __pyx_k_seven_length, sizeof(__pyx_k_seven_length), 0, 0, 1, 1},
    {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
    {&__pyx_n_s_shape_accuracy, __pyx_k_shape_accuracy, sizeof(__pyx_k_shape_accuracy), 0, 0, 1, 1},
    {&__pyx_kp_s_shape_precision, __pyx_k_shape_precision, sizeof(__pyx_k_shape_precision), 0, 0, 1, 0},
    {&__pyx_n_s_shapes, __pyx_k_shapes, sizeof(__pyx_k_shapes), 0, 0, 1, 1},
    {&__pyx_n_s_short_relators, __pyx_k_short_relators, sizeof(__pyx_k_short_relators), 0, 0, 1, 1},
    {&__pyx_n_s_shortest, __pyx_k_shortest, sizeof(__pyx_k_shortest), 0, 0, 1, 1},
    {&__pyx_n_s_shortest_longitudes, __pyx_k_shortest_longitudes, sizeof(__pyx_k_shortest_longitudes), 0, 0, 1, 1},
    {&__pyx_n_s_shortest_meridians, __pyx_k_shortest_meridians, sizeof(__pyx_k_shortest_meridians), 0, 0, 1, 1},
    {&__pyx_n_s_show_uAcknowledge, __pyx_k_show_uAcknowledge, sizeof(__pyx_k_show_uAcknowledge), 0, 0, 1, 1},
    {&__pyx_n_s_shrink_factor, __pyx_k_shrink_factor, sizeof(__pyx_k_shrink_factor), 0, 0, 1, 1},
    {&__pyx_n_s_side, __pyx_k_side, sizeof(__pyx_k_side), 0, 0, 1, 1},
    {&__pyx_n_s_side_lengths, __pyx_k_side_lengths, sizeof(__pyx_k_side_lengths), 0, 0, 1, 1},
    {&__pyx_n_s_sided, __pyx_k_sided, sizeof(__pyx_k_sided), 0, 0, 1, 1},
    {&__pyx_n_s_sign, __pyx_k_sign, sizeof(__pyx_k_sign), 0, 0, 1, 1},
    {&__pyx_n_s_signs, __pyx_k_signs, sizeof(__pyx_k_signs), 0, 0, 1, 1},
    {&__pyx_n_s_signtype, __pyx_k_signtype, sizeof(__pyx_k_signtype), 0, 0, 1, 1},
    {&__pyx_n_s_simplified_matrix, __pyx_k_simplified_matrix, sizeof(__pyx_k_simplified_matrix), 0, 0, 1, 1},
    {&__pyx_n_s_simplify, __pyx_k_simplify, sizeof(__pyx_k_simplify), 0, 0, 1, 1},
    {&__pyx_n_s_simplify_presentation, __pyx_k_simplify_presentation, sizeof(__pyx_k_simplify_presentation), 0, 0, 1, 1},
    {&__pyx_n_s_singularity_index, __pyx_k_singularity_index, sizeof(__pyx_k_singularity_index), 0, 0, 1, 1},
    {&__pyx_n_s_six_length, __pyx_k_six_length, sizeof(__pyx_k_six_length), 0, 0, 1, 1},
    {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
    {&__pyx_n_s_sl2, __pyx_k_sl2, sizeof(__pyx_k_sl2), 0, 0, 1, 1},
    {&__pyx_n_s_smith_form, __pyx_k_smith_form, sizeof(__pyx_k_smith_form), 0, 0, 1, 1},
    {&__pyx_n_s_snap, __pyx_k_snap, sizeof(__pyx_k_snap), 0, 0, 1, 1},
    {&__pyx_n_s_snapPea, __pyx_k_snapPea, sizeof(__pyx_k_snapPea), 0, 0, 1, 1},
    {&__pyx_n_s_snappea, __pyx_k_snappea, sizeof(__pyx_k_snappea), 0, 0, 1, 1},
    {&__pyx_n_s_snappy, __pyx_k_snappy, sizeof(__pyx_k_snappy), 0, 0, 1, 1},
    {&__pyx_n_s_so_far, __pyx_k_so_far, sizeof(__pyx_k_so_far), 0, 0, 1, 1},
    {&__pyx_n_s_soln, __pyx_k_soln, sizeof(__pyx_k_soln), 0, 0, 1, 1},
    {&__pyx_n_s_solution_type, __pyx_k_solution_type, sizeof(__pyx_k_solution_type), 0, 0, 1, 1},
    {&__pyx_n_s_sorted, __pyx_k_sorted, sizeof(__pyx_k_sorted), 0, 0, 1, 1},
    {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
    {&__pyx_n_s_spec_2, __pyx_k_spec_2, sizeof(__pyx_k_spec_2), 0, 0, 1, 1},
    {&__pyx_n_s_specs, __pyx_k_specs, sizeof(__pyx_k_specs), 0, 0, 1, 1},
    {&__pyx_n_s_spectrum, __pyx_k_spectrum, sizeof(__pyx_k_spectrum), 0, 0, 1, 1},
    {&__pyx_n_s_spherogram, __pyx_k_spherogram, sizeof(__pyx_k_spherogram), 0, 0, 1, 1},
    {&__pyx_n_s_spin_short, __pyx_k_spin_short, sizeof(__pyx_k_spin_short), 0, 0, 1, 1},
    {&__pyx_n_s_spine_radius, __pyx_k_spine_radius, sizeof(__pyx_k_spine_radius), 0, 0, 1, 1},
    {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
    {&__pyx_n_s_split_filling_info, __pyx_k_split_filling_info, sizeof(__pyx_k_split_filling_info), 0, 0, 1, 1},
    {&__pyx_n_s_splitting, __pyx_k_splitting, sizeof(__pyx_k_splitting), 0, 0, 1, 1},
    {&__pyx_n_s_splitting_from_string, __pyx_k_splitting_from_string, sizeof(__pyx_k_splitting_from_string), 0, 0, 1, 1},
    {&__pyx_n_s_splitting_surfaces, __pyx_k_splitting_surfaces, sizeof(__pyx_k_splitting_surfaces), 0, 0, 1, 1},
    {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
    {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1},
    {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
    {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1},
    {&__pyx_n_s_stderr, __pyx_k_stderr, sizeof(__pyx_k_stderr), 0, 0, 1, 1},
    {&__pyx_n_s_stdout, __pyx_k_stdout, sizeof(__pyx_k_stdout), 0, 0, 1, 1},
    {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
    {&__pyx_n_s_stl, __pyx_k_stl, sizeof(__pyx_k_stl), 0, 0, 1, 1},
    {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
    {&__pyx_n_s_stopper, __pyx_k_stopper, sizeof(__pyx_k_stopper), 0, 0, 1, 1},
    {&__pyx_n_s_stopping_displacement, __pyx_k_stopping_displacement, sizeof(__pyx_k_stopping_displacement), 0, 0, 1, 1},
    {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
    {&__pyx_n_s_strandtype, __pyx_k_strandtype, sizeof(__pyx_k_strandtype), 0, 0, 1, 1},
    {&__pyx_n_s_strategy, __pyx_k_strategy, sizeof(__pyx_k_strategy), 0, 0, 1, 1},
    {&__pyx_n_s_string, __pyx_k_string, sizeof(__pyx_k_string), 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_strline, __pyx_k_strline, sizeof(__pyx_k_strline), 0, 0, 1, 1},
    {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
    {&__pyx_n_s_structure, __pyx_k_structure, sizeof(__pyx_k_structure), 0, 0, 1, 1},
    {&__pyx_n_s_subgroup, __pyx_k_subgroup, sizeof(__pyx_k_subgroup), 0, 0, 1, 1},
    {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
    {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
    {&__pyx_n_s_surface, __pyx_k_surface, sizeof(__pyx_k_surface), 0, 0, 1, 1},
    {&__pyx_n_s_surfaces, __pyx_k_surfaces, sizeof(__pyx_k_surfaces), 0, 0, 1, 1},
    {&__pyx_n_s_symmetric_triangulation, __pyx_k_symmetric_triangulation, sizeof(__pyx_k_symmetric_triangulation), 0, 0, 1, 1},
    {&__pyx_n_s_symmetries_of_link, __pyx_k_symmetries_of_link, sizeof(__pyx_k_symmetries_of_link), 0, 0, 1, 1},
    {&__pyx_n_s_symmetries_of_manifold, __pyx_k_symmetries_of_manifold, sizeof(__pyx_k_symmetries_of_manifold), 0, 0, 1, 1},
    {&__pyx_n_s_symmetry_group, __pyx_k_symmetry_group, sizeof(__pyx_k_symmetry_group), 0, 0, 1, 1},
    {&__pyx_n_s_symplectic_basis, __pyx_k_symplectic_basis, sizeof(__pyx_k_symplectic_basis), 0, 0, 1, 1},
    {&__pyx_n_s_symplectic_form, __pyx_k_symplectic_form, sizeof(__pyx_k_symplectic_form), 0, 0, 1, 1},
    {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
    {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
    {&__pyx_n_s_table, __pyx_k_table, sizeof(__pyx_k_table), 0, 0, 1, 1},
    {&__pyx_n_s_table_directory, __pyx_k_table_directory, sizeof(__pyx_k_table_directory), 0, 0, 1, 1},
    {&__pyx_n_s_tail, __pyx_k_tail, sizeof(__pyx_k_tail), 0, 0, 1, 1},
    {&__pyx_n_s_tail_vertex_index, __pyx_k_tail_vertex_index, sizeof(__pyx_k_tail_vertex_index), 0, 0, 1, 1},
    {&__pyx_n_s_tarfile, __pyx_k_tarfile, sizeof(__pyx_k_tarfile), 0, 0, 1, 1},
    {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1},
    {&__pyx_n_s_tarpath, __pyx_k_tarpath, sizeof(__pyx_k_tarpath), 0, 0, 1, 1},
    {&__pyx_n_s_temp, __pyx_k_temp, sizeof(__pyx_k_temp), 0, 0, 1, 1},
    {&__pyx_n_s_tempfile, __pyx_k_tempfile, sizeof(__pyx_k_tempfile), 0, 0, 1, 1},
    {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
    {&__pyx_n_s_tet, __pyx_k_tet, sizeof(__pyx_k_tet), 0, 0, 1, 1},
    {&__pyx_n_s_tet_num, __pyx_k_tet_num, sizeof(__pyx_k_tet_num), 0, 0, 1, 1},
    {&__pyx_n_s_tetrahedra_data, __pyx_k_tetrahedra_data, sizeof(__pyx_k_tetrahedra_data), 0, 0, 1, 1},
    {&__pyx_n_s_tetrahedra_shapes, __pyx_k_tetrahedra_shapes, sizeof(__pyx_k_tetrahedra_shapes), 0, 0, 1, 1},
    {&__pyx_kp_s_tetrahedra_shapes_were_inserted, __pyx_k_tetrahedra_shapes_were_inserted, sizeof(__pyx_k_tetrahedra_shapes_were_inserted), 0, 0, 1, 0},
    {&__pyx_kp_s_tetrahedral_group, __pyx_k_tetrahedral_group, sizeof(__pyx_k_tetrahedral_group), 0, 0, 1, 0},
    {&__pyx_kp_s_the_gap_method_for_covers_requir, __pyx_k_the_gap_method_for_covers_requir, sizeof(__pyx_k_the_gap_method_for_covers_requir), 0, 0, 1, 0},
    {&__pyx_kp_s_the_magma_method_for_covers_requ, __pyx_k_the_magma_method_for_covers_requ, sizeof(__pyx_k_the_magma_method_for_covers_requ), 0, 0, 1, 0},
    {&__pyx_n_s_three_to_two, __pyx_k_three_to_two, sizeof(__pyx_k_three_to_two), 0, 0, 1, 1},
    {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
    {&__pyx_n_s_tilts, __pyx_k_tilts, sizeof(__pyx_k_tilts), 0, 0, 1, 1},
    {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
    {&__pyx_n_s_tip, __pyx_k_tip, sizeof(__pyx_k_tip), 0, 0, 1, 1},
    {&__pyx_n_s_tip_vertex_index, __pyx_k_tip_vertex_index, sizeof(__pyx_k_tip_vertex_index), 0, 0, 1, 1},
    {&__pyx_n_s_title, __pyx_k_title, sizeof(__pyx_k_title), 0, 0, 1, 1},
    {&__pyx_n_s_to_byte_str, __pyx_k_to_byte_str, sizeof(__pyx_k_to_byte_str), 0, 0, 1, 1},
    {&__pyx_n_s_to_bytes, __pyx_k_to_bytes, sizeof(__pyx_k_to_bytes), 0, 0, 1, 1},
    {&__pyx_n_s_to_do, __pyx_k_to_do, sizeof(__pyx_k_to_do), 0, 0, 1, 1},
    {&__pyx_n_s_to_str, __pyx_k_to_str, sizeof(__pyx_k_to_str), 0, 0, 1, 1},
    {&__pyx_n_s_to_string, __pyx_k_to_string, sizeof(__pyx_k_to_string), 0, 0, 1, 1},
    {&__pyx_n_s_to_string_locals_genexpr, __pyx_k_to_string_locals_genexpr, sizeof(__pyx_k_to_string_locals_genexpr), 0, 0, 1, 1},
    {&__pyx_n_s_topology, __pyx_k_topology, sizeof(__pyx_k_topology), 0, 0, 1, 1},
    {&__pyx_kp_s_torus_cusp, __pyx_k_torus_cusp, sizeof(__pyx_k_torus_cusp), 0, 0, 1, 0},
    {&__pyx_n_s_total, __pyx_k_total, sizeof(__pyx_k_total), 0, 0, 1, 1},
    {&__pyx_n_s_translations, __pyx_k_translations, sizeof(__pyx_k_translations), 0, 0, 1, 1},
    {&__pyx_kp_s_tri, __pyx_k_tri, sizeof(__pyx_k_tri), 0, 0, 1, 0},
    {&__pyx_kp_s_tri_txt, __pyx_k_tri_txt, sizeof(__pyx_k_tri_txt), 0, 0, 1, 0},
    {&__pyx_n_s_triangulation, __pyx_k_triangulation, sizeof(__pyx_k_triangulation), 0, 0, 1, 1},
    {&__pyx_n_s_triangulation_class, __pyx_k_triangulation_class, sizeof(__pyx_k_triangulation_class), 0, 0, 1, 1},
    {&__pyx_n_s_triangulation_help, __pyx_k_triangulation_help, sizeof(__pyx_k_triangulation_help), 0, 0, 1, 1},
    {&__pyx_n_s_triangulation_isosig, __pyx_k_triangulation_isosig, sizeof(__pyx_k_triangulation_isosig), 0, 0, 1, 1},
    {&__pyx_n_s_try_hard_to_shorten_relators, __pyx_k_try_hard_to_shorten_relators, sizeof(__pyx_k_try_hard_to_shorten_relators), 0, 0, 1, 1},
    {&__pyx_n_s_twister, __pyx_k_twister, sizeof(__pyx_k_twister), 0, 0, 1, 1},
    {&__pyx_n_s_twister_word, __pyx_k_twister_word, sizeof(__pyx_k_twister_word), 0, 0, 1, 1},
    {&__pyx_n_s_two_sided, __pyx_k_two_sided, sizeof(__pyx_k_two_sided), 0, 0, 1, 1},
    {&__pyx_kp_s_two_sided_2, __pyx_k_two_sided_2, sizeof(__pyx_k_two_sided_2), 0, 0, 1, 0},
    {&__pyx_n_s_two_to_three, __pyx_k_two_to_three, sizeof(__pyx_k_two_to_three), 0, 0, 1, 1},
    {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
    {&__pyx_n_s_type_str, __pyx_k_type_str, sizeof(__pyx_k_type_str), 0, 0, 1, 1},
    {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
    {&__pyx_n_s_u, __pyx_k_u, sizeof(__pyx_k_u), 0, 0, 1, 1},
    {&__pyx_n_s_unit, __pyx_k_unit, sizeof(__pyx_k_unit), 0, 0, 1, 1},
    {&__pyx_n_s_unknown, __pyx_k_unknown, sizeof(__pyx_k_unknown), 0, 0, 1, 1},
    {&__pyx_n_s_unnamed, __pyx_k_unnamed, sizeof(__pyx_k_unnamed), 0, 0, 1, 1},
    {&__pyx_kp_s_unnamed_link, __pyx_k_unnamed_link, sizeof(__pyx_k_unnamed_link), 0, 0, 1, 0},
    {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
    {&__pyx_n_s_unpickle_dirichlet_domain, __pyx_k_unpickle_dirichlet_domain, sizeof(__pyx_k_unpickle_dirichlet_domain), 0, 0, 1, 1},
    {&__pyx_kp_s_unrecognized_solution_type, __pyx_k_unrecognized_solution_type, sizeof(__pyx_k_unrecognized_solution_type), 0, 0, 1, 0},
    {&__pyx_n_s_unsimplified_filled_triangulati, __pyx_k_unsimplified_filled_triangulati, sizeof(__pyx_k_unsimplified_filled_triangulati), 0, 0, 1, 1},
    {&__pyx_n_s_unsimplified_filled_triangulati_2, __pyx_k_unsimplified_filled_triangulati_2, sizeof(__pyx_k_unsimplified_filled_triangulati_2), 0, 0, 1, 1},
    {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
    {&__pyx_n_s_upper, __pyx_k_upper, sizeof(__pyx_k_upper), 0, 0, 1, 1},
    {&__pyx_n_s_use_field_conversion, __pyx_k_use_field_conversion, sizeof(__pyx_k_use_field_conversion), 0, 0, 1, 1},
    {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
    {&__pyx_n_s_user_radius, __pyx_k_user_radius, sizeof(__pyx_k_user_radius), 0, 0, 1, 1},
    {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
    {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
    {&__pyx_kp_s_v1205_2_3, __pyx_k_v1205_2_3, sizeof(__pyx_k_v1205_2_3), 0, 0, 1, 0},
    {&__pyx_n_s_valid_index, __pyx_k_valid_index, sizeof(__pyx_k_valid_index), 0, 0, 1, 1},
    {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
    {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
    {&__pyx_n_s_verbose_form, __pyx_k_verbose_form, sizeof(__pyx_k_verbose_form), 0, 0, 1, 1},
    {&__pyx_n_s_verified, __pyx_k_verified, sizeof(__pyx_k_verified), 0, 0, 1, 1},
    {&__pyx_n_s_verify, __pyx_k_verify, sizeof(__pyx_k_verify), 0, 0, 1, 1},
    {&__pyx_n_s_verify_complex_volume, __pyx_k_verify_complex_volume, sizeof(__pyx_k_verify_complex_volume), 0, 0, 1, 1},
    {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
    {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
    {&__pyx_n_s_vertex, __pyx_k_vertex, sizeof(__pyx_k_vertex), 0, 0, 1, 1},
    {&__pyx_n_s_vertex_class, __pyx_k_vertex_class, sizeof(__pyx_k_vertex_class), 0, 0, 1, 1},
    {&__pyx_n_s_vertex_data_list, __pyx_k_vertex_data_list, sizeof(__pyx_k_vertex_data_list), 0, 0, 1, 1},
    {&__pyx_n_s_vertex_epsilon, __pyx_k_vertex_epsilon, sizeof(__pyx_k_vertex_epsilon), 0, 0, 1, 1},
    {&__pyx_n_s_vertex_image_indices, __pyx_k_vertex_image_indices, sizeof(__pyx_k_vertex_image_indices), 0, 0, 1, 1},
    {&__pyx_n_s_vertex_indices, __pyx_k_vertex_indices, sizeof(__pyx_k_vertex_indices), 0, 0, 1, 1},
    {&__pyx_n_s_vertex_list, __pyx_k_vertex_list, sizeof(__pyx_k_vertex_list), 0, 0, 1, 1},
    {&__pyx_n_s_vertex_list_2, __pyx_k_vertex_list_2, sizeof(__pyx_k_vertex_list_2), 0, 0, 1, 1},
    {&__pyx_n_s_vertex_to_index, __pyx_k_vertex_to_index, sizeof(__pyx_k_vertex_to_index), 0, 0, 1, 1},
    {&__pyx_n_s_vertex_to_index_dict, __pyx_k_vertex_to_index_dict, sizeof(__pyx_k_vertex_to_index_dict), 0, 0, 1, 1},
    {&__pyx_n_s_vertices, __pyx_k_vertices, sizeof(__pyx_k_vertices), 0, 0, 1, 1},
    {&__pyx_n_s_view, __pyx_k_view, sizeof(__pyx_k_view), 0, 0, 1, 1},
    {&__pyx_n_s_vol, __pyx_k_vol, sizeof(__pyx_k_vol), 0, 0, 1, 1},
    {&__pyx_n_s_volume, __pyx_k_volume, sizeof(__pyx_k_volume), 0, 0, 1, 1},
    {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
    {&__pyx_n_s_w0, __pyx_k_w0, sizeof(__pyx_k_w0), 0, 0, 1, 1},
    {&__pyx_n_s_w1, __pyx_k_w1, sizeof(__pyx_k_w1), 0, 0, 1, 1},
    {&__pyx_n_s_wb, __pyx_k_wb, sizeof(__pyx_k_wb), 0, 0, 1, 1},
    {&__pyx_n_s_where_to_resume, __pyx_k_where_to_resume, sizeof(__pyx_k_where_to_resume), 0, 0, 1, 1},
    {&__pyx_n_s_which_curve, __pyx_k_which_curve, sizeof(__pyx_k_which_curve), 0, 0, 1, 1},
    {&__pyx_n_s_which_cusp, __pyx_k_which_cusp, sizeof(__pyx_k_which_cusp), 0, 0, 1, 1},
    {&__pyx_n_s_which_solution, __pyx_k_which_solution, sizeof(__pyx_k_which_solution), 0, 0, 1, 1},
    {&__pyx_n_s_which_surface, __pyx_k_which_surface, sizeof(__pyx_k_which_surface), 0, 0, 1, 1},
    {&__pyx_n_s_with_hyperbolic_structure, __pyx_k_with_hyperbolic_structure, sizeof(__pyx_k_with_hyperbolic_structure), 0, 0, 1, 1},
    {&__pyx_n_s_within_sage, __pyx_k_within_sage, sizeof(__pyx_k_within_sage), 0, 0, 1, 1},
    {&__pyx_n_s_without_hyperbolic_structure, __pyx_k_without_hyperbolic_structure, sizeof(__pyx_k_without_hyperbolic_structure), 0, 0, 1, 1},
    {&__pyx_n_s_word, __pyx_k_word, sizeof(__pyx_k_word), 0, 0, 1, 1},
    {&__pyx_n_s_word_as_list, __pyx_k_word_as_list, sizeof(__pyx_k_word_as_list), 0, 0, 1, 1},
    {&__pyx_n_s_word_list, __pyx_k_word_list, sizeof(__pyx_k_word_list), 0, 0, 1, 1},
    {&__pyx_n_s_word_moves, __pyx_k_word_moves, sizeof(__pyx_k_word_moves), 0, 0, 1, 1},
    {&__pyx_n_s_words, __pyx_k_words, sizeof(__pyx_k_words), 0, 0, 1, 1},
    {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
    {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
    {&__pyx_n_s_x012, __pyx_k_x012, sizeof(__pyx_k_x012), 0, 0, 1, 1},
    {&__pyx_kp_s_xX_d, __pyx_k_xX_d, sizeof(__pyx_k_xX_d), 0, 0, 1, 0},
    {&__pyx_kp_s_x_d_1, __pyx_k_x_d_1, sizeof(__pyx_k_x_d_1), 0, 0, 1, 0},
    {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
    {&__pyx_n_s_y123, __pyx_k_y123, sizeof(__pyx_k_y123), 0, 0, 1, 1},
    {&__pyx_n_s_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 0, 1, 1},
    {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 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_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 41, __pyx_L1_error)
  __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(1, 84, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 214, __pyx_L1_error)
  __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(2, 530, __pyx_L1_error)
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 107, __pyx_L1_error)
  __pyx_builtin_eval = __Pyx_GetBuiltinName(__pyx_n_s_eval); if (!__pyx_builtin_eval) __PYX_ERR(0, 261, __pyx_L1_error)
  __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) __PYX_ERR(0, 380, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 457, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 469, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 509, __pyx_L1_error)
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 511, __pyx_L1_error)
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 515, __pyx_L1_error)
  __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) __PYX_ERR(0, 551, __pyx_L1_error)
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 705, __pyx_L1_error)
  __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(3, 118, __pyx_L1_error)
  __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(3, 268, __pyx_L1_error)
  __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(3, 284, __pyx_L1_error)
  __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(3, 1026, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(3, 1193, __pyx_L1_error)
  __pyx_builtin_all = __Pyx_GetBuiltinName(__pyx_n_s_all); if (!__pyx_builtin_all) __PYX_ERR(3, 1311, __pyx_L1_error)
  __pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_n_s_sorted); if (!__pyx_builtin_sorted) __PYX_ERR(3, 2530, __pyx_L1_error)
  __pyx_builtin_round = __Pyx_GetBuiltinName(__pyx_n_s_round); if (!__pyx_builtin_round) __PYX_ERR(1, 1344, __pyx_L1_error)
  __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(4, 54, __pyx_L1_error)
  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(2, 310, __pyx_L1_error)
  __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(2, 314, __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);

  /* "cython/core/basic.pyx":380
 * 
 *             return "[ %s, ..., %s]" % (
 *                 ', '.join(map(repr, l[:3])),             # <<<<<<<<<<<<<<
 *                 ', '.join(map(repr, l[-3:])))
 * 
 */
  __pyx_slice__3 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__3)) __PYX_ERR(0, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__3);
  __Pyx_GIVEREF(__pyx_slice__3);

  /* "cython/core/basic.pyx":381
 *             return "[ %s, ..., %s]" % (
 *                 ', '.join(map(repr, l[:3])),
 *                 ', '.join(map(repr, l[-3:])))             # <<<<<<<<<<<<<<
 * 
 *         return (
 */
  __pyx_slice__4 = PySlice_New(__pyx_int_neg_3, Py_None, Py_None); if (unlikely(!__pyx_slice__4)) __PYX_ERR(0, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__4);
  __Pyx_GIVEREF(__pyx_slice__4);

  /* "cython/core/basic.pyx":375
 *     def __repr__(self, _type_str = "MatrixWithExplanations"):
 * 
 *         def format_explain_list(l):             # <<<<<<<<<<<<<<
 *             if len(l) <= 6:
 *                 return repr(l)
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_n_s_l); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);
  __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_format_explain_list, 375, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 375, __pyx_L1_error)

  /* "cython/core/basic.pyx":454
 *         # e.g., "1.0 E-10" (note the space before "E").
 *         # Remove it - otherwise it cannot be parsed.
 *         string = string.replace(' ', '')             # <<<<<<<<<<<<<<
 *         float(string)
 *     except:
 */
  __pyx_tuple__10 = PyTuple_Pack(2, __pyx_kp_s__8, __pyx_kp_s__9); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 454, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "cython/core/basic.pyx":515
 * 
 *     def _immutable(self, *args):
 *         raise AttributeError('Info objects are immutable.')             # <<<<<<<<<<<<<<
 * 
 *     def keys(self):
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_Info_objects_are_immutable); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "cython/core/basic.pyx":615
 *         if len(self) > 0 and 'word' in self[0]:
 *             base = LengthSpectrumFormatStringWithWord % (
 *                 'mult', ' length', 'topology', 'parity', 'word')             # <<<<<<<<<<<<<<
 *         else:
 *             base = LengthSpectrumFormatString % (
 */
  __pyx_tuple__14 = PyTuple_Pack(5, __pyx_n_s_mult, __pyx_kp_s_length_2, __pyx_n_s_topology, __pyx_n_s_parity, __pyx_n_s_word); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "cython/core/basic.pyx":618
 *         else:
 *             base = LengthSpectrumFormatString % (
 *                 'mult', ' length', 'topology', 'parity')             # <<<<<<<<<<<<<<
 *         return '\n'.join([base] + [repr(s) for s in self])
 * 
 */
  __pyx_tuple__15 = PyTuple_Pack(4, __pyx_n_s_mult, __pyx_kp_s_length_2, __pyx_n_s_topology, __pyx_n_s_parity); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "cython/core/basic.pyx":630
 * 
 * def format_two_by_two(mat):
 *     a,b,c,d = ['%d' % x for x in [mat[0,0], mat[0,1], mat[1,0], mat[1,1]]]             # <<<<<<<<<<<<<<
 *     w0 = max(len(a), len(c))
 *     w1 = max(len(b), len(d))
 */
  __pyx_tuple__19 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);
  __pyx_tuple__20 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_1); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);
  __pyx_tuple__21 = PyTuple_Pack(2, __pyx_int_1, __pyx_int_0); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);
  __pyx_tuple__22 = PyTuple_Pack(2, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "cython/core/basic.pyx":705
 *     klp = LE.SnapPea_KLPProjection()
 *     if klp is None:
 *         raise RuntimeError('Communication with PLink failed.')             # <<<<<<<<<<<<<<
 *     elif klp == (0, 0, 0, []):
 *         msg_stream.write('\nGot the empty link from PLink and so not changing the triangulation.\n')
 */
  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_Communication_with_PLink_failed); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "cython/core/triangulation.pyx":93
 *         self.hyperbolic_structure_initialized = False
 *         self._link_file_full_path = None
 *         for attr in ['__snappy__', 'snapPea', '_to_string']:             # <<<<<<<<<<<<<<
 *             if hasattr(spec, attr):
 *                 spec = getattr(spec, attr)()
 */
  __pyx_tuple__25 = PyTuple_Pack(3, __pyx_n_s_snappy, __pyx_n_s_snapPea, __pyx_n_s_to_string); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(3, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "cython/core/triangulation.pyx":103
 *             self.get_triangulation(spec, remove_finite_vertices)
 *             if self.c_triangulation == NULL:
 *                 raise RuntimeError('An empty triangulation was generated.')             # <<<<<<<<<<<<<<
 *         elif spec is None:
 *             self.get_from_new_plink()
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_An_empty_triangulation_was_gener); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(3, 103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "cython/core/triangulation.pyx":112
 *     cdef get_from_new_plink(self, file_name=None):
 *         if LinkEditor is None:
 *             raise RuntimeError('PLink was not imported.')             # <<<<<<<<<<<<<<
 *         self.LE = LinkEditor(no_arcs=True,
 *                              callback=_plink_callback,
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_PLink_was_not_imported); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(3, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "cython/core/triangulation.pyx":118
 *                              file_name=file_name,
 *                              manifold=self)
 *         print('Starting the link editor.\n'             # <<<<<<<<<<<<<<
 *               'Select Tools->Send to SnapPy to load the '
 *               'link complement.')
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_Starting_the_link_editor_Select); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(3, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "cython/core/triangulation.pyx":134
 *         m = split_filling_info.match(spec)
 *         name = m.group(1)
 *         fillings = eval( '[' + m.group(2).replace(')(', '),(')+ ']', {})             # <<<<<<<<<<<<<<
 * 
 *         # Step 1. The easy databases
 */
  __pyx_tuple__31 = PyTuple_Pack(2, __pyx_kp_s__29, __pyx_kp_s__30); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(3, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "cython/core/triangulation.pyx":269
 *             if os.path.isfile(pathname):
 *                 file = open(pathname, 'r')
 *                 first_line = file.readline()[:-1]             # <<<<<<<<<<<<<<
 *                 file.close()
 *                 if first_line.find('% Link Projection') > -1:
 */
  __pyx_slice__34 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__34)) __PYX_ERR(3, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__34);
  __Pyx_GIVEREF(__pyx_slice__34);

  /* "cython/core/triangulation.pyx":343
 *             L.view(self.LE)
 *         else:
 *             raise ValueError('No associated link known.')             # <<<<<<<<<<<<<<
 * 
 *     def link(self):
 */
  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_No_associated_link_known); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(3, 343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "cython/core/triangulation.pyx":379
 *             return get_num_nonor_cusps(self.c_triangulation)
 *         else:
 *             raise ValueError("Acceptable cusp types are "             # <<<<<<<<<<<<<<
 *                              "['all', 'orientable', 'nonorientable'].")
 * 
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_Acceptable_cusp_types_are_all_or); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(3, 379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "cython/core/triangulation.pyx":413
 *         """
 *         if self.is_orientable():
 *             raise ValueError('The Triangulation is already orientable.')             # <<<<<<<<<<<<<<
 * 
 *         cdef c_Triangulation* cover_c_triangulation = NULL
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_The_Triangulation_is_already_ori); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(3, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "cython/core/triangulation.pyx":618
 *                 mode='w', title='Save Triangulation', defaultextension='.tri',
 *                 filetypes = [
 *                     ('Triangulation and text files', '*.tri *.txt', 'TEXT'),             # <<<<<<<<<<<<<<
 *                     ('All text files', '', 'TEXT'),
 *                     ('All files', '')])
 */
  __pyx_tuple__39 = PyTuple_Pack(3, __pyx_kp_s_Triangulation_and_text_files, __pyx_kp_s_tri_txt, __pyx_n_s_TEXT); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(3, 618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "cython/core/triangulation.pyx":619
 *                 filetypes = [
 *                     ('Triangulation and text files', '*.tri *.txt', 'TEXT'),
 *                     ('All text files', '', 'TEXT'),             # <<<<<<<<<<<<<<
 *                     ('All files', '')])
 *             if savefile:
 */
  __pyx_tuple__40 = PyTuple_Pack(3, __pyx_kp_s_All_text_files, __pyx_kp_s__9, __pyx_n_s_TEXT); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(3, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "cython/core/triangulation.pyx":620
 *                     ('Triangulation and text files', '*.tri *.txt', 'TEXT'),
 *                     ('All text files', '', 'TEXT'),
 *                     ('All files', '')])             # <<<<<<<<<<<<<<
 *             if savefile:
 *                 filename = savefile.name
 */
  __pyx_tuple__41 = PyTuple_Pack(2, __pyx_kp_s_All_files, __pyx_kp_s__9); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(3, 620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "cython/core/triangulation.pyx":627
 *                 return
 * 
 *         raise ValueError('Please specify a file name.')             # <<<<<<<<<<<<<<
 * 
 *     def save(self, file_name=None):
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_Please_specify_a_file_name); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(3, 627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "cython/core/triangulation.pyx":646
 *         """
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty.')             # <<<<<<<<<<<<<<
 *         if file_name is None:
 *             self._empty_save()
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_The_Triangulation_is_empty); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(3, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "cython/core/triangulation.pyx":692
 *         cdef c_Triangulation* c_triangulation = NULL
 *         if self.c_triangulation is not NULL:
 *             raise ValueError('The Triangulation must be empty.')             # <<<<<<<<<<<<<<
 *         b_string = to_byte_str(string)
 *         c_triangulation = read_triangulation_from_string(b_string)
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_The_Triangulation_must_be_empty); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(3, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "cython/core/triangulation.pyx":717
 *             raise ValueError('The Triangulation is empty.')
 *         if False in [ c.is_complete for c in self.cusp_info()]:
 *             raise ValueError('Byte encoding requires complete cusps.')             # <<<<<<<<<<<<<<
 *         c_terse = tri_to_terse(self.c_triangulation)
 *         byteseq = bytearray([c_terse.num_tetrahedra])
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_Byte_encoding_requires_complete); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(3, 717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "cython/core/triangulation.pyx":925
 *             raise ValueError('The Triangulation is empty.')
 *         if ( len(permutation) != num or set(permutation) != set(range(num)) ):
 *             raise ValueError('Not a valid permutation')             # <<<<<<<<<<<<<<
 *         indices = <int *>malloc(num*sizeof(int))
 *         for n in range(num):
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_Not_a_valid_permutation); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(3, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "cython/core/triangulation.pyx":993
 * 
 *         if self.c_triangulation is NULL or other.c_triangulation is NULL:
 *             raise ValueError('Manifolds must be non-empty.')             # <<<<<<<<<<<<<<
 * 
 *         compute_cusped_isomorphisms(self.c_triangulation,
 */
  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_Manifolds_must_be_non_empty); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(3, 993, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "cython/core/triangulation.pyx":1031
 *         if False in ( self.cusp_info('is_complete') +
 *                       other.cusp_info('is_complete') ):
 *             raise ValueError("Can't compare triangulations of manifolds "             # <<<<<<<<<<<<<<
 *                              "with Dehn fillings.")
 *         return bool(same_triangulation(self.c_triangulation,
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_Can_t_compare_triangulations_of); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(3, 1031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "cython/core/triangulation.pyx":1073
 *         cdef char* c_new_name = b_new_name
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The empty triangulation has no name.')             # <<<<<<<<<<<<<<
 *         set_triangulation_name(self.c_triangulation, c_new_name)
 * 
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_The_empty_triangulation_has_no_n); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(3, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "cython/core/triangulation.pyx":1183
 *                 if ( not hasattr(filling_data, '__getitem__')
 *                      or not hasattr(filling_data[0], '__getitem__') ):
 *                     raise IndexError('If there is more than one cusp '             # <<<<<<<<<<<<<<
 *                                      'you must specify which one you\n'
 *                                      'are filling, e.g. M.dehn_fill((2,3),1)')
 */
  __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_If_there_is_more_than_one_cusp_y); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(3, 1183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "cython/core/triangulation.pyx":1266
 *         """
 *         if not self.is_orientable():
 *             raise ValueError("The Manifold is not orientable, so its "             # <<<<<<<<<<<<<<
 *                              "orientation can't be reversed.")
 *         reorient(self.c_triangulation)
 */
  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_The_Manifold_is_not_orientable_s); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(3, 1266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "cython/core/triangulation.pyx":1296
 * 
 *         if False in [(c in range(n)) for c in cusps_to_fill]:
 *             raise IndexError('The specified indices to be filled are beyond '             # <<<<<<<<<<<<<<
 *                              'the actual number of cusps.')
 *         if 0 in [cusp_is_fillable(self.c_triangulation, c)
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_The_specified_indices_to_be_fill); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(3, 1296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "cython/core/triangulation.pyx":1300
 *         if 0 in [cusp_is_fillable(self.c_triangulation, c)
 *                  for c in cusps_to_fill]:
 *             raise IndexError('To permanently fill a cusp, the Dehn '             # <<<<<<<<<<<<<<
 *                              'filling coefficients must be relatively '
 *                              'prime integers.')
 */
  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_To_permanently_fill_a_cusp_the_D); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(3, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "cython/core/triangulation.pyx":1361
 *         n = self.num_cusps()
 *         if not all(cusp_is_fillable(self.c_triangulation, c) for c in range(n)):
 *             raise IndexError('All cusps must be fillable.')             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation* c_new_tri = NULL
 *         cdef Triangulation filled_tri
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s_All_cusps_must_be_fillable); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(3, 1361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "cython/core/triangulation.pyx":1375
 *             mark_solid_tori = True
 *         else:
 *             raise ValueError("The method must be 'fold' or 'layered' or 'layered_and_marked'")             # <<<<<<<<<<<<<<
 * 
 *         c_new_tri = subdivide(self.c_triangulation, to_byte_str(self.name() + '_filled'))
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_The_method_must_be_fold_or_layer); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(3, 1375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "cython/core/triangulation.pyx":1508
 * 
 *         if N < 2 or N > 15:
 *             raise ValueError('N has to be 2...15')             # <<<<<<<<<<<<<<
 * 
 *         if equation_type not in ['all',
 */
  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_N_has_to_be_2_15); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(3, 1508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "cython/core/triangulation.pyx":1515
 *                                  'peripheral',
 *                                  'longitude', 'meridian']:
 *             raise ValueError('Wrong equation_type')             # <<<<<<<<<<<<<<
 * 
 *         if self.c_triangulation is NULL:
 */
  __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s_Wrong_equation_type); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(3, 1515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "cython/core/triangulation.pyx":1650
 *             T = get_num_tetrahedra(self.c_triangulation)
 *             if 2 * T != len(obstruction_class):
 *                 raise ValueError('Obstruction class has wrong length')             # <<<<<<<<<<<<<<
 *             c_obstruction_class = <int *>malloc(2*T*sizeof(int))
 *             for i, c in enumerate(obstruction_class):
 */
  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_Obstruction_class_has_wrong_leng); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(3, 1650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "cython/core/triangulation.pyx":2144
 * 
 *         if form != 'rect':
 *             raise ValueError("Equations are available in 'log' and "             # <<<<<<<<<<<<<<
 *                              "'rect' forms only.")
 *         rect = []
 */
  __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_Equations_are_available_in_log_a); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(3, 2144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "cython/core/triangulation.pyx":2180
 * 
 *         if not all_Dehn_coefficients_are_integers(self.c_triangulation):
 *             raise ValueError('All Dehn filling coefficients must be integers')             # <<<<<<<<<<<<<<
 *         choose_generators(self.c_triangulation, 0, 0)
 *         num_generators = self.c_triangulation.num_generators
 */
  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_All_Dehn_filling_coefficients_mu); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(3, 2180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "cython/core/triangulation.pyx":2207
 *                     relation_matrix[row, column] -= 1
 *                 elif status != not_a_generator:
 *                     raise RuntimeError('Invalid generator status')             # <<<<<<<<<<<<<<
 *                 veer_left(&ptet)
 *                 if same_positioned_tet(&ptet, &ptet0):
 */
  __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_Invalid_generator_status); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(3, 2207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "cython/core/triangulation.pyx":2274
 *                 free_relations(&R)
 *         else:
 *             raise RuntimeError("The SnapPea kernel couldn't compute "             # <<<<<<<<<<<<<<
 *                                "the homology presentation matrix")
 *         return AbelianGroup(relations)
 */
  __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_The_SnapPea_kernel_couldn_t_comp); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(3, 2274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "cython/core/triangulation.pyx":2353
 *                 minimize_number_of_generators, try_hard_to_shorten_relators)
 *         try:
 *             return self._cache.lookup('fundamental_group', *args)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_n_s_fundamental_group); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(3, 2353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "cython/core/triangulation.pyx":2416
 *                     f = permutation_rep
 *                     if not repr(f.Image().Type()) == 'GrpPerm':
 *                         raise TypeError('The homomorphism image is not '             # <<<<<<<<<<<<<<
 *                                         'a permutation group.')
 *                 else:
 */
  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_The_homomorphism_image_is_not_a); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(3, 2416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "cython/core/triangulation.pyx":2419
 *                                         'a permutation group.')
 *                 else:
 *                     raise TypeError('That Magma type not recognized.')             # <<<<<<<<<<<<<<
 * 
 *                 magma.eval("""\
 */
  __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_That_Magma_type_not_recognized); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(3, 2419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "cython/core/triangulation.pyx":2499
 *         """
 *         if degree < 1:
 *             raise ValueError('Cover degree should be at least 1')             # <<<<<<<<<<<<<<
 * 
 *         if self.c_triangulation is NULL:
 */
  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_Cover_degree_should_be_at_least); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(3, 2499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "cython/core/triangulation.pyx":2504
 *             raise ValueError('The Triangulation is empty.')
 *         if cover_type not in ('cyclic', 'all'):
 *             raise ValueError("Supported cover_types are 'all' "             # <<<<<<<<<<<<<<
 *                              "and 'cyclic'.")
 *         if method is None:
 */
  __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_Supported_cover_types_are_all_an); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(3, 2504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "cython/core/triangulation.pyx":2521
 *             return self._covers_magma(degree)
 * 
 *         raise ValueError("Supported methods are 'low_index', 'gap', 'magma' "             # <<<<<<<<<<<<<<
 *                          "and 'snappea'")
 * 
 */
  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_s_Supported_methods_are_low_index); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(3, 2521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "cython/core/triangulation.pyx":2551
 *                                           num_threads=num_threads)
 * 
 *         def index(subgroup):             # <<<<<<<<<<<<<<
 *             return 1 if len(subgroup) == 0 else len(subgroup[0])
 * 
 */
  __pyx_tuple__69 = PyTuple_Pack(1, __pyx_n_s_subgroup); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(3, 2551, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);
  __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_index, 2551, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(3, 2551, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2649
 *         for permutation in perm_list:
 *             if set(permutation) != S:
 *                 raise ValueError('The permutation list is invalid.')             # <<<<<<<<<<<<<<
 * 
 *         # Initialize
 */
  __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_The_permutation_list_is_invalid); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(3, 2649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "cython/core/triangulation.pyx":2657
 *         num_generators = G.num_generators()
 *         if len(perm_list) != num_generators:
 *             raise ValueError('Number of permutations is not the same '             # <<<<<<<<<<<<<<
 *                              'as the number of generators')
 * 
 */
  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s_Number_of_permutations_is_not_th); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(3, 2657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "cython/core/triangulation.pyx":2747
 * 
 *         if self.c_triangulation is NULL:
 *             raise ValueError('The Triangulation is empty')             # <<<<<<<<<<<<<<
 * 
 *         if which_cusp is not None:
 */
  __pyx_tuple__73 = PyTuple_Pack(1, __pyx_kp_s_The_Triangulation_is_empty_2); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(3, 2747, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "cython/core/triangulation.pyx":2757
 *         if peripheral_data == 'fillings':
 *             if which_cusp is not None:
 *                 raise ValueError("You must apply 'fillings' to all "             # <<<<<<<<<<<<<<
 *                                  "of the cusps.")
 *             install_current_curve_bases(self.c_triangulation)
 */
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_s_You_must_apply_fillings_to_all_o); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(3, 2757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "cython/core/triangulation.pyx":2780
 *             if a*d - b*c != 1 and (self.is_orientable() or a*d - b*c != -1):
 *                 if self.is_orientable():
 *                     raise ValueError('The data provided does not give a '             # <<<<<<<<<<<<<<
 *                                      '(positively oriented) basis.')
 *                 else:
 */
  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_s_The_data_provided_does_not_give); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(3, 2780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "cython/core/triangulation.pyx":2783
 *                                      '(positively oriented) basis.')
 *                 else:
 *                     raise ValueError('The data provided does not give a basis.')             # <<<<<<<<<<<<<<
 * 
 *             if 'Klein' in self.cusp_info(which_cusp)['topology']:
 */
  __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_s_The_data_provided_does_not_give_2); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(3, 2783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "cython/core/triangulation.pyx":2787
 *             if 'Klein' in self.cusp_info(which_cusp)['topology']:
 *                 if b != 0 or c != 0:
 *                     raise ValueError('The data provided are invalid for Klein '             # <<<<<<<<<<<<<<
 *                                      'bottle cusps.')
 * 
 */
  __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_s_The_data_provided_are_invalid_fo); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(3, 2787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);

  /* "cython/core/triangulation.pyx":2794
 * 
 *             for n in range(self.num_cusps()):
 *                 for i,j in [(0,0),(0,1),(1,0),(1,1)]:             # <<<<<<<<<<<<<<
 *                     matrices[n][i][j] = 1 if i == j else 0
 * 
 */
  __pyx_tuple__78 = PyTuple_Pack(4, __pyx_tuple__19, __pyx_tuple__20, __pyx_tuple__21, __pyx_tuple__22); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(3, 2794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);

  /* "cython/core/triangulation.pyx":2816
 *                 return
 *             if len(peripheral_data) > self.num_cusps():
 *                 raise IndexError('You provided more peripheral data '             # <<<<<<<<<<<<<<
 *                                  'than there are cusps.')
 * 
 */
  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_s_You_provided_more_peripheral_dat); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(3, 2816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "cython/core/triangulation.pyx":3015
 *                 ignore_orientation)
 *         try:
 *             return self._cache.lookup('triangulation_isosig', *args)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
  __pyx_tuple__80 = PyTuple_Pack(1, __pyx_n_s_triangulation_isosig); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(3, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);

  /* "cython/core/triangulation.pyx":3118
 *         if verify:
 *             if self._is_symplectic(retval):
 *                 print("Result is symplectic (up to factors of 2)")             # <<<<<<<<<<<<<<
 *             else:
 *                 print("Warning: Result is not symplectic")
 */
  __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s_Result_is_symplectic_up_to_facto); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(3, 3118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "cython/core/triangulation.pyx":3120
 *                 print("Result is symplectic (up to factors of 2)")
 *             else:
 *                 print("Warning: Result is not symplectic")             # <<<<<<<<<<<<<<
 * 
 *         return matrix(retval)
 */
  __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_s_Warning_Result_is_not_symplectic); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(3, 3120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);

  /* "cython/core/manifold.pyx":163
 *         result = proto_canonize(self.c_triangulation)
 *         if FuncResult[result] != 'func_OK':
 *             raise RuntimeError('SnapPea failed to find the canonical '             # <<<<<<<<<<<<<<
 *                                'triangulation.')
 *         self._cache.clear(message='canonize')
 */
  __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_s_SnapPea_failed_to_find_the_canon); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(1, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);

  /* "cython/core/manifold.pyx":215
 *         if opacities:
 *             if not len(opacities) == 4 * n:
 *                 raise Exception("Number of opacities does not match.")             # <<<<<<<<<<<<<<
 *             c_opacities = <Boolean *>malloc(n * 4 * sizeof(Boolean))
 *             for i in range(4 * n):
 */
  __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_s_Number_of_opacities_does_not_mat); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(1, 215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);

  /* "cython/core/manifold.pyx":327
 *     def dirichlet_domain(self,
 *                          vertex_epsilon=default_vertex_epsilon,
 *                          displacement = (0.0, 0.0, 0.0),             # <<<<<<<<<<<<<<
 *                          centroid_at_origin=True,
 *                          maximize_injectivity_radius=True,
 */
  __pyx_tuple__86 = PyTuple_Pack(3, __pyx_float_0_0, __pyx_float_0_0, __pyx_float_0_0); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(1, 327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);

  /* "cython/core/manifold.pyx":368
 *                 maximize_injectivity_radius, include_words)
 *         try:
 *             return self._cache.lookup('dirichlet_domain', *args)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
  __pyx_tuple__87 = PyTuple_Pack(1, __pyx_n_s_dirichlet_domain); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(1, 368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);

  /* "cython/core/manifold.pyx":388
 *         """
 *         if Browser is None:
 *             raise RuntimeError("Browser not imported; Tk, CyOpenGL or pypng is probably missing.")             # <<<<<<<<<<<<<<
 *         return Browser(self)
 * 
 */
  __pyx_tuple__88 = PyTuple_Pack(1, __pyx_kp_s_Browser_not_imported_Tk_CyOpenGL); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(1, 388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);

  /* "cython/core/manifold.pyx":497
 * 
 *         if result != func_OK:
 *             raise ValueError('SnapPea failed to compute any part '             # <<<<<<<<<<<<<<
 *                              'of the symmetry group.')
 * 
 */
  __pyx_tuple__89 = PyTuple_Pack(1, __pyx_kp_s_SnapPea_failed_to_compute_any_pa); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(1, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);

  /* "cython/core/manifold.pyx":746
 *         if verified or bits_prec:
 *             if accuracy:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     'SnapPea kernel style estimation of accuracy not available '
 *                     'for arbitrary precision/interval arithmetic.')
 */
  __pyx_tuple__90 = PyTuple_Pack(1, __pyx_kp_s_SnapPea_kernel_style_estimation); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(1, 746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);

  /* "cython/core/manifold.pyx":777
 *                      &requires_initialization)
 *         if not is_known:
 *             raise ValueError("The Chern-Simons invariant isn't "             # <<<<<<<<<<<<<<
 *                              "currently known.")
 *         cs = Real2Number(CS)
 */
  __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_s_The_Chern_Simons_invariant_isn_t); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(1, 777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);

  /* "cython/core/manifold.pyx":909
 *                                        fixed_alignment=fixed_alignment,
 *                                        bits_prec=bits_prec, dec_prec=dec_prec,
 *                                        intervals=intervals)[::2]             # <<<<<<<<<<<<<<
 *             if part is not None:
 *                 return result
 */
  __pyx_slice__92 = PySlice_New(Py_None, Py_None, __pyx_int_2); if (unlikely(!__pyx_slice__92)) __PYX_ERR(1, 909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__92);
  __Pyx_GIVEREF(__pyx_slice__92);

  /* "cython/core/manifold.pyx":918
 *         if bits_prec or dec_prec:
 *             if fixed_alignment is False:
 *                 raise ValueError(             # <<<<<<<<<<<<<<
 *                     'High precision shapes must be computed '
 *                     'in the fixed alignment')
 */
  __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_s_High_precision_shapes_must_be_co); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(1, 918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);

  /* "cython/core/manifold.pyx":927
 *                 result.append(ShapeInfo(rect=z,
 *                                         log=z.log(),
 *                                         accuracies=(None, None, None, None)))             # <<<<<<<<<<<<<<
 *         else:
 *             for i in range(self.num_tetrahedra()):
 */
  __pyx_tuple__94 = PyTuple_Pack(4, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(1, 927, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "cython/core/manifold.pyx":965
 *                     bits_prec = Number._default_precision)
 *             if not engine.expand_until_certified():
 *                 raise RuntimeError('Could not certify shape intervals, either '             # <<<<<<<<<<<<<<
 *                                    'there are degenerate shapes or the '
 *                                    'precision must be increased.')
 */
  __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_s_Could_not_certify_shape_interval); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(1, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);

  /* "cython/core/manifold.pyx":977
 *                 return [a[part] for a in result]
 *             except KeyError:
 *                 raise ValueError('A non-existent shape data type '             # <<<<<<<<<<<<<<
 *                                  'was specified.')
 *         else:
 */
  __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_s_A_non_existent_shape_data_type_w); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(1, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);

  /* "cython/core/manifold.pyx":1000
 *             soln = complete
 *         else:
 *             raise ValueError("Please specify 'filled' or 'complete'.")             # <<<<<<<<<<<<<<
 *         result = []
 *         for i in range(self.num_tetrahedra()):
 */
  __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_s_Please_specify_filled_or_complet); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(1, 1000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);

  /* "cython/core/manifold.pyx":1174
 *         if verified or bits_prec:
 *             if not data_spec == 'shape':
 *                 raise Exception("Verified and arbitrary precision computation "             # <<<<<<<<<<<<<<
 *                                 "of cusp_info only "
 *                                 "implemented for cusp shapes. Pass 'shape' "
 */
  __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_s_Verified_and_arbitrary_precision); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(1, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);

  /* "cython/core/manifold.pyx":1364
 *         elif peripheral_data == 'shortest':
 *             if which_cusp is not None:
 *                 raise ValueError("You must apply 'shortest' to all "             # <<<<<<<<<<<<<<
 *                                  "of the cusps.")
 *             if return_matrices:
 */
  __pyx_tuple__99 = PyTuple_Pack(1, __pyx_kp_s_You_must_apply_shortest_to_all_o); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(1, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);

  /* "cython/core/manifold.pyx":1473
 *         args = (cutoff, full_rigor, grouped, include_words)
 *         try:
 *             return self._cache.lookup('length_spectrum', *args)             # <<<<<<<<<<<<<<
 *         except KeyError:
 *             pass
 */
  __pyx_tuple__100 = PyTuple_Pack(1, __pyx_n_s_length_spectrum); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(1, 1473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);

  /* "cython/core/manifold.pyx":1526
 * 
 *         if c_triangulation == NULL:
 *             raise RuntimeError('The curve is not isotopic to a geodesic.')             # <<<<<<<<<<<<<<
 *         else:
 *             result = self.__class__('empty')
 */
  __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_s_The_curve_is_not_isotopic_to_a_g); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(1, 1526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);

  /* "cython/core/manifold.pyx":1596
 * 
 *         if FuncResult[result] == 'func_bad_input':
 *             raise ValueError('The Dehn filling coefficients must be '             # <<<<<<<<<<<<<<
 *                              'relatively prime integers.')
 * 
 */
  __pyx_tuple__102 = PyTuple_Pack(1, __pyx_kp_s_The_Dehn_filling_coefficients_mu); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(1, 1596, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);

  /* "cython/core/manifold.pyx":1600
 * 
 *         if FuncResult[result] == 'func_failed':
 *             raise RuntimeError('The SnapPea kernel was not able to '             # <<<<<<<<<<<<<<
 *                                'determine if the manifolds are isometric.')
 * 
 */
  __pyx_tuple__103 = PyTuple_Pack(1, __pyx_kp_s_The_SnapPea_kernel_was_not_able); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(1, 1600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);

  /* "cython/core/manifold.pyx":1610
 *             else:
 *                 if isometries is NULL:  # means manifold is closed
 *                     raise ValueError("Can't get the list of isometries for closed manifolds")             # <<<<<<<<<<<<<<
 *                 ans = IsometryListToIsometries(isometries)
 *                 free_isometry_list(isometries)
 */
  __pyx_tuple__104 = PyTuple_Pack(1, __pyx_kp_s_Can_t_get_the_list_of_isometries); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(1, 1610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);

  /* "cython/core/manifold.pyx":1723
 *         result = find_normal_surfaces(self.c_triangulation, &surfaces)
 *         if result != func_OK:
 *             raise RuntimeError('SnapPea kernel failed when computing normal surfaces')             # <<<<<<<<<<<<<<
 * 
 *         ans = []
 */
  __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_s_SnapPea_kernel_failed_when_compu); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(1, 1723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);

  /* "cython/core/manifold.pyx":1773
 *         result = find_normal_surfaces(self.c_triangulation, &surfaces)
 *         if result != func_OK:
 *             raise RuntimeError('SnapPea kernel failed when computing normal surfaces.')             # <<<<<<<<<<<<<<
 * 
 *         if isinstance(which_surface, NormalSurfaceInfo):
 */
  __pyx_tuple__106 = PyTuple_Pack(1, __pyx_kp_s_SnapPea_kernel_failed_when_compu_2); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(1, 1773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__106);
  __Pyx_GIVEREF(__pyx_tuple__106);

  /* "cython/core/manifold.pyx":1784
 *         result = split_along_normal_surface(surfaces, which_surface, pieces)
 *         if result != func_OK:
 *             raise RuntimeError('SnapPea kernel failed when splitting open along the given surface.')             # <<<<<<<<<<<<<<
 * 
 *         ans = []
 */
  __pyx_tuple__107 = PyTuple_Pack(1, __pyx_kp_s_SnapPea_kernel_failed_when_split); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(1, 1784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);

  /* "cython/core/abelian_group.pyx":48
 *                 self.divisors = list(elementary_divisors)
 *             except:
 *                 raise ValueError('Elementary divisors must be given '             # <<<<<<<<<<<<<<
 *                                  'as a sequence.')
 *         int_types = [int]
 */
  __pyx_tuple__109 = PyTuple_Pack(1, __pyx_kp_s_Elementary_divisors_must_be_give); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(4, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__109);
  __Pyx_GIVEREF(__pyx_tuple__109);

  /* "cython/core/fundamental_group.pyx":10
 * 
 * def inverse_list_word(word):
 *     return [ -x for x in word[::-1] ]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_slice__110 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__110)) __PYX_ERR(8, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__110);
  __Pyx_GIVEREF(__pyx_slice__110);

  /* "cython/core/fundamental_group.pyx":75
 * def word_as_list(word, int num_generators):
 *     if not isinstance(word, str):
 *         raise TypeError('Words must be represented as Python strings.')             # <<<<<<<<<<<<<<
 *     word_list = []
 *     if num_generators > 26:
 */
  __pyx_tuple__112 = PyTuple_Pack(1, __pyx_kp_s_Words_must_be_represented_as_Pyt); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(8, 75, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__112);
  __Pyx_GIVEREF(__pyx_tuple__112);

  /* "cython/core/fundamental_group.pyx":81
 *             g = int(number)
 *             if not (0 < g and g <= num_generators):
 *                 raise ValueError('The word contains a non-generator.')             # <<<<<<<<<<<<<<
 *             if prefix.islower():
 *                 word_list.append( g)
 */
  __pyx_tuple__113 = PyTuple_Pack(1, __pyx_kp_s_The_word_contains_a_non_generato); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(8, 81, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);

  /* "cython/core/fundamental_group.pyx":415
 *         """
 *         if not _within_sage:
 *             raise RuntimeError("Not within Sage")             # <<<<<<<<<<<<<<
 *         F = FreeGroup(self.generators())
 *         rels = [F(R) for R in self.relators(as_int_list=True)]
 */
  __pyx_tuple__119 = PyTuple_Pack(1, __pyx_kp_s_Not_within_Sage); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(8, 415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);

  /* "cython/core/symmetry_group.pyx":27
 *     cdef _set_c_symmetry_group(self, c_SymmetryGroup * c_symmetry_group):
 *         if c_symmetry_group is NULL:
 *             raise ValueError('You tried to create an *empty* SymmetryGroup.')             # <<<<<<<<<<<<<<
 *         self.c_symmetry_group = c_symmetry_group
 * 
 */
  __pyx_tuple__120 = PyTuple_Pack(1, __pyx_kp_s_You_tried_to_create_an_empty_Sym); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(9, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__120);
  __Pyx_GIVEREF(__pyx_tuple__120);

  /* "cython/core/symmetry_group.pyx":96
 *         is_abelian = B2B(symmetry_group_is_abelian(self.c_symmetry_group, &A))
 *         if not is_abelian:
 *             raise ValueError('The symmetry group is not abelian.')             # <<<<<<<<<<<<<<
 * 
 *         coeffs = []
 */
  __pyx_tuple__121 = PyTuple_Pack(1, __pyx_kp_s_The_symmetry_group_is_not_abelia); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(9, 96, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);

  /* "cython/core/symmetry_group.pyx":132
 * 
 *         if not self.is_polyhedral():
 *             raise ValueError('The symmetry group is not polyhedral.')             # <<<<<<<<<<<<<<
 * 
 *         symmetry_group_is_polyhedral(self.c_symmetry_group,
 */
  __pyx_tuple__122 = PyTuple_Pack(1, __pyx_kp_s_The_symmetry_group_is_not_polyhe); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(9, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);

  /* "cython/core/symmetry_group.pyx":180
 *         """
 *         if not self.is_direct_product():
 *             raise ValueError('The symmetry group is not a nontrivial, '             # <<<<<<<<<<<<<<
 *                              'nonabelian direct product.')
 * 
 */
  __pyx_tuple__123 = PyTuple_Pack(1, __pyx_kp_s_The_symmetry_group_is_not_a_nont); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(9, 180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__123);
  __Pyx_GIVEREF(__pyx_tuple__123);

  /* "cython/core/symmetry_group.pyx":191
 *         c_factor_1 = get_symmetry_group_factor(self.c_symmetry_group, 1)
 * 
 *         factor_0 = SymmetryGroup(True, False)             # <<<<<<<<<<<<<<
 *         factor_1 = SymmetryGroup(True, False)
 *         factor_0._set_c_symmetry_group(c_factor_0)
 */
  __pyx_tuple__124 = PyTuple_Pack(2, Py_True, Py_False); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(9, 191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);

  /* "cython/core/symmetry_group.pyx":246
 * 
 *         if not self.is_full_group():
 *             raise ValueError('The full symmetry group is not known.')             # <<<<<<<<<<<<<<
 * 
 *         cdef c_SymmetryGroup* c_abelianization
 */
  __pyx_tuple__125 = PyTuple_Pack(1, __pyx_kp_s_The_full_symmetry_group_is_not_k); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(9, 246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);

  /* "cython/core/symmetry_group.pyx":266
 * 
 *         if not self.is_full_group():
 *             raise ValueError('The full symmetry group not known.')             # <<<<<<<<<<<<<<
 * 
 *         cdef c_SymmetryGroup* c_center
 */
  __pyx_tuple__126 = PyTuple_Pack(1, __pyx_kp_s_The_full_symmetry_group_not_know); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(9, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);

  /* "cython/core/dirichlet.pyx":14
 *     data = data_bytes.split(b'\n')
 *     if data[0].strip() != b'% Generators':
 *         raise ValueError('The generator data does not start with '             # <<<<<<<<<<<<<<
 *                          '"% Generators"')
 *     nums = []
 */
  __pyx_tuple__127 = PyTuple_Pack(1, __pyx_kp_s_The_generator_data_does_not_star); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(10, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);

  /* "cython/core/dirichlet.pyx":17
 *                          '"% Generators"')
 *     nums = []
 *     for line in data[1:]:             # <<<<<<<<<<<<<<
 *         nums += line.split()
 *     num_gens = int(nums[0])
 */
  __pyx_slice__128 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__128)) __PYX_ERR(10, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__128);
  __Pyx_GIVEREF(__pyx_slice__128);

  /* "cython/core/dirichlet.pyx":53
 * 
 *     if not O31_determinants_OK(generators, num_gens, det_error_epsilon):
 *         raise ValueError('The data given do not have the '             # <<<<<<<<<<<<<<
 *                          'right determinants.')
 * 
 */
  __pyx_tuple__129 = PyTuple_Pack(1, __pyx_kp_s_The_data_given_do_not_have_the_r); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(10, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__129);
  __Pyx_GIVEREF(__pyx_tuple__129);

  /* "cython/core/dirichlet.pyx":122
 *         self.c_dirichlet_domain = NULL
 *         if generator_file != '':
 *             with open(generator_file, mode='rb') as input_file:             # <<<<<<<<<<<<<<
 *                 data = input_file.read()
 *             self.c_dirichlet_domain, self.c_num_generators = (
 */
  __pyx_tuple__131 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(10, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__131);
  __Pyx_GIVEREF(__pyx_tuple__131);

  /* "cython/core/dirichlet.pyx":146
 *         else:
 *             if manifold is None:
 *                 raise ValueError('Supply a manifold, or generators.')             # <<<<<<<<<<<<<<
 *             if manifold.c_triangulation is NULL:
 *                 raise ValueError('The Triangulation is empty.')
 */
  __pyx_tuple__132 = PyTuple_Pack(1, __pyx_kp_s_Supply_a_manifold_or_generators); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(10, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);

  /* "cython/core/dirichlet.pyx":166
 *             self.manifold_name = manifold.name()
 *         if self.c_dirichlet_domain == NULL:
 *             raise RuntimeError('The Dirichlet construction failed.')             # <<<<<<<<<<<<<<
 *         if manifold:
 *             self._number_ = manifold._number_
 */
  __pyx_tuple__133 = PyTuple_Pack(1, __pyx_kp_s_The_Dirichlet_construction_faile); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(10, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__133);
  __Pyx_GIVEREF(__pyx_tuple__133);

  /* "cython/core/dirichlet.pyx":506
 *             return ViewerWindow(PolyhedronViewer, facedicts=self.face_list(),
 *                                 title=f'Dirichlet Domain of {self.manifold_name}')
 *         raise RuntimeError('The PolyhedronViewer class '             # <<<<<<<<<<<<<<
 *                            'was not imported.')
 * 
 */
  __pyx_tuple__134 = PyTuple_Pack(1, __pyx_kp_s_The_PolyhedronViewer_class_was_n); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(10, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);

  /* "cython/core/dirichlet.pyx":544
 *         c_triangulation = Dirichlet_to_triangulation(self.c_dirichlet_domain)
 *         if c_triangulation is NULL:
 *             raise ValueError('The Dirichlet domain could not be '             # <<<<<<<<<<<<<<
 *                              'triangulated; perhaps this is an '
 *                              'orbifold group?')
 */
  __pyx_tuple__135 = PyTuple_Pack(1, __pyx_kp_s_The_Dirichlet_domain_could_not_b); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(10, 544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__135);
  __Pyx_GIVEREF(__pyx_tuple__135);

  /* "cython/core/dirichlet.pyx":582
 * 
 *         if self.c_dirichlet_domain == NULL:
 *             raise ValueError('The Dirichlet Domain was not computed.')             # <<<<<<<<<<<<<<
 *         matrices = []
 *         face = self.c_dirichlet_domain.face_list_begin.next
 */
  __pyx_tuple__136 = PyTuple_Pack(1, __pyx_kp_s_The_Dirichlet_Domain_was_not_com); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(10, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);

  /* "cython/core/dirichlet.pyx":620
 * 
 *             if c_word == NULL:
 *                 raise ValueError('The Dirichlet Domain was computed without '             # <<<<<<<<<<<<<<
 *                                  'include_words = True.')
 * 
 */
  __pyx_tuple__137 = PyTuple_Pack(1, __pyx_kp_s_The_Dirichlet_Domain_was_compute); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(10, 620, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__137);
  __Pyx_GIVEREF(__pyx_tuple__137);

  /* "cython/core/cusp_neighborhoods.pyx":23
 *             self.c_triangulation)
 *         if self.c_cusp_neighborhood == NULL:
 *             raise RuntimeError('The cusp neighborhood construction failed.')             # <<<<<<<<<<<<<<
 *         self.manifold_name = manifold.name()
 *         self._num_cusps = get_num_cusp_neighborhoods(self.c_cusp_neighborhood)
 */
  __pyx_tuple__138 = PyTuple_Pack(1, __pyx_kp_s_The_cusp_neighborhood_constructi); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(11, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);

  /* "cython/core/cusp_neighborhoods.pyx":208
 *             Object2Real(cutoff))
 *         if horoball_list == NULL:
 *             raise RuntimeError('The horoball construction failed.')             # <<<<<<<<<<<<<<
 *         result = []
 *         for n from 0 <= n < horoball_list.num_horoballs:
 */
  __pyx_tuple__139 = PyTuple_Pack(1, __pyx_kp_s_The_horoball_construction_failed); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(11, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__139);
  __Pyx_GIVEREF(__pyx_tuple__139);

  /* "cython/core/cusp_neighborhoods.pyx":242
 *             which_cusp)
 *         if segment_list == NULL:
 *             raise RuntimeError('The Ford domain construction failed.')             # <<<<<<<<<<<<<<
 *         result = []
 *         for n in range(segment_list.num_segments):
 */
  __pyx_tuple__140 = PyTuple_Pack(1, __pyx_kp_s_The_Ford_domain_construction_fai); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(11, 242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);

  /* "cython/core/cusp_neighborhoods.pyx":271
 *             which_cusp)
 *         if segment_list == NULL:
 *             raise RuntimeError('The triangulation construction failed.')             # <<<<<<<<<<<<<<
 *         result = []
 *         for n from 0 <= n < segment_list.num_segments:
 */
  __pyx_tuple__141 = PyTuple_Pack(1, __pyx_kp_s_The_triangulation_construction_f); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(11, 271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);

  /* "cython/core/cusp_neighborhoods.pyx":306
 *                                     's' if self.num_cusps() > 1 else '',
 *                                     self.manifold_name))
 *         raise RuntimeError('The HoroballViewer class was not imported.')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__142 = PyTuple_Pack(1, __pyx_kp_s_The_HoroballViewer_class_was_not); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(11, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);

  /* "cython/core/pickle.pyx":77
 *             is_complete = 0
 *         if M != floor(M) or L != floor(L):
 *             raise ValueError('Manifold must be pickled with _to_string.')             # <<<<<<<<<<<<<<
 *         if M < -128 or M > 127 or L < -128 or L > 127:
 *             raise ValueError('Manifold must be pickled with _to_string.')
 */
  __pyx_tuple__143 = PyTuple_Pack(1, __pyx_kp_s_Manifold_must_be_pickled_with__t); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(12, 77, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);

  /* "cython/core/pickle.pyx":227
 *                     cusps[i].l = <Real>L
 *         else:
 *             raise RuntimeError('Failed to allocate memory for cusps')             # <<<<<<<<<<<<<<
 *     tri_data.cusp_data = cusps
 * 
 */
  __pyx_tuple__145 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_allocate_memory_for_cu); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(12, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);

  /* "cython/core/pickle.pyx":235
 *     if tets == NULL:
 *         free(cusps)
 *         raise RuntimeError('Failed to allocate memory for tets.')             # <<<<<<<<<<<<<<
 *     for i in range(tri_data.num_tetrahedra):
 *         n = unpickle_tetrahedron_data(&tets[i], tri_pickle, n, p[0])
 */
  __pyx_tuple__146 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_allocate_memory_for_te); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(12, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);

  /* "cython/core/pickle.pyx":325
 *     num_tets = len(listlike)
 *     if num_tets == 0:
 *         raise ValueError('No tetrahedra data provided')             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
  __pyx_tuple__147 = PyTuple_Pack(1, __pyx_kp_s_No_tetrahedra_data_provided); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(12, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);

  /* "cython/core/pickle.pyx":330
 *         first0, first1 = listlike[0]
 *     except ValueError:
 *         raise ValueError('Tetrahedra data appears invalid')             # <<<<<<<<<<<<<<
 *     if len(first0) != 4 or [len(x) for x in first1] != [4, 4, 4, 4]:
 *         raise ValueError('Tetrahedra data appears invalid')
 */
  __pyx_tuple__148 = PyTuple_Pack(1, __pyx_kp_s_Tetrahedra_data_appears_invalid); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(12, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);

  /* "cython/core/tail.pyx":35
 *         g, n, monodromy = m.groups()
 *         g, n = int(g), int(n)
 *         monodromy = monodromy.replace(',', '*').replace('_', '')             # <<<<<<<<<<<<<<
 *         surface = twister.Surface((g, n))
 *         return surface.bundle(monodromy, return_type='string')
 */
  __pyx_tuple__149 = PyTuple_Pack(2, __pyx_kp_s__114, __pyx_kp_s__111); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(2, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);
  __pyx_tuple__151 = PyTuple_Pack(2, __pyx_n_s__150, __pyx_kp_s__9); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(2, 35, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);

  /* "cython/core/tail.pyx":104
 *         num_cusps = get_num_cusps(c_triangulation)
 *         if len(fillings) > num_cusps:
 *             raise ValueError('The number of fillings specified exceeds '             # <<<<<<<<<<<<<<
 *                              'the number of cusps.')
 *         for i in range(len(fillings)):
 */
  __pyx_tuple__152 = PyTuple_Pack(1, __pyx_kp_s_The_number_of_fillings_specified); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(2, 104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__152);
  __Pyx_GIVEREF(__pyx_tuple__152);

  /* "cython/core/tail.pyx":266
 *         record = struct.unpack('%dB' % (size+2), data)
 *     else:
 *         raise ValueError('You have specified a Hoste-Thistlethwaite '             # <<<<<<<<<<<<<<
 *                          'knot with an \n'
 *                          'inappropriate index or number of crossings.')
 */
  __pyx_tuple__153 = PyTuple_Pack(1, __pyx_kp_s_You_have_specified_a_Hoste_Thist); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(2, 266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);

  /* "cython/core/tail.pyx":301
 *     length = 0
 * 
 *     def __init__(self, indices=(0, 0, 0)):             # <<<<<<<<<<<<<<
 *         myslice = slice(*indices)
 *         self.start, self.stop, self.step = myslice.indices(self.length)
 */
  __pyx_tuple__154 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(2, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__154);
  __Pyx_GIVEREF(__pyx_tuple__154);

  /* "cython/core/tail.pyx":310
 * 
 *     def __contains__(self, item):
 *         raise NotImplementedError("This census does not support manifold lookup")             # <<<<<<<<<<<<<<
 * 
 *     def next(self):
 */
  __pyx_tuple__155 = PyTuple_Pack(1, __pyx_kp_s_This_census_does_not_support_man); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(2, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);

  /* "cython/core/tail.pyx":420
 *             # return Manifold('t%d' % census_index)
 *         else:
 *             raise IndexError('Index is out of range.')             # <<<<<<<<<<<<<<
 *         c_triangulation = GetCuspedCensusManifold(
 *             self.path, num_tet, self.orientability, census_index)
 */
  __pyx_tuple__156 = PyTuple_Pack(1, __pyx_kp_s_Index_is_out_of_range); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(2, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);

  /* "cython/core/tail.pyx":425
 *         if c_triangulation == NULL:
 *             print(num_tet, census_index)
 *             raise RuntimeError('SnapPea failed to read the census manifold.')             # <<<<<<<<<<<<<<
 *         result = Manifold(spec='empty')
 *         result.set_c_triangulation(c_triangulation)
 */
  __pyx_tuple__157 = PyTuple_Pack(1, __pyx_kp_s_SnapPea_failed_to_read_the_censu); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(2, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);

  /* "cython/core/tail.pyx":461
 *     path = str(manifold_path)
 * 
 *     def __init__(self, indices=(0, 11031, 1)):             # <<<<<<<<<<<<<<
 *         if ObsOrientableClosedCensus.data is None:
 *             datafile = os.path.join(closed_census_directory,
 */
  __pyx_tuple__158 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_11031, __pyx_int_1); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(2, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__158);
  __Pyx_GIVEREF(__pyx_tuple__158);

  /* "cython/core/tail.pyx":496
 *     path = str(manifold_path)
 * 
 *     def __init__(self, indices=(0, 17, 1)):             # <<<<<<<<<<<<<<
 *         if ObsNonorientableClosedCensus.data is None:
 *             datafile = os.path.join(closed_census_directory,
 */
  __pyx_tuple__159 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_17, __pyx_int_1); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(2, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);

  /* "cython/core/tail.pyx":597
 *                 except:
 *                     raise IOError("The census knot %s was not found." % name)
 *                 result = Triangulation('empty')             # <<<<<<<<<<<<<<
 *                 result.set_c_triangulation(c_triangulation)
 *                 result.set_name(name)
 */
  __pyx_tuple__160 = PyTuple_Pack(1, __pyx_n_s_empty); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(2, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__160);
  __Pyx_GIVEREF(__pyx_tuple__160);

  /* "cython/core/tail.pyx":602
 *                 return result.with_hyperbolic_structure()
 *             else:
 *                 raise IndexError('There are only 201 census knots.')             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__161 = PyTuple_Pack(1, __pyx_kp_s_There_are_only_201_census_knots); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(2, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);

  /* "cython/core/tail.pyx":619
 *     max_crossings = 11
 * 
 *     def __init__(self, components, indices=(0, 10000, 1)):             # <<<<<<<<<<<<<<
 *         self.Christy_links = tarfile.open(link_archive, 'r:*')
 * 
 */
  __pyx_tuple__162 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_10000, __pyx_int_1); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(2, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__162);
  __Pyx_GIVEREF(__pyx_tuple__162);

  /* "cython/core/tail.pyx":673
 * class MorwenLinks:
 *     def __init__(self, num_components, num_crossings = None):
 *         raise ValueError(             # <<<<<<<<<<<<<<
 *             'The MorwenLinks class has been replaced by HTLinkExteriors. '
 *             'Please refer to the documentation for HTLinkExteriors.'
 */
  __pyx_tuple__163 = PyTuple_Pack(1, __pyx_kp_s_The_MorwenLinks_class_has_been_r); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(2, 673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);

  /* "cython/core/tail.pyx":691
 *             return
 * 
 *         crossings = range(4, 15) if num_crossings is None else [num_crossings]             # <<<<<<<<<<<<<<
 *         files = []
 *         for c in crossings:
 */
  __pyx_tuple__164 = PyTuple_Pack(2, __pyx_int_4, __pyx_int_15); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(2, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__164);
  __Pyx_GIVEREF(__pyx_tuple__164);

  /* "cython/core/tail.pyx":732
 *                                                                braid_word):
 *     if num_strands < 2:
 *         raise ValueError('Braids must have at least 2 strands.')             # <<<<<<<<<<<<<<
 *     allowed_letters = ([x for x in range(1, num_strands)] +
 *                        [x for x in range(-num_strands+1, 0)])
 */
  __pyx_tuple__165 = PyTuple_Pack(1, __pyx_kp_s_Braids_must_have_at_least_2_stra); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(2, 732, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);

  /* "cython/core/tail.pyx":736
 *                        [x for x in range(-num_strands+1, 0)])
 *     if False in [b in allowed_letters for b in braid_word]:
 *         raise ValueError('The braid word is invalid.')             # <<<<<<<<<<<<<<
 * 
 *     cdef int* word
 */
  __pyx_tuple__166 = PyTuple_Pack(1, __pyx_kp_s_The_braid_word_is_invalid); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(2, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__166);
  __Pyx_GIVEREF(__pyx_tuple__166);

  /* "cython/core/tail.pyx":763
 *     P.crossings = <KLPCrossing *>malloc(P.num_crossings * sizeof(KLPCrossing))
 *     if P.crossings == NULL:
 *         raise RuntimeError('Could not allocate a crossing table.')             # <<<<<<<<<<<<<<
 * 
 *     for i in range(P.num_crossings):
 */
  __pyx_tuple__167 = PyTuple_Pack(1, __pyx_kp_s_Could_not_allocate_a_crossing_ta); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(2, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);

  /* "cython/core/tail.pyx":794
 * 
 *     if c_triangulation == NULL:
 *         raise RuntimeError('Could not create the triangulation.')             # <<<<<<<<<<<<<<
 * 
 *     # The triangulation must have a name or SnapPea will segfault when
 */
  __pyx_tuple__168 = PyTuple_Pack(1, __pyx_kp_s_Could_not_create_the_triangulati); if (unlikely(!__pyx_tuple__168)) __PYX_ERR(2, 794, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__168);
  __Pyx_GIVEREF(__pyx_tuple__168);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0x59cf8a3, 0x3a22a1e, 0x3df3bb8):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x59cf8a3, 0x3a22a1e, 0x3df3bb8) = (_col_support, _entries, _row_support, _units, cols, dead_columns, rows))" % __pyx_checksum
 */
  __pyx_tuple__169 = PyTuple_Pack(3, __pyx_int_94173347, __pyx_int_60959262, __pyx_int_64961464); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(7, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);

  /* "cython/core/basic.pyx":21
 * from .pari import pari as pari
 * try:
 *     import sage.all             # <<<<<<<<<<<<<<
 *     import sage.structure.sage_object
 *     from sage.groups.perm_gps.permgroup_element import is_PermutationGroupElement
 */
  __pyx_tuple__171 = PyTuple_Pack(2, __pyx_n_s_sage, __pyx_n_s_all); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);

  /* "cython/core/basic.pyx":22
 * try:
 *     import sage.all
 *     import sage.structure.sage_object             # <<<<<<<<<<<<<<
 *     from sage.groups.perm_gps.permgroup_element import is_PermutationGroupElement
 *     from sage.groups.perm_gps.permgroup import PermutationGroup
 */
  __pyx_tuple__172 = PyTuple_Pack(3, __pyx_n_s_sage, __pyx_n_s_structure, __pyx_n_s_sage_object); if (unlikely(!__pyx_tuple__172)) __PYX_ERR(0, 22, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__172);
  __Pyx_GIVEREF(__pyx_tuple__172);

  /* "cython/core/basic.pyx":31
 *         from sage.interfaces.abc import GapElement, MagmaElement
 * 
 *         def is_GapElement(elt):             # <<<<<<<<<<<<<<
 *             return isinstance(elt, GapElement)
 * 
 */
  __pyx_tuple__173 = PyTuple_Pack(1, __pyx_n_s_elt); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);
  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_is_GapElement, 31, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 31, __pyx_L1_error)

  /* "cython/core/basic.pyx":34
 *             return isinstance(elt, GapElement)
 * 
 *         def is_MagmaElement(elt):             # <<<<<<<<<<<<<<
 *             return isinstance(elt, MagmaElement)
 *     except:
 */
  __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_is_MagmaElement, 34, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(0, 34, __pyx_L1_error)

  /* "cython/core/basic.pyx":89
 * 
 * 
 * def valid_index(i, n, format_str):             # <<<<<<<<<<<<<<
 *     """
 *     Return range(n)[i] or raises a nicely formatted IndexError
 */
  __pyx_tuple__176 = PyTuple_Pack(3, __pyx_n_s_i, __pyx_n_s_n, __pyx_n_s_format_str); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__176);
  __Pyx_GIVEREF(__pyx_tuple__176);
  __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_valid_index, 89, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(0, 89, __pyx_L1_error)

  /* "cython/core/basic.pyx":113
 * # A stream for asynchronous messages
 * class MsgIO():
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         if sys.stdout is None:
 *             self.write = None
 */
  __pyx_tuple__178 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__178);
  __Pyx_GIVEREF(__pyx_tuple__178);
  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_init, 113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(0, 113, __pyx_L1_error)

  /* "cython/core/basic.pyx":125
 * 
 * 
 * def to_str(s):             # <<<<<<<<<<<<<<
 *     return s.decode()
 * 
 */
  __pyx_tuple__180 = PyTuple_Pack(1, __pyx_n_s_s); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);
  __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_to_str, 125, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(0, 125, __pyx_L1_error)

  /* "cython/core/basic.pyx":129
 * 
 * 
 * def bytearray_to_bytes(x):             # <<<<<<<<<<<<<<
 *     return bytes(x)
 * 
 */
  __pyx_tuple__182 = PyTuple_Pack(1, __pyx_n_s_x); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__182);
  __Pyx_GIVEREF(__pyx_tuple__182);
  __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_bytearray_to_bytes, 129, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) __PYX_ERR(0, 129, __pyx_L1_error)

  /* "cython/core/basic.pyx":133
 * 
 * 
 * def to_byte_str(s):             # <<<<<<<<<<<<<<
 *     return s.encode('utf-8') if type(s) != bytes else s
 * 
 */
  __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_to_byte_str, 133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(0, 133, __pyx_L1_error)

  /* "cython/core/basic.pyx":163
 * 
 * 
 * def set_test_flag(int value):             # <<<<<<<<<<<<<<
 *     cdef int old
 *     global SnapPy_test_flag
 */
  __pyx_tuple__185 = PyTuple_Pack(2, __pyx_n_s_value, __pyx_n_s_old); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__185);
  __Pyx_GIVEREF(__pyx_tuple__185);
  __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_set_test_flag, 163, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 163, __pyx_L1_error)

  /* "cython/core/basic.pyx":190
 * 
 * 
 * def SnapPea_interrupt():             # <<<<<<<<<<<<<<
 *     """
 *     The UI can call this to stop SnapPea.  Returns True if SnapPea s busy.
 */
  __pyx_codeobj__187 = (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_cython_core_basic_pyx, __pyx_n_s_SnapPea_interrupt, 190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(0, 190, __pyx_L1_error)

  /* "cython/core/basic.pyx":260
 * 
 * 
 * def cy_eval(s):             # <<<<<<<<<<<<<<
 *     return eval(s)
 * 
 */
  __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_cy_eval, 260, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 260, __pyx_L1_error)

  /* "cython/core/basic.pyx":264
 * 
 * 
 * def smith_form(M):             # <<<<<<<<<<<<<<
 *     if _within_sage:
 *         if not hasattr(M, 'elementary_divisors'):
 */
  __pyx_tuple__189 = PyTuple_Pack(10, __pyx_n_s_M, __pyx_n_s_m, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_i, __pyx_n_s_zeros, __pyx_n_s_nonzeros, __pyx_n_s_x, __pyx_n_s_x, __pyx_n_s_x); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__189);
  __Pyx_GIVEREF(__pyx_tuple__189);
  __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__189, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_smith_form, 264, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(0, 264, __pyx_L1_error)

  /* "cython/core/basic.pyx":306
 * 
 * # SnapPea memory usage
 * def check_SnapPea_memory():             # <<<<<<<<<<<<<<
 *     verify_my_malloc_usage()
 * 
 */
  __pyx_codeobj__191 = (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_cython_core_basic_pyx, __pyx_n_s_check_SnapPea_memory, 306, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(0, 306, __pyx_L1_error)

  /* "cython/core/basic.pyx":310
 * 
 * 
 * def set_rand_seed(seed):             # <<<<<<<<<<<<<<
 *     """
 *     Set seed of the random number generator used for choosing
 */
  __pyx_tuple__192 = PyTuple_Pack(1, __pyx_n_s_seed); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__192);
  __Pyx_GIVEREF(__pyx_tuple__192);
  __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_set_rand_seed, 310, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) __PYX_ERR(0, 310, __pyx_L1_error)

  /* "cython/core/basic.pyx":367
 * class MatrixWithExplanations():
 * 
 *     def __init__(self, mat, explain_rows, explain_columns):             # <<<<<<<<<<<<<<
 * 
 *         self.matrix = mat
 */
  __pyx_tuple__194 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_mat, __pyx_n_s_explain_rows, __pyx_n_s_explain_columns); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__194);
  __Pyx_GIVEREF(__pyx_tuple__194);
  __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_init, 367, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) __PYX_ERR(0, 367, __pyx_L1_error)

  /* "cython/core/basic.pyx":373
 *         self.explain_columns = explain_columns
 * 
 *     def __repr__(self, _type_str = "MatrixWithExplanations"):             # <<<<<<<<<<<<<<
 * 
 *         def format_explain_list(l):
 */
  __pyx_tuple__196 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_type_str, __pyx_n_s_format_explain_list, __pyx_n_s_format_explain_list); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__196);
  __Pyx_GIVEREF(__pyx_tuple__196);
  __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_repr_2, 373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) __PYX_ERR(0, 373, __pyx_L1_error)
  __pyx_tuple__198 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_MatrixWithExplanations)); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__198);
  __Pyx_GIVEREF(__pyx_tuple__198);

  /* "cython/core/basic.pyx":396
 * class NeumannZagierTypeEquations(MatrixWithExplanations):
 * 
 *     def __init__(self, mat, explain_rows, explain_columns):             # <<<<<<<<<<<<<<
 *         MatrixWithExplanations.__init__(self,
 *                                         mat, explain_rows, explain_columns)
 */
  __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_init, 396, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) __PYX_ERR(0, 396, __pyx_L1_error)

  /* "cython/core/basic.pyx":400
 *                                         mat, explain_rows, explain_columns)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return MatrixWithExplanations.__repr__(self,
 *                                                "NeumannZagierTypeEquations")
 */
  __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_repr_2, 400, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 400, __pyx_L1_error)

  /* "cython/core/basic.pyx":503
 *     Initialize with keyword arguments, or **dict.
 *     """
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         # Hack to support obsolete keys
 *         content = dict(kwargs)
 */
  __pyx_tuple__201 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_kwargs, __pyx_n_s_content, __pyx_n_s_old, __pyx_n_s_new_2); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);
  __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_init, 503, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 503, __pyx_L1_error)

  /* "cython/core/basic.pyx":514
 *         self.__dict__.update(kwargs)
 * 
 *     def _immutable(self, *args):             # <<<<<<<<<<<<<<
 *         raise AttributeError('Info objects are immutable.')
 * 
 */
  __pyx_tuple__203 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);
  __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_immutable, 514, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(0, 514, __pyx_L1_error)

  /* "cython/core/basic.pyx":517
 *         raise AttributeError('Info objects are immutable.')
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self.__dict__.keys()
 * 
 */
  __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_keys, 517, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(0, 517, __pyx_L1_error)

  /* "cython/core/basic.pyx":526
 * 
 * class CuspInfo(Info):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self.is_complete:
 *             if 'shape' in self:
 */
  __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_repr_2, 526, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(0, 526, __pyx_L1_error)

  /* "cython/core/basic.pyx":543
 * 
 * class DualCurveInfo(Info):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return ('%3d: %s curve of length %s'%
 *                 (self.index, MatrixParity[self.parity], self.filled_length))
 */
  __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_repr_2, 543, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(0, 543, __pyx_L1_error)

  /* "cython/core/basic.pyx":550
 * 
 * 
 * def _StrLongestLen(l):             # <<<<<<<<<<<<<<
 *     return str(max(len(e) for e in l))
 * 
 */
  __pyx_tuple__208 = PyTuple_Pack(3, __pyx_n_s_l, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__208);
  __Pyx_GIVEREF(__pyx_tuple__208);
  __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_StrLongestLen, 550, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(0, 550, __pyx_L1_error)

  /* "cython/core/basic.pyx":572
 * 
 * class LengthSpectrumInfo(Info):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         lenStr = "%17.14f" % self.length.real()
 *         absImag = abs(self.length.imag())
 */
  __pyx_tuple__210 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_lenStr, __pyx_n_s_absImag); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__210);
  __Pyx_GIVEREF(__pyx_tuple__210);
  __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_repr_2, 572, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(0, 572, __pyx_L1_error)

  /* "cython/core/basic.pyx":600
 *     _obsolete = {'precision' : 'accuracies'}
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(self.__dict__)
 * 
 */
  __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_repr_2, 600, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(0, 600, __pyx_L1_error)

  /* "cython/core/basic.pyx":605
 * 
 * class NormalSurfaceInfo(Info):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         orient = 'Orientable' if self.orientable else 'Non-orientable'
 *         sided = 'two-sided' if self.two_sided else 'one-sided'
 */
  __pyx_tuple__213 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_orient, __pyx_n_s_sided); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__213);
  __Pyx_GIVEREF(__pyx_tuple__213);
  __pyx_codeobj__214 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__213, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_repr_2, 605, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__214)) __PYX_ERR(0, 605, __pyx_L1_error)

  /* "cython/core/basic.pyx":612
 * 
 * class LengthSpectrum(list):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if len(self) > 0 and 'word' in self[0]:
 *             base = LengthSpectrumFormatStringWithWord % (
 */
  __pyx_tuple__215 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_base, __pyx_n_s_s); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__215);
  __Pyx_GIVEREF(__pyx_tuple__215);
  __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__215, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_repr_2, 612, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(0, 612, __pyx_L1_error)

  /* "cython/core/basic.pyx":623
 * 
 * class ListOnePerLine(list):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '[' + ',\n '.join([repr(s) for s in self]) + ']'
 * 
 */
  __pyx_tuple__217 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_s); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__217);
  __Pyx_GIVEREF(__pyx_tuple__217);
  __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_repr_2, 623, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(0, 623, __pyx_L1_error)

  /* "cython/core/basic.pyx":629
 * # Isometry
 * 
 * def format_two_by_two(mat):             # <<<<<<<<<<<<<<
 *     a,b,c,d = ['%d' % x for x in [mat[0,0], mat[0,1], mat[1,0], mat[1,1]]]
 *     w0 = max(len(a), len(c))
 */
  __pyx_tuple__219 = PyTuple_Pack(8, __pyx_n_s_mat, __pyx_n_s_a_2, __pyx_n_s_b_2, __pyx_n_s_c, __pyx_n_s_d_4, __pyx_n_s_w0, __pyx_n_s_w1, __pyx_n_s_x); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__219);
  __Pyx_GIVEREF(__pyx_tuple__219);
  __pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__219, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_format_two_by_two, 629, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(0, 629, __pyx_L1_error)

  /* "cython/core/basic.pyx":641
 *     Represents an isometry from one manifold to another.
 *     """
 *     def __init__(self, cusp_images, cusp_maps, extends_to_link):             # <<<<<<<<<<<<<<
 *         self._cusp_images, self._cusp_maps = cusp_images, cusp_maps
 *         self._extends_to_link = extends_to_link
 */
  __pyx_tuple__221 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_cusp_images, __pyx_n_s_cusp_maps, __pyx_n_s_extends_to_link); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__221);
  __Pyx_GIVEREF(__pyx_tuple__221);
  __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_init, 641, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(0, 641, __pyx_L1_error)

  /* "cython/core/basic.pyx":645
 *         self._extends_to_link = extends_to_link
 * 
 *     def cusp_images(self):             # <<<<<<<<<<<<<<
 *         return self._cusp_images
 * 
 */
  __pyx_codeobj__223 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_cusp_images, 645, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__223)) __PYX_ERR(0, 645, __pyx_L1_error)

  /* "cython/core/basic.pyx":648
 *         return self._cusp_images
 * 
 *     def cusp_maps(self):             # <<<<<<<<<<<<<<
 *         return self._cusp_maps
 * 
 */
  __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_cusp_maps, 648, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(0, 648, __pyx_L1_error)

  /* "cython/core/basic.pyx":651
 *         return self._cusp_maps
 * 
 *     def extends_to_link(self):             # <<<<<<<<<<<<<<
 *         return self._extends_to_link
 * 
 */
  __pyx_codeobj__225 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_extends_to_link, 651, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) __PYX_ERR(0, 651, __pyx_L1_error)

  /* "cython/core/basic.pyx":654
 *         return self._extends_to_link
 * 
 *     def num_cusps(self):             # <<<<<<<<<<<<<<
 *         return len(self.cusp_images())
 * 
 */
  __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_num_cusps, 654, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(0, 654, __pyx_L1_error)

  /* "cython/core/basic.pyx":657
 *         return len(self.cusp_images())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         images = self.cusp_images()
 *         maps = self.cusp_maps()
 */
  __pyx_tuple__227 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_images, __pyx_n_s_maps, __pyx_n_s_line0, __pyx_n_s_line1, __pyx_n_s_line2, __pyx_n_s_i, __pyx_n_s_l0, __pyx_n_s_l1, __pyx_n_s_l2, __pyx_n_s_L, __pyx_n_s_line3, __pyx_n_s_l); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__227);
  __Pyx_GIVEREF(__pyx_tuple__227);
  __pyx_codeobj__228 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__227, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_repr_2, 657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__228)) __PYX_ERR(0, 657, __pyx_L1_error)

  /* "cython/core/basic.pyx":697
 * # PLink communication
 * 
 * def _plink_callback(LE):             # <<<<<<<<<<<<<<
 *     cdef Manifold manifold
 *     cdef c_Triangulation* c_triangulation = NULL
 */
  __pyx_tuple__229 = PyTuple_Pack(4, __pyx_n_s_LE, __pyx_n_s_manifold, __pyx_n_s_c_triangulation, __pyx_n_s_klp); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__229);
  __Pyx_GIVEREF(__pyx_tuple__229);
  __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_plink_callback_2, 697, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(0, 697, __pyx_L1_error)

  /* "cython/core/basic.pyx":723
 * # Conversion functions Manifold <-> Triangulation
 * 
 * def Manifold_from_Triangulation(Triangulation T, recompute=True,             # <<<<<<<<<<<<<<
 *                                 manifold_class=None):
 *     cdef c_Triangulation *c_triangulation
 */
  __pyx_tuple__231 = PyTuple_Pack(5, __pyx_n_s_T, __pyx_n_s_recompute, __pyx_n_s_manifold_class_2, __pyx_n_s_c_triangulation, __pyx_n_s_M); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);
  __pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__231, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_Manifold_from_Triangulation, 723, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__232)) __PYX_ERR(0, 723, __pyx_L1_error)
  __pyx_tuple__233 = PyTuple_Pack(2, ((PyObject *)Py_True), Py_None); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);

  /* "cython/core/basic.pyx":749
 * 
 * 
 * def Triangulation_from_Manifold(Manifold M):             # <<<<<<<<<<<<<<
 *     cdef c_Triangulation *c_triangulation
 *     cdef Triangulation T
 */
  __pyx_tuple__234 = PyTuple_Pack(3, __pyx_n_s_M, __pyx_n_s_c_triangulation, __pyx_n_s_T); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__234);
  __Pyx_GIVEREF(__pyx_tuple__234);
  __pyx_codeobj__235 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__234, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_basic_pyx, __pyx_n_s_Triangulation_from_Manifold, 749, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__235)) __PYX_ERR(0, 749, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":255
 *         free_LR_factorization(gluing)
 * 
 *     def _get_from_link_data(self, data, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         if self.c_triangulation != NULL:
 *             free_triangulation(self.c_triangulation)
 */
  __pyx_tuple__236 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_data, __pyx_n_s_remove_finite_vertices); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(3, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__236);
  __Pyx_GIVEREF(__pyx_tuple__236);
  __pyx_codeobj__237 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_get_from_link_data, 255, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) __PYX_ERR(3, 255, __pyx_L1_error)
  __pyx_tuple__238 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(3, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__238);
  __Pyx_GIVEREF(__pyx_tuple__238);

  /* "cython/core/triangulation.pyx":290
 *                 self._remove_finite_vertices()
 * 
 *     def _remove_finite_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Removing any finite vertices by simplification and drilling.
 */
  __pyx_codeobj__239 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_remove_finite_vertices_2, 290, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__239)) __PYX_ERR(3, 290, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":310
 *                 count_cusps(self.c_triangulation)
 * 
 *     def cover_info(self):             # <<<<<<<<<<<<<<
 *         """
 *         If this is a manifold or triangulation which was constructed as
 */
  __pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_cover_info, 310, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) __PYX_ERR(3, 310, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":319
 *             return dict(self._cover_info)
 * 
 *     def plink(self):             # <<<<<<<<<<<<<<
 *         """
 *         Brings up a link editor window if the manifold is stored
 */
  __pyx_tuple__241 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_L); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(3, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);
  __pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_plink, 319, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) __PYX_ERR(3, 319, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":345
 *             raise ValueError('No associated link known.')
 * 
 *     def link(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the manifold is stored as a link complement in your
 */
  __pyx_codeobj__243 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_link, 345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__243)) __PYX_ERR(3, 345, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":363
 *         self.c_triangulation = c_triangulation
 * 
 *     def num_cusps(self, cusp_type='all'):             # <<<<<<<<<<<<<<
 *         """
 *         Return the total number of cusps.  By giving the optional argument
 */
  __pyx_tuple__244 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_cusp_type); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(3, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__244);
  __Pyx_GIVEREF(__pyx_tuple__244);
  __pyx_codeobj__245 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__244, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_num_cusps, 363, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__245)) __PYX_ERR(3, 363, __pyx_L1_error)
  __pyx_tuple__246 = PyTuple_Pack(1, __pyx_n_s_all); if (unlikely(!__pyx_tuple__246)) __PYX_ERR(3, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__246);
  __Pyx_GIVEREF(__pyx_tuple__246);

  /* "cython/core/triangulation.pyx":382
 *                              "['all', 'orientable', 'nonorientable'].")
 * 
 *     def _num_fake_cusps(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the number of "fake" cusps, which is typically the number
 */
  __pyx_codeobj__247 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_num_fake_cusps, 382, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__247)) __PYX_ERR(3, 382, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":398
 *         return get_num_fake_cusps(self.c_triangulation)
 * 
 *     def orientation_cover(self):             # <<<<<<<<<<<<<<
 *         """
 *         For a non-orientable Triangulation, returns the 2-fold cover which
 */
  __pyx_tuple__248 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_cover_c_triangulation, __pyx_n_s_new_tri); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(3, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__248);
  __Pyx_GIVEREF(__pyx_tuple__248);
  __pyx_codeobj__249 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__248, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_orientation_cover, 398, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__249)) __PYX_ERR(3, 398, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":427
 *         return new_tri
 * 
 *     def is_orientable(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the underlying 3-manifold is orientable.
 */
  __pyx_tuple__250 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_orientability); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(3, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__250);
  __Pyx_GIVEREF(__pyx_tuple__250);
  __pyx_codeobj__251 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_is_orientable, 427, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__251)) __PYX_ERR(3, 427, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":442
 *         return None
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a copy of the triangulation.
 */
  __pyx_tuple__252 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_copy_c_triangulation, __pyx_n_s_new_tri); if (unlikely(!__pyx_tuple__252)) __PYX_ERR(3, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__252);
  __Pyx_GIVEREF(__pyx_tuple__252);
  __pyx_codeobj__253 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_copy, 442, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__253)) __PYX_ERR(3, 442, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":459
 *         return new_tri
 * 
 *     def randomize(self, blowup_multiple=4, passes_at_fours=6):             # <<<<<<<<<<<<<<
 *         """
 *         Perform random Pachner moves on the underlying triangulation,
 */
  __pyx_tuple__254 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_blowup_multiple, __pyx_n_s_passes_at_fours); if (unlikely(!__pyx_tuple__254)) __PYX_ERR(3, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__254);
  __Pyx_GIVEREF(__pyx_tuple__254);
  __pyx_codeobj__255 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_randomize, 459, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__255)) __PYX_ERR(3, 459, __pyx_L1_error)
  __pyx_tuple__256 = PyTuple_Pack(2, __pyx_int_4, __pyx_int_6); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(3, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__256);
  __Pyx_GIVEREF(__pyx_tuple__256);

  /* "cython/core/triangulation.pyx":473
 *         self._cache.clear(message='randomize')
 * 
 *     def simplify(self, passes_at_fours=6):             # <<<<<<<<<<<<<<
 *         """
 *         Try to simplify the triangulation by doing Pachner moves.
 */
  __pyx_tuple__257 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_passes_at_fours); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(3, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__257);
  __Pyx_GIVEREF(__pyx_tuple__257);
  __pyx_codeobj__258 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__257, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_simplify, 473, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__258)) __PYX_ERR(3, 473, __pyx_L1_error)
  __pyx_tuple__259 = PyTuple_Pack(1, __pyx_int_6); if (unlikely(!__pyx_tuple__259)) __PYX_ERR(3, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__259);
  __Pyx_GIVEREF(__pyx_tuple__259);

  /* "cython/core/triangulation.pyx":504
 *         self._cache.clear(message='simplify')
 * 
 *     def _two_to_three(self, tet_num, face_index):             # <<<<<<<<<<<<<<
 *         """
 *         Performs a 2-3 move which removes a given face.
 */
  __pyx_tuple__260 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_tet_num, __pyx_n_s_face_index, __pyx_n_s_result, __pyx_n_s_tet, __pyx_n_s_n, __pyx_n_s_f, __pyx_n_s_i); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(3, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__260);
  __Pyx_GIVEREF(__pyx_tuple__260);
  __pyx_codeobj__261 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__260, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_two_to_three, 504, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__261)) __PYX_ERR(3, 504, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":539
 *         return result
 * 
 *     def _three_to_two(self, tet_num, edge_index):             # <<<<<<<<<<<<<<
 *         r"""
 *         Perform a 3-2 move which removes a given 3-valent edge.
 */
  __pyx_tuple__262 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_tet_num, __pyx_n_s_edge_index, __pyx_n_s_result, __pyx_n_s_tet, __pyx_n_s_where_to_resume, __pyx_n_s__150, __pyx_n_s_e, __pyx_n_s_i); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(3, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__262);
  __Pyx_GIVEREF(__pyx_tuple__262);
  __pyx_codeobj__263 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__262, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_three_to_two, 539, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__263)) __PYX_ERR(3, 539, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":590
 *         return result
 * 
 *     def with_hyperbolic_structure(self):             # <<<<<<<<<<<<<<
 *         """
 *         Add a (possibly degenerate) hyperbolic structure, turning the
 */
  __pyx_codeobj__264 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_with_hyperbolic_structure, 590, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__264)) __PYX_ERR(3, 590, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":602
 *         return Manifold_from_Triangulation(self)
 * 
 *     def _polish_hyperbolic_structures(self):             # <<<<<<<<<<<<<<
 *         """
 *         This function does nothing for Triangulation. It is overloaded in
 */
  __pyx_codeobj__265 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_polish_hyperbolic_structures, 602, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__265)) __PYX_ERR(3, 602, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":609
 *         pass
 * 
 *     def _empty_save(self):             # <<<<<<<<<<<<<<
 *         """
 *         Called by save when no file name is specified, so that in
 */
  __pyx_tuple__266 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_savefile, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(3, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__266);
  __Pyx_GIVEREF(__pyx_tuple__266);
  __pyx_codeobj__267 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__266, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_empty_save, 609, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__267)) __PYX_ERR(3, 609, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":629
 *         raise ValueError('Please specify a file name.')
 * 
 *     def save(self, file_name=None):             # <<<<<<<<<<<<<<
 *         """
 *         Save the triangulation as a SnapPea triangulation file.
 */
  __pyx_tuple__268 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_file_name, __pyx_n_s_b_file_name); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(3, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__268);
  __Pyx_GIVEREF(__pyx_tuple__268);
  __pyx_codeobj__269 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_save, 629, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__269)) __PYX_ERR(3, 629, __pyx_L1_error)
  __pyx_tuple__270 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__270)) __PYX_ERR(3, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__270);
  __Pyx_GIVEREF(__pyx_tuple__270);

  /* "cython/core/triangulation.pyx":653
 *             write_triangulation(self.c_triangulation, b_file_name)
 * 
 *     def _to_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a string containing the contents of a SnapPea triangulation
 */
  __pyx_tuple__271 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_c_string, __pyx_n_s_result); if (unlikely(!__pyx_tuple__271)) __PYX_ERR(3, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__271);
  __Pyx_GIVEREF(__pyx_tuple__271);
  __pyx_codeobj__272 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__271, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_to_string, 653, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__272)) __PYX_ERR(3, 653, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":675
 *             return to_str(result)
 * 
 *     def _from_string(self, string, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         """
 *         WARNING: Users should not use this function directly.  To
 */
  __pyx_tuple__273 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_string, __pyx_n_s_remove_finite_vertices, __pyx_n_s_c_triangulation, __pyx_n_s_b_string); if (unlikely(!__pyx_tuple__273)) __PYX_ERR(3, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__273);
  __Pyx_GIVEREF(__pyx_tuple__273);
  __pyx_codeobj__274 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_from_string, 675, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__274)) __PYX_ERR(3, 675, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":699
 *             self._remove_finite_vertices()
 * 
 *     def _to_bytes(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a reasonably short byte sequence which encodes the
 */
  __pyx_tuple__275 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_c_terse, __pyx_n_s_n, __pyx_n_s_byte, __pyx_n_s_byteseq, __pyx_n_s_bit, __pyx_n_s_c); if (unlikely(!__pyx_tuple__275)) __PYX_ERR(3, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__275);
  __Pyx_GIVEREF(__pyx_tuple__275);
  __pyx_codeobj__276 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__275, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_to_bytes, 699, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__276)) __PYX_ERR(3, 699, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":737
 *         return bytearray_to_bytes(byteseq)
 * 
 *     def _from_bytes(self, bytestring, *args):             # <<<<<<<<<<<<<<
 *         """
 *         Fill an empty triangulation from a byte sequence generated by
 */
  __pyx_tuple__277 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_bytestring, __pyx_n_s_args, __pyx_n_s_c_triangulation); if (unlikely(!__pyx_tuple__277)) __PYX_ERR(3, 737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__277);
  __Pyx_GIVEREF(__pyx_tuple__277);
  __pyx_codeobj__278 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__277, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_from_bytes, 737, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__278)) __PYX_ERR(3, 737, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":756
 *         self.set_c_triangulation(c_triangulation)
 * 
 *     def _from_pickle(self, bytestring, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         """
 *         """
 */
  __pyx_tuple__279 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_bytestring, __pyx_n_s_remove_finite_vertices, __pyx_n_s_c_triangulation); if (unlikely(!__pyx_tuple__279)) __PYX_ERR(3, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__279);
  __Pyx_GIVEREF(__pyx_tuple__279);
  __pyx_codeobj__280 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__279, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_from_pickle, 756, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__280)) __PYX_ERR(3, 756, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":767
 *             self._remove_finite_vertices()
 * 
 *     def _from_tetrahedra_gluing_data(self, tetrahedra_data,             # <<<<<<<<<<<<<<
 *                                      num_or_cusps=0,
 *                                      num_nonor_cusps=0,
 */
  __pyx_tuple__281 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_tetrahedra_data, __pyx_n_s_num_or_cusps, __pyx_n_s_num_nonor_cusps, __pyx_n_s_cusp_indices, __pyx_n_s_peripheral_curves, __pyx_n_s_remove_finite_vertices, __pyx_n_s_c_triangulation); if (unlikely(!__pyx_tuple__281)) __PYX_ERR(3, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__281);
  __Pyx_GIVEREF(__pyx_tuple__281);
  __pyx_codeobj__282 = (PyObject*)__Pyx_PyCode_New(7, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__281, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_from_tetrahedra_gluing_data, 767, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__282)) __PYX_ERR(3, 767, __pyx_L1_error)
  __pyx_tuple__283 = PyTuple_Pack(5, __pyx_int_0, __pyx_int_0, Py_None, Py_None, Py_True); if (unlikely(!__pyx_tuple__283)) __PYX_ERR(3, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__283);
  __Pyx_GIVEREF(__pyx_tuple__283);

  /* "cython/core/triangulation.pyx":821
 *             self._remove_finite_vertices()
 * 
 *     def _from_isosig(self, isosig, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         """
 *         WARNING: Users should not use this function directly.  To
 */
  __pyx_tuple__284 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_isosig, __pyx_n_s_remove_finite_vertices, __pyx_n_s_match, __pyx_n_s_decoration); if (unlikely(!__pyx_tuple__284)) __PYX_ERR(3, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__284);
  __Pyx_GIVEREF(__pyx_tuple__284);
  __pyx_codeobj__285 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__284, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_from_isosig, 821, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__285)) __PYX_ERR(3, 821, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":862
 *             decorated_isosig.set_peripheral_from_decoration(self, decoration)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Used by pickle.dumps.
 */
  __pyx_codeobj__286 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_reduce, 862, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__286)) __PYX_ERR(3, 862, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":897
 *         return (self.__class__, (self.pickle(),))
 * 
 *     def pickle(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return pickle_triangulation(self.c_triangulation)
 */
  __pyx_codeobj__287 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_pickle_2, 897, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__287)) __PYX_ERR(3, 897, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":906
 *             return self._to_string()
 * 
 *     def _reindex_cusps(self, permutation):             # <<<<<<<<<<<<<<
 *         """
 *         >>> import itertools
 */
  __pyx_tuple__288 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_permutation, __pyx_n_s_indices, __pyx_n_s_n, __pyx_n_s_num); if (unlikely(!__pyx_tuple__288)) __PYX_ERR(3, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__288);
  __Pyx_GIVEREF(__pyx_tuple__288);
  __pyx_codeobj__289 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_reindex_cusps, 906, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__289)) __PYX_ERR(3, 906, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":932
 *         free(indices)
 * 
 *     def _get_cusp_indices_and_peripheral_curve_data(self):             # <<<<<<<<<<<<<<
 *         cdef int i, j, k, v, f
 *         cdef TriangulationData* data
 */
  __pyx_tuple__290 = PyTuple_Pack(14, __pyx_n_s_self, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_v, __pyx_n_s_f, __pyx_n_s_data, __pyx_n_s_result_cusp_indices, __pyx_n_s_row, __pyx_n_s_result_curves, __pyx_n_s_data_ijk, __pyx_n_s_v, __pyx_n_s_v, __pyx_n_s_f); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(3, 932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__290);
  __Pyx_GIVEREF(__pyx_tuple__290);
  __pyx_codeobj__291 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__290, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_get_cusp_indices_and_peripheral, 932, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__291)) __PYX_ERR(3, 932, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":954
 *         return (result_cusp_indices, result_curves)
 * 
 *     def _get_tetrahedra_gluing_data(self):             # <<<<<<<<<<<<<<
 *         cdef int i, j, k
 *         cdef TriangulationData* data
 */
  __pyx_tuple__292 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_data, __pyx_n_s_result, __pyx_n_s_neighbors, __pyx_n_s_perms, __pyx_n_s_j, __pyx_n_s_j, __pyx_n_s_k); if (unlikely(!__pyx_tuple__292)) __PYX_ERR(3, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__292);
  __Pyx_GIVEREF(__pyx_tuple__292);
  __pyx_codeobj__293 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__292, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_get_tetrahedra_gluing_data, 954, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__293)) __PYX_ERR(3, 954, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":969
 *         return result
 * 
 *     def isomorphisms_to(self, Triangulation other not None):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a complete list of combinatorial isomorphisms between
 */
  __pyx_tuple__294 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_other, __pyx_n_s_isometries, __pyx_n_s_result); if (unlikely(!__pyx_tuple__294)) __PYX_ERR(3, 969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__294);
  __Pyx_GIVEREF(__pyx_tuple__294);
  __pyx_codeobj__295 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_isomorphisms_to, 969, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__295)) __PYX_ERR(3, 969, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1049
 *             return repr
 * 
 *     def name(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the name of the triangulation.
 */
  __pyx_codeobj__296 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_name, 1049, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__296)) __PYX_ERR(3, 1049, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1061
 *         return to_str(get_triangulation_name(self.c_triangulation))
 * 
 *     def set_name(self, new_name):             # <<<<<<<<<<<<<<
 *         """
 *         Give the triangulation a new name.
 */
  __pyx_tuple__297 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_new_name, __pyx_n_s_b_new_name, __pyx_n_s_c_new_name); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(3, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__297);
  __Pyx_GIVEREF(__pyx_tuple__297);
  __pyx_codeobj__298 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_set_name, 1061, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__298)) __PYX_ERR(3, 1061, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1076
 *         set_triangulation_name(self.c_triangulation, c_new_name)
 * 
 *     def DT_code(self, alpha=False, flips=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return the Dowker-Thistlethwaite code of this link complement,
 */
  __pyx_tuple__299 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_alpha, __pyx_n_s_flips, __pyx_n_s_codec, __pyx_n_s_x); if (unlikely(!__pyx_tuple__299)) __PYX_ERR(3, 1076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__299);
  __Pyx_GIVEREF(__pyx_tuple__299);
  __pyx_codeobj__300 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__299, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_DT_code, 1076, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__300)) __PYX_ERR(3, 1076, __pyx_L1_error)
  __pyx_tuple__301 = PyTuple_Pack(2, Py_False, Py_False); if (unlikely(!__pyx_tuple__301)) __PYX_ERR(3, 1076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__301);
  __Pyx_GIVEREF(__pyx_tuple__301);

  /* "cython/core/triangulation.pyx":1108
 *                 return codec.code
 * 
 *     def _set_DTcode(self, code, lazy=True):             # <<<<<<<<<<<<<<
 *         if not lazy and not isinstance(code, spherogram.DTcodec):
 *             code = spherogram.DTcodec(code)
 */
  __pyx_tuple__302 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_code, __pyx_n_s_lazy); if (unlikely(!__pyx_tuple__302)) __PYX_ERR(3, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__302);
  __Pyx_GIVEREF(__pyx_tuple__302);
  __pyx_codeobj__303 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__302, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_set_DTcode, 1108, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__303)) __PYX_ERR(3, 1108, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1113
 *         self._DTcode = code
 * 
 *     def _set_PDcode(self, code):             # <<<<<<<<<<<<<<
 *         self._PDcode = code
 * 
 */
  __pyx_tuple__304 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_code); if (unlikely(!__pyx_tuple__304)) __PYX_ERR(3, 1113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__304);
  __Pyx_GIVEREF(__pyx_tuple__304);
  __pyx_codeobj__305 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__304, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_set_PDcode, 1113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__305)) __PYX_ERR(3, 1113, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1116
 *         self._PDcode = code
 * 
 *     def num_tetrahedra(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of tetrahedra in the triangulation.
 */
  __pyx_codeobj__306 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_num_tetrahedra, 1116, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__306)) __PYX_ERR(3, 1116, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1128
 *         return get_num_tetrahedra(self.c_triangulation)
 * 
 *     def dehn_fill(self, filling_data, which_cusp=None):             # <<<<<<<<<<<<<<
 *         """
 *         Set the Dehn filling coefficients of the cusps.  This can be
 */
  __pyx_tuple__307 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_filling_data, __pyx_n_s_which_cusp, __pyx_n_s_num_cusps, __pyx_n_s_meridian, __pyx_n_s_longitude, __pyx_n_s_complete, __pyx_n_s_i, __pyx_n_s_fill); if (unlikely(!__pyx_tuple__307)) __PYX_ERR(3, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__307);
  __Pyx_GIVEREF(__pyx_tuple__307);
  __pyx_codeobj__308 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__307, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_dehn_fill, 1128, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__308)) __PYX_ERR(3, 1128, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1198
 *     # When doctesting, the M,L coefficients acquire an accuracy of 8.
 *     # So we have to include the zeros in the doctest string.
 *     def cusp_info(self, data_spec=None):             # <<<<<<<<<<<<<<
 *         """
 *         Returns an info object containing information about the given
 */
  __pyx_tuple__309 = PyTuple_Pack(16, __pyx_n_s_self, __pyx_n_s_data_spec, __pyx_n_s_cusp_index, __pyx_n_s_topology, __pyx_n_s_is_complete, __pyx_n_s_m, __pyx_n_s_l, __pyx_n_s_initial_shape, __pyx_n_s_current_shape, __pyx_n_s_initial_shape_accuracy, __pyx_n_s_current_shape_accuracy, __pyx_n_s_initial_modulus, __pyx_n_s_current_modulus, __pyx_n_s_info, __pyx_n_s_i, __pyx_n_s_c); if (unlikely(!__pyx_tuple__309)) __PYX_ERR(3, 1198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__309);
  __Pyx_GIVEREF(__pyx_tuple__309);
  __pyx_codeobj__310 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__309, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_cusp_info, 1198, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__310)) __PYX_ERR(3, 1198, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1254
 *         return CuspInfo(**info)
 * 
 *     def reverse_orientation(self):             # <<<<<<<<<<<<<<
 *         """
 *         Reverses the orientation of the Triangulation, presuming that
 */
  __pyx_codeobj__311 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_reverse_orientation, 1254, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__311)) __PYX_ERR(3, 1254, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1271
 *         self._cache.clear(message='reverse_orientation')
 * 
 *     def filled_triangulation(self, cusps_to_fill='all'):             # <<<<<<<<<<<<<<
 *         """
 *         Return a new manifold where the specified cusps have been
 */
  __pyx_tuple__312 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_cusps_to_fill, __pyx_n_s_n, __pyx_n_s_c_filled_tri, __pyx_n_s_filled_tri, __pyx_n_s_fill_cusp_spec, __pyx_n_s_i, __pyx_n_s_fill_all, __pyx_n_s_c, __pyx_n_s_c, __pyx_n_s_c, __pyx_n_s_i); if (unlikely(!__pyx_tuple__312)) __PYX_ERR(3, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__312);
  __Pyx_GIVEREF(__pyx_tuple__312);
  __pyx_codeobj__313 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__312, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_filled_triangulation, 1271, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__313)) __PYX_ERR(3, 1271, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1320
 *         return filled_tri
 * 
 *     def _unsimplified_filled_triangulation(self, method='fold'):             # <<<<<<<<<<<<<<
 *         """
 *         For a Triangulation that describes a closed manifold, returns
 */
  __pyx_tuple__314 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_method, __pyx_n_s_n, __pyx_n_s_c_new_tri, __pyx_n_s_filled_tri, __pyx_n_s_fill_cusp_spec, __pyx_n_s_fill_by_fold, __pyx_n_s_mark_solid_tori, __pyx_n_s_i, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__314)) __PYX_ERR(3, 1320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__314);
  __Pyx_GIVEREF(__pyx_tuple__314);
  __pyx_codeobj__315 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__314, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_unsimplified_filled_triangulati_2, 1320, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__315)) __PYX_ERR(3, 1320, __pyx_L1_error)
  __pyx_tuple__316 = PyTuple_Pack(1, __pyx_n_s_fold); if (unlikely(!__pyx_tuple__316)) __PYX_ERR(3, 1320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__316);
  __Pyx_GIVEREF(__pyx_tuple__316);

  /* "cython/core/triangulation.pyx":1392
 *         return filled_tri
 * 
 *     def _marked_tetrahedra(self, clear_marks=False):             # <<<<<<<<<<<<<<
 *         cdef int *marked = NULL
 *         n = self.num_tetrahedra()
 */
  __pyx_tuple__317 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_clear_marks, __pyx_n_s_marked, __pyx_n_s_n, __pyx_n_s_ans, __pyx_n_s_i); if (unlikely(!__pyx_tuple__317)) __PYX_ERR(3, 1392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__317);
  __Pyx_GIVEREF(__pyx_tuple__317);
  __pyx_codeobj__318 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__317, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_marked_tetrahedra, 1392, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__318)) __PYX_ERR(3, 1392, __pyx_L1_error)
  __pyx_tuple__319 = PyTuple_Pack(1, Py_False); if (unlikely(!__pyx_tuple__319)) __PYX_ERR(3, 1392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__319);
  __Pyx_GIVEREF(__pyx_tuple__319);

  /* "cython/core/triangulation.pyx":1403
 *         return ans
 * 
 *     def edge_valences(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a dictionary whose keys are the valences of the edges
 */
  __pyx_tuple__320 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_c, __pyx_n_s_v, __pyx_n_s_ans); if (unlikely(!__pyx_tuple__320)) __PYX_ERR(3, 1403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__320);
  __Pyx_GIVEREF(__pyx_tuple__320);
  __pyx_codeobj__321 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__320, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_edge_valences, 1403, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__321)) __PYX_ERR(3, 1403, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1424
 *         return ans
 * 
 *     def gluing_equations_pgl(self, N=2, equation_type='all'):             # <<<<<<<<<<<<<<
 * 
 *         """
 */
  __pyx_tuple__322 = PyTuple_Pack(17, __pyx_n_s_self, __pyx_n_s_N, __pyx_n_s_equation_type, __pyx_n_s_c_matrix, __pyx_n_s_equations, __pyx_n_s_explain_rows, __pyx_n_s_explain_cols, __pyx_n_s_eqns, __pyx_n_s_r, __pyx_n_s_i, __pyx_n_s_cusp_info, __pyx_n_s_to_do, __pyx_n_s_m, __pyx_n_s_l, __pyx_n_s_j, __pyx_n_s_j, __pyx_n_s_j); if (unlikely(!__pyx_tuple__322)) __PYX_ERR(3, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__322);
  __Pyx_GIVEREF(__pyx_tuple__322);
  __pyx_codeobj__323 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__322, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_gluing_equations_pgl, 1424, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__323)) __PYX_ERR(3, 1424, __pyx_L1_error)
  __pyx_tuple__324 = PyTuple_Pack(2, __pyx_int_2, __pyx_n_s_all); if (unlikely(!__pyx_tuple__324)) __PYX_ERR(3, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__324);
  __Pyx_GIVEREF(__pyx_tuple__324);

  /* "cython/core/triangulation.pyx":1602
 *                                           explain_cols)
 * 
 *     def _ptolemy_equations_identified_face_classes(self):             # <<<<<<<<<<<<<<
 *         """
 *         This function returns an identification structure where s_f_t gets
 */
  __pyx_tuple__325 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_vars); if (unlikely(!__pyx_tuple__325)) __PYX_ERR(3, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__325);
  __Pyx_GIVEREF(__pyx_tuple__325);
  __pyx_codeobj__326 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__325, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_ptolemy_equations_identified_fa, 1602, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__326)) __PYX_ERR(3, 1602, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1629
 *         return convert_and_free_identification_of_variables(c_vars)
 * 
 *     def _ptolemy_equations_identified_coordinates(self, N,             # <<<<<<<<<<<<<<
 *                                                   obstruction_class = None):
 * 
 */
  __pyx_tuple__327 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_N, __pyx_n_s_obstruction_class, __pyx_n_s_c_vars, __pyx_n_s_c_obstruction_class, __pyx_n_s_T, __pyx_n_s_i, __pyx_n_s_c); if (unlikely(!__pyx_tuple__327)) __PYX_ERR(3, 1629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__327);
  __Pyx_GIVEREF(__pyx_tuple__327);
  __pyx_codeobj__328 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__327, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_ptolemy_equations_identified_co, 1629, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__328)) __PYX_ERR(3, 1629, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1664
 *         return convert_and_free_identification_of_variables(c_vars)
 * 
 *     def _ptolemy_equations_action_by_decoration_change(self, int N):             # <<<<<<<<<<<<<<
 *         """
 *         We can change a decoration by multiplying a coset of a cusp by a
 */
  __pyx_tuple__329 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_N, __pyx_n_s_c_matrix, __pyx_n_s_m, __pyx_n_s_explain_rows, __pyx_n_s_explain_cols); if (unlikely(!__pyx_tuple__329)) __PYX_ERR(3, 1664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__329);
  __Pyx_GIVEREF(__pyx_tuple__329);
  __pyx_codeobj__330 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_ptolemy_equations_action_by_dec, 1664, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__330)) __PYX_ERR(3, 1664, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1688
 *         return m, explain_rows, explain_cols
 * 
 *     def _ptolemy_equations_boundary_map_3(self):             # <<<<<<<<<<<<<<
 *         """
 *         Boundary map C_3 -> C_2 in cellular homology represented as matrix
 */
  __pyx_tuple__331 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_c_matrix, __pyx_n_s_m, __pyx_n_s_explain_rows, __pyx_n_s_explain_cols); if (unlikely(!__pyx_tuple__331)) __PYX_ERR(3, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__331);
  __Pyx_GIVEREF(__pyx_tuple__331);
  __pyx_codeobj__332 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__331, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_ptolemy_equations_boundary_map, 1688, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__332)) __PYX_ERR(3, 1688, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1717
 *         return m, explain_rows, explain_cols
 * 
 *     def _ptolemy_equations_boundary_map_2(self):             # <<<<<<<<<<<<<<
 *         """
 *         Boundary map C_2 -> C_1 in cellular homology represented as matrix.
 */
  __pyx_codeobj__333 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__331, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_ptolemy_equations_boundary_map_2, 1717, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__333)) __PYX_ERR(3, 1717, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1738
 *         return m, explain_rows, explain_cols
 * 
 *     def _ptolemy_equations_boundary_map_1(self):             # <<<<<<<<<<<<<<
 *         """
 *         Boundary map C_1 -> C_0 in cellular homology represented as matrix.
 */
  __pyx_codeobj__334 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__331, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_ptolemy_equations_boundary_map_3, 1738, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__334)) __PYX_ERR(3, 1738, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1761
 *         return m, explain_rows, explain_cols
 * 
 *     def ptolemy_obstruction_classes(self):             # <<<<<<<<<<<<<<
 * 
 *         """
 */
  __pyx_codeobj__335 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_ptolemy_obstruction_classes, 1761, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__335)) __PYX_ERR(3, 1761, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1823
 *         return ptolemyManifoldMethods.get_ptolemy_obstruction_classes(self)
 * 
 *     def ptolemy_generalized_obstruction_classes(self, N):             # <<<<<<<<<<<<<<
 * 
 *         """
 */
  __pyx_tuple__336 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_N); if (unlikely(!__pyx_tuple__336)) __PYX_ERR(3, 1823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__336);
  __Pyx_GIVEREF(__pyx_tuple__336);
  __pyx_codeobj__337 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__336, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_ptolemy_generalized_obstruction, 1823, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__337)) __PYX_ERR(3, 1823, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":1890
 *                 self, N))
 * 
 *     def ptolemy_variety(self, N, obstruction_class = None,             # <<<<<<<<<<<<<<
 *                         simplify = True, eliminate_fixed_ptolemys = False):
 * 
 */
  __pyx_tuple__338 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_N, __pyx_n_s_obstruction_class, __pyx_n_s_simplify, __pyx_n_s_eliminate_fixed_ptolemys); if (unlikely(!__pyx_tuple__338)) __PYX_ERR(3, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__338);
  __Pyx_GIVEREF(__pyx_tuple__338);
  __pyx_codeobj__339 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__338, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_ptolemy_variety, 1890, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__339)) __PYX_ERR(3, 1890, __pyx_L1_error)
  __pyx_tuple__340 = PyTuple_Pack(3, Py_None, Py_True, Py_False); if (unlikely(!__pyx_tuple__340)) __PYX_ERR(3, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__340);
  __Pyx_GIVEREF(__pyx_tuple__340);

  /* "cython/core/triangulation.pyx":2075
 *             eliminate_fixed_ptolemys = eliminate_fixed_ptolemys)
 * 
 *     def gluing_equations(self,form='log'):             # <<<<<<<<<<<<<<
 *         """
 *         In the default mode, this function returns a matrix with rows
 */
  __pyx_tuple__341 = PyTuple_Pack(23, __pyx_n_s_self, __pyx_n_s_form, __pyx_n_s_c_eqns, __pyx_n_s_num_rows, __pyx_n_s_num_cols, __pyx_n_s_eqn, __pyx_n_s_eqns, __pyx_n_s_i, __pyx_n_s_cusp_info, __pyx_n_s_to_do, __pyx_n_s_m, __pyx_n_s_l, __pyx_n_s_rect, __pyx_n_s_row, __pyx_n_s_n, __pyx_n_s_a_2, __pyx_n_s_b_2, __pyx_n_s_c, __pyx_n_s_j, __pyx_n_s_r, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_j); if (unlikely(!__pyx_tuple__341)) __PYX_ERR(3, 2075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__341);
  __Pyx_GIVEREF(__pyx_tuple__341);
  __pyx_codeobj__342 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 23, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__341, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_gluing_equations, 2075, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__342)) __PYX_ERR(3, 2075, __pyx_L1_error)
  __pyx_tuple__343 = PyTuple_Pack(1, __pyx_n_s_log); if (unlikely(!__pyx_tuple__343)) __PYX_ERR(3, 2075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__343);
  __Pyx_GIVEREF(__pyx_tuple__343);

  /* "cython/core/triangulation.pyx":2238
 *         return relation_matrix
 * 
 *     def _presentation_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the presentation matrix for the first integral
 */
  __pyx_codeobj__344 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_presentation_matrix, 2238, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__344)) __PYX_ERR(3, 2238, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2278
 *         return AbelianGroup(relations)
 * 
 *     def homology(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns an AbelianGroup representing the first integral
 */
  __pyx_tuple__345 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_H, __pyx_n_s_n, __pyx_n_s_coefficient_list, __pyx_n_s_result); if (unlikely(!__pyx_tuple__345)) __PYX_ERR(3, 2278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__345);
  __Pyx_GIVEREF(__pyx_tuple__345);
  __pyx_codeobj__346 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__345, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_homology, 2278, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__346)) __PYX_ERR(3, 2278, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2313
 *         return self._cache.save(result, 'homology')
 * 
 *     def fundamental_group(self,             # <<<<<<<<<<<<<<
 *                           simplify_presentation = True,
 *                           fillings_may_affect_generators = True,
 */
  __pyx_tuple__347 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_simplify_presentation, __pyx_n_s_fillings_may_affect_generators, __pyx_n_s_minimize_number_of_generators, __pyx_n_s_try_hard_to_shorten_relators, __pyx_n_s_args); if (unlikely(!__pyx_tuple__347)) __PYX_ERR(3, 2313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__347);
  __Pyx_GIVEREF(__pyx_tuple__347);
  __pyx_codeobj__348 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__347, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_fundamental_group, 2313, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__348)) __PYX_ERR(3, 2313, __pyx_L1_error)
  __pyx_tuple__349 = PyTuple_Pack(4, Py_True, Py_True, Py_True, Py_True); if (unlikely(!__pyx_tuple__349)) __PYX_ERR(3, 2313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__349);
  __Pyx_GIVEREF(__pyx_tuple__349);

  /* "cython/core/triangulation.pyx":2360
 *                                 'fundamental_group', *args)
 * 
 *     def cover(self, permutation_rep):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Triangulation representing the finite cover
 */
  __pyx_tuple__350 = PyTuple_Pack(19, __pyx_n_s_self, __pyx_n_s_permutation_rep, __pyx_n_s_c_representation, __pyx_n_s_c_triangulation, __pyx_n_s_cover, __pyx_n_s_GG, __pyx_n_s_coset_action, __pyx_n_s_gap_image_gens, __pyx_n_s_Q, __pyx_n_s_f, __pyx_n_s_input_type, __pyx_n_s_G, __pyx_n_s_degree, __pyx_n_s_info, __pyx_n_s_g, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_perm, __pyx_n_s_x); if (unlikely(!__pyx_tuple__350)) __PYX_ERR(3, 2360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__350);
  __Pyx_GIVEREF(__pyx_tuple__350);
  __pyx_codeobj__351 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 19, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__350, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_cover, 2360, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__351)) __PYX_ERR(3, 2360, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2460
 *         return cover
 * 
 *     def covers(self, degree, method=None, cover_type='all'):             # <<<<<<<<<<<<<<
 *         """
 *         M.covers(degree, method=None, cover_type='all')
 */
  __pyx_tuple__352 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_degree, __pyx_n_s_method, __pyx_n_s_cover_type); if (unlikely(!__pyx_tuple__352)) __PYX_ERR(3, 2460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__352);
  __Pyx_GIVEREF(__pyx_tuple__352);
  __pyx_codeobj__353 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__352, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_covers, 2460, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__353)) __PYX_ERR(3, 2460, __pyx_L1_error)
  __pyx_tuple__354 = PyTuple_Pack(2, Py_None, __pyx_n_s_all); if (unlikely(!__pyx_tuple__354)) __PYX_ERR(3, 2460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__354);
  __Pyx_GIVEREF(__pyx_tuple__354);

  /* "cython/core/triangulation.pyx":2524
 *                          "and 'snappea'")
 * 
 *     def _covers_low_index(self, degree, num_threads=0):             # <<<<<<<<<<<<<<
 *         """
 *         Compute all covers using low_index.
 */
  __pyx_tuple__355 = PyTuple_Pack(14, __pyx_n_s_self, __pyx_n_s_degree, __pyx_n_s_num_threads, __pyx_n_s_G, __pyx_n_s_relators, __pyx_n_s_short_relators, __pyx_n_s_long_relators, __pyx_n_s_strategy, __pyx_n_s_reps, __pyx_n_s_index, __pyx_n_s_index, __pyx_n_s_rel, __pyx_n_s_rel, __pyx_n_s_H); if (unlikely(!__pyx_tuple__355)) __PYX_ERR(3, 2524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__355);
  __Pyx_GIVEREF(__pyx_tuple__355);
  __pyx_codeobj__356 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__355, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_covers_low_index, 2524, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__356)) __PYX_ERR(3, 2524, __pyx_L1_error)
  __pyx_tuple__357 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__357)) __PYX_ERR(3, 2524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__357);
  __Pyx_GIVEREF(__pyx_tuple__357);

  /* "cython/core/triangulation.pyx":2556
 *         return [self.cover(H) for H in reps if index(H) == degree]
 * 
 *     def _covers_gap(self, degree):             # <<<<<<<<<<<<<<
 *         """
 *         Compute all covers using gap.
 */
  __pyx_tuple__358 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_degree, __pyx_n_s_G, __pyx_n_s_H); if (unlikely(!__pyx_tuple__358)) __PYX_ERR(3, 2556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__358);
  __Pyx_GIVEREF(__pyx_tuple__358);
  __pyx_codeobj__359 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__358, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_covers_gap, 2556, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__359)) __PYX_ERR(3, 2556, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2568
 *                 if G.Index(H) == degree]
 * 
 *     def _covers_magma(self, degree):             # <<<<<<<<<<<<<<
 *         """
 *         Compute all covers using magma.
 */
  __pyx_codeobj__360 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__358, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_covers_magma, 2568, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__360)) __PYX_ERR(3, 2568, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2580
 *                                              (degree, degree))]
 * 
 *     def _covers_snappea(self, degree, cover_type):             # <<<<<<<<<<<<<<
 *         """
 *         Compute cyclic or all covers using SnapPea kernel.
 */
  __pyx_tuple__361 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_degree, __pyx_n_s_cover_type, __pyx_n_s_reps, __pyx_n_s_rep, __pyx_n_s_cover, __pyx_n_s_T, __pyx_n_s_c_cover_type, __pyx_n_s_covers, __pyx_n_s_cover_count, __pyx_n_s_info); if (unlikely(!__pyx_tuple__361)) __PYX_ERR(3, 2580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__361);
  __Pyx_GIVEREF(__pyx_tuple__361);
  __pyx_codeobj__362 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__361, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_covers_snappea, 2580, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__362)) __PYX_ERR(3, 2580, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2727
 *         return c_repn_in_original_gens
 * 
 *     def set_peripheral_curves(self, peripheral_data,             # <<<<<<<<<<<<<<
 *                               which_cusp=None, return_matrices=False):
 *         """
 */
  __pyx_tuple__363 = PyTuple_Pack(17, __pyx_n_s_self, __pyx_n_s_peripheral_data, __pyx_n_s_which_cusp, __pyx_n_s_return_matrices, __pyx_n_s_a_2, __pyx_n_s_b_2, __pyx_n_s_c, __pyx_n_s_d_4, __pyx_n_s_matrices_2, __pyx_n_s_result, __pyx_n_s_cobs, __pyx_n_s_n, __pyx_n_s_meridian, __pyx_n_s_longitude, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_basis); if (unlikely(!__pyx_tuple__363)) __PYX_ERR(3, 2727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__363);
  __Pyx_GIVEREF(__pyx_tuple__363);
  __pyx_codeobj__364 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__363, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_set_peripheral_curves, 2727, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__364)) __PYX_ERR(3, 2727, __pyx_L1_error)
  __pyx_tuple__365 = PyTuple_Pack(2, Py_None, Py_False); if (unlikely(!__pyx_tuple__365)) __PYX_ERR(3, 2727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__365);
  __Pyx_GIVEREF(__pyx_tuple__365);

  /* "cython/core/triangulation.pyx":2862
 *                                  peripheral_data)
 * 
 *     def has_finite_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns True if and only if the triangulation has finite (non-ideal)
 */
  __pyx_codeobj__366 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_has_finite_vertices, 2862, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__366)) __PYX_ERR(3, 2862, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":2889
 *         return get_num_fake_cusps(self.c_triangulation) > 0
 * 
 *     def triangulation_isosig(self,             # <<<<<<<<<<<<<<
 *                              decorated=True,
 *                              ignore_cusp_ordering = False,
 */
  __pyx_tuple__367 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_decorated, __pyx_n_s_ignore_cusp_ordering, __pyx_n_s_ignore_curve_orientations, __pyx_n_s_ignore_orientation, __pyx_n_s_c_string, __pyx_n_s_args, __pyx_n_s_result); if (unlikely(!__pyx_tuple__367)) __PYX_ERR(3, 2889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__367);
  __Pyx_GIVEREF(__pyx_tuple__367);
  __pyx_codeobj__368 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__367, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_triangulation_isosig, 2889, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__368)) __PYX_ERR(3, 2889, __pyx_L1_error)
  __pyx_tuple__369 = PyTuple_Pack(4, Py_True, Py_False, Py_False, Py_True); if (unlikely(!__pyx_tuple__369)) __PYX_ERR(3, 2889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__369);
  __Pyx_GIVEREF(__pyx_tuple__369);

  /* "cython/core/triangulation.pyx":3034
 *         return self._cache.save(result, 'triangulation_isosig', *args)
 * 
 *     def _symplectic_form(self, u, v):             # <<<<<<<<<<<<<<
 *         return sum([u[2 * i] * v[2 * i + 1] - u[2 * i + 1] * v[2 * i] for i in range(len(u) // 2)])
 * 
 */
  __pyx_tuple__370 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_u, __pyx_n_s_v, __pyx_n_s_i); if (unlikely(!__pyx_tuple__370)) __PYX_ERR(3, 3034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__370);
  __Pyx_GIVEREF(__pyx_tuple__370);
  __pyx_codeobj__371 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__370, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_symplectic_form, 3034, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__371)) __PYX_ERR(3, 3034, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":3037
 *         return sum([u[2 * i] * v[2 * i + 1] - u[2 * i + 1] * v[2 * i] for i in range(len(u) // 2)])
 * 
 *     def _is_symplectic(self, M):             # <<<<<<<<<<<<<<
 *         """
 *         Test if the matrix M is symplectic
 */
  __pyx_tuple__372 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_M, __pyx_n_s_n, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_omega); if (unlikely(!__pyx_tuple__372)) __PYX_ERR(3, 3037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__372);
  __Pyx_GIVEREF(__pyx_tuple__372);
  __pyx_codeobj__373 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__372, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_is_symplectic, 3037, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__373)) __PYX_ERR(3, 3037, __pyx_L1_error)

  /* "cython/core/triangulation.pyx":3057
 *         return True
 * 
 *     def symplectic_basis(self, verify=False):             # <<<<<<<<<<<<<<
 *         """
 *         Extend the Neumann-Zagier Matrix to one which is symplectic
 */
  __pyx_tuple__374 = PyTuple_Pack(20, __pyx_n_s_self, __pyx_n_s_verify, __pyx_n_s_c_eqns, __pyx_n_s_g_eqns, __pyx_n_s_num_rows, __pyx_n_s_num_cols, __pyx_n_s_dual_rows, __pyx_n_s_eqn, __pyx_n_s_eqns, __pyx_n_s_i, __pyx_n_s_cusp_info, __pyx_n_s_to_do, __pyx_n_s_m, __pyx_n_s_l, __pyx_n_s_rows, __pyx_n_s_retval, __pyx_n_s_j, __pyx_n_s_j, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__374)) __PYX_ERR(3, 3057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__374);
  __Pyx_GIVEREF(__pyx_tuple__374);
  __pyx_codeobj__375 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 20, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__374, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_triangulation_pyx, __pyx_n_s_symplectic_basis, 3057, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__375)) __PYX_ERR(3, 3057, __pyx_L1_error)

  /* "cython/core/manifold.pyx":84
 *             do_Dehn_filling(self.c_triangulation)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _number_(n):
 *         return number.number_to_native_number(n)
 */
  __pyx_tuple__376 = PyTuple_Pack(1, __pyx_n_s_n); if (unlikely(!__pyx_tuple__376)) __PYX_ERR(1, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__376);
  __Pyx_GIVEREF(__pyx_tuple__376);
  __pyx_codeobj__377 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__376, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_number_2, 84, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__377)) __PYX_ERR(1, 84, __pyx_L1_error)

  /* "cython/core/manifold.pyx":88
 *         return number.number_to_native_number(n)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def use_field_conversion(cls, func):
 *         """
 */
  __pyx_tuple__378 = PyTuple_Pack(2, __pyx_n_s_cls, __pyx_n_s_func); if (unlikely(!__pyx_tuple__378)) __PYX_ERR(1, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__378);
  __Pyx_GIVEREF(__pyx_tuple__378);
  __pyx_codeobj__379 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__378, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_use_field_conversion, 88, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__379)) __PYX_ERR(1, 88, __pyx_L1_error)

  /* "cython/core/manifold.pyx":136
 *         number.use_field_conversion(func)
 * 
 *     def init_hyperbolic_structure(self, force_recompute = False):             # <<<<<<<<<<<<<<
 *         if not self.c_triangulation:
 *             return
 */
  __pyx_tuple__380 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_force_recompute); if (unlikely(!__pyx_tuple__380)) __PYX_ERR(1, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__380);
  __Pyx_GIVEREF(__pyx_tuple__380);
  __pyx_codeobj__381 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__380, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_init_hyperbolic_structure, 136, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__381)) __PYX_ERR(1, 136, __pyx_L1_error)

  /* "cython/core/manifold.pyx":145
 *         self.hyperbolic_structure_initialized = True
 * 
 *     def canonize(self):             # <<<<<<<<<<<<<<
 *         """
 *         Change the triangulation to an arbitrary retriangulation of
 */
  __pyx_tuple__382 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__382)) __PYX_ERR(1, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__382);
  __Pyx_GIVEREF(__pyx_tuple__382);
  __pyx_codeobj__383 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__382, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_canonize, 145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__383)) __PYX_ERR(1, 145, __pyx_L1_error)

  /* "cython/core/manifold.pyx":167
 *         self._cache.clear(message='canonize')
 * 
 *     def _canonical_retriangulation(self, opacities = None):             # <<<<<<<<<<<<<<
 *         """
 *         If this triangulation is a subdivision of the canonical cell
 */
  __pyx_tuple__384 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_opacities, __pyx_n_s_c_opacities, __pyx_n_s_c_retriangulated_triangulation, __pyx_n_s_n, __pyx_n_s_result, __pyx_n_s_new_tri, __pyx_n_s_i); if (unlikely(!__pyx_tuple__384)) __PYX_ERR(1, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__384);
  __Pyx_GIVEREF(__pyx_tuple__384);
  __pyx_codeobj__385 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__384, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_canonical_retriangulation, 167, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__385)) __PYX_ERR(1, 167, __pyx_L1_error)

  /* "cython/core/manifold.pyx":238
 *         return new_tri
 * 
 *     def _canonical_cells_are_tetrahedra(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns True if and only if the canonical
 */
  __pyx_tuple__386 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_M); if (unlikely(!__pyx_tuple__386)) __PYX_ERR(1, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__386);
  __Pyx_GIVEREF(__pyx_tuple__386);
  __pyx_codeobj__387 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__386, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_canonical_cells_are_tetrahedra, 238, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__387)) __PYX_ERR(1, 238, __pyx_L1_error)

  /* "cython/core/manifold.pyx":256
 *         return get_num_fake_cusps(M.c_triangulation) == 0
 * 
 *     def _from_string(self, string, initialize_structure=True):             # <<<<<<<<<<<<<<
 *         """
 *         WARNING: Users should not use this function directly.  To create a
 */
  __pyx_tuple__388 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_string, __pyx_n_s_initialize_structure); if (unlikely(!__pyx_tuple__388)) __PYX_ERR(1, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__388);
  __Pyx_GIVEREF(__pyx_tuple__388);
  __pyx_codeobj__389 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__388, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_from_string, 256, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__389)) __PYX_ERR(1, 256, __pyx_L1_error)

  /* "cython/core/manifold.pyx":272
 *             self.init_hyperbolic_structure()
 * 
 *     def _from_bytes(self, bytestring, initialize_structure=True):             # <<<<<<<<<<<<<<
 *         """
 *         Fill an empty manifold from a byte sequence generated by
 */
  __pyx_tuple__390 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_bytestring, __pyx_n_s_initialize_structure); if (unlikely(!__pyx_tuple__390)) __PYX_ERR(1, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__390);
  __Pyx_GIVEREF(__pyx_tuple__390);
  __pyx_codeobj__391 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__390, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_from_bytes, 272, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__391)) __PYX_ERR(1, 272, __pyx_L1_error)

  /* "cython/core/manifold.pyx":286
 *             self.init_hyperbolic_structure()
 * 
 *     def _from_isosig(self, isosig, initialize_structure=True):             # <<<<<<<<<<<<<<
 *         """
 *         Fill an empty manifold from an isosig generated by
 */
  __pyx_tuple__392 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_isosig, __pyx_n_s_initialize_structure); if (unlikely(!__pyx_tuple__392)) __PYX_ERR(1, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__392);
  __Pyx_GIVEREF(__pyx_tuple__392);
  __pyx_codeobj__393 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__392, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_from_isosig, 286, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__393)) __PYX_ERR(1, 286, __pyx_L1_error)

  /* "cython/core/manifold.pyx":297
 *             self.init_hyperbolic_structure()
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a copy of the manifold
 */
  __pyx_tuple__394 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_empty); if (unlikely(!__pyx_tuple__394)) __PYX_ERR(1, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__394);
  __Pyx_GIVEREF(__pyx_tuple__394);
  __pyx_codeobj__395 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__394, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_copy, 297, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__395)) __PYX_ERR(1, 297, __pyx_L1_error)

  /* "cython/core/manifold.pyx":309
 *         return Manifold_from_Triangulation(self, manifold_class=self.__class__)
 * 
 *     def cusp_neighborhood(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns information about the cusp neighborhoods of the
 */
  __pyx_codeobj__396 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_cusp_neighborhood, 309, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__396)) __PYX_ERR(1, 309, __pyx_L1_error)

  /* "cython/core/manifold.pyx":325
 *         return CuspNeighborhood(self)
 * 
 *     def dirichlet_domain(self,             # <<<<<<<<<<<<<<
 *                          vertex_epsilon=default_vertex_epsilon,
 *                          displacement = (0.0, 0.0, 0.0),
 */
  __pyx_tuple__397 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_vertex_epsilon, __pyx_n_s_displacement, __pyx_n_s_centroid_at_origin, __pyx_n_s_maximize_injectivity_radius, __pyx_n_s_include_words, __pyx_n_s_args); if (unlikely(!__pyx_tuple__397)) __PYX_ERR(1, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__397);
  __Pyx_GIVEREF(__pyx_tuple__397);
  __pyx_codeobj__398 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__397, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_dirichlet_domain, 325, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__398)) __PYX_ERR(1, 325, __pyx_L1_error)

  /* "cython/core/manifold.pyx":375
 *                                 'dirichlet_domain', *args)
 * 
 *     def browse(self):             # <<<<<<<<<<<<<<
 *         """
 *         Opens browser window with a graphical interface, which allows to
 */
  __pyx_codeobj__399 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_browse, 375, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__399)) __PYX_ERR(1, 375, __pyx_L1_error)

  /* "cython/core/manifold.pyx":391
 *         return Browser(self)
 * 
 *     def filled_triangulation(self, cusps_to_fill='all'):             # <<<<<<<<<<<<<<
 *         """
 *         Return a new Manifold where the specified cusps have been
 */
  __pyx_tuple__400 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_cusps_to_fill, __pyx_n_s_filled_2); if (unlikely(!__pyx_tuple__400)) __PYX_ERR(1, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__400);
  __Pyx_GIVEREF(__pyx_tuple__400);
  __pyx_codeobj__401 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__400, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_filled_triangulation, 391, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__401)) __PYX_ERR(1, 391, __pyx_L1_error)

  /* "cython/core/manifold.pyx":418
 *         return filled
 * 
 *     def fundamental_group(self,             # <<<<<<<<<<<<<<
 *                           simplify_presentation = True,
 *                           fillings_may_affect_generators = True,
 */
  __pyx_tuple__402 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_simplify_presentation, __pyx_n_s_fillings_may_affect_generators, __pyx_n_s_minimize_number_of_generators, __pyx_n_s_try_hard_to_shorten_relators, __pyx_n_s_args, __pyx_n_s_result); if (unlikely(!__pyx_tuple__402)) __PYX_ERR(1, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__402);
  __Pyx_GIVEREF(__pyx_tuple__402);
  __pyx_codeobj__403 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__402, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_fundamental_group, 418, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__403)) __PYX_ERR(1, 418, __pyx_L1_error)

  /* "cython/core/manifold.pyx":468
 *         return self._cache.save(result, 'fundamental_group', *args)
 * 
 *     def symmetry_group(self, of_link=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the symmetry group of the Manifold.
 */
  __pyx_tuple__404 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_of_link, __pyx_n_s_symmetries_of_manifold, __pyx_n_s_symmetries_of_link, __pyx_n_s_c_symmetric_triangulation, __pyx_n_s_symmetric_triangulation, __pyx_n_s_is_full_group, __pyx_n_s_result, __pyx_n_s_symmetry_group); if (unlikely(!__pyx_tuple__404)) __PYX_ERR(1, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__404);
  __Pyx_GIVEREF(__pyx_tuple__404);
  __pyx_codeobj__405 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__404, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_symmetry_group, 468, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__405)) __PYX_ERR(1, 468, __pyx_L1_error)

  /* "cython/core/manifold.pyx":514
 *         return self._cache.save(symmetry_group, 'symmetry_group', of_link)
 * 
 *     def symmetric_triangulation(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Dehn filling description of the manifold realizing
 */
  __pyx_codeobj__406 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_symmetric_triangulation, 514, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__406)) __PYX_ERR(1, 514, __pyx_L1_error)

  /* "cython/core/manifold.pyx":535
 *             return self._cache.lookup('symmetric_triangulation')
 * 
 *     def cover(self, permutation_rep):             # <<<<<<<<<<<<<<
 *         """
 *         M.cover(permutation_rep)
 */
  __pyx_tuple__407 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_permutation_rep, __pyx_n_s_cover); if (unlikely(!__pyx_tuple__407)) __PYX_ERR(1, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__407);
  __Pyx_GIVEREF(__pyx_tuple__407);
  __pyx_codeobj__408 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__407, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_cover, 535, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__408)) __PYX_ERR(1, 535, __pyx_L1_error)

  /* "cython/core/manifold.pyx":607
 *                                            manifold_class=self.__class__)
 * 
 *     def covers(self, degree, method=None, cover_type='all'):             # <<<<<<<<<<<<<<
 *         """
 *         M.covers(degree, method=None, cover_type='all')
 */
  __pyx_tuple__409 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_degree, __pyx_n_s_method, __pyx_n_s_cover_type, __pyx_n_s_covers, __pyx_n_s_cover); if (unlikely(!__pyx_tuple__409)) __PYX_ERR(1, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__409);
  __Pyx_GIVEREF(__pyx_tuple__409);
  __pyx_codeobj__410 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__409, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_covers, 607, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__410)) __PYX_ERR(1, 607, __pyx_L1_error)

  /* "cython/core/manifold.pyx":700
 *         raise ValueError(err_msg)
 * 
 *     def _complex_volume(self):             # <<<<<<<<<<<<<<
 *         cdef Complex volume
 *         cdef int accuracy
 */
  __pyx_tuple__411 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_volume, __pyx_n_s_accuracy, __pyx_n_s_result); if (unlikely(!__pyx_tuple__411)) __PYX_ERR(1, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__411);
  __Pyx_GIVEREF(__pyx_tuple__411);
  __pyx_codeobj__412 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__411, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_complex_volume_2, 700, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__412)) __PYX_ERR(1, 700, __pyx_L1_error)

  /* "cython/core/manifold.pyx":714
 *         return self._number_(result)
 * 
 *     def volume(self, accuracy=False, verified = False, bits_prec = None):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the volume of the current solution to the hyperbolic
 */
  __pyx_tuple__413 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_accuracy, __pyx_n_s_verified, __pyx_n_s_bits_prec, __pyx_n_s_vol); if (unlikely(!__pyx_tuple__413)) __PYX_ERR(1, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__413);
  __Pyx_GIVEREF(__pyx_tuple__413);
  __pyx_codeobj__414 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__413, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_volume, 714, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__414)) __PYX_ERR(1, 714, __pyx_L1_error)
  __pyx_tuple__415 = PyTuple_Pack(3, Py_False, Py_False, Py_None); if (unlikely(!__pyx_tuple__415)) __PYX_ERR(1, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__415);
  __Pyx_GIVEREF(__pyx_tuple__415);

  /* "cython/core/manifold.pyx":807
 *         return result
 * 
 *     def chern_simons(self, accuracy = False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the Chern-Simons invariant of the manifold, if it is known.
 */
  __pyx_tuple__416 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_accuracy, __pyx_n_s_cs); if (unlikely(!__pyx_tuple__416)) __PYX_ERR(1, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__416);
  __Pyx_GIVEREF(__pyx_tuple__416);
  __pyx_codeobj__417 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__416, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_chern_simons, 807, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__417)) __PYX_ERR(1, 807, __pyx_L1_error)

  /* "cython/core/manifold.pyx":848
 *             return self._number_(cs)
 * 
 *     def without_hyperbolic_structure(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns self as a Triangulation, forgetting the hyperbolic
 */
  __pyx_codeobj__418 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_without_hyperbolic_structure, 848, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__418)) __PYX_ERR(1, 848, __pyx_L1_error)

  /* "cython/core/manifold.pyx":860
 *         return Triangulation_from_Manifold(self)
 * 
 *     def _polish_hyperbolic_structures(self):             # <<<<<<<<<<<<<<
 *         polish_hyperbolic_structures(self.c_triangulation)
 * 
 */
  __pyx_codeobj__419 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_polish_hyperbolic_structures, 860, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__419)) __PYX_ERR(1, 860, __pyx_L1_error)

  /* "cython/core/manifold.pyx":863
 *         polish_hyperbolic_structures(self.c_triangulation)
 * 
 *     def tetrahedra_shapes(self, part=None, fixed_alignment=True,             # <<<<<<<<<<<<<<
 *                           bits_prec=None, dec_prec=None,
 *                           intervals=False):
 */
  __pyx_tuple__420 = PyTuple_Pack(26, __pyx_n_s_self, __pyx_n_s_part, __pyx_n_s_fixed_alignment, __pyx_n_s_bits_prec, __pyx_n_s_dec_prec, __pyx_n_s_intervals, __pyx_n_s_rect_re, __pyx_n_s_rect_im, __pyx_n_s_log_re, __pyx_n_s_log_im, __pyx_n_s_acc_rec_re, __pyx_n_s_acc_rec_im, __pyx_n_s_acc_log_re, __pyx_n_s_acc_log_im, __pyx_n_s_is_geometric, __pyx_n_s_result, __pyx_n_s_shapes, __pyx_n_s_z, __pyx_n_s_i, __pyx_n_s_rect_shape, __pyx_n_s_log_shape, __pyx_n_s_engine, __pyx_n_s_a_2, __pyx_n_s_a_2, __pyx_n_s_z, __pyx_n_s_a_2); if (unlikely(!__pyx_tuple__420)) __PYX_ERR(1, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__420);
  __Pyx_GIVEREF(__pyx_tuple__420);
  __pyx_codeobj__421 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 26, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__420, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_tetrahedra_shapes, 863, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__421)) __PYX_ERR(1, 863, __pyx_L1_error)
  __pyx_tuple__422 = PyTuple_Pack(5, Py_None, Py_True, Py_None, Py_None, Py_False); if (unlikely(!__pyx_tuple__422)) __PYX_ERR(1, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__422);
  __Pyx_GIVEREF(__pyx_tuple__422);

  /* "cython/core/manifold.pyx":982
 *             return ListOnePerLine(result)
 * 
 *     def _get_tetrahedra_shapes(self, which_solution):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of the tetrahedra shapes from one of the two
 */
  __pyx_tuple__423 = PyTuple_Pack(14, __pyx_n_s_self, __pyx_n_s_which_solution, __pyx_n_s_i, __pyx_n_s_rect_re, __pyx_n_s_rect_im, __pyx_n_s_log_re, __pyx_n_s_log_im, __pyx_n_s_acc_rec_re, __pyx_n_s_acc_rec_im, __pyx_n_s_acc_log_re, __pyx_n_s_acc_log_im, __pyx_n_s_is_geometric, __pyx_n_s_soln, __pyx_n_s_result); if (unlikely(!__pyx_tuple__423)) __PYX_ERR(1, 982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__423);
  __Pyx_GIVEREF(__pyx_tuple__423);
  __pyx_codeobj__424 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__423, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_get_tetrahedra_shapes, 982, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__424)) __PYX_ERR(1, 982, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1010
 *         return result
 * 
 *     def set_tetrahedra_shapes(self,             # <<<<<<<<<<<<<<
 *                               filled_shapes=None,
 *                               complete_shapes=None,
 */
  __pyx_tuple__425 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_filled_shapes, __pyx_n_s_complete_shapes, __pyx_n_s_fillings, __pyx_n_s_i, __pyx_n_s_N, __pyx_n_s_filled_shape_array, __pyx_n_s_complete_shape_array, __pyx_n_s_shape); if (unlikely(!__pyx_tuple__425)) __PYX_ERR(1, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__425);
  __Pyx_GIVEREF(__pyx_tuple__425);
  __pyx_codeobj__426 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__425, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_set_tetrahedra_shapes, 1010, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__426)) __PYX_ERR(1, 1010, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1048
 *         self._cache.clear(message='Manifold.set_tetrahedra_shapes')
 * 
 *     def solution_type(self, enum=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the type of the current solution to the gluing
 */
  __pyx_tuple__427 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_enum, __pyx_n_s_solution_type); if (unlikely(!__pyx_tuple__427)) __PYX_ERR(1, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__427);
  __Pyx_GIVEREF(__pyx_tuple__427);
  __pyx_codeobj__428 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__427, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_solution_type, 1048, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__428)) __PYX_ERR(1, 1048, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1093
 *             return SolutionType[solution_type]
 * 
 *     def set_target_holonomy(self, target, which_cusp=0, recompute=True):             # <<<<<<<<<<<<<<
 *         """
 *         M.set_target_holonomy(target, which_cusp=0, recompute=True)
 */
  __pyx_tuple__429 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_target, __pyx_n_s_which_cusp, __pyx_n_s_recompute, __pyx_n_s_c_target); if (unlikely(!__pyx_tuple__429)) __PYX_ERR(1, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__429);
  __Pyx_GIVEREF(__pyx_tuple__429);
  __pyx_codeobj__430 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__429, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_set_target_holonomy, 1093, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__430)) __PYX_ERR(1, 1093, __pyx_L1_error)
  __pyx_tuple__431 = PyTuple_Pack(2, __pyx_int_0, Py_True); if (unlikely(!__pyx_tuple__431)) __PYX_ERR(1, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__431);
  __Pyx_GIVEREF(__pyx_tuple__431);

  /* "cython/core/manifold.pyx":1108
 *                             which_cusp, c_target, recompute)
 * 
 *     def cusp_info(self, data_spec=None, verified = False, bits_prec = None):             # <<<<<<<<<<<<<<
 *         """
 *         Returns an info object containing information about the given
 */
  __pyx_tuple__432 = PyTuple_Pack(30, __pyx_n_s_self, __pyx_n_s_data_spec, __pyx_n_s_verified, __pyx_n_s_bits_prec, __pyx_n_s_cusp_index, __pyx_n_s_topology, __pyx_n_s_is_complete, __pyx_n_s_m, __pyx_n_s_l, __pyx_n_s_initial_shape, __pyx_n_s_current_shape, __pyx_n_s_initial_shape_accuracy, __pyx_n_s_current_shape_accuracy, __pyx_n_s_initial_modulus, __pyx_n_s_current_modulus, __pyx_n_s_meridian_accuracy, __pyx_n_s_longitude_accuracy, __pyx_n_s_singularity_index, __pyx_n_s_accuracy, __pyx_n_s_c_meridian, __pyx_n_s_c_longitude, __pyx_n_s_c_core_length, __pyx_n_s_shape, __pyx_n_s_meridian, __pyx_n_s_longitude, __pyx_n_s_modulus, __pyx_n_s_info, __pyx_n_s_core_length, __pyx_n_s_i, __pyx_n_s_c); if (unlikely(!__pyx_tuple__432)) __PYX_ERR(1, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__432);
  __Pyx_GIVEREF(__pyx_tuple__432);
  __pyx_codeobj__433 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 30, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__432, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_cusp_info, 1108, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__433)) __PYX_ERR(1, 1108, __pyx_L1_error)
  __pyx_tuple__434 = PyTuple_Pack(3, Py_None, Py_False, Py_None); if (unlikely(!__pyx_tuple__434)) __PYX_ERR(1, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__434);
  __Pyx_GIVEREF(__pyx_tuple__434);

  /* "cython/core/manifold.pyx":1231
 *         return CuspInfo(**info)
 * 
 *     def dehn_fill(self, filling_data, which_cusp=None):             # <<<<<<<<<<<<<<
 *         """
 *         Set the Dehn filling coefficients of the cusps.  This can be
 */
  __pyx_tuple__435 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_filling_data, __pyx_n_s_which_cusp); if (unlikely(!__pyx_tuple__435)) __PYX_ERR(1, 1231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__435);
  __Pyx_GIVEREF(__pyx_tuple__435);
  __pyx_codeobj__436 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__435, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_dehn_fill, 1231, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__436)) __PYX_ERR(1, 1231, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1269
 *         self._cache.clear(message='Manifold.dehn_fill')
 * 
 *     def set_peripheral_curves(self, peripheral_data,             # <<<<<<<<<<<<<<
 *                               which_cusp=None, return_matrices=False):
 *         """
 */
  __pyx_tuple__437 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_peripheral_data, __pyx_n_s_which_cusp, __pyx_n_s_return_matrices, __pyx_n_s_d_4, __pyx_n_s_matrices_2, __pyx_n_s_cusps, __pyx_n_s_cobs, __pyx_n_s_i, __pyx_n_s_n); if (unlikely(!__pyx_tuple__437)) __PYX_ERR(1, 1269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__437);
  __Pyx_GIVEREF(__pyx_tuple__437);
  __pyx_codeobj__438 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__437, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_set_peripheral_curves, 1269, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__438)) __PYX_ERR(1, 1269, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1383
 *                 self, peripheral_data, which_cusp,return_matrices)
 * 
 *     def dual_curves(self, max_segments=6):             # <<<<<<<<<<<<<<
 *         """
 *         Constructs a *reasonable* selection of simple closed curves in
 */
  __pyx_tuple__439 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_max_segments, __pyx_n_s_i, __pyx_n_s_num_curves, __pyx_n_s_curve_list, __pyx_n_s_parity, __pyx_n_s_complete_length, __pyx_n_s_filled_length, __pyx_n_s_result); if (unlikely(!__pyx_tuple__439)) __PYX_ERR(1, 1383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__439);
  __Pyx_GIVEREF(__pyx_tuple__439);
  __pyx_codeobj__440 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__439, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_dual_curves, 1383, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__440)) __PYX_ERR(1, 1383, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1449
 *         return ListOnePerLine(result)
 * 
 *     def length_spectrum(self,             # <<<<<<<<<<<<<<
 *                         cutoff=1.0,
 *                         full_rigor=True,
 */
  __pyx_tuple__441 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_cutoff, __pyx_n_s_full_rigor, __pyx_n_s_grouped, __pyx_n_s_include_words, __pyx_n_s_args, __pyx_n_s_D); if (unlikely(!__pyx_tuple__441)) __PYX_ERR(1, 1449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__441);
  __Pyx_GIVEREF(__pyx_tuple__441);
  __pyx_codeobj__442 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__441, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_length_spectrum, 1449, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__442)) __PYX_ERR(1, 1449, __pyx_L1_error)
  __pyx_tuple__443 = PyTuple_Pack(4, __pyx_float_1_0, Py_True, Py_True, Py_False); if (unlikely(!__pyx_tuple__443)) __PYX_ERR(1, 1449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__443);
  __Pyx_GIVEREF(__pyx_tuple__443);

  /* "cython/core/manifold.pyx":1485
 *             *args)
 * 
 *     def drill(self, which_curve, max_segments=6):             # <<<<<<<<<<<<<<
 *         """
 *         Drills out the specified dual curve from among all dual curves
 */
  __pyx_tuple__444 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_which_curve, __pyx_n_s_max_segments, __pyx_n_s_num_curves, __pyx_n_s_curve_list, __pyx_n_s_c_triangulation, __pyx_n_s_result, __pyx_n_s_c_new_name, __pyx_n_s_new_name); if (unlikely(!__pyx_tuple__444)) __PYX_ERR(1, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__444);
  __Pyx_GIVEREF(__pyx_tuple__444);
  __pyx_codeobj__445 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__444, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_drill, 1485, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__445)) __PYX_ERR(1, 1485, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1532
 *             return result
 * 
 *     def is_isometric_to(self, Manifold other, return_isometries=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns True if M and N are isometric, False if they not.  A
 */
  __pyx_tuple__446 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_other, __pyx_n_s_return_isometries, __pyx_n_s_are_isometric, __pyx_n_s_result, __pyx_n_s_isometries, __pyx_n_s_ans); if (unlikely(!__pyx_tuple__446)) __PYX_ERR(1, 1532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__446);
  __Pyx_GIVEREF(__pyx_tuple__446);
  __pyx_codeobj__447 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__446, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_is_isometric_to, 1532, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__447)) __PYX_ERR(1, 1532, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1616
 *         return ans
 * 
 *     def is_two_bridge(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the manifold is the complement of a two-bridge knot or link
 */
  __pyx_tuple__448 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_is_two_bridge, __pyx_n_s_p, __pyx_n_s_q, __pyx_n_s_c_canonized_triangulation); if (unlikely(!__pyx_tuple__448)) __PYX_ERR(1, 1616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__448);
  __Pyx_GIVEREF(__pyx_tuple__448);
  __pyx_codeobj__449 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__448, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_is_two_bridge, 1616, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__449)) __PYX_ERR(1, 1616, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1649
 *             return False
 * 
 *     def _choose_generators(self, compute_corners, centroid_at_origin):             # <<<<<<<<<<<<<<
 *         choose_generators(self.c_triangulation,
 *                           compute_corners,
 */
  __pyx_tuple__450 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_compute_corners, __pyx_n_s_centroid_at_origin); if (unlikely(!__pyx_tuple__450)) __PYX_ERR(1, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__450);
  __Pyx_GIVEREF(__pyx_tuple__450);
  __pyx_codeobj__451 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__450, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_choose_generators, 1649, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__451)) __PYX_ERR(1, 1649, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1654
 *                           centroid_at_origin)
 * 
 *     def _choose_generators_info(self):             # <<<<<<<<<<<<<<
 *         """
 *         Extracts, from the bowels of SnapPea, the information about the
 */
  __pyx_tuple__452 = PyTuple_Pack(24, __pyx_n_s_self, __pyx_n_s_generator_path, __pyx_n_s_face0_gen, __pyx_n_s_face1_gen, __pyx_n_s_face2_gen, __pyx_n_s_face3_gen, __pyx_n_s_c0, __pyx_n_s_c1, __pyx_n_s_c2, __pyx_n_s_c3, __pyx_n_s_neighbor0_idx, __pyx_n_s_neighbor1_idx, __pyx_n_s_neighbor2_idx, __pyx_n_s_neighbor3_idx, __pyx_n_s_perm0, __pyx_n_s_perm1, __pyx_n_s_perm2, __pyx_n_s_perm3, __pyx_n_s_ans, __pyx_n_s_i, __pyx_n_s_i, __pyx_n_s_i, __pyx_n_s_i, __pyx_n_s_i); if (unlikely(!__pyx_tuple__452)) __PYX_ERR(1, 1654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__452);
  __Pyx_GIVEREF(__pyx_tuple__452);
  __pyx_codeobj__453 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 24, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__452, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_choose_generators_info, 1654, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__453)) __PYX_ERR(1, 1654, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1692
 *         return ans
 * 
 *     def splitting_surfaces(self):             # <<<<<<<<<<<<<<
 *         """
 *         Searches for connected closed normal surfaces of nonnegative Euler
 */
  __pyx_tuple__454 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_surfaces, __pyx_n_s_result, __pyx_n_s_ans, __pyx_n_s_i); if (unlikely(!__pyx_tuple__454)) __PYX_ERR(1, 1692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__454);
  __Pyx_GIVEREF(__pyx_tuple__454);
  __pyx_codeobj__455 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__454, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_splitting_surfaces, 1692, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__455)) __PYX_ERR(1, 1692, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1736
 *         return ListOnePerLine(ans)
 * 
 *     def split(self, which_surface):             # <<<<<<<<<<<<<<
 *         """
 *         Split the manifold open along a surface of positive characteristic found
 */
  __pyx_tuple__456 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_which_surface, __pyx_n_s_surfaces, __pyx_n_s_result, __pyx_n_s_num_surfaces, __pyx_n_s_pieces, __pyx_n_s_M0, __pyx_n_s_M1, __pyx_n_s_ans); if (unlikely(!__pyx_tuple__456)) __PYX_ERR(1, 1736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__456);
  __Pyx_GIVEREF(__pyx_tuple__456);
  __pyx_codeobj__457 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__456, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_split, 1736, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__457)) __PYX_ERR(1, 1736, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1801
 *         return ans
 * 
 *     def _identify(self, extends_to_link=False):             # <<<<<<<<<<<<<<
 *         ans = []
 *         for table in database.__all_tables__.values():
 */
  __pyx_tuple__458 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_extends_to_link, __pyx_n_s_ans, __pyx_n_s_table, __pyx_n_s_match); if (unlikely(!__pyx_tuple__458)) __PYX_ERR(1, 1801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__458);
  __Pyx_GIVEREF(__pyx_tuple__458);
  __pyx_codeobj__459 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__458, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_identify_2, 1801, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__459)) __PYX_ERR(1, 1801, __pyx_L1_error)

  /* "cython/core/manifold.pyx":1809
 *         return ans
 * 
 *     def _cusp_cross_section_info(self):             # <<<<<<<<<<<<<<
 *         cdef c_Tetrahedron *tet
 *         allocate_cross_sections(self.c_triangulation)
 */
  __pyx_tuple__460 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_tet, __pyx_n_s_tilts, __pyx_n_s_side_lengths, __pyx_n_s_one_tet_tilts, __pyx_n_s_one_tet_lengths, __pyx_n_s_v, __pyx_n_s_one_vertex_lengths, __pyx_n_s_f); if (unlikely(!__pyx_tuple__460)) __PYX_ERR(1, 1809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__460);
  __Pyx_GIVEREF(__pyx_tuple__460);
  __pyx_codeobj__461 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__460, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_manifold_pyx, __pyx_n_s_cusp_cross_section_info, 1809, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__461)) __PYX_ERR(1, 1809, __pyx_L1_error)

  /* "cython/core/abelian_group.pyx":80
 *         return self.divisors[i]
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Used by the pickle module to pickle an Abelian Group.
 */
  __pyx_codeobj__462 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_abelian_group_pyx, __pyx_n_s_reduce, 80, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__462)) __PYX_ERR(4, 80, __pyx_L1_error)

  /* "cython/core/abelian_group.pyx":111
 *         return self
 * 
 *     def elementary_divisors(self):             # <<<<<<<<<<<<<<
 *         """
 *         The elementary divisors of this finitely generated abelian group.
 */
  __pyx_codeobj__463 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_abelian_group_pyx, __pyx_n_s_elementary_divisors, 111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__463)) __PYX_ERR(4, 111, __pyx_L1_error)

  /* "cython/core/abelian_group.pyx":117
 *         return self.divisors
 * 
 *     def rank(self):             # <<<<<<<<<<<<<<
 *         """
 *         The rank of the group.
 */
  __pyx_codeobj__464 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_abelian_group_pyx, __pyx_n_s_rank, 117, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__464)) __PYX_ERR(4, 117, __pyx_L1_error)

  /* "cython/core/abelian_group.pyx":123
 *         return len(self.divisors)
 * 
 *     def betti_number(self):             # <<<<<<<<<<<<<<
 *         """
 *         The rank of the maximal free abelian subgroup.
 */
  __pyx_tuple__465 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_n); if (unlikely(!__pyx_tuple__465)) __PYX_ERR(4, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__465);
  __Pyx_GIVEREF(__pyx_tuple__465);
  __pyx_codeobj__466 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__465, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_abelian_group_pyx, __pyx_n_s_betti_number, 123, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__466)) __PYX_ERR(4, 123, __pyx_L1_error)

  /* "cython/core/abelian_group.pyx":129
 *         return len([1 for n in self.divisors if n == 0])
 * 
 *     def order(self):             # <<<<<<<<<<<<<<
 *         """
 *         The order of the group.  Returns the string 'infinite' if the
 */
  __pyx_tuple__467 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_det, __pyx_n_s_c); if (unlikely(!__pyx_tuple__467)) __PYX_ERR(4, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__467);
  __Pyx_GIVEREF(__pyx_tuple__467);
  __pyx_codeobj__468 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__467, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_abelian_group_pyx, __pyx_n_s_order, 129, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__468)) __PYX_ERR(4, 129, __pyx_L1_error)

  /* "cython/core/abelian_group.pyx":157
 *         self.dead_columns = set()
 * 
 *     def get_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a triple (number of rows, number of columns, entries)
 */
  __pyx_codeobj__469 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_abelian_group_pyx, __pyx_n_s_get_data, 157, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__469)) __PYX_ERR(4, 157, __pyx_L1_error)

  /* "cython/core/abelian_group.pyx":211
 *         return repr(self.explode())
 * 
 *     def add_rows(self, n):             # <<<<<<<<<<<<<<
 *         self.rows += n
 * 
 */
  __pyx_codeobj__470 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__465, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_abelian_group_pyx, __pyx_n_s_add_rows, 211, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__470)) __PYX_ERR(4, 211, __pyx_L1_error)

  /* "cython/core/abelian_group.pyx":214
 *         self.rows += n
 * 
 *     def row_op(self, i, j, m):             # <<<<<<<<<<<<<<
 *         """
 *         Subtract m * row_i from row_j
 */
  __pyx_tuple__471 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_m, __pyx_n_s_k); if (unlikely(!__pyx_tuple__471)) __PYX_ERR(4, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__471);
  __Pyx_GIVEREF(__pyx_tuple__471);
  __pyx_codeobj__472 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__471, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_abelian_group_pyx, __pyx_n_s_row_op, 214, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__472)) __PYX_ERR(4, 214, __pyx_L1_error)

  /* "cython/core/abelian_group.pyx":221
 *             self[j,k] -= m*self[i,k]
 * 
 *     def explode(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the full matrix, including dead columns, as a list of lists.
 */
  __pyx_tuple__473 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__473)) __PYX_ERR(4, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__473);
  __Pyx_GIVEREF(__pyx_tuple__473);
  __pyx_codeobj__474 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__473, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_abelian_group_pyx, __pyx_n_s_explode, 221, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__474)) __PYX_ERR(4, 221, __pyx_L1_error)

  /* "cython/core/abelian_group.pyx":228
 *                 for i in range(self.rows)]
 * 
 *     def simplify(self):             # <<<<<<<<<<<<<<
 *         """
 *         If any entry is a unit, eliminate the corresponding generator.
 */
  __pyx_tuple__475 = PyTuple_Pack(14, __pyx_n_s_self, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_l, __pyx_n_s_col_support, __pyx_n_s_row_entries, __pyx_n_s_unit, __pyx_n_s_m, __pyx_n_s_a_il, __pyx_n_s_kl, __pyx_n_s_temp, __pyx_n_s_k, __pyx_n_s_l); if (unlikely(!__pyx_tuple__475)) __PYX_ERR(4, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__475);
  __Pyx_GIVEREF(__pyx_tuple__475);
  __pyx_codeobj__476 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__475, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_abelian_group_pyx, __pyx_n_s_simplify, 228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__476)) __PYX_ERR(4, 228, __pyx_L1_error)

  /* "cython/core/abelian_group.pyx":252
 *             self.dead_columns.add(j)
 * 
 *     def simplified_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the simplified presentation as a matrix.
 */
  __pyx_tuple__477 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_columns, __pyx_n_s_rows, __pyx_n_s_presentation, __pyx_n_s_j, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__477)) __PYX_ERR(4, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__477);
  __Pyx_GIVEREF(__pyx_tuple__477);
  __pyx_codeobj__478 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__477, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_abelian_group_pyx, __pyx_n_s_simplified_matrix, 252, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__478)) __PYX_ERR(4, 252, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_tuple__479 = 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__479)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__479);
  __Pyx_GIVEREF(__pyx_tuple__479);
  __pyx_codeobj__480 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__479, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__480)) __PYX_ERR(7, 1, __pyx_L1_error)

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_PresentationMatrix, (type(self), 0x59cf8a3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_PresentationMatrix__set_state(self, __pyx_state)
 */
  __pyx_tuple__481 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__481)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__481);
  __Pyx_GIVEREF(__pyx_tuple__481);
  __pyx_codeobj__482 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__481, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__482)) __PYX_ERR(7, 16, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":9
 * 
 * 
 * def inverse_list_word(word):             # <<<<<<<<<<<<<<
 *     return [ -x for x in word[::-1] ]
 * 
 */
  __pyx_tuple__483 = PyTuple_Pack(2, __pyx_n_s_word, __pyx_n_s_x); if (unlikely(!__pyx_tuple__483)) __PYX_ERR(8, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__483);
  __Pyx_GIVEREF(__pyx_tuple__483);
  __pyx_codeobj__484 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__483, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_inverse_list_word, 9, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__484)) __PYX_ERR(8, 9, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":13
 * 
 * 
 * def reduce_list_word(word):             # <<<<<<<<<<<<<<
 *     """
 *     Cancels inverse generators.
 */
  __pyx_tuple__485 = PyTuple_Pack(3, __pyx_n_s_word, __pyx_n_s_result, __pyx_n_s_letter); if (unlikely(!__pyx_tuple__485)) __PYX_ERR(8, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__485);
  __Pyx_GIVEREF(__pyx_tuple__485);
  __pyx_codeobj__486 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__485, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_reduce_list_word, 13, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__486)) __PYX_ERR(8, 13, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":59
 * 
 * 
 * def _letter_seperator(verbose_form):             # <<<<<<<<<<<<<<
 *     return '*' if verbose_form else ''
 * 
 */
  __pyx_tuple__487 = PyTuple_Pack(1, __pyx_n_s_verbose_form); if (unlikely(!__pyx_tuple__487)) __PYX_ERR(8, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__487);
  __Pyx_GIVEREF(__pyx_tuple__487);
  __pyx_codeobj__488 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__487, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_letter_seperator, 59, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__488)) __PYX_ERR(8, 59, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":73
 * 
 * 
 * def word_as_list(word, int num_generators):             # <<<<<<<<<<<<<<
 *     if not isinstance(word, str):
 *         raise TypeError('Words must be represented as Python strings.')
 */
  __pyx_tuple__489 = PyTuple_Pack(7, __pyx_n_s_word, __pyx_n_s_num_generators, __pyx_n_s_word_list, __pyx_n_s_prefix, __pyx_n_s_number, __pyx_n_s_g, __pyx_n_s_letter); if (unlikely(!__pyx_tuple__489)) __PYX_ERR(8, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__489);
  __Pyx_GIVEREF(__pyx_tuple__489);
  __pyx_codeobj__490 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__489, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_word_as_list, 73, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__490)) __PYX_ERR(8, 73, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":98
 *     return word_list
 * 
 * def list_as_word(int_list, int num_generators, verbose_form):             # <<<<<<<<<<<<<<
 *     return _letter_seperator(verbose_form).join(
 *         int_to_gen_string(g, num_generators, verbose_form)
 */
  __pyx_tuple__491 = PyTuple_Pack(5, __pyx_n_s_int_list, __pyx_n_s_num_generators, __pyx_n_s_verbose_form, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__491)) __PYX_ERR(8, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__491);
  __Pyx_GIVEREF(__pyx_tuple__491);
  __pyx_codeobj__492 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__491, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_list_as_word, 98, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__492)) __PYX_ERR(8, 98, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":134
 *             '\n   '.join(self.relators()))
 * 
 *     def num_generators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of generators for the presentation.
 */
  __pyx_codeobj__493 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_num_generators, 134, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__493)) __PYX_ERR(8, 134, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":140
 *         return fg_get_num_generators(self.c_group_presentation)
 * 
 *     def num_relators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of generators for the presentation.
 */
  __pyx_codeobj__494 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_num_relators, 140, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__494)) __PYX_ERR(8, 140, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":146
 *         return fg_get_num_relations(self.c_group_presentation)
 * 
 *     def num_original_generators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of geometric generators (before simplification).
 */
  __pyx_codeobj__495 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_num_original_generators, 146, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__495)) __PYX_ERR(8, 146, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":152
 *         return fg_get_num_orig_gens(self.c_group_presentation)
 * 
 *     def original_generators(self, verbose_form=False, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return the original geometric generators (before
 */
  __pyx_tuple__496 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_verbose_form, __pyx_n_s_as_int_list, __pyx_n_s_n, __pyx_n_s_gen, __pyx_n_s_num_gen, __pyx_n_s_num_orig_gens, __pyx_n_s_orig_gens, __pyx_n_s_word); if (unlikely(!__pyx_tuple__496)) __PYX_ERR(8, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__496);
  __Pyx_GIVEREF(__pyx_tuple__496);
  __pyx_codeobj__497 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__496, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_original_generators, 152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__497)) __PYX_ERR(8, 152, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":177
 *         return orig_gens
 * 
 *     def generators_in_originals(self, verbose_form=False, raw_form=False, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return the current generators in terms of the original
 */
  __pyx_tuple__498 = PyTuple_Pack(16, __pyx_n_s_self, __pyx_n_s_verbose_form, __pyx_n_s_raw_form, __pyx_n_s_as_int_list, __pyx_n_s_moves, __pyx_n_s_n, __pyx_n_s_words, __pyx_n_s_a_2, __pyx_n_s_word, __pyx_n_s_parts, __pyx_n_s_b_2, __pyx_n_s_A, __pyx_n_s_B, __pyx_n_s_i, __pyx_n_s_g, __pyx_n_s_word); if (unlikely(!__pyx_tuple__498)) __PYX_ERR(8, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__498);
  __Pyx_GIVEREF(__pyx_tuple__498);
  __pyx_codeobj__499 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__498, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_generators_in_originals, 177, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__499)) __PYX_ERR(8, 177, __pyx_L1_error)
  __pyx_tuple__500 = PyTuple_Pack(3, Py_False, Py_False, Py_False); if (unlikely(!__pyx_tuple__500)) __PYX_ERR(8, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__500);
  __Pyx_GIVEREF(__pyx_tuple__500);

  /* "cython/core/fundamental_group.pyx":232
 *             return [ list_as_word(word, n, verbose_form) for word in words[1:]]
 * 
 *     def _word_moves(self):             # <<<<<<<<<<<<<<
 *         cdef int *c_moves
 *         c_moves = fg_get_word_moves(self.c_group_presentation)
 */
  __pyx_tuple__501 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_c_moves, __pyx_n_s_moves); if (unlikely(!__pyx_tuple__501)) __PYX_ERR(8, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__501);
  __Pyx_GIVEREF(__pyx_tuple__501);
  __pyx_codeobj__502 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__501, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_word_moves, 232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__502)) __PYX_ERR(8, 232, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":239
 *         return moves
 * 
 *     def generators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the letters representing the generators in the presentation.
 */
  __pyx_tuple__503 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_n, __pyx_n_s_i); if (unlikely(!__pyx_tuple__503)) __PYX_ERR(8, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__503);
  __Pyx_GIVEREF(__pyx_tuple__503);
  __pyx_codeobj__504 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__503, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_generators, 239, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__504)) __PYX_ERR(8, 239, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":283
 *                  for i in range(1, 1+n) ]
 * 
 *     def relators(self, verbose_form = False, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of words representing the relators in the presentation.
 */
  __pyx_tuple__505 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_verbose_form, __pyx_n_s_as_int_list, __pyx_n_s_n, __pyx_n_s_relation, __pyx_n_s_num_gens, __pyx_n_s_relation_list, __pyx_n_s_num_relations, __pyx_n_s_word); if (unlikely(!__pyx_tuple__505)) __PYX_ERR(8, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__505);
  __Pyx_GIVEREF(__pyx_tuple__505);
  __pyx_codeobj__506 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__505, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_relators, 283, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__506)) __PYX_ERR(8, 283, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":306
 *         return relation_list
 * 
 *     def meridian(self, int which_cusp=0, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a word representing a conjugate of the current
 */
  __pyx_tuple__507 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_which_cusp, __pyx_n_s_as_int_list); if (unlikely(!__pyx_tuple__507)) __PYX_ERR(8, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__507);
  __Pyx_GIVEREF(__pyx_tuple__507);
  __pyx_codeobj__508 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__507, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_meridian, 306, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__508)) __PYX_ERR(8, 306, __pyx_L1_error)
  __pyx_tuple__509 = PyTuple_Pack(2, __pyx_int_0, Py_False); if (unlikely(!__pyx_tuple__509)) __PYX_ERR(8, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__509);
  __Pyx_GIVEREF(__pyx_tuple__509);

  /* "cython/core/fundamental_group.pyx":331
 *                verbose_form = False)
 * 
 *     def longitude(self, int which_cusp=0, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a word representing a conjugate of the current
 */
  __pyx_codeobj__510 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__507, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_longitude, 331, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__510)) __PYX_ERR(8, 331, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":357
 *                verbose_form = False)
 * 
 *     def peripheral_curves(self, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of meridian-longitude pairs for all cusps.
 */
  __pyx_tuple__511 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_as_int_list, __pyx_n_s_n); if (unlikely(!__pyx_tuple__511)) __PYX_ERR(8, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__511);
  __Pyx_GIVEREF(__pyx_tuple__511);
  __pyx_codeobj__512 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__511, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_peripheral_curves, 357, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__512)) __PYX_ERR(8, 357, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":369
 *                  for n in range(self.num_cusps) ]
 * 
 *     def magma_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a string which will define this group within MAGMA.
 */
  __pyx_codeobj__513 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_magma_string, 369, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__513)) __PYX_ERR(8, 369, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":376
 *                 ', '.join(self.relators(verbose_form=True)) + '>')
 * 
 *     def gap_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a string which will define this group within GAP:
 */
  __pyx_tuple__514 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_gens, __pyx_n_s_gen_names, __pyx_n_s_relators, __pyx_n_s_assignments, __pyx_n_s_x, __pyx_n_s_i, __pyx_n_s_x); if (unlikely(!__pyx_tuple__514)) __PYX_ERR(8, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__514);
  __Pyx_GIVEREF(__pyx_tuple__514);
  __pyx_codeobj__515 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__514, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_gap_string, 376, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__515)) __PYX_ERR(8, 376, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":404
 *                 )
 * 
 *     def _gap_init_(self):             # <<<<<<<<<<<<<<
 *         return self.gap_string()
 * 
 */
  __pyx_codeobj__516 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_gap_init, 404, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__516)) __PYX_ERR(8, 404, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":407
 *         return self.gap_string()
 * 
 *     def _magma_init_(self, magma):             # <<<<<<<<<<<<<<
 *         return self.magma_string()
 * 
 */
  __pyx_tuple__517 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_magma); if (unlikely(!__pyx_tuple__517)) __PYX_ERR(8, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__517);
  __Pyx_GIVEREF(__pyx_tuple__517);
  __pyx_codeobj__518 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__517, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_magma_init, 407, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__518)) __PYX_ERR(8, 407, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":410
 *         return self.magma_string()
 * 
 *     def sage(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the corresponding Sage FinitelyPresentedGroup
 */
  __pyx_tuple__519 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_F, __pyx_n_s_rels, __pyx_n_s_R); if (unlikely(!__pyx_tuple__519)) __PYX_ERR(8, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__519);
  __Pyx_GIVEREF(__pyx_tuple__519);
  __pyx_codeobj__520 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__519, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_sage, 410, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__520)) __PYX_ERR(8, 410, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":420
 *         return F/rels
 * 
 *     def character_variety_vars_and_polys(self, as_ideal=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of variables and a list polynomials where the
 */
  __pyx_tuple__521 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_as_ideal, __pyx_n_s_presentation, __pyx_n_s_ans); if (unlikely(!__pyx_tuple__521)) __PYX_ERR(8, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__521);
  __Pyx_GIVEREF(__pyx_tuple__521);
  __pyx_codeobj__522 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__521, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_character_variety_vars_and_polys, 420, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__522)) __PYX_ERR(8, 420, __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__523 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__523)) __PYX_ERR(7, 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__524 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__481, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__524)) __PYX_ERR(7, 3, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":485
 * # Holonomy Groups
 * cdef class CHolonomyGroup(CFundamentalGroup):
 *     def _matrices(self, word):             # <<<<<<<<<<<<<<
 *         """
 *         Returns (M,O,L) where M = SL2C(word), O = O31(word), and L is
 */
  __pyx_tuple__525 = PyTuple_Pack(16, __pyx_n_s_self, __pyx_n_s_word, __pyx_n_s_M, __pyx_n_s_O, __pyx_n_s_c_word, __pyx_n_s_result, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_word_list, __pyx_n_s_sl2, __pyx_n_s_o31, __pyx_n_s_L, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__525)) __PYX_ERR(8, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__525);
  __Pyx_GIVEREF(__pyx_tuple__525);
  __pyx_codeobj__526 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__525, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_matrices, 485, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__526)) __PYX_ERR(8, 485, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":510
 *             return None
 * 
 *     def SL2C(self, word):             # <<<<<<<<<<<<<<
 *         """
 *         Return the image of the element represented by the input word
 */
  __pyx_tuple__527 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_word); if (unlikely(!__pyx_tuple__527)) __PYX_ERR(8, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__527);
  __Pyx_GIVEREF(__pyx_tuple__527);
  __pyx_codeobj__528 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__527, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_SL2C, 510, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__528)) __PYX_ERR(8, 510, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":519
 *         return self._matrices(word)[0]
 * 
 *     def O31(self, word):             # <<<<<<<<<<<<<<
 *         """
 *         Return the image of the element represented by the input word
 */
  __pyx_codeobj__529 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__527, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_O31, 519, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__529)) __PYX_ERR(8, 519, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":527
 *         return self._matrices(word)[1]
 * 
 *     def complex_length(self, word):             # <<<<<<<<<<<<<<
 *         """
 *         Return the complex length of the isometry represented by the
 */
  __pyx_codeobj__530 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__527, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_complex_length, 527, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__530)) __PYX_ERR(8, 527, __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__531 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__531)) __PYX_ERR(7, 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__532 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__481, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__532)) __PYX_ERR(7, 3, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":589
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _number_(n):
 *         return number.number_to_native_number(n)
 */
  __pyx_codeobj__533 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__376, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_fundamental_group_py, __pyx_n_s_number_2, 589, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__533)) __PYX_ERR(8, 589, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":30
 *         self.c_symmetry_group = c_symmetry_group
 * 
 *     def is_full_group(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the full symmetry group has been found.
 */
  __pyx_codeobj__534 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_n_s_is_full_group, 30, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__534)) __PYX_ERR(9, 30, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":62
 *         return thePretext + theText
 * 
 *     def order(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the order of the symmetry group
 */
  __pyx_codeobj__535 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_n_s_order, 62, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__535)) __PYX_ERR(9, 62, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":72
 *         return symmetry_group_order(self.c_symmetry_group)
 * 
 *     def is_abelian(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the symmetry group is abelian.
 */
  __pyx_tuple__536 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_abelian_description); if (unlikely(!__pyx_tuple__536)) __PYX_ERR(9, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__536);
  __Pyx_GIVEREF(__pyx_tuple__536);
  __pyx_codeobj__537 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__536, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_n_s_is_abelian, 72, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__537)) __PYX_ERR(9, 72, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":84
 *             self.c_symmetry_group, &abelian_description))
 * 
 *     def abelian_description(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the symmetry group is abelian, return it as an AbelianGroup
 */
  __pyx_tuple__538 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_A, __pyx_n_s_n, __pyx_n_s_is_abelian, __pyx_n_s_coeffs); if (unlikely(!__pyx_tuple__538)) __PYX_ERR(9, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__538);
  __Pyx_GIVEREF(__pyx_tuple__538);
  __pyx_codeobj__539 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__538, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_n_s_abelian_description, 84, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__539)) __PYX_ERR(9, 84, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":105
 *         return AbelianGroup(elementary_divisors=coeffs)
 * 
 *     def is_dihedral(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the symmetry group is dihedral.
 */
  __pyx_codeobj__540 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_n_s_is_dihedral, 105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__540)) __PYX_ERR(9, 105, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":115
 *         return B2B(symmetry_group_is_dihedral(self.c_symmetry_group))
 * 
 *     def is_polyhedral(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns whether the symmetry group is a (possibly binary)
 */
  __pyx_codeobj__541 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_n_s_is_polyhedral, 115, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__541)) __PYX_ERR(9, 115, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":123
 *                                                 NULL, NULL, NULL, NULL))
 * 
 *     def polyhedral_description(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the symmetry group is a (possibly binary)
 */
  __pyx_tuple__542 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_is_binary_group, __pyx_n_s_p, __pyx_n_s_q, __pyx_n_s_r, __pyx_n_s_name); if (unlikely(!__pyx_tuple__542)) __PYX_ERR(9, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__542);
  __Pyx_GIVEREF(__pyx_tuple__542);
  __pyx_codeobj__543 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__542, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_n_s_polyhedral_description, 123, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__543)) __PYX_ERR(9, 123, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":150
 *         return name
 * 
 *     def is_S5(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns whether the group is the symmetric group on five things.
 */
  __pyx_codeobj__544 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_n_s_is_S5, 150, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__544)) __PYX_ERR(9, 150, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":156
 *         return B2B(symmetry_group_is_S5(self.c_symmetry_group))
 * 
 *     def is_direct_product(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the SymmetryGroup is a nontrivial direct
 */
  __pyx_codeobj__545 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_n_s_is_direct_product, 156, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__545)) __PYX_ERR(9, 156, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":169
 *         return B2B(symmetry_group_is_direct_product(self.c_symmetry_group))
 * 
 *     def direct_product_description(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the SymmetryGroup is a nontrivial direct product with at
 */
  __pyx_tuple__546 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_c_factor_0, __pyx_n_s_c_factor_1, __pyx_n_s_factor_0, __pyx_n_s_factor_1); if (unlikely(!__pyx_tuple__546)) __PYX_ERR(9, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__546);
  __Pyx_GIVEREF(__pyx_tuple__546);
  __pyx_codeobj__547 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__546, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_n_s_direct_product_description, 169, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__547)) __PYX_ERR(9, 169, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":197
 *         return (factor_0, factor_1)
 * 
 *     def is_amphicheiral(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the manifold has an orientation reversing symmetry.
 */
  __pyx_codeobj__548 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_n_s_is_amphicheiral, 197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__548)) __PYX_ERR(9, 197, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":207
 *         return B2B(symmetry_group_is_amphicheiral(self.c_symmetry_group))
 * 
 *     def is_invertible_knot(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether a one-cusped has a symmetry that acts on the
 */
  __pyx_codeobj__549 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_n_s_is_invertible_knot, 207, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__549)) __PYX_ERR(9, 207, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":218
 *         return B2B(symmetry_group_invertible_knot(self.c_symmetry_group))
 * 
 *     def commutator_subgroup(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the commutator subgroup of the SymmetryGroup
 */
  __pyx_tuple__550 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_c_comm_subgroup, __pyx_n_s_comm_subgroup); if (unlikely(!__pyx_tuple__550)) __PYX_ERR(9, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__550);
  __Pyx_GIVEREF(__pyx_tuple__550);
  __pyx_codeobj__551 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__550, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_n_s_commutator_subgroup, 218, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__551)) __PYX_ERR(9, 218, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":236
 *         return comm_subgroup
 * 
 *     def abelianization(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the abelianization of the symmetry group
 */
  __pyx_tuple__552 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_c_abelianization, __pyx_n_s_abelianization); if (unlikely(!__pyx_tuple__552)) __PYX_ERR(9, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__552);
  __Pyx_GIVEREF(__pyx_tuple__552);
  __pyx_codeobj__553 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__552, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_n_s_abelianization, 236, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__553)) __PYX_ERR(9, 236, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":256
 *         return abelianization.abelian_description()
 * 
 *     def center(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the center of the symmetry group
 */
  __pyx_tuple__554 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_c_center, __pyx_n_s_center); if (unlikely(!__pyx_tuple__554)) __PYX_ERR(9, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__554);
  __Pyx_GIVEREF(__pyx_tuple__554);
  __pyx_codeobj__555 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__554, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_n_s_center, 256, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__555)) __PYX_ERR(9, 256, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":276
 *         return center.abelian_description()
 * 
 *     def multiply_elements(self, i, j):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the product of group elements i and j.  The convention
 */
  __pyx_tuple__556 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_order, __pyx_n_s_x); if (unlikely(!__pyx_tuple__556)) __PYX_ERR(9, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__556);
  __Pyx_GIVEREF(__pyx_tuple__556);
  __pyx_codeobj__557 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__556, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_n_s_multiply_elements, 276, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__557)) __PYX_ERR(9, 276, __pyx_L1_error)

  /* "cython/core/symmetry_group.pyx":295
 *         return symmetry_group_product(self.c_symmetry_group, i, j)
 * 
 *     def isometries(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a detailed list of all the isometries in the symmetry group.
 */
  __pyx_tuple__558 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_isometries, __pyx_n_s_ans); if (unlikely(!__pyx_tuple__558)) __PYX_ERR(9, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__558);
  __Pyx_GIVEREF(__pyx_tuple__558);
  __pyx_codeobj__559 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__558, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_symmetry_group_pyx, __pyx_n_s_isometries, 295, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__559)) __PYX_ERR(9, 295, __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__560 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__560)) __PYX_ERR(7, 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__561 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__481, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__561)) __PYX_ERR(7, 3, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":102
 *     cdef int c_num_generators
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _number_(n):
 *         return number.number_to_native_number(n)
 */
  __pyx_codeobj__562 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__376, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_number_2, 102, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__562)) __PYX_ERR(10, 102, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":184
 *             )
 * 
 *     def num_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of vertices.
 */
  __pyx_codeobj__563 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_num_vertices, 184, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__563)) __PYX_ERR(10, 184, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":190
 *         return self.c_dirichlet_domain.num_vertices
 * 
 *     def num_finite_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of finite (non-ideal) vertices.
 */
  __pyx_codeobj__564 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_num_finite_vertices, 190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__564)) __PYX_ERR(10, 190, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":196
 *         return self.c_dirichlet_domain.num_finite_vertices
 * 
 *     def num_ideal_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of ideal vertices.
 */
  __pyx_codeobj__565 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_num_ideal_vertices, 196, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__565)) __PYX_ERR(10, 196, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":202
 *         return self.c_dirichlet_domain.num_ideal_vertices
 * 
 *     def num_edges(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of edges.
 */
  __pyx_codeobj__566 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_num_edges, 202, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__566)) __PYX_ERR(10, 202, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":208
 *         return self.c_dirichlet_domain.num_edges
 * 
 *     def num_faces(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of faces.
 */
  __pyx_codeobj__567 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_num_faces, 208, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__567)) __PYX_ERR(10, 208, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":214
 *         return self.c_dirichlet_domain.num_faces
 * 
 *     def in_radius(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the radius of the largest inscribed sphere.
 */
  __pyx_tuple__568 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_radius); if (unlikely(!__pyx_tuple__568)) __PYX_ERR(10, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__568);
  __Pyx_GIVEREF(__pyx_tuple__568);
  __pyx_codeobj__569 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__568, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_in_radius, 214, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__569)) __PYX_ERR(10, 214, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":221
 *         return self._number_(radius)
 * 
 *     def out_radius(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the radius of the smallest circubscribed sphere.
 */
  __pyx_codeobj__570 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__568, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_out_radius, 221, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__570)) __PYX_ERR(10, 221, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":228
 *         return self._number_(radius)
 * 
 *     def spine_radius(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the infimum of the radii (measured from the origin) of all
 */
  __pyx_codeobj__571 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__568, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_spine_radius, 228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__571)) __PYX_ERR(10, 228, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":236
 *         return self._number_(radius)
 * 
 *     def length_spectrum_dicts(self, cutoff_length=1.0,             # <<<<<<<<<<<<<<
 *                               full_rigor=True,
 *                               multiplicities=True,
 */
  __pyx_tuple__572 = PyTuple_Pack(16, __pyx_n_s_self, __pyx_n_s_cutoff_length, __pyx_n_s_full_rigor, __pyx_n_s_multiplicities, __pyx_n_s_user_radius, __pyx_n_s_grouped, __pyx_n_s_num_lengths, __pyx_n_s_geodesics, __pyx_n_s_c_word, __pyx_n_s_spectrum, __pyx_n_s_n, __pyx_n_s_length, __pyx_n_s_its_matrix, __pyx_n_s_d_4, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__572)) __PYX_ERR(10, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__572);
  __Pyx_GIVEREF(__pyx_tuple__572);
  __pyx_codeobj__573 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__572, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_length_spectrum_dicts, 236, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__573)) __PYX_ERR(10, 236, __pyx_L1_error)
  __pyx_tuple__574 = PyTuple_Pack(5, __pyx_float_1_0, Py_True, Py_True, __pyx_float_0_0, Py_True); if (unlikely(!__pyx_tuple__574)) __PYX_ERR(10, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__574);
  __Pyx_GIVEREF(__pyx_tuple__574);

  /* "cython/core/dirichlet.pyx":303
 *         return LengthSpectrum(spectrum)
 * 
 *     def vertex_list(self, details = False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of the coordinates of the vertices.  These are
 */
  __pyx_tuple__575 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_details); if (unlikely(!__pyx_tuple__575)) __PYX_ERR(10, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__575);
  __Pyx_GIVEREF(__pyx_tuple__575);
  __pyx_codeobj__576 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__575, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_vertex_list_2, 303, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__576)) __PYX_ERR(10, 303, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":323
 *             return self._vertex_list()
 * 
 *     def _vertex_list(self):             # <<<<<<<<<<<<<<
 *         cdef WEVertex *vertex = &self.c_dirichlet_domain.vertex_list_begin
 *         vertices = []
 */
  __pyx_tuple__577 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_vertex, __pyx_n_s_vertices); if (unlikely(!__pyx_tuple__577)) __PYX_ERR(10, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__577);
  __Pyx_GIVEREF(__pyx_tuple__577);
  __pyx_codeobj__578 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__577, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_vertex_list, 323, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__578)) __PYX_ERR(10, 323, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":335
 *         return vertices
 * 
 *     def _vertex_data_list(self):             # <<<<<<<<<<<<<<
 *         cdef WEVertex *vertex = &self.c_dirichlet_domain.vertex_list_begin
 *         vertices = []
 */
  __pyx_codeobj__579 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__577, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_vertex_data_list, 335, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__579)) __PYX_ERR(10, 335, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":350
 *         return vertices
 * 
 *     def _vertex_to_index_dict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns dictionary from WEVertex pointer to index of vertex.
 */
  __pyx_tuple__580 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_vertex, __pyx_n_s_result, __pyx_n_s_index); if (unlikely(!__pyx_tuple__580)) __PYX_ERR(10, 350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__580);
  __Pyx_GIVEREF(__pyx_tuple__580);
  __pyx_codeobj__581 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__580, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_vertex_to_index_dict, 350, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__581)) __PYX_ERR(10, 350, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":365
 *         return result
 * 
 *     def _edge_to_index_dict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns dictionary from WEEdge pointer to index of edge.
 */
  __pyx_tuple__582 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_edge, __pyx_n_s_result, __pyx_n_s_index); if (unlikely(!__pyx_tuple__582)) __PYX_ERR(10, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__582);
  __Pyx_GIVEREF(__pyx_tuple__582);
  __pyx_codeobj__583 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__582, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_edge_to_index_dict, 365, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__583)) __PYX_ERR(10, 365, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":380
 *         return result
 * 
 *     def face_list(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of faces, each represented as a dictionary with
 */
  __pyx_tuple__584 = PyTuple_Pack(24, __pyx_n_s_self, __pyx_n_s_face, __pyx_n_s_edge, __pyx_n_s_neighbor, __pyx_n_s_vertex, __pyx_n_s_vertex_to_index, __pyx_n_s_edge_to_index, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_tail, __pyx_n_s_tip, __pyx_n_s_faces, __pyx_n_s_vertices, __pyx_n_s_vertex_indices, __pyx_n_s_vertex_image_indices, __pyx_n_s_edge_indices, __pyx_n_s_edge_image_indices, __pyx_n_s_edge_orientations, __pyx_n_s_side, __pyx_n_s_end, __pyx_n_s_neighbor_end, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_i); if (unlikely(!__pyx_tuple__584)) __PYX_ERR(10, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__584);
  __Pyx_GIVEREF(__pyx_tuple__584);
  __pyx_codeobj__585 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 24, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__584, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_face_list, 380, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__585)) __PYX_ERR(10, 380, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":474
 *         return faces
 * 
 *     def edge_list(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of edges, each represented as a dictionar with keys
 */
  __pyx_tuple__586 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_edge, __pyx_n_s_edges, __pyx_n_s_vertex_to_index); if (unlikely(!__pyx_tuple__586)) __PYX_ERR(10, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__586);
  __Pyx_GIVEREF(__pyx_tuple__586);
  __pyx_codeobj__587 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__586, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_edge_list, 474, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__587)) __PYX_ERR(10, 474, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":502
 *         return edges
 * 
 *     def view(self):             # <<<<<<<<<<<<<<
 *         if PolyhedronViewer:
 *             return ViewerWindow(PolyhedronViewer, facedicts=self.face_list(),
 */
  __pyx_codeobj__588 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_view, 502, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__588)) __PYX_ERR(10, 502, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":509
 *                            'was not imported.')
 * 
 *     def manifold(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Manifold computed directly from the Dirichlet
 */
  __pyx_codeobj__589 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_manifold, 509, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__589)) __PYX_ERR(10, 509, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":524
 *         return self.triangulate(_manifold_class)
 * 
 *     def triangulation(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Triangulation computed directly from the Dirichlet
 */
  __pyx_codeobj__590 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_triangulation, 524, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__590)) __PYX_ERR(10, 524, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":552
 *         return M
 * 
 *     def volume(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the approximate volume of the DirichletDomain.
 */
  __pyx_tuple__591 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_volume); if (unlikely(!__pyx_tuple__591)) __PYX_ERR(10, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__591);
  __Pyx_GIVEREF(__pyx_tuple__591);
  __pyx_codeobj__592 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__591, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_volume, 552, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__592)) __PYX_ERR(10, 552, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":564
 *         return self._number_(volume)
 * 
 *     def pairing_matrices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of the O31Matrices which pair the faces of
 */
  __pyx_tuple__593 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_M, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_face, __pyx_n_s_matrices_2, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__593)) __PYX_ERR(10, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__593);
  __Pyx_GIVEREF(__pyx_tuple__593);
  __pyx_codeobj__594 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__593, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_pairing_matrices, 564, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__594)) __PYX_ERR(10, 564, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":593
 *         return matrices
 * 
 *     def pairing_words(self):             # <<<<<<<<<<<<<<
 *         """
 *         Group elements which pair the faces of this DirichletDomain
 */
  __pyx_tuple__595 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_face, __pyx_n_s_c_word, __pyx_n_s_words); if (unlikely(!__pyx_tuple__595)) __PYX_ERR(10, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__595);
  __Pyx_GIVEREF(__pyx_tuple__595);
  __pyx_codeobj__596 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__595, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_pairing_words, 593, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__596)) __PYX_ERR(10, 593, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":631
 *         return words
 * 
 *     def _to_string(self):             # <<<<<<<<<<<<<<
 *         matrices = self.pairing_matrices()
 *         result = '%% Generators\n%s\n' % len(matrices)
 */
  __pyx_tuple__597 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_matrices_2, __pyx_n_s_result, __pyx_n_s_matrix, __pyx_n_s_row, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__597)) __PYX_ERR(10, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__597);
  __Pyx_GIVEREF(__pyx_tuple__597);
  __pyx_codeobj__598 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__597, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_to_string, 631, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__598)) __PYX_ERR(10, 631, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":640
 *         return result
 * 
 *     def __reduce_ex__(self, protocol):             # <<<<<<<<<<<<<<
 *         return (_unpickle_dirichlet_domain, (self._to_string(), self.manifold_name))
 * 
 */
  __pyx_tuple__599 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_protocol); if (unlikely(!__pyx_tuple__599)) __PYX_ERR(10, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__599);
  __Pyx_GIVEREF(__pyx_tuple__599);
  __pyx_codeobj__600 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__599, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_reduce_ex, 640, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__600)) __PYX_ERR(10, 640, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":643
 *         return (_unpickle_dirichlet_domain, (self._to_string(), self.manifold_name))
 * 
 *     def save(self, filename):             # <<<<<<<<<<<<<<
 *         """
 *         Save the Dirichlet domain as a text file in "% Generators" format.
 */
  __pyx_tuple__601 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_output); if (unlikely(!__pyx_tuple__601)) __PYX_ERR(10, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__601);
  __Pyx_GIVEREF(__pyx_tuple__601);
  __pyx_codeobj__602 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__601, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_save, 643, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__602)) __PYX_ERR(10, 643, __pyx_L1_error)

  /* "cython/core/dirichlet.pyx":666
 *             output.write(self._to_string().encode('ascii'))
 * 
 *     def export_stl(self, filename, model='klein', cutout=False, num_subdivisions=3,             # <<<<<<<<<<<<<<
 *                    shrink_factor=0.9, cutoff_radius=0.9, callback=None):
 *         """
 */
  __pyx_tuple__603 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_model, __pyx_n_s_cutout, __pyx_n_s_num_subdivisions, __pyx_n_s_shrink_factor, __pyx_n_s_cutoff_radius, __pyx_n_s_callback, __pyx_n_s_output, __pyx_n_s_output_file, __pyx_n_s_line); if (unlikely(!__pyx_tuple__603)) __PYX_ERR(10, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__603);
  __Pyx_GIVEREF(__pyx_tuple__603);
  __pyx_codeobj__604 = (PyObject*)__Pyx_PyCode_New(8, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__603, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_export_stl, 666, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__604)) __PYX_ERR(10, 666, __pyx_L1_error)
  __pyx_tuple__605 = PyTuple_Pack(6, __pyx_n_s_klein, Py_False, __pyx_int_3, __pyx_float_0_9, __pyx_float_0_9, Py_None); if (unlikely(!__pyx_tuple__605)) __PYX_ERR(10, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__605);
  __Pyx_GIVEREF(__pyx_tuple__605);

  /* "cython/core/dirichlet.pyx":741
 * 
 * 
 * def _unpickle_dirichlet_domain(string, name):             # <<<<<<<<<<<<<<
 *     return DirichletDomain(generator_bytes=string.encode('ascii'), manifold_name=name)
 */
  __pyx_tuple__606 = PyTuple_Pack(2, __pyx_n_s_string, __pyx_n_s_name); if (unlikely(!__pyx_tuple__606)) __PYX_ERR(10, 741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__606);
  __Pyx_GIVEREF(__pyx_tuple__606);
  __pyx_codeobj__607 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__606, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_dirichlet_pyx, __pyx_n_s_unpickle_dirichlet_domain, 741, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__607)) __PYX_ERR(10, 741, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":9
 *     cdef original_indices
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _number_(n):
 *         return number.number_to_native_number(n)
 */
  __pyx_codeobj__608 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__376, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_number_2, 9, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__608)) __PYX_ERR(11, 9, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":39
 *             N, N != 1 and 's' or '')
 * 
 *     def manifold(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a Manifold built from the current canonical triangulation.
 */
  __pyx_tuple__609 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_c_triangulation, __pyx_n_s_M); if (unlikely(!__pyx_tuple__609)) __PYX_ERR(11, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__609);
  __Pyx_GIVEREF(__pyx_tuple__609);
  __pyx_codeobj__610 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__609, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_manifold, 39, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__610)) __PYX_ERR(11, 39, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":53
 *         return M
 * 
 *     def original_index(self, which_cusp):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the index by which the Manifold identifies this cusp.
 */
  __pyx_tuple__611 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_which_cusp); if (unlikely(!__pyx_tuple__611)) __PYX_ERR(11, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__611);
  __Pyx_GIVEREF(__pyx_tuple__611);
  __pyx_codeobj__612 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__611, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_original_index, 53, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__612)) __PYX_ERR(11, 53, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":59
 *         return self.original_indices[which_cusp]
 * 
 *     def check_index(self, which_cusp):             # <<<<<<<<<<<<<<
 *         """
 *         Raises an IndexError if the cusp index is invalid.
 */
  __pyx_tuple__613 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_which_cusp, __pyx_n_s_N); if (unlikely(!__pyx_tuple__613)) __PYX_ERR(11, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__613);
  __Pyx_GIVEREF(__pyx_tuple__613);
  __pyx_codeobj__614 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__613, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_check_index, 59, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__614)) __PYX_ERR(11, 59, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":70
 *                              'exist.' % which_cusp)
 * 
 *     def num_cusps(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of cusps.
 */
  __pyx_codeobj__615 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_num_cusps, 70, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__615)) __PYX_ERR(11, 70, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":76
 *         return self._num_cusps
 * 
 *     def topology(self, which_cusp = 0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the topological type of the specified cusp.
 */
  __pyx_tuple__616 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_which_cusp, __pyx_n_s_N, __pyx_n_s_topology); if (unlikely(!__pyx_tuple__616)) __PYX_ERR(11, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__616);
  __Pyx_GIVEREF(__pyx_tuple__616);
  __pyx_codeobj__617 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__616, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_topology, 76, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__617)) __PYX_ERR(11, 76, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":84
 *         return CuspTopology[topology]
 * 
 *     def get_displacement(self, which_cusp = 0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the displacement of the horospherical boundary of the
 */
  __pyx_tuple__618 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_which_cusp, __pyx_n_s_N, __pyx_n_s_disp); if (unlikely(!__pyx_tuple__618)) __PYX_ERR(11, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__618);
  __Pyx_GIVEREF(__pyx_tuple__618);
  __pyx_codeobj__619 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__618, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_get_displacement, 84, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__619)) __PYX_ERR(11, 84, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":99
 *         return self._number_(disp)
 * 
 *     def set_displacement(self, new_displacement, which_cusp=0):             # <<<<<<<<<<<<<<
 *         """
 *         Set the displacement of the specified cusp.
 */
  __pyx_tuple__620 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_new_displacement, __pyx_n_s_which_cusp, __pyx_n_s_N); if (unlikely(!__pyx_tuple__620)) __PYX_ERR(11, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__620);
  __Pyx_GIVEREF(__pyx_tuple__620);
  __pyx_codeobj__621 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__620, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_set_displacement, 99, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__621)) __PYX_ERR(11, 99, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":107
 *                                            N, Object2Real(new_displacement))
 * 
 *     def stopping_displacement(self, which_cusp=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the displacement at which the specified cusp
 */
  __pyx_codeobj__622 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__618, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_stopping_displacement, 107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__622)) __PYX_ERR(11, 107, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":118
 *         return self._number_(disp)
 * 
 *     def stopper(self, which_cusp):             # <<<<<<<<<<<<<<
 *         """
 *         Return the index of the cusp which will be the first one that
 */
  __pyx_codeobj__623 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__613, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_stopper, 118, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__623)) __PYX_ERR(11, 118, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":128
 *             self.c_cusp_neighborhood, N)
 * 
 *     def reach(self, which_cusp=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the displacement at which the specified cusp
 */
  __pyx_tuple__624 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_which_cusp, __pyx_n_s_N, __pyx_n_s_reach); if (unlikely(!__pyx_tuple__624)) __PYX_ERR(11, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__624);
  __Pyx_GIVEREF(__pyx_tuple__624);
  __pyx_codeobj__625 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__624, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_reach, 128, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__625)) __PYX_ERR(11, 128, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":139
 *         return self._number_(reach)
 * 
 *     def max_reach(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the maximum reach over all cusps.
 */
  __pyx_tuple__626 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_reach); if (unlikely(!__pyx_tuple__626)) __PYX_ERR(11, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__626);
  __Pyx_GIVEREF(__pyx_tuple__626);
  __pyx_codeobj__627 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__626, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_max_reach, 139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__627)) __PYX_ERR(11, 139, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":147
 *         return self._number_(reach)
 * 
 *     def get_tie(self, which_cusp):             # <<<<<<<<<<<<<<
 *         """
 *         Return True if the specified cusp is a member of the tied group.
 */
  __pyx_codeobj__628 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__613, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_get_tie, 147, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__628)) __PYX_ERR(11, 147, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":155
 *         return get_cusp_neighborhood_tie(self.c_cusp_neighborhood, N)
 * 
 *     def set_tie(self, which_cusp, new_tie):             # <<<<<<<<<<<<<<
 *         """
 *         Mark the specified cusp as a member of the tied group.
 */
  __pyx_tuple__629 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_which_cusp, __pyx_n_s_new_tie, __pyx_n_s_N); if (unlikely(!__pyx_tuple__629)) __PYX_ERR(11, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__629);
  __Pyx_GIVEREF(__pyx_tuple__629);
  __pyx_codeobj__630 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__629, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_set_tie, 155, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__630)) __PYX_ERR(11, 155, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":162
 *         set_cusp_neighborhood_tie(self.c_cusp_neighborhood, N, new_tie)
 * 
 *     def volume(self, which_cusp=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the volume of the horoball neighborhood of the specified
 */
  __pyx_tuple__631 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_which_cusp, __pyx_n_s_N, __pyx_n_s_volume); if (unlikely(!__pyx_tuple__631)) __PYX_ERR(11, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__631);
  __Pyx_GIVEREF(__pyx_tuple__631);
  __pyx_codeobj__632 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__631, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_volume, 162, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__632)) __PYX_ERR(11, 162, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":172
 *         return self._number_(volume)
 * 
 *     def translations(self, which_cusp = 0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the (complex) Euclidean translations of the meridian
 */
  __pyx_tuple__633 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_which_cusp, __pyx_n_s_meridian, __pyx_n_s_longitude, __pyx_n_s_N, __pyx_n_s_M, __pyx_n_s_L); if (unlikely(!__pyx_tuple__633)) __PYX_ERR(11, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__633);
  __Pyx_GIVEREF(__pyx_tuple__633);
  __pyx_codeobj__634 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__633, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_translations, 172, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__634)) __PYX_ERR(11, 172, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":190
 *         return self._number_(M), self._number_(L)
 * 
 *     def horoballs(self, cutoff=0.1, which_cusp=0, full_list=True,             # <<<<<<<<<<<<<<
 *                   high_precision=False):
 *         """
 */
  __pyx_tuple__635 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_cutoff, __pyx_n_s_which_cusp, __pyx_n_s_full_list, __pyx_n_s_high_precision, __pyx_n_s_horoball_list, __pyx_n_s_ball, __pyx_n_s_result, __pyx_n_s_n, __pyx_n_s_dict_3); if (unlikely(!__pyx_tuple__635)) __PYX_ERR(11, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__635);
  __Pyx_GIVEREF(__pyx_tuple__635);
  __pyx_codeobj__636 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__635, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_horoballs, 190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__636)) __PYX_ERR(11, 190, __pyx_L1_error)
  __pyx_tuple__637 = PyTuple_Pack(4, __pyx_float_0_1, __pyx_int_0, Py_True, Py_False); if (unlikely(!__pyx_tuple__637)) __PYX_ERR(11, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__637);
  __Pyx_GIVEREF(__pyx_tuple__637);

  /* "cython/core/cusp_neighborhoods.pyx":225
 *         return result
 * 
 *     def Ford_domain(self, which_cusp=0, high_precision=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of pairs of complex numbers describing the
 */
  __pyx_tuple__638 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_which_cusp, __pyx_n_s_high_precision, __pyx_n_s_segment_list, __pyx_n_s_segment, __pyx_n_s_result, __pyx_n_s_n, __pyx_n_s_pair); if (unlikely(!__pyx_tuple__638)) __PYX_ERR(11, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__638);
  __Pyx_GIVEREF(__pyx_tuple__638);
  __pyx_codeobj__639 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__638, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_Ford_domain, 225, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__639)) __PYX_ERR(11, 225, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":257
 *         return result
 * 
 *     def triangulation(self, which_cusp=0, high_precision=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of dictionaries describing the endpoints of the
 */
  __pyx_tuple__640 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_which_cusp, __pyx_n_s_high_precision, __pyx_n_s_segment_list, __pyx_n_s_segment, __pyx_n_s_result, __pyx_n_s_n, __pyx_n_s_endpoints, __pyx_n_s_indices); if (unlikely(!__pyx_tuple__640)) __PYX_ERR(11, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__640);
  __Pyx_GIVEREF(__pyx_tuple__640);
  __pyx_codeobj__641 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__640, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_triangulation, 257, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__641)) __PYX_ERR(11, 257, __pyx_L1_error)

  /* "cython/core/cusp_neighborhoods.pyx":289
 *         return result
 * 
 *     def view(self, which_cusp=0, cutoff=None):             # <<<<<<<<<<<<<<
 *         """
 *         Create a 3D picture of the horoball packing.  One can specify
 */
  __pyx_tuple__642 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_which_cusp, __pyx_n_s_cutoff); if (unlikely(!__pyx_tuple__642)) __PYX_ERR(11, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__642);
  __Pyx_GIVEREF(__pyx_tuple__642);
  __pyx_codeobj__643 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__642, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_cusp_neighborhoods_p, __pyx_n_s_view, 289, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__643)) __PYX_ERR(11, 289, __pyx_L1_error)
  __pyx_tuple__644 = PyTuple_Pack(2, __pyx_int_0, Py_None); if (unlikely(!__pyx_tuple__644)) __PYX_ERR(11, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__644);
  __Pyx_GIVEREF(__pyx_tuple__644);

  /* "(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__645 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__645)) __PYX_ERR(7, 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__646 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__481, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__646)) __PYX_ERR(7, 3, __pyx_L1_error)

  /* "cython/core/tail.pyx":3
 * # get_triangulation
 * 
 * split_filling_info = re.compile(r'(.*?)((?:\([0-9 .+-]+,[0-9 .+-]+\))*$)')             # <<<<<<<<<<<<<<
 * is_torus_bundle = re.compile('b([+-no])([+-])([lLrR]+)$')
 * is_link_complement1_pat = r'(?P<crossings>[0-9]+)[\^](?P<components>[0-9]+)[_](?P<index>[0-9]+)$'
 */
  __pyx_tuple__647 = PyTuple_Pack(1, __pyx_kp_s_0_9_0_9); if (unlikely(!__pyx_tuple__647)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__647);
  __Pyx_GIVEREF(__pyx_tuple__647);

  /* "cython/core/tail.pyx":4
 * 
 * split_filling_info = re.compile(r'(.*?)((?:\([0-9 .+-]+,[0-9 .+-]+\))*$)')
 * is_torus_bundle = re.compile('b([+-no])([+-])([lLrR]+)$')             # <<<<<<<<<<<<<<
 * is_link_complement1_pat = r'(?P<crossings>[0-9]+)[\^](?P<components>[0-9]+)[_](?P<index>[0-9]+)$'
 * is_link_complement2_pat = r'(?P<crossings>[0-9]+)[_](?P<index>[0-9]+)[\^](?P<components>[0-9]+)$'
 */
  __pyx_tuple__648 = PyTuple_Pack(1, __pyx_kp_s_b_no_lLrR); if (unlikely(!__pyx_tuple__648)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__648);
  __Pyx_GIVEREF(__pyx_tuple__648);

  /* "cython/core/tail.pyx":12
 * is_link_complement3 = re.compile(is_link_complement3_pat)
 * rolfsen_link_regexs = [is_link_complement1, is_link_complement2, is_link_complement3]
 * is_HT_knot = re.compile('(?P<crossings>[0-9]+)(?P<alternation>[an])(?P<index>[0-9]+)$')             # <<<<<<<<<<<<<<
 * is_braid_complement = re.compile(r'[Bb]raid[:]?(\[[0-9, \-]+\])$')
 * is_int_DT_exterior = re.compile(r'DT[:]? *(\[[0-9, \-\(\)]+\](?: *, *\[[01, ]+\])?)$')
 */
  __pyx_tuple__649 = PyTuple_Pack(1, __pyx_kp_s_P_crossings_0_9_P_alternation_a); if (unlikely(!__pyx_tuple__649)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__649);
  __Pyx_GIVEREF(__pyx_tuple__649);

  /* "cython/core/tail.pyx":13
 * rolfsen_link_regexs = [is_link_complement1, is_link_complement2, is_link_complement3]
 * is_HT_knot = re.compile('(?P<crossings>[0-9]+)(?P<alternation>[an])(?P<index>[0-9]+)$')
 * is_braid_complement = re.compile(r'[Bb]raid[:]?(\[[0-9, \-]+\])$')             # <<<<<<<<<<<<<<
 * is_int_DT_exterior = re.compile(r'DT[:]? *(\[[0-9, \-\(\)]+\](?: *, *\[[01, ]+\])?)$')
 * is_alpha_DT_exterior = re.compile(r'DT[:\[] *([a-zA-Z]+(?:\.[01]+)?)[\]]?$')
 */
  __pyx_tuple__650 = PyTuple_Pack(1, __pyx_kp_s_Bb_raid_0_9); if (unlikely(!__pyx_tuple__650)) __PYX_ERR(2, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__650);
  __Pyx_GIVEREF(__pyx_tuple__650);

  /* "cython/core/tail.pyx":14
 * is_HT_knot = re.compile('(?P<crossings>[0-9]+)(?P<alternation>[an])(?P<index>[0-9]+)$')
 * is_braid_complement = re.compile(r'[Bb]raid[:]?(\[[0-9, \-]+\])$')
 * is_int_DT_exterior = re.compile(r'DT[:]? *(\[[0-9, \-\(\)]+\](?: *, *\[[01, ]+\])?)$')             # <<<<<<<<<<<<<<
 * is_alpha_DT_exterior = re.compile(r'DT[:\[] *([a-zA-Z]+(?:\.[01]+)?)[\]]?$')
 * twister_word = r'\[*([abcABC_\d!*]*|[abcABC_\d!,]*)\]*'
 */
  __pyx_tuple__651 = PyTuple_Pack(1, __pyx_kp_s_DT_0_9_01); if (unlikely(!__pyx_tuple__651)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__651);
  __Pyx_GIVEREF(__pyx_tuple__651);

  /* "cython/core/tail.pyx":15
 * is_braid_complement = re.compile(r'[Bb]raid[:]?(\[[0-9, \-]+\])$')
 * is_int_DT_exterior = re.compile(r'DT[:]? *(\[[0-9, \-\(\)]+\](?: *, *\[[01, ]+\])?)$')
 * is_alpha_DT_exterior = re.compile(r'DT[:\[] *([a-zA-Z]+(?:\.[01]+)?)[\]]?$')             # <<<<<<<<<<<<<<
 * twister_word = r'\[*([abcABC_\d!*]*|[abcABC_\d!,]*)\]*'
 * is_twister_bundle = re.compile(r'Bundle\(S_\{(\d+),(\d+)\},'+twister_word+r'\)')
 */
  __pyx_tuple__652 = PyTuple_Pack(1, __pyx_kp_s_DT_a_zA_Z_01); if (unlikely(!__pyx_tuple__652)) __PYX_ERR(2, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__652);
  __Pyx_GIVEREF(__pyx_tuple__652);

  /* "cython/core/tail.pyx":19
 * is_twister_bundle = re.compile(r'Bundle\(S_\{(\d+),(\d+)\},'+twister_word+r'\)')
 * is_twister_splitting = re.compile(r'Splitting\(S_\{(\d+),(\d+)\},'+twister_word+','+twister_word+r'\)')
 * is_isosig = re.compile(r'([a-zA-Z0-9\+\-]+)$')             # <<<<<<<<<<<<<<
 * is_decorated_isosig = decorated_isosig.isosig_pattern
 * 
 */
  __pyx_tuple__654 = PyTuple_Pack(1, __pyx_kp_s_a_zA_Z0_9); if (unlikely(!__pyx_tuple__654)) __PYX_ERR(2, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__654);
  __Pyx_GIVEREF(__pyx_tuple__654);

  /* "cython/core/tail.pyx":29
 * 
 * 
 * def bundle_from_string(desc):             # <<<<<<<<<<<<<<
 *     desc = desc.replace(' ', '')
 *     m = is_twister_bundle.match(desc)
 */
  __pyx_tuple__655 = PyTuple_Pack(6, __pyx_n_s_desc, __pyx_n_s_m, __pyx_n_s_g, __pyx_n_s_n, __pyx_n_s_monodromy, __pyx_n_s_surface); if (unlikely(!__pyx_tuple__655)) __PYX_ERR(2, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__655);
  __Pyx_GIVEREF(__pyx_tuple__655);
  __pyx_codeobj__656 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__655, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_bundle_from_string, 29, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__656)) __PYX_ERR(2, 29, __pyx_L1_error)

  /* "cython/core/tail.pyx":40
 * 
 * 
 * def splitting_from_string(desc):             # <<<<<<<<<<<<<<
 *     desc = desc.replace(' ', '')
 *     m = is_twister_splitting.match(desc)
 */
  __pyx_tuple__657 = PyTuple_Pack(7, __pyx_n_s_desc, __pyx_n_s_m, __pyx_n_s_g, __pyx_n_s_n, __pyx_n_s_gluing, __pyx_n_s_handles, __pyx_n_s_surface); if (unlikely(!__pyx_tuple__657)) __PYX_ERR(2, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__657);
  __Pyx_GIVEREF(__pyx_tuple__657);
  __pyx_codeobj__658 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__657, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_splitting_from_string, 40, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__658)) __PYX_ERR(2, 40, __pyx_L1_error)

  /* "cython/core/tail.pyx":53
 * 
 * # Orientability.orientable = 0
 * rev_spec_dict = {(5, 0) : 'm',             # <<<<<<<<<<<<<<
 *                  (5, 1) : 'm',
 *                  (6, 0) : 's',
 */
  __pyx_tuple__659 = PyTuple_Pack(2, __pyx_int_5, __pyx_int_0); if (unlikely(!__pyx_tuple__659)) __PYX_ERR(2, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__659);
  __Pyx_GIVEREF(__pyx_tuple__659);

  /* "cython/core/tail.pyx":54
 * # Orientability.orientable = 0
 * rev_spec_dict = {(5, 0) : 'm',
 *                  (5, 1) : 'm',             # <<<<<<<<<<<<<<
 *                  (6, 0) : 's',
 *                  (7, 0) : 'v',
 */
  __pyx_tuple__660 = PyTuple_Pack(2, __pyx_int_5, __pyx_int_1); if (unlikely(!__pyx_tuple__660)) __PYX_ERR(2, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__660);
  __Pyx_GIVEREF(__pyx_tuple__660);

  /* "cython/core/tail.pyx":55
 * rev_spec_dict = {(5, 0) : 'm',
 *                  (5, 1) : 'm',
 *                  (6, 0) : 's',             # <<<<<<<<<<<<<<
 *                  (7, 0) : 'v',
 *                  (6, 1) : 'x',
 */
  __pyx_tuple__661 = PyTuple_Pack(2, __pyx_int_6, __pyx_int_0); if (unlikely(!__pyx_tuple__661)) __PYX_ERR(2, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__661);
  __Pyx_GIVEREF(__pyx_tuple__661);

  /* "cython/core/tail.pyx":56
 *                  (5, 1) : 'm',
 *                  (6, 0) : 's',
 *                  (7, 0) : 'v',             # <<<<<<<<<<<<<<
 *                  (6, 1) : 'x',
 *                  (7, 1) : 'y'}
 */
  __pyx_tuple__662 = PyTuple_Pack(2, __pyx_int_7, __pyx_int_0); if (unlikely(!__pyx_tuple__662)) __PYX_ERR(2, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__662);
  __Pyx_GIVEREF(__pyx_tuple__662);

  /* "cython/core/tail.pyx":57
 *                  (6, 0) : 's',
 *                  (7, 0) : 'v',
 *                  (6, 1) : 'x',             # <<<<<<<<<<<<<<
 *                  (7, 1) : 'y'}
 * 
 */
  __pyx_tuple__663 = PyTuple_Pack(2, __pyx_int_6, __pyx_int_1); if (unlikely(!__pyx_tuple__663)) __PYX_ERR(2, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__663);
  __Pyx_GIVEREF(__pyx_tuple__663);

  /* "cython/core/tail.pyx":58
 *                  (7, 0) : 'v',
 *                  (6, 1) : 'x',
 *                  (7, 1) : 'y'}             # <<<<<<<<<<<<<<
 * 
 * triangulation_help = """
 */
  __pyx_tuple__664 = PyTuple_Pack(2, __pyx_int_7, __pyx_int_1); if (unlikely(!__pyx_tuple__664)) __PYX_ERR(2, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__664);
  __Pyx_GIVEREF(__pyx_tuple__664);

  /* "cython/core/tail.pyx":117
 * 
 * # Testing code for get_triangulation
 * def get_triangulation_tester():             # <<<<<<<<<<<<<<
 *     """
 *     >>> get_triangulation_tester() # doctest: +NUMERIC6
 */
  __pyx_tuple__665 = PyTuple_Pack(4, __pyx_n_s_M, __pyx_n_s_specs, __pyx_n_s_spec, __pyx_n_s_vol); if (unlikely(!__pyx_tuple__665)) __PYX_ERR(2, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__665);
  __Pyx_GIVEREF(__pyx_tuple__665);
  __pyx_codeobj__666 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__665, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_get_triangulation_tester, 117, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__666)) __PYX_ERR(2, 117, __pyx_L1_error)

  /* "cython/core/tail.pyx":227
 * 
 * 
 * def extract_HT_knot(record, crossings, alternation):             # <<<<<<<<<<<<<<
 *     DT = []
 *     size = (1+crossings)//2
 */
  __pyx_tuple__667 = PyTuple_Pack(11, __pyx_n_s_record, __pyx_n_s_crossings, __pyx_n_s_alternation, __pyx_n_s_DT_3, __pyx_n_s_size, __pyx_n_s_byte, __pyx_n_s_first_nybble, __pyx_n_s_second_nybble, __pyx_n_s_signs, __pyx_n_s_mask, __pyx_n_s_i); if (unlikely(!__pyx_tuple__667)) __PYX_ERR(2, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__667);
  __Pyx_GIVEREF(__pyx_tuple__667);
  __pyx_codeobj__668 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__667, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_extract_HT_knot, 227, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__668)) __PYX_ERR(2, 227, __pyx_L1_error)

  /* "cython/core/tail.pyx":248
 * 
 * 
 * def get_HT_knot_DT(crossings, alternation, index):             # <<<<<<<<<<<<<<
 *     size = (1 + crossings) // 2
 *     index -= 1
 */
  __pyx_tuple__669 = PyTuple_Pack(8, __pyx_n_s_crossings, __pyx_n_s_alternation, __pyx_n_s_index, __pyx_n_s_size, __pyx_n_s_offset, __pyx_n_s_data, __pyx_n_s_record, __pyx_n_s_DT_3); if (unlikely(!__pyx_tuple__669)) __PYX_ERR(2, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__669);
  __Pyx_GIVEREF(__pyx_tuple__669);
  __pyx_codeobj__670 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__669, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_get_HT_knot_DT, 248, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__670)) __PYX_ERR(2, 248, __pyx_L1_error)

  /* "cython/core/tail.pyx":274
 * 
 * 
 * def get_HT_knot_by_index(alternation, index, manifold_class):             # <<<<<<<<<<<<<<
 *     crossings = 16
 *     if alternation == 'a':
 */
  __pyx_tuple__671 = PyTuple_Pack(7, __pyx_n_s_alternation, __pyx_n_s_index, __pyx_n_s_manifold_class_2, __pyx_n_s_crossings, __pyx_n_s_i, __pyx_n_s_index_within_crossings, __pyx_n_s_name); if (unlikely(!__pyx_tuple__671)) __PYX_ERR(2, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__671);
  __Pyx_GIVEREF(__pyx_tuple__671);
  __pyx_codeobj__672 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__671, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_get_HT_knot_by_index, 274, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__672)) __PYX_ERR(2, 274, __pyx_L1_error)

  /* "cython/core/tail.pyx":301
 *     length = 0
 * 
 *     def __init__(self, indices=(0, 0, 0)):             # <<<<<<<<<<<<<<
 *         myslice = slice(*indices)
 *         self.start, self.stop, self.step = myslice.indices(self.length)
 */
  __pyx_tuple__673 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_indices, __pyx_n_s_myslice); if (unlikely(!__pyx_tuple__673)) __PYX_ERR(2, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__673);
  __Pyx_GIVEREF(__pyx_tuple__673);
  __pyx_codeobj__674 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__673, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_init, 301, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__674)) __PYX_ERR(2, 301, __pyx_L1_error)
  __pyx_tuple__675 = PyTuple_Pack(1, ((PyObject*)__pyx_tuple__154)); if (unlikely(!__pyx_tuple__675)) __PYX_ERR(2, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__675);
  __Pyx_GIVEREF(__pyx_tuple__675);

  /* "cython/core/tail.pyx":306
 *         self.index = self.start
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_codeobj__676 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_iter, 306, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__676)) __PYX_ERR(2, 306, __pyx_L1_error)

  /* "cython/core/tail.pyx":309
 *         return self
 * 
 *     def __contains__(self, item):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("This census does not support manifold lookup")
 * 
 */
  __pyx_tuple__677 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_item); if (unlikely(!__pyx_tuple__677)) __PYX_ERR(2, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__677);
  __Pyx_GIVEREF(__pyx_tuple__677);
  __pyx_codeobj__678 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__677, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_contains, 309, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__678)) __PYX_ERR(2, 309, __pyx_L1_error)

  /* "cython/core/tail.pyx":312
 *         raise NotImplementedError("This census does not support manifold lookup")
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         if self.index >= self.stop:
 *             raise StopIteration
 */
  __pyx_codeobj__679 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_next, 312, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__679)) __PYX_ERR(2, 312, __pyx_L1_error)

  /* "cython/core/tail.pyx":320
 *     __next__ = next
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.length
 * 
 */
  __pyx_codeobj__680 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_len_2, 320, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__680)) __PYX_ERR(2, 320, __pyx_L1_error)

  /* "cython/core/tail.pyx":324
 * 
 *     # subclasses override this
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_codeobj__681 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__465, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_getitem, 324, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__681)) __PYX_ERR(2, 324, __pyx_L1_error)

  /* "cython/core/tail.pyx":330
 * #  Cusped Census
 * 
 * Orientable_lengths = (301, 962, 3552, 12846, 301+962+3552+12846)             # <<<<<<<<<<<<<<
 * Nonorientable_lengths = (114, 259, 887, 114+259+887)
 * 
 */
  __pyx_tuple__682 = PyTuple_Pack(5, __pyx_int_301, __pyx_int_962, __pyx_int_3552, __pyx_int_12846, __pyx_int_17661); if (unlikely(!__pyx_tuple__682)) __PYX_ERR(2, 330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__682);
  __Pyx_GIVEREF(__pyx_tuple__682);

  /* "cython/core/tail.pyx":331
 * 
 * Orientable_lengths = (301, 962, 3552, 12846, 301+962+3552+12846)
 * Nonorientable_lengths = (114, 259, 887, 114+259+887)             # <<<<<<<<<<<<<<
 * 
 * five_tet_orientable = (
 */
  __pyx_tuple__683 = PyTuple_Pack(4, __pyx_int_114, __pyx_int_259, __pyx_int_887, __pyx_int_1260); if (unlikely(!__pyx_tuple__683)) __PYX_ERR(2, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__683);
  __Pyx_GIVEREF(__pyx_tuple__683);

  /* "cython/core/tail.pyx":334
 * 
 * five_tet_orientable = (
 *    3, 4, 6, 7, 9, 10, 11, 15, 16, 17, 19, 22, 23, 26, 27, 29, 30, 32, 33,             # <<<<<<<<<<<<<<
 *    34, 35, 36, 37, 38, 39, 40, 43, 44, 45, 46, 47, 49, 52, 53, 54, 55, 58,
 *    59, 60, 61, 62, 64, 66, 67, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80,
 */
  __pyx_tuple__684 = PyTuple_Pack(301, __pyx_int_3, __pyx_int_4, __pyx_int_6, __pyx_int_7, __pyx_int_9, __pyx_int_10, __pyx_int_11, __pyx_int_15, __pyx_int_16, __pyx_int_17, __pyx_int_19, __pyx_int_22, __pyx_int_23, __pyx_int_26, __pyx_int_27, __pyx_int_29, __pyx_int_30, __pyx_int_32, __pyx_int_33, __pyx_int_34, __pyx_int_35, __pyx_int_36, __pyx_int_37, __pyx_int_38, __pyx_int_39, __pyx_int_40, __pyx_int_43, __pyx_int_44, __pyx_int_45, __pyx_int_46, __pyx_int_47, __pyx_int_49, __pyx_int_52, __pyx_int_53, __pyx_int_54, __pyx_int_55, __pyx_int_58, __pyx_int_59, __pyx_int_60, __pyx_int_61, __pyx_int_62, __pyx_int_64, __pyx_int_66, __pyx_int_67, __pyx_int_69, __pyx_int_70, __pyx_int_71, __pyx_int_72, __pyx_int_73, __pyx_int_74, __pyx_int_76, __pyx_int_77, __pyx_int_78, __pyx_int_79, __pyx_int_80, __pyx_int_81, __pyx_int_82, __pyx_int_83, __pyx_int_84, __pyx_int_85, __pyx_int_87, __pyx_int_89, __pyx_int_90, __pyx_int_93, __pyx_int_94, __pyx_int_95, __pyx_int_96, __pyx_int_98, __pyx_int_99, __pyx_int_100, __pyx_int_102, __pyx_int_103, __pyx_int_104, __pyx_int_105, __pyx_int_106, __pyx_int_108, __pyx_int_110, __pyx_int_111, __pyx_int_112, __pyx_int_113, __pyx_int_115, __pyx_int_116, __pyx_int_117, __pyx_int_118, __pyx_int_119, __pyx_int_120, __pyx_int_121, __pyx_int_122, __pyx_int_123, __pyx_int_125, __pyx_int_129, __pyx_int_130, __pyx_int_135, __pyx_int_136, __pyx_int_137, __pyx_int_139, __pyx_int_140, __pyx_int_141, __pyx_int_142, __pyx_int_143, __pyx_int_144, __pyx_int_145, __pyx_int_146, __pyx_int_147, __pyx_int_148, __pyx_int_149, __pyx_int_150, __pyx_int_151, __pyx_int_154, __pyx_int_155, __pyx_int_157, __pyx_int_159, __pyx_int_160, __pyx_int_161, __pyx_int_162, __pyx_int_163, __pyx_int_164, __pyx_int_165, __pyx_int_166, __pyx_int_167, __pyx_int_168, __pyx_int_169, __pyx_int_170, __pyx_int_171, __pyx_int_172, __pyx_int_173, __pyx_int_175, __pyx_int_178, __pyx_int_179, __pyx_int_180, __pyx_int_181, __pyx_int_182, __pyx_int_183, __pyx_int_184, __pyx_int_185, __pyx_int_186, __pyx_int_188, __pyx_int_189, __pyx_int_190, __pyx_int_191, __pyx_int_192, __pyx_int_193, __pyx_int_194, __pyx_int_195, __pyx_int_196, __pyx_int_197, __pyx_int_198, __pyx_int_199, __pyx_int_200, __pyx_int_201, __pyx_int_202, __pyx_int_203, __pyx_int_206, __pyx_int_207, __pyx_int_208, __pyx_int_209, __pyx_int_210, __pyx_int_211, __pyx_int_212, __pyx_int_213, __pyx_int_214, __pyx_int_215, __pyx_int_216, __pyx_int_217, __pyx_int_218, __pyx_int_219, __pyx_int_220, __pyx_int_221, __pyx_int_222, __pyx_int_223, __pyx_int_224, __pyx_int_225, __pyx_int_227, __pyx_int_228, __pyx_int_229, __pyx_int_230, __pyx_int_231, __pyx_int_232, __pyx_int_233, __pyx_int_234, __pyx_int_235, __pyx_int_236, __pyx_int_238, __pyx_int_239, __pyx_int_240, __pyx_int_241, __pyx_int_242, __pyx_int_243, __pyx_int_244, __pyx_int_246, __pyx_int_247, __pyx_int_248, __pyx_int_249, __pyx_int_250, __pyx_int_251, __pyx_int_252, __pyx_int_253, __pyx_int_255, __pyx_int_256, __pyx_int_257, __pyx_int_258, __pyx_int_259, __pyx_int_260, __pyx_int_261, __pyx_int_262, __pyx_int_263, __pyx_int_266, __pyx_int_267, __pyx_int_269, __pyx_int_270, __pyx_int_271, __pyx_int_272, __pyx_int_273, __pyx_int_275, __pyx_int_276, __pyx_int_277, __pyx_int_278, __pyx_int_279, __pyx_int_280, __pyx_int_281, __pyx_int_282, __pyx_int_284, __pyx_int_285, __pyx_int_286, __pyx_int_287, __pyx_int_288, __pyx_int_289, __pyx_int_290, __pyx_int_291, __pyx_int_292, __pyx_int_293, __pyx_int_294, __pyx_int_295, __pyx_int_296, __pyx_int_297, __pyx_int_299, __pyx_int_300, __pyx_int_302, __pyx_int_303, __pyx_int_304, __pyx_int_305, __pyx_int_306, __pyx_int_307, __pyx_int_310, __pyx_int_312, __pyx_int_316, __pyx_int_318, __pyx_int_319, __pyx_int_320, __pyx_int_322, __pyx_int_326, __pyx_int_328, __pyx_int_329, __pyx_int_335, __pyx_int_336, __pyx_int_337, __pyx_int_338, __pyx_int_339, __pyx_int_340, __pyx_int_342, __pyx_int_343, __pyx_int_345, __pyx_int_346, __pyx_int_349, __pyx_int_350, __pyx_int_351, __pyx_int_352, __pyx_int_356, __pyx_int_357, __pyx_int_358, __pyx_int_359, __pyx_int_360, __pyx_int_361, __pyx_int_363, __pyx_int_364, __pyx_int_366, __pyx_int_367, __pyx_int_368, __pyx_int_369, __pyx_int_370, __pyx_int_371, __pyx_int_372, __pyx_int_373, __pyx_int_374, __pyx_int_376, __pyx_int_378, __pyx_int_385, __pyx_int_388, __pyx_int_389, __pyx_int_390, __pyx_int_391, __pyx_int_392, __pyx_int_393, __pyx_int_395, __pyx_int_397, __pyx_int_400, __pyx_int_401, __pyx_int_402, __pyx_int_403, __pyx_int_410, __pyx_int_412); if (unlikely(!__pyx_tuple__684)) __PYX_ERR(2, 334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__684);
  __Pyx_GIVEREF(__pyx_tuple__684);

  /* "cython/core/tail.pyx":357
 * 
 * five_tet_nonorientable = (
 *    0, 1, 2, 5, 8, 12, 13, 14, 18, 20, 21, 24, 25, 28, 31, 41, 42, 48, 50,             # <<<<<<<<<<<<<<
 *    51, 56, 57, 63, 65, 68, 75, 86, 88, 91, 92, 97, 101, 107, 109, 114, 124,
 *    126, 127, 128, 131, 132, 133, 134, 138, 152, 153, 156, 158, 174, 176,
 */
  __pyx_tuple__685 = PyTuple_Pack(114, __pyx_int_0, __pyx_int_1, __pyx_int_2, __pyx_int_5, __pyx_int_8, __pyx_int_12, __pyx_int_13, __pyx_int_14, __pyx_int_18, __pyx_int_20, __pyx_int_21, __pyx_int_24, __pyx_int_25, __pyx_int_28, __pyx_int_31, __pyx_int_41, __pyx_int_42, __pyx_int_48, __pyx_int_50, __pyx_int_51, __pyx_int_56, __pyx_int_57, __pyx_int_63, __pyx_int_65, __pyx_int_68, __pyx_int_75, __pyx_int_86, __pyx_int_88, __pyx_int_91, __pyx_int_92, __pyx_int_97, __pyx_int_101, __pyx_int_107, __pyx_int_109, __pyx_int_114, __pyx_int_124, __pyx_int_126, __pyx_int_127, __pyx_int_128, __pyx_int_131, __pyx_int_132, __pyx_int_133, __pyx_int_134, __pyx_int_138, __pyx_int_152, __pyx_int_153, __pyx_int_156, __pyx_int_158, __pyx_int_174, __pyx_int_176, __pyx_int_177, __pyx_int_187, __pyx_int_204, __pyx_int_205, __pyx_int_226, __pyx_int_237, __pyx_int_245, __pyx_int_254, __pyx_int_264, __pyx_int_265, __pyx_int_268, __pyx_int_274, __pyx_int_283, __pyx_int_298, __pyx_int_301, __pyx_int_308, __pyx_int_309, __pyx_int_311, __pyx_int_313, __pyx_int_314, __pyx_int_315, __pyx_int_317, __pyx_int_321, __pyx_int_323, __pyx_int_324, __pyx_int_325, __pyx_int_327, __pyx_int_330, __pyx_int_331, __pyx_int_332, __pyx_int_333, __pyx_int_334, __pyx_int_341, __pyx_int_344, __pyx_int_347, __pyx_int_348, __pyx_int_353, __pyx_int_354, __pyx_int_355, __pyx_int_362, __pyx_int_365, __pyx_int_375, __pyx_int_377, __pyx_int_379, __pyx_int_380, __pyx_int_381, __pyx_int_382, __pyx_int_383, __pyx_int_384, __pyx_int_386, __pyx_int_387, __pyx_int_394, __pyx_int_396, __pyx_int_398, __pyx_int_399, __pyx_int_404, __pyx_int_405, __pyx_int_406, __pyx_int_407, __pyx_int_408, __pyx_int_409, __pyx_int_411, __pyx_int_413, __pyx_int_414); if (unlikely(!__pyx_tuple__685)) __PYX_ERR(2, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__685);
  __Pyx_GIVEREF(__pyx_tuple__685);

  /* "cython/core/tail.pyx":376
 *     path = str(manifold_path)
 * 
 *     def __init__(self, indices=(0, length, 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 *         self.Census_Morwen8 = tarfile.open(os.path.join(manifold_path, 'morwen8.tgz'), 'r:*')
 */
  __pyx_tuple__686 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_indices); if (unlikely(!__pyx_tuple__686)) __PYX_ERR(2, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__686);
  __Pyx_GIVEREF(__pyx_tuple__686);
  __pyx_codeobj__687 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__686, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_init, 376, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__687)) __PYX_ERR(2, 376, __pyx_L1_error)

  /* "cython/core/tail.pyx":381
 * 
 *     # Override
 *     def lookup(self, n):             # <<<<<<<<<<<<<<
 *         return five_tet_orientable[n]
 * 
 */
  __pyx_codeobj__688 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__465, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_lookup, 381, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__688)) __PYX_ERR(2, 381, __pyx_L1_error)

  /* "cython/core/tail.pyx":384
 *         return five_tet_orientable[n]
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 */
  __pyx_tuple__689 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_n, __pyx_n_s_c_triangulation, __pyx_n_s_result, __pyx_n_s_num_tet, __pyx_n_s_census_index, __pyx_n_s_num, __pyx_n_s_spec, __pyx_n_s_tarpath, __pyx_n_s_filedata); if (unlikely(!__pyx_tuple__689)) __PYX_ERR(2, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__689);
  __Pyx_GIVEREF(__pyx_tuple__689);
  __pyx_codeobj__690 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__689, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_getitem, 384, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__690)) __PYX_ERR(2, 384, __pyx_L1_error)

  /* "cython/core/tail.pyx":444
 *     orientability = Orientability.index('nonorientable')
 * 
 *     def __init__(self, indices=(0, length, 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 * 
 */
  __pyx_codeobj__691 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__686, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_init, 444, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__691)) __PYX_ERR(2, 444, __pyx_L1_error)

  /* "cython/core/tail.pyx":447
 *         Census.__init__(self, indices)
 * 
 *     def lookup(self, n):             # <<<<<<<<<<<<<<
 *         return five_tet_nonorientable[n]
 * 
 */
  __pyx_codeobj__692 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__465, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_lookup, 447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__692)) __PYX_ERR(2, 447, __pyx_L1_error)

  /* "cython/core/tail.pyx":461
 *     path = str(manifold_path)
 * 
 *     def __init__(self, indices=(0, 11031, 1)):             # <<<<<<<<<<<<<<
 *         if ObsOrientableClosedCensus.data is None:
 *             datafile = os.path.join(closed_census_directory,
 */
  __pyx_tuple__693 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_indices, __pyx_n_s_datafile, __pyx_n_s_closed_orientable); if (unlikely(!__pyx_tuple__693)) __PYX_ERR(2, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__693);
  __Pyx_GIVEREF(__pyx_tuple__693);
  __pyx_codeobj__694 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__693, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_init, 461, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__694)) __PYX_ERR(2, 461, __pyx_L1_error)
  __pyx_tuple__695 = PyTuple_Pack(1, ((PyObject*)__pyx_tuple__158)); if (unlikely(!__pyx_tuple__695)) __PYX_ERR(2, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__695);
  __Pyx_GIVEREF(__pyx_tuple__695);

  /* "cython/core/tail.pyx":471
 *         Census.__init__(self, indices)
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 */
  __pyx_tuple__696 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_n, __pyx_n_s_c_triangulation, __pyx_n_s_result, __pyx_n_s__150, __pyx_n_s_num_tet, __pyx_n_s_index, __pyx_n_s_m, __pyx_n_s_l); if (unlikely(!__pyx_tuple__696)) __PYX_ERR(2, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__696);
  __Pyx_GIVEREF(__pyx_tuple__696);
  __pyx_codeobj__697 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__696, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_getitem, 471, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__697)) __PYX_ERR(2, 471, __pyx_L1_error)

  /* "cython/core/tail.pyx":496
 *     path = str(manifold_path)
 * 
 *     def __init__(self, indices=(0, 17, 1)):             # <<<<<<<<<<<<<<
 *         if ObsNonorientableClosedCensus.data is None:
 *             datafile = os.path.join(closed_census_directory,
 */
  __pyx_tuple__698 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_indices, __pyx_n_s_datafile, __pyx_n_s_closed_nonorientable); if (unlikely(!__pyx_tuple__698)) __PYX_ERR(2, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__698);
  __Pyx_GIVEREF(__pyx_tuple__698);
  __pyx_codeobj__699 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__698, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_init, 496, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__699)) __PYX_ERR(2, 496, __pyx_L1_error)
  __pyx_tuple__700 = PyTuple_Pack(1, ((PyObject*)__pyx_tuple__159)); if (unlikely(!__pyx_tuple__700)) __PYX_ERR(2, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__700);
  __Pyx_GIVEREF(__pyx_tuple__700);

  /* "cython/core/tail.pyx":506
 *         Census.__init__(self, indices)
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 */
  __pyx_codeobj__701 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__696, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_getitem, 506, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__701)) __PYX_ERR(2, 506, __pyx_L1_error)

  /* "cython/core/tail.pyx":533
 *     alternation = 'a'
 * 
 *     def __init__(self, indices=(0, sum(Alternating_numbers.values()), 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 * 
 */
  __pyx_codeobj__702 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__686, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_init, 533, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__702)) __PYX_ERR(2, 533, __pyx_L1_error)

  /* "cython/core/tail.pyx":536
 *         Census.__init__(self, indices)
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         if isinstance(n, slice):
 *             return self.__class__(n.indices(self.length))
 */
  __pyx_codeobj__703 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__465, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_getitem, 536, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__703)) __PYX_ERR(2, 536, __pyx_L1_error)

  /* "cython/core/tail.pyx":558
 *     alternation = 'n'
 * 
 *     def __init__(self, indices=(0, sum(Nonalternating_numbers.values()), 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 * 
 */
  __pyx_codeobj__704 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__686, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_init, 558, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__704)) __PYX_ERR(2, 558, __pyx_L1_error)

  /* "cython/core/tail.pyx":571
 *     length = sum(census_knot_numbers)
 * 
 *     def __init__(self, indices=(0, sum(census_knot_numbers), 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 *         self.Census_Knots = tarfile.open(census_knot_archive, 'r:*')
 */
  __pyx_codeobj__705 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__686, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_init, 571, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__705)) __PYX_ERR(2, 571, __pyx_L1_error)

  /* "cython/core/tail.pyx":575
 *         self.Census_Knots = tarfile.open(census_knot_archive, 'r:*')
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'Knots in S^3 which appear in the SnapPea Census'
 * 
 */
  __pyx_codeobj__706 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_repr_2, 575, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__706)) __PYX_ERR(2, 575, __pyx_L1_error)

  /* "cython/core/tail.pyx":578
 *         return 'Knots in S^3 which appear in the SnapPea Census'
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         if isinstance(n, slice):
 *             return self.__class__(n.indices(self.length))
 */
  __pyx_tuple__707 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_n, __pyx_n_s_total, __pyx_n_s_m, __pyx_n_s_name, __pyx_n_s_tarpath, __pyx_n_s_filedata, __pyx_n_s_c_triangulation, __pyx_n_s_result); if (unlikely(!__pyx_tuple__707)) __PYX_ERR(2, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__707);
  __Pyx_GIVEREF(__pyx_tuple__707);
  __pyx_codeobj__708 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__707, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_getitem, 578, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__708)) __PYX_ERR(2, 578, __pyx_L1_error)

  /* "cython/core/tail.pyx":619
 *     max_crossings = 11
 * 
 *     def __init__(self, components, indices=(0, 10000, 1)):             # <<<<<<<<<<<<<<
 *         self.Christy_links = tarfile.open(link_archive, 'r:*')
 * 
 */
  __pyx_tuple__709 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_components, __pyx_n_s_indices); if (unlikely(!__pyx_tuple__709)) __PYX_ERR(2, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__709);
  __Pyx_GIVEREF(__pyx_tuple__709);
  __pyx_codeobj__710 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__709, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_init, 619, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__710)) __PYX_ERR(2, 619, __pyx_L1_error)
  __pyx_tuple__711 = PyTuple_Pack(1, ((PyObject*)__pyx_tuple__162)); if (unlikely(!__pyx_tuple__711)) __PYX_ERR(2, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__711);
  __Pyx_GIVEREF(__pyx_tuple__711);

  /* "cython/core/tail.pyx":634
 *                                indices[2]))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return ('Christy census of %s-component link complements '
 *                 'in S^3' % self.components)
 */
  __pyx_codeobj__712 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_repr_2, 634, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__712)) __PYX_ERR(2, 634, __pyx_L1_error)

  /* "cython/core/tail.pyx":638
 *                 'in S^3' % self.components)
 * 
 *     def __getitem__(self, j):             # <<<<<<<<<<<<<<
 *         if isinstance(j, slice):
 *             return self.__class__(j.indices(self.length))
 */
  __pyx_tuple__713 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_j, __pyx_n_s_so_far, __pyx_n_s_k, __pyx_n_s_n, __pyx_n_s_l, __pyx_n_s_filename, __pyx_n_s_name, __pyx_n_s_tarpath, __pyx_n_s_filedata, __pyx_n_s_c_triangulation, __pyx_n_s_result); if (unlikely(!__pyx_tuple__713)) __PYX_ERR(2, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__713);
  __Pyx_GIVEREF(__pyx_tuple__713);
  __pyx_codeobj__714 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__713, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_getitem, 638, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__714)) __PYX_ERR(2, 638, __pyx_L1_error)

  /* "cython/core/tail.pyx":672
 * 
 * class MorwenLinks:
 *     def __init__(self, num_components, num_crossings = None):             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             'The MorwenLinks class has been replaced by HTLinkExteriors. '
 */
  __pyx_tuple__715 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_num_components, __pyx_n_s_num_crossings); if (unlikely(!__pyx_tuple__715)) __PYX_ERR(2, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__715);
  __Pyx_GIVEREF(__pyx_tuple__715);
  __pyx_codeobj__716 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__715, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_init, 672, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__716)) __PYX_ERR(2, 672, __pyx_L1_error)

  /* "cython/core/tail.pyx":679
 * 
 * 
 * def left_pad_string(str,  length, pad=' '):             # <<<<<<<<<<<<<<
 *     return pad*(length - len(str)) + str
 * 
 */
  __pyx_tuple__717 = PyTuple_Pack(3, __pyx_n_s_str, __pyx_n_s_length, __pyx_n_s_pad); if (unlikely(!__pyx_tuple__717)) __PYX_ERR(2, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__717);
  __Pyx_GIVEREF(__pyx_tuple__717);
  __pyx_codeobj__718 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__717, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_left_pad_string, 679, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__718)) __PYX_ERR(2, 679, __pyx_L1_error)
  __pyx_tuple__719 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s__8)); if (unlikely(!__pyx_tuple__719)) __PYX_ERR(2, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__719);
  __Pyx_GIVEREF(__pyx_tuple__719);

  /* "cython/core/tail.pyx":687
 *     Obsolete.
 *     """
 *     def __init__(self, num_components, num_crossings = None):             # <<<<<<<<<<<<<<
 *         if num_components < 0:
 *             return
 */
  __pyx_tuple__720 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_num_components, __pyx_n_s_num_crossings, __pyx_n_s_crossings, __pyx_n_s_files, __pyx_n_s_c, __pyx_n_s_n, __pyx_n_s_second_char, __pyx_n_s_file, __pyx_n_s_data, __pyx_n_s_line, __pyx_n_s_strline); if (unlikely(!__pyx_tuple__720)) __PYX_ERR(2, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__720);
  __Pyx_GIVEREF(__pyx_tuple__720);
  __pyx_codeobj__721 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__720, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_init, 687, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__721)) __PYX_ERR(2, 687, __pyx_L1_error)

  /* "cython/core/tail.pyx":713
 *         Census.__init__(self, indices=(0, len(self.DT_codes), 1))
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         if isinstance(n, slice):
 *             SC = self.__class__(-1)
 */
  __pyx_tuple__722 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_n, __pyx_n_s_SC, __pyx_n_s_name, __pyx_n_s_result); if (unlikely(!__pyx_tuple__722)) __PYX_ERR(2, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__722);
  __Pyx_GIVEREF(__pyx_tuple__722);
  __pyx_codeobj__723 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__722, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cython_core_tail_pyx, __pyx_n_s_getitem, 713, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__723)) __PYX_ERR(2, 713, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle_PresentationMatrix(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__724 = 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__724)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__724);
  __Pyx_GIVEREF(__pyx_tuple__724);
  __pyx_codeobj__725 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__724, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_PresentationMatri, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__725)) __PYX_ERR(7, 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;
  __pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyDict_Type_pop.method_name = &__pyx_n_s_pop;
  __pyx_umethod_PyDict_Type_update.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyDict_Type_update.method_name = &__pyx_n_s_update;
  __pyx_umethod_PyList_Type_pop.type = (PyObject*)&PyList_Type;
  __pyx_umethod_PyList_Type_pop.method_name = &__pyx_n_s_pop;
  if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(6, 1, __pyx_L1_error);
  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_float_0_1 = PyFloat_FromDouble(0.1); if (unlikely(!__pyx_float_0_1)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_float_0_2 = PyFloat_FromDouble(0.2); if (unlikely(!__pyx_float_0_2)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_float_0_9 = PyFloat_FromDouble(0.9); if (unlikely(!__pyx_float_0_9)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_float_1eneg_9 = PyFloat_FromDouble(1e-9); if (unlikely(!__pyx_float_1eneg_9)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_13 = PyInt_FromLong(13); if (unlikely(!__pyx_int_13)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_14 = PyInt_FromLong(14); if (unlikely(!__pyx_int_14)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_16 = PyInt_FromLong(16); if (unlikely(!__pyx_int_16)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_19 = PyInt_FromLong(19); if (unlikely(!__pyx_int_19)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_20 = PyInt_FromLong(20); if (unlikely(!__pyx_int_20)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_21 = PyInt_FromLong(21); if (unlikely(!__pyx_int_21)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_22 = PyInt_FromLong(22); if (unlikely(!__pyx_int_22)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_23 = PyInt_FromLong(23); if (unlikely(!__pyx_int_23)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_24 = PyInt_FromLong(24); if (unlikely(!__pyx_int_24)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_25 = PyInt_FromLong(25); if (unlikely(!__pyx_int_25)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_26 = PyInt_FromLong(26); if (unlikely(!__pyx_int_26)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_27 = PyInt_FromLong(27); if (unlikely(!__pyx_int_27)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_28 = PyInt_FromLong(28); if (unlikely(!__pyx_int_28)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_29 = PyInt_FromLong(29); if (unlikely(!__pyx_int_29)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_30 = PyInt_FromLong(30); if (unlikely(!__pyx_int_30)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_31 = PyInt_FromLong(31); if (unlikely(!__pyx_int_31)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_33 = PyInt_FromLong(33); if (unlikely(!__pyx_int_33)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_34 = PyInt_FromLong(34); if (unlikely(!__pyx_int_34)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_35 = PyInt_FromLong(35); if (unlikely(!__pyx_int_35)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_36 = PyInt_FromLong(36); if (unlikely(!__pyx_int_36)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_37 = PyInt_FromLong(37); if (unlikely(!__pyx_int_37)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_38 = PyInt_FromLong(38); if (unlikely(!__pyx_int_38)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_39 = PyInt_FromLong(39); if (unlikely(!__pyx_int_39)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_40 = PyInt_FromLong(40); if (unlikely(!__pyx_int_40)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_41 = PyInt_FromLong(41); if (unlikely(!__pyx_int_41)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_42 = PyInt_FromLong(42); if (unlikely(!__pyx_int_42)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_43 = PyInt_FromLong(43); if (unlikely(!__pyx_int_43)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_44 = PyInt_FromLong(44); if (unlikely(!__pyx_int_44)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_45 = PyInt_FromLong(45); if (unlikely(!__pyx_int_45)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_46 = PyInt_FromLong(46); if (unlikely(!__pyx_int_46)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_47 = PyInt_FromLong(47); if (unlikely(!__pyx_int_47)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_48 = PyInt_FromLong(48); if (unlikely(!__pyx_int_48)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_49 = PyInt_FromLong(49); if (unlikely(!__pyx_int_49)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_50 = PyInt_FromLong(50); if (unlikely(!__pyx_int_50)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_51 = PyInt_FromLong(51); if (unlikely(!__pyx_int_51)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_52 = PyInt_FromLong(52); if (unlikely(!__pyx_int_52)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_53 = PyInt_FromLong(53); if (unlikely(!__pyx_int_53)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_54 = PyInt_FromLong(54); if (unlikely(!__pyx_int_54)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_55 = PyInt_FromLong(55); if (unlikely(!__pyx_int_55)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_56 = PyInt_FromLong(56); if (unlikely(!__pyx_int_56)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_57 = PyInt_FromLong(57); if (unlikely(!__pyx_int_57)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_58 = PyInt_FromLong(58); if (unlikely(!__pyx_int_58)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_59 = PyInt_FromLong(59); if (unlikely(!__pyx_int_59)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_60 = PyInt_FromLong(60); if (unlikely(!__pyx_int_60)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_61 = PyInt_FromLong(61); if (unlikely(!__pyx_int_61)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_62 = PyInt_FromLong(62); if (unlikely(!__pyx_int_62)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_63 = PyInt_FromLong(63); if (unlikely(!__pyx_int_63)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_64 = PyInt_FromLong(64); if (unlikely(!__pyx_int_64)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_65 = PyInt_FromLong(65); if (unlikely(!__pyx_int_65)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_66 = PyInt_FromLong(66); if (unlikely(!__pyx_int_66)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_67 = PyInt_FromLong(67); if (unlikely(!__pyx_int_67)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_68 = PyInt_FromLong(68); if (unlikely(!__pyx_int_68)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_69 = PyInt_FromLong(69); if (unlikely(!__pyx_int_69)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_70 = PyInt_FromLong(70); if (unlikely(!__pyx_int_70)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_71 = PyInt_FromLong(71); if (unlikely(!__pyx_int_71)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_72 = PyInt_FromLong(72); if (unlikely(!__pyx_int_72)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_73 = PyInt_FromLong(73); if (unlikely(!__pyx_int_73)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_74 = PyInt_FromLong(74); if (unlikely(!__pyx_int_74)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_75 = PyInt_FromLong(75); if (unlikely(!__pyx_int_75)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_76 = PyInt_FromLong(76); if (unlikely(!__pyx_int_76)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_77 = PyInt_FromLong(77); if (unlikely(!__pyx_int_77)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_78 = PyInt_FromLong(78); if (unlikely(!__pyx_int_78)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_79 = PyInt_FromLong(79); if (unlikely(!__pyx_int_79)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_80 = PyInt_FromLong(80); if (unlikely(!__pyx_int_80)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_81 = PyInt_FromLong(81); if (unlikely(!__pyx_int_81)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_82 = PyInt_FromLong(82); if (unlikely(!__pyx_int_82)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_83 = PyInt_FromLong(83); if (unlikely(!__pyx_int_83)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_84 = PyInt_FromLong(84); if (unlikely(!__pyx_int_84)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_85 = PyInt_FromLong(85); if (unlikely(!__pyx_int_85)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_86 = PyInt_FromLong(86); if (unlikely(!__pyx_int_86)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_87 = PyInt_FromLong(87); if (unlikely(!__pyx_int_87)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_88 = PyInt_FromLong(88); if (unlikely(!__pyx_int_88)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_89 = PyInt_FromLong(89); if (unlikely(!__pyx_int_89)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_90 = PyInt_FromLong(90); if (unlikely(!__pyx_int_90)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_91 = PyInt_FromLong(91); if (unlikely(!__pyx_int_91)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_92 = PyInt_FromLong(92); if (unlikely(!__pyx_int_92)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_93 = PyInt_FromLong(93); if (unlikely(!__pyx_int_93)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_94 = PyInt_FromLong(94); if (unlikely(!__pyx_int_94)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_95 = PyInt_FromLong(95); if (unlikely(!__pyx_int_95)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_96 = PyInt_FromLong(96); if (unlikely(!__pyx_int_96)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_97 = PyInt_FromLong(97); if (unlikely(!__pyx_int_97)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_98 = PyInt_FromLong(98); if (unlikely(!__pyx_int_98)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_99 = PyInt_FromLong(99); if (unlikely(!__pyx_int_99)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_101 = PyInt_FromLong(101); if (unlikely(!__pyx_int_101)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_102 = PyInt_FromLong(102); if (unlikely(!__pyx_int_102)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_103 = PyInt_FromLong(103); if (unlikely(!__pyx_int_103)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_104 = PyInt_FromLong(104); if (unlikely(!__pyx_int_104)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_105 = PyInt_FromLong(105); if (unlikely(!__pyx_int_105)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_106 = PyInt_FromLong(106); if (unlikely(!__pyx_int_106)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_107 = PyInt_FromLong(107); if (unlikely(!__pyx_int_107)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_108 = PyInt_FromLong(108); if (unlikely(!__pyx_int_108)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_109 = PyInt_FromLong(109); if (unlikely(!__pyx_int_109)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_110 = PyInt_FromLong(110); if (unlikely(!__pyx_int_110)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_111 = PyInt_FromLong(111); if (unlikely(!__pyx_int_111)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_112 = PyInt_FromLong(112); if (unlikely(!__pyx_int_112)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_113 = PyInt_FromLong(113); if (unlikely(!__pyx_int_113)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_114 = PyInt_FromLong(114); if (unlikely(!__pyx_int_114)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_115 = PyInt_FromLong(115); if (unlikely(!__pyx_int_115)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_116 = PyInt_FromLong(116); if (unlikely(!__pyx_int_116)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_117 = PyInt_FromLong(117); if (unlikely(!__pyx_int_117)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_118 = PyInt_FromLong(118); if (unlikely(!__pyx_int_118)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_119 = PyInt_FromLong(119); if (unlikely(!__pyx_int_119)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_120 = PyInt_FromLong(120); if (unlikely(!__pyx_int_120)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_121 = PyInt_FromLong(121); if (unlikely(!__pyx_int_121)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_122 = PyInt_FromLong(122); if (unlikely(!__pyx_int_122)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_123 = PyInt_FromLong(123); if (unlikely(!__pyx_int_123)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_124 = PyInt_FromLong(124); if (unlikely(!__pyx_int_124)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_125 = PyInt_FromLong(125); if (unlikely(!__pyx_int_125)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_126 = PyInt_FromLong(126); if (unlikely(!__pyx_int_126)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_127 = PyInt_FromLong(127); if (unlikely(!__pyx_int_127)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_128 = PyInt_FromLong(128); if (unlikely(!__pyx_int_128)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_129 = PyInt_FromLong(129); if (unlikely(!__pyx_int_129)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_130 = PyInt_FromLong(130); if (unlikely(!__pyx_int_130)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_131 = PyInt_FromLong(131); if (unlikely(!__pyx_int_131)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_132 = PyInt_FromLong(132); if (unlikely(!__pyx_int_132)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_133 = PyInt_FromLong(133); if (unlikely(!__pyx_int_133)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_134 = PyInt_FromLong(134); if (unlikely(!__pyx_int_134)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_135 = PyInt_FromLong(135); if (unlikely(!__pyx_int_135)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_136 = PyInt_FromLong(136); if (unlikely(!__pyx_int_136)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_137 = PyInt_FromLong(137); if (unlikely(!__pyx_int_137)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_138 = PyInt_FromLong(138); if (unlikely(!__pyx_int_138)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_139 = PyInt_FromLong(139); if (unlikely(!__pyx_int_139)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_140 = PyInt_FromLong(140); if (unlikely(!__pyx_int_140)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_141 = PyInt_FromLong(141); if (unlikely(!__pyx_int_141)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_142 = PyInt_FromLong(142); if (unlikely(!__pyx_int_142)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_143 = PyInt_FromLong(143); if (unlikely(!__pyx_int_143)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_144 = PyInt_FromLong(144); if (unlikely(!__pyx_int_144)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_145 = PyInt_FromLong(145); if (unlikely(!__pyx_int_145)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_146 = PyInt_FromLong(146); if (unlikely(!__pyx_int_146)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_147 = PyInt_FromLong(147); if (unlikely(!__pyx_int_147)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_148 = PyInt_FromLong(148); if (unlikely(!__pyx_int_148)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_149 = PyInt_FromLong(149); if (unlikely(!__pyx_int_149)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_150 = PyInt_FromLong(150); if (unlikely(!__pyx_int_150)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_151 = PyInt_FromLong(151); if (unlikely(!__pyx_int_151)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_152 = PyInt_FromLong(152); if (unlikely(!__pyx_int_152)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_153 = PyInt_FromLong(153); if (unlikely(!__pyx_int_153)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_154 = PyInt_FromLong(154); if (unlikely(!__pyx_int_154)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_155 = PyInt_FromLong(155); if (unlikely(!__pyx_int_155)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_156 = PyInt_FromLong(156); if (unlikely(!__pyx_int_156)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_157 = PyInt_FromLong(157); if (unlikely(!__pyx_int_157)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_158 = PyInt_FromLong(158); if (unlikely(!__pyx_int_158)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_159 = PyInt_FromLong(159); if (unlikely(!__pyx_int_159)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_160 = PyInt_FromLong(160); if (unlikely(!__pyx_int_160)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_161 = PyInt_FromLong(161); if (unlikely(!__pyx_int_161)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_162 = PyInt_FromLong(162); if (unlikely(!__pyx_int_162)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_163 = PyInt_FromLong(163); if (unlikely(!__pyx_int_163)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_164 = PyInt_FromLong(164); if (unlikely(!__pyx_int_164)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_165 = PyInt_FromLong(165); if (unlikely(!__pyx_int_165)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_166 = PyInt_FromLong(166); if (unlikely(!__pyx_int_166)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_167 = PyInt_FromLong(167); if (unlikely(!__pyx_int_167)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_168 = PyInt_FromLong(168); if (unlikely(!__pyx_int_168)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_169 = PyInt_FromLong(169); if (unlikely(!__pyx_int_169)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_170 = PyInt_FromLong(170); if (unlikely(!__pyx_int_170)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_171 = PyInt_FromLong(171); if (unlikely(!__pyx_int_171)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_172 = PyInt_FromLong(172); if (unlikely(!__pyx_int_172)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_173 = PyInt_FromLong(173); if (unlikely(!__pyx_int_173)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_174 = PyInt_FromLong(174); if (unlikely(!__pyx_int_174)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_175 = PyInt_FromLong(175); if (unlikely(!__pyx_int_175)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_176 = PyInt_FromLong(176); if (unlikely(!__pyx_int_176)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_177 = PyInt_FromLong(177); if (unlikely(!__pyx_int_177)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_178 = PyInt_FromLong(178); if (unlikely(!__pyx_int_178)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_179 = PyInt_FromLong(179); if (unlikely(!__pyx_int_179)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_180 = PyInt_FromLong(180); if (unlikely(!__pyx_int_180)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_181 = PyInt_FromLong(181); if (unlikely(!__pyx_int_181)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_182 = PyInt_FromLong(182); if (unlikely(!__pyx_int_182)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_183 = PyInt_FromLong(183); if (unlikely(!__pyx_int_183)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_184 = PyInt_FromLong(184); if (unlikely(!__pyx_int_184)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_185 = PyInt_FromLong(185); if (unlikely(!__pyx_int_185)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_186 = PyInt_FromLong(186); if (unlikely(!__pyx_int_186)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_187 = PyInt_FromLong(187); if (unlikely(!__pyx_int_187)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_188 = PyInt_FromLong(188); if (unlikely(!__pyx_int_188)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_189 = PyInt_FromLong(189); if (unlikely(!__pyx_int_189)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_190 = PyInt_FromLong(190); if (unlikely(!__pyx_int_190)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_191 = PyInt_FromLong(191); if (unlikely(!__pyx_int_191)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_192 = PyInt_FromLong(192); if (unlikely(!__pyx_int_192)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_193 = PyInt_FromLong(193); if (unlikely(!__pyx_int_193)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_194 = PyInt_FromLong(194); if (unlikely(!__pyx_int_194)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_195 = PyInt_FromLong(195); if (unlikely(!__pyx_int_195)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_196 = PyInt_FromLong(196); if (unlikely(!__pyx_int_196)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_197 = PyInt_FromLong(197); if (unlikely(!__pyx_int_197)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_198 = PyInt_FromLong(198); if (unlikely(!__pyx_int_198)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_199 = PyInt_FromLong(199); if (unlikely(!__pyx_int_199)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_200 = PyInt_FromLong(200); if (unlikely(!__pyx_int_200)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_201 = PyInt_FromLong(201); if (unlikely(!__pyx_int_201)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_202 = PyInt_FromLong(202); if (unlikely(!__pyx_int_202)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_203 = PyInt_FromLong(203); if (unlikely(!__pyx_int_203)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_204 = PyInt_FromLong(204); if (unlikely(!__pyx_int_204)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_205 = PyInt_FromLong(205); if (unlikely(!__pyx_int_205)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_206 = PyInt_FromLong(206); if (unlikely(!__pyx_int_206)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_207 = PyInt_FromLong(207); if (unlikely(!__pyx_int_207)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_208 = PyInt_FromLong(208); if (unlikely(!__pyx_int_208)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_209 = PyInt_FromLong(209); if (unlikely(!__pyx_int_209)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_210 = PyInt_FromLong(210); if (unlikely(!__pyx_int_210)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_211 = PyInt_FromLong(211); if (unlikely(!__pyx_int_211)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_212 = PyInt_FromLong(212); if (unlikely(!__pyx_int_212)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_213 = PyInt_FromLong(213); if (unlikely(!__pyx_int_213)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_214 = PyInt_FromLong(214); if (unlikely(!__pyx_int_214)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_215 = PyInt_FromLong(215); if (unlikely(!__pyx_int_215)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_216 = PyInt_FromLong(216); if (unlikely(!__pyx_int_216)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_217 = PyInt_FromLong(217); if (unlikely(!__pyx_int_217)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_218 = PyInt_FromLong(218); if (unlikely(!__pyx_int_218)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_219 = PyInt_FromLong(219); if (unlikely(!__pyx_int_219)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_220 = PyInt_FromLong(220); if (unlikely(!__pyx_int_220)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_221 = PyInt_FromLong(221); if (unlikely(!__pyx_int_221)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_222 = PyInt_FromLong(222); if (unlikely(!__pyx_int_222)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_223 = PyInt_FromLong(223); if (unlikely(!__pyx_int_223)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_224 = PyInt_FromLong(224); if (unlikely(!__pyx_int_224)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_225 = PyInt_FromLong(225); if (unlikely(!__pyx_int_225)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_226 = PyInt_FromLong(226); if (unlikely(!__pyx_int_226)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_227 = PyInt_FromLong(227); if (unlikely(!__pyx_int_227)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_228 = PyInt_FromLong(228); if (unlikely(!__pyx_int_228)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_229 = PyInt_FromLong(229); if (unlikely(!__pyx_int_229)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_230 = PyInt_FromLong(230); if (unlikely(!__pyx_int_230)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_231 = PyInt_FromLong(231); if (unlikely(!__pyx_int_231)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_232 = PyInt_FromLong(232); if (unlikely(!__pyx_int_232)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_233 = PyInt_FromLong(233); if (unlikely(!__pyx_int_233)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_234 = PyInt_FromLong(234); if (unlikely(!__pyx_int_234)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_235 = PyInt_FromLong(235); if (unlikely(!__pyx_int_235)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_236 = PyInt_FromLong(236); if (unlikely(!__pyx_int_236)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_237 = PyInt_FromLong(237); if (unlikely(!__pyx_int_237)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_238 = PyInt_FromLong(238); if (unlikely(!__pyx_int_238)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_239 = PyInt_FromLong(239); if (unlikely(!__pyx_int_239)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_240 = PyInt_FromLong(240); if (unlikely(!__pyx_int_240)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_241 = PyInt_FromLong(241); if (unlikely(!__pyx_int_241)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_242 = PyInt_FromLong(242); if (unlikely(!__pyx_int_242)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_243 = PyInt_FromLong(243); if (unlikely(!__pyx_int_243)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_244 = PyInt_FromLong(244); if (unlikely(!__pyx_int_244)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_245 = PyInt_FromLong(245); if (unlikely(!__pyx_int_245)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_246 = PyInt_FromLong(246); if (unlikely(!__pyx_int_246)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_247 = PyInt_FromLong(247); if (unlikely(!__pyx_int_247)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_248 = PyInt_FromLong(248); if (unlikely(!__pyx_int_248)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_249 = PyInt_FromLong(249); if (unlikely(!__pyx_int_249)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_250 = PyInt_FromLong(250); if (unlikely(!__pyx_int_250)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_251 = PyInt_FromLong(251); if (unlikely(!__pyx_int_251)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_252 = PyInt_FromLong(252); if (unlikely(!__pyx_int_252)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_253 = PyInt_FromLong(253); if (unlikely(!__pyx_int_253)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_254 = PyInt_FromLong(254); if (unlikely(!__pyx_int_254)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_255 = PyInt_FromLong(255); if (unlikely(!__pyx_int_255)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_256 = PyInt_FromLong(256); if (unlikely(!__pyx_int_256)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_257 = PyInt_FromLong(257); if (unlikely(!__pyx_int_257)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_258 = PyInt_FromLong(258); if (unlikely(!__pyx_int_258)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_259 = PyInt_FromLong(259); if (unlikely(!__pyx_int_259)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_260 = PyInt_FromLong(260); if (unlikely(!__pyx_int_260)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_261 = PyInt_FromLong(261); if (unlikely(!__pyx_int_261)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_262 = PyInt_FromLong(262); if (unlikely(!__pyx_int_262)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_263 = PyInt_FromLong(263); if (unlikely(!__pyx_int_263)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_264 = PyInt_FromLong(264); if (unlikely(!__pyx_int_264)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_265 = PyInt_FromLong(265); if (unlikely(!__pyx_int_265)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_266 = PyInt_FromLong(266); if (unlikely(!__pyx_int_266)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_267 = PyInt_FromLong(267); if (unlikely(!__pyx_int_267)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_268 = PyInt_FromLong(268); if (unlikely(!__pyx_int_268)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_269 = PyInt_FromLong(269); if (unlikely(!__pyx_int_269)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_270 = PyInt_FromLong(270); if (unlikely(!__pyx_int_270)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_271 = PyInt_FromLong(271); if (unlikely(!__pyx_int_271)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_272 = PyInt_FromLong(272); if (unlikely(!__pyx_int_272)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_273 = PyInt_FromLong(273); if (unlikely(!__pyx_int_273)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_274 = PyInt_FromLong(274); if (unlikely(!__pyx_int_274)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_275 = PyInt_FromLong(275); if (unlikely(!__pyx_int_275)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_276 = PyInt_FromLong(276); if (unlikely(!__pyx_int_276)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_277 = PyInt_FromLong(277); if (unlikely(!__pyx_int_277)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_278 = PyInt_FromLong(278); if (unlikely(!__pyx_int_278)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_279 = PyInt_FromLong(279); if (unlikely(!__pyx_int_279)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_280 = PyInt_FromLong(280); if (unlikely(!__pyx_int_280)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_281 = PyInt_FromLong(281); if (unlikely(!__pyx_int_281)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_282 = PyInt_FromLong(282); if (unlikely(!__pyx_int_282)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_283 = PyInt_FromLong(283); if (unlikely(!__pyx_int_283)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_284 = PyInt_FromLong(284); if (unlikely(!__pyx_int_284)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_285 = PyInt_FromLong(285); if (unlikely(!__pyx_int_285)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_286 = PyInt_FromLong(286); if (unlikely(!__pyx_int_286)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_287 = PyInt_FromLong(287); if (unlikely(!__pyx_int_287)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_288 = PyInt_FromLong(288); if (unlikely(!__pyx_int_288)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_289 = PyInt_FromLong(289); if (unlikely(!__pyx_int_289)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_290 = PyInt_FromLong(290); if (unlikely(!__pyx_int_290)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_291 = PyInt_FromLong(291); if (unlikely(!__pyx_int_291)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_292 = PyInt_FromLong(292); if (unlikely(!__pyx_int_292)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_293 = PyInt_FromLong(293); if (unlikely(!__pyx_int_293)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_294 = PyInt_FromLong(294); if (unlikely(!__pyx_int_294)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_295 = PyInt_FromLong(295); if (unlikely(!__pyx_int_295)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_296 = PyInt_FromLong(296); if (unlikely(!__pyx_int_296)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_297 = PyInt_FromLong(297); if (unlikely(!__pyx_int_297)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_298 = PyInt_FromLong(298); if (unlikely(!__pyx_int_298)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_299 = PyInt_FromLong(299); if (unlikely(!__pyx_int_299)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_300 = PyInt_FromLong(300); if (unlikely(!__pyx_int_300)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_301 = PyInt_FromLong(301); if (unlikely(!__pyx_int_301)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_302 = PyInt_FromLong(302); if (unlikely(!__pyx_int_302)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_303 = PyInt_FromLong(303); if (unlikely(!__pyx_int_303)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_304 = PyInt_FromLong(304); if (unlikely(!__pyx_int_304)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_305 = PyInt_FromLong(305); if (unlikely(!__pyx_int_305)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_306 = PyInt_FromLong(306); if (unlikely(!__pyx_int_306)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_307 = PyInt_FromLong(307); if (unlikely(!__pyx_int_307)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_308 = PyInt_FromLong(308); if (unlikely(!__pyx_int_308)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_309 = PyInt_FromLong(309); if (unlikely(!__pyx_int_309)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_310 = PyInt_FromLong(310); if (unlikely(!__pyx_int_310)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_311 = PyInt_FromLong(311); if (unlikely(!__pyx_int_311)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_312 = PyInt_FromLong(312); if (unlikely(!__pyx_int_312)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_313 = PyInt_FromLong(313); if (unlikely(!__pyx_int_313)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_314 = PyInt_FromLong(314); if (unlikely(!__pyx_int_314)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_315 = PyInt_FromLong(315); if (unlikely(!__pyx_int_315)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_316 = PyInt_FromLong(316); if (unlikely(!__pyx_int_316)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_317 = PyInt_FromLong(317); if (unlikely(!__pyx_int_317)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_318 = PyInt_FromLong(318); if (unlikely(!__pyx_int_318)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_319 = PyInt_FromLong(319); if (unlikely(!__pyx_int_319)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_320 = PyInt_FromLong(320); if (unlikely(!__pyx_int_320)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_321 = PyInt_FromLong(321); if (unlikely(!__pyx_int_321)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_322 = PyInt_FromLong(322); if (unlikely(!__pyx_int_322)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_323 = PyInt_FromLong(323); if (unlikely(!__pyx_int_323)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_324 = PyInt_FromLong(324); if (unlikely(!__pyx_int_324)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_325 = PyInt_FromLong(325); if (unlikely(!__pyx_int_325)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_326 = PyInt_FromLong(326); if (unlikely(!__pyx_int_326)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_327 = PyInt_FromLong(327); if (unlikely(!__pyx_int_327)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_328 = PyInt_FromLong(328); if (unlikely(!__pyx_int_328)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_329 = PyInt_FromLong(329); if (unlikely(!__pyx_int_329)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_330 = PyInt_FromLong(330); if (unlikely(!__pyx_int_330)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_331 = PyInt_FromLong(331); if (unlikely(!__pyx_int_331)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_332 = PyInt_FromLong(332); if (unlikely(!__pyx_int_332)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_333 = PyInt_FromLong(333); if (unlikely(!__pyx_int_333)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_334 = PyInt_FromLong(334); if (unlikely(!__pyx_int_334)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_335 = PyInt_FromLong(335); if (unlikely(!__pyx_int_335)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_336 = PyInt_FromLong(336); if (unlikely(!__pyx_int_336)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_337 = PyInt_FromLong(337); if (unlikely(!__pyx_int_337)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_338 = PyInt_FromLong(338); if (unlikely(!__pyx_int_338)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_339 = PyInt_FromLong(339); if (unlikely(!__pyx_int_339)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_340 = PyInt_FromLong(340); if (unlikely(!__pyx_int_340)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_341 = PyInt_FromLong(341); if (unlikely(!__pyx_int_341)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_342 = PyInt_FromLong(342); if (unlikely(!__pyx_int_342)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_343 = PyInt_FromLong(343); if (unlikely(!__pyx_int_343)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_344 = PyInt_FromLong(344); if (unlikely(!__pyx_int_344)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_345 = PyInt_FromLong(345); if (unlikely(!__pyx_int_345)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_346 = PyInt_FromLong(346); if (unlikely(!__pyx_int_346)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_347 = PyInt_FromLong(347); if (unlikely(!__pyx_int_347)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_348 = PyInt_FromLong(348); if (unlikely(!__pyx_int_348)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_349 = PyInt_FromLong(349); if (unlikely(!__pyx_int_349)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_350 = PyInt_FromLong(350); if (unlikely(!__pyx_int_350)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_351 = PyInt_FromLong(351); if (unlikely(!__pyx_int_351)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_352 = PyInt_FromLong(352); if (unlikely(!__pyx_int_352)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_353 = PyInt_FromLong(353); if (unlikely(!__pyx_int_353)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_354 = PyInt_FromLong(354); if (unlikely(!__pyx_int_354)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_355 = PyInt_FromLong(355); if (unlikely(!__pyx_int_355)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_356 = PyInt_FromLong(356); if (unlikely(!__pyx_int_356)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_357 = PyInt_FromLong(357); if (unlikely(!__pyx_int_357)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_358 = PyInt_FromLong(358); if (unlikely(!__pyx_int_358)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_359 = PyInt_FromLong(359); if (unlikely(!__pyx_int_359)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_360 = PyInt_FromLong(360); if (unlikely(!__pyx_int_360)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_361 = PyInt_FromLong(361); if (unlikely(!__pyx_int_361)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_362 = PyInt_FromLong(362); if (unlikely(!__pyx_int_362)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_363 = PyInt_FromLong(363); if (unlikely(!__pyx_int_363)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_364 = PyInt_FromLong(364); if (unlikely(!__pyx_int_364)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_365 = PyInt_FromLong(365); if (unlikely(!__pyx_int_365)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_366 = PyInt_FromLong(366); if (unlikely(!__pyx_int_366)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_367 = PyInt_FromLong(367); if (unlikely(!__pyx_int_367)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_368 = PyInt_FromLong(368); if (unlikely(!__pyx_int_368)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_369 = PyInt_FromLong(369); if (unlikely(!__pyx_int_369)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_370 = PyInt_FromLong(370); if (unlikely(!__pyx_int_370)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_371 = PyInt_FromLong(371); if (unlikely(!__pyx_int_371)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_372 = PyInt_FromLong(372); if (unlikely(!__pyx_int_372)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_373 = PyInt_FromLong(373); if (unlikely(!__pyx_int_373)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_374 = PyInt_FromLong(374); if (unlikely(!__pyx_int_374)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_375 = PyInt_FromLong(375); if (unlikely(!__pyx_int_375)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_376 = PyInt_FromLong(376); if (unlikely(!__pyx_int_376)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_377 = PyInt_FromLong(377); if (unlikely(!__pyx_int_377)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_378 = PyInt_FromLong(378); if (unlikely(!__pyx_int_378)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_379 = PyInt_FromLong(379); if (unlikely(!__pyx_int_379)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_380 = PyInt_FromLong(380); if (unlikely(!__pyx_int_380)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_381 = PyInt_FromLong(381); if (unlikely(!__pyx_int_381)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_382 = PyInt_FromLong(382); if (unlikely(!__pyx_int_382)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_383 = PyInt_FromLong(383); if (unlikely(!__pyx_int_383)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_384 = PyInt_FromLong(384); if (unlikely(!__pyx_int_384)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_385 = PyInt_FromLong(385); if (unlikely(!__pyx_int_385)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_386 = PyInt_FromLong(386); if (unlikely(!__pyx_int_386)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_387 = PyInt_FromLong(387); if (unlikely(!__pyx_int_387)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_388 = PyInt_FromLong(388); if (unlikely(!__pyx_int_388)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_389 = PyInt_FromLong(389); if (unlikely(!__pyx_int_389)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_390 = PyInt_FromLong(390); if (unlikely(!__pyx_int_390)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_391 = PyInt_FromLong(391); if (unlikely(!__pyx_int_391)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_392 = PyInt_FromLong(392); if (unlikely(!__pyx_int_392)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_393 = PyInt_FromLong(393); if (unlikely(!__pyx_int_393)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_394 = PyInt_FromLong(394); if (unlikely(!__pyx_int_394)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_395 = PyInt_FromLong(395); if (unlikely(!__pyx_int_395)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_396 = PyInt_FromLong(396); if (unlikely(!__pyx_int_396)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_397 = PyInt_FromLong(397); if (unlikely(!__pyx_int_397)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_398 = PyInt_FromLong(398); if (unlikely(!__pyx_int_398)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_399 = PyInt_FromLong(399); if (unlikely(!__pyx_int_399)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_400 = PyInt_FromLong(400); if (unlikely(!__pyx_int_400)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_401 = PyInt_FromLong(401); if (unlikely(!__pyx_int_401)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_402 = PyInt_FromLong(402); if (unlikely(!__pyx_int_402)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_403 = PyInt_FromLong(403); if (unlikely(!__pyx_int_403)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_404 = PyInt_FromLong(404); if (unlikely(!__pyx_int_404)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_405 = PyInt_FromLong(405); if (unlikely(!__pyx_int_405)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_406 = PyInt_FromLong(406); if (unlikely(!__pyx_int_406)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_407 = PyInt_FromLong(407); if (unlikely(!__pyx_int_407)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_408 = PyInt_FromLong(408); if (unlikely(!__pyx_int_408)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_409 = PyInt_FromLong(409); if (unlikely(!__pyx_int_409)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_410 = PyInt_FromLong(410); if (unlikely(!__pyx_int_410)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_411 = PyInt_FromLong(411); if (unlikely(!__pyx_int_411)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_412 = PyInt_FromLong(412); if (unlikely(!__pyx_int_412)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_413 = PyInt_FromLong(413); if (unlikely(!__pyx_int_413)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_414 = PyInt_FromLong(414); if (unlikely(!__pyx_int_414)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_552 = PyInt_FromLong(552); if (unlikely(!__pyx_int_552)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_887 = PyInt_FromLong(887); if (unlikely(!__pyx_int_887)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_888 = PyInt_FromLong(888); if (unlikely(!__pyx_int_888)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_962 = PyInt_FromLong(962); if (unlikely(!__pyx_int_962)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_1260 = PyInt_FromLong(1260); if (unlikely(!__pyx_int_1260)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_1288 = PyInt_FromLong(1288); if (unlikely(!__pyx_int_1288)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_3552 = PyInt_FromLong(3552); if (unlikely(!__pyx_int_3552)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_4878 = PyInt_FromLong(4878); if (unlikely(!__pyx_int_4878)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_5110 = PyInt_FromLong(5110); if (unlikely(!__pyx_int_5110)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_10000 = PyInt_FromLong(10000L); if (unlikely(!__pyx_int_10000)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_11031 = PyInt_FromLong(11031L); if (unlikely(!__pyx_int_11031)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_12846 = PyInt_FromLong(12846L); if (unlikely(!__pyx_int_12846)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_17661 = PyInt_FromLong(17661L); if (unlikely(!__pyx_int_17661)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_19536 = PyInt_FromLong(19536L); if (unlikely(!__pyx_int_19536)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_27436 = PyInt_FromLong(27436L); if (unlikely(!__pyx_int_27436)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_32768 = PyInt_FromLong(32768L); if (unlikely(!__pyx_int_32768)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_85263 = PyInt_FromLong(85263L); if (unlikely(!__pyx_int_85263)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_168030 = PyInt_FromLong(168030L); if (unlikely(!__pyx_int_168030)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_379799 = PyInt_FromLong(379799L); if (unlikely(!__pyx_int_379799)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_1008906 = PyInt_FromLong(1008906L); if (unlikely(!__pyx_int_1008906)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_60959262 = PyInt_FromLong(60959262L); if (unlikely(!__pyx_int_60959262)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_64961464 = PyInt_FromLong(64961464L); if (unlikely(!__pyx_int_64961464)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_94173347 = PyInt_FromLong(94173347L); if (unlikely(!__pyx_int_94173347)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_int_neg_3 = PyInt_FromLong(-3); if (unlikely(!__pyx_int_neg_3)) __PYX_ERR(6, 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(6, 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 ---*/
  gLongComputationTicker = Py_None; Py_INCREF(Py_None);
  __pyx_v_6SnapPy_IS_HUGE = Py_None; Py_INCREF(Py_None);
  __pyx_v_6SnapPy_IS_BIG = Py_None; Py_INCREF(Py_None);
  __pyx_v_6SnapPy_IS_COMPLETE = Py_None; Py_INCREF(Py_None);
  __pyx_9genexpr10__pyx_v_6SnapPy_n = 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
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __pyx_vtabptr_6SnapPy_Triangulation = &__pyx_vtable_6SnapPy_Triangulation;
  __pyx_vtable_6SnapPy_Triangulation.get_from_new_plink = (PyObject *(*)(struct __pyx_obj_6SnapPy_Triangulation *, struct __pyx_opt_args_6SnapPy_13Triangulation_get_from_new_plink *__pyx_optional_args))__pyx_f_6SnapPy_13Triangulation_get_from_new_plink;
  __pyx_vtable_6SnapPy_Triangulation.get_triangulation = (PyObject *(*)(struct __pyx_obj_6SnapPy_Triangulation *, PyObject *, struct __pyx_opt_args_6SnapPy_13Triangulation_get_triangulation *__pyx_optional_args))__pyx_f_6SnapPy_13Triangulation_get_triangulation;
  __pyx_vtable_6SnapPy_Triangulation.get_HT_knot = (PyObject *(*)(struct __pyx_obj_6SnapPy_Triangulation *, PyObject *, PyObject *, PyObject *, PyObject *))__pyx_f_6SnapPy_13Triangulation_get_HT_knot;
  __pyx_vtable_6SnapPy_Triangulation.get_punctured_torus_bundle = (PyObject *(*)(struct __pyx_obj_6SnapPy_Triangulation *, PyObject *))__pyx_f_6SnapPy_13Triangulation_get_punctured_torus_bundle;
  __pyx_vtable_6SnapPy_Triangulation.get_from_file = (PyObject *(*)(struct __pyx_obj_6SnapPy_Triangulation *, PyObject *, struct __pyx_opt_args_6SnapPy_13Triangulation_get_from_file *__pyx_optional_args))__pyx_f_6SnapPy_13Triangulation_get_from_file;
  __pyx_vtable_6SnapPy_Triangulation.set_c_triangulation = (PyObject *(*)(struct __pyx_obj_6SnapPy_Triangulation *, Triangulation *))__pyx_f_6SnapPy_13Triangulation_set_c_triangulation;
  __pyx_vtable_6SnapPy_Triangulation.big_homology = (PyObject *(*)(struct __pyx_obj_6SnapPy_Triangulation *))__pyx_f_6SnapPy_13Triangulation_big_homology;
  __pyx_vtable_6SnapPy_Triangulation.c_presentation_matrix = (PyObject *(*)(struct __pyx_obj_6SnapPy_Triangulation *))__pyx_f_6SnapPy_13Triangulation_c_presentation_matrix;
  __pyx_vtable_6SnapPy_Triangulation.csmall_homology = (PyObject *(*)(struct __pyx_obj_6SnapPy_Triangulation *))__pyx_f_6SnapPy_13Triangulation_csmall_homology;
  __pyx_vtable_6SnapPy_Triangulation.build_rep_into_Sn = (RepresentationIntoSn *(*)(struct __pyx_obj_6SnapPy_Triangulation *, PyObject *))__pyx_f_6SnapPy_13Triangulation_build_rep_into_Sn;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6SnapPy_Triangulation = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy_Triangulation_spec, NULL); if (unlikely(!__pyx_ptype_6SnapPy_Triangulation)) __PYX_ERR(3, 6, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy_Triangulation_spec, __pyx_ptype_6SnapPy_Triangulation) < 0) __PYX_ERR(3, 6, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy_Triangulation = &__pyx_type_6SnapPy_Triangulation;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy_Triangulation) < 0) __PYX_ERR(3, 6, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy_Triangulation->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6SnapPy_Triangulation->tp_dictoffset && __pyx_ptype_6SnapPy_Triangulation->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy_Triangulation->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6SnapPy_Triangulation, __pyx_vtabptr_6SnapPy_Triangulation) < 0) __PYX_ERR(3, 6, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6SnapPy_Triangulation) < 0) __PYX_ERR(3, 6, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Triangulation_2, (PyObject *) __pyx_ptype_6SnapPy_Triangulation) < 0) __PYX_ERR(3, 6, __pyx_L1_error)
  __pyx_vtabptr_6SnapPy_Manifold = &__pyx_vtable_6SnapPy_Manifold;
  __pyx_vtable_6SnapPy_Manifold.__pyx_base = *__pyx_vtabptr_6SnapPy_Triangulation;
  __pyx_vtable_6SnapPy_Manifold._real_volume = (PyObject *(*)(struct __pyx_obj_6SnapPy_Manifold *))__pyx_f_6SnapPy_8Manifold__real_volume;
  __pyx_vtable_6SnapPy_Manifold._cusped_complex_volume = (PyObject *(*)(struct __pyx_obj_6SnapPy_Manifold *, Complex *, int *))__pyx_f_6SnapPy_8Manifold__cusped_complex_volume;
  __pyx_vtable_6SnapPy_Manifold._old_chern_simons = (PyObject *(*)(struct __pyx_obj_6SnapPy_Manifold *))__pyx_f_6SnapPy_8Manifold__old_chern_simons;
  __pyx_vtable_6SnapPy_Manifold._chern_simons = (PyObject *(*)(struct __pyx_obj_6SnapPy_Manifold *))__pyx_f_6SnapPy_8Manifold__chern_simons;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6SnapPy_Triangulation); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6SnapPy_Manifold = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy_Manifold_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6SnapPy_Manifold)) __PYX_ERR(1, 3, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy_Manifold_spec, __pyx_ptype_6SnapPy_Manifold) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy_Manifold = &__pyx_type_6SnapPy_Manifold;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6SnapPy_Manifold->tp_base = __pyx_ptype_6SnapPy_Triangulation;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy_Manifold) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy_Manifold->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6SnapPy_Manifold->tp_dictoffset && __pyx_ptype_6SnapPy_Manifold->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy_Manifold->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6SnapPy_Manifold, __pyx_vtabptr_6SnapPy_Manifold) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6SnapPy_Manifold) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Manifold, (PyObject *) __pyx_ptype_6SnapPy_Manifold) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6SnapPy_AbelianGroup = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy_AbelianGroup_spec, NULL); if (unlikely(!__pyx_ptype_6SnapPy_AbelianGroup)) __PYX_ERR(4, 3, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy_AbelianGroup_spec, __pyx_ptype_6SnapPy_AbelianGroup) < 0) __PYX_ERR(4, 3, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy_AbelianGroup = &__pyx_type_6SnapPy_AbelianGroup;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy_AbelianGroup) < 0) __PYX_ERR(4, 3, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy_AbelianGroup->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6SnapPy_AbelianGroup->tp_dictoffset && __pyx_ptype_6SnapPy_AbelianGroup->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy_AbelianGroup->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AbelianGroup, (PyObject *) __pyx_ptype_6SnapPy_AbelianGroup) < 0) __PYX_ERR(4, 3, __pyx_L1_error)
  __pyx_vtabptr_6SnapPy_PresentationMatrix = &__pyx_vtable_6SnapPy_PresentationMatrix;
  __pyx_vtable_6SnapPy_PresentationMatrix._set = (PyObject *(*)(struct __pyx_obj_6SnapPy_PresentationMatrix *, PyObject *, PyObject *))__pyx_f_6SnapPy_18PresentationMatrix__set;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6SnapPy_PresentationMatrix = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy_PresentationMatrix_spec, NULL); if (unlikely(!__pyx_ptype_6SnapPy_PresentationMatrix)) __PYX_ERR(4, 140, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy_PresentationMatrix_spec, __pyx_ptype_6SnapPy_PresentationMatrix) < 0) __PYX_ERR(4, 140, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy_PresentationMatrix = &__pyx_type_6SnapPy_PresentationMatrix;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy_PresentationMatrix) < 0) __PYX_ERR(4, 140, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy_PresentationMatrix->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6SnapPy_PresentationMatrix->tp_dictoffset && __pyx_ptype_6SnapPy_PresentationMatrix->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy_PresentationMatrix->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6SnapPy_PresentationMatrix, __pyx_vtabptr_6SnapPy_PresentationMatrix) < 0) __PYX_ERR(4, 140, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6SnapPy_PresentationMatrix) < 0) __PYX_ERR(4, 140, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PresentationMatrix, (PyObject *) __pyx_ptype_6SnapPy_PresentationMatrix) < 0) __PYX_ERR(4, 140, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6SnapPy_PresentationMatrix) < 0) __PYX_ERR(4, 140, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6SnapPy_CFundamentalGroup = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy_CFundamentalGroup_spec, NULL); if (unlikely(!__pyx_ptype_6SnapPy_CFundamentalGroup)) __PYX_ERR(8, 103, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy_CFundamentalGroup_spec, __pyx_ptype_6SnapPy_CFundamentalGroup) < 0) __PYX_ERR(8, 103, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy_CFundamentalGroup = &__pyx_type_6SnapPy_CFundamentalGroup;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy_CFundamentalGroup) < 0) __PYX_ERR(8, 103, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy_CFundamentalGroup->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6SnapPy_CFundamentalGroup->tp_dictoffset && __pyx_ptype_6SnapPy_CFundamentalGroup->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy_CFundamentalGroup->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CFundamentalGroup, (PyObject *) __pyx_ptype_6SnapPy_CFundamentalGroup) < 0) __PYX_ERR(8, 103, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6SnapPy_CFundamentalGroup) < 0) __PYX_ERR(8, 103, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_6SnapPy_CHolonomyGroup = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy_CHolonomyGroup_spec, __pyx_t_1);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_ptype_6SnapPy_CHolonomyGroup)) __PYX_ERR(8, 484, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy_CHolonomyGroup_spec, __pyx_ptype_6SnapPy_CHolonomyGroup) < 0) __PYX_ERR(8, 484, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy_CHolonomyGroup = &__pyx_type_6SnapPy_CHolonomyGroup;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  __pyx_ptype_6SnapPy_CHolonomyGroup->tp_base = __pyx_ptype_6SnapPy_CFundamentalGroup;
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy_CHolonomyGroup) < 0) __PYX_ERR(8, 484, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy_CHolonomyGroup->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6SnapPy_CHolonomyGroup->tp_dictoffset && __pyx_ptype_6SnapPy_CHolonomyGroup->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy_CHolonomyGroup->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CHolonomyGroup, (PyObject *) __pyx_ptype_6SnapPy_CHolonomyGroup) < 0) __PYX_ERR(8, 484, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6SnapPy_CHolonomyGroup) < 0) __PYX_ERR(8, 484, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6SnapPy_SymmetryGroup = &__pyx_vtable_6SnapPy_SymmetryGroup;
  __pyx_vtable_6SnapPy_SymmetryGroup._set_c_symmetry_group = (PyObject *(*)(struct __pyx_obj_6SnapPy_SymmetryGroup *, SymmetryGroup *))__pyx_f_6SnapPy_13SymmetryGroup__set_c_symmetry_group;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6SnapPy_SymmetryGroup = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy_SymmetryGroup_spec, NULL); if (unlikely(!__pyx_ptype_6SnapPy_SymmetryGroup)) __PYX_ERR(9, 3, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy_SymmetryGroup_spec, __pyx_ptype_6SnapPy_SymmetryGroup) < 0) __PYX_ERR(9, 3, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy_SymmetryGroup = &__pyx_type_6SnapPy_SymmetryGroup;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy_SymmetryGroup) < 0) __PYX_ERR(9, 3, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy_SymmetryGroup->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6SnapPy_SymmetryGroup->tp_dictoffset && __pyx_ptype_6SnapPy_SymmetryGroup->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy_SymmetryGroup->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_vtabptr_6SnapPy_SymmetryGroup) < 0) __PYX_ERR(9, 3, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6SnapPy_SymmetryGroup) < 0) __PYX_ERR(9, 3, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SymmetryGroup, (PyObject *) __pyx_ptype_6SnapPy_SymmetryGroup) < 0) __PYX_ERR(9, 3, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6SnapPy_SymmetryGroup) < 0) __PYX_ERR(9, 3, __pyx_L1_error)
  #endif
  __pyx_vtabptr_6SnapPy_CDirichletDomain = &__pyx_vtable_6SnapPy_CDirichletDomain;
  __pyx_vtable_6SnapPy_CDirichletDomain.triangulate = (PyObject *(*)(struct __pyx_obj_6SnapPy_CDirichletDomain *, PyObject *))__pyx_f_6SnapPy_16CDirichletDomain_triangulate;
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6SnapPy_CDirichletDomain = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy_CDirichletDomain_spec, NULL); if (unlikely(!__pyx_ptype_6SnapPy_CDirichletDomain)) __PYX_ERR(10, 97, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy_CDirichletDomain_spec, __pyx_ptype_6SnapPy_CDirichletDomain) < 0) __PYX_ERR(10, 97, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy_CDirichletDomain = &__pyx_type_6SnapPy_CDirichletDomain;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy_CDirichletDomain) < 0) __PYX_ERR(10, 97, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy_CDirichletDomain->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6SnapPy_CDirichletDomain->tp_dictoffset && __pyx_ptype_6SnapPy_CDirichletDomain->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy_CDirichletDomain->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (__Pyx_SetVtable(__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_vtabptr_6SnapPy_CDirichletDomain) < 0) __PYX_ERR(10, 97, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_MergeVtables(__pyx_ptype_6SnapPy_CDirichletDomain) < 0) __PYX_ERR(10, 97, __pyx_L1_error)
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CDirichletDomain, (PyObject *) __pyx_ptype_6SnapPy_CDirichletDomain) < 0) __PYX_ERR(10, 97, __pyx_L1_error)
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6SnapPy_CCuspNeighborhood = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy_CCuspNeighborhood_spec, NULL); if (unlikely(!__pyx_ptype_6SnapPy_CCuspNeighborhood)) __PYX_ERR(11, 3, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy_CCuspNeighborhood_spec, __pyx_ptype_6SnapPy_CCuspNeighborhood) < 0) __PYX_ERR(11, 3, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy_CCuspNeighborhood = &__pyx_type_6SnapPy_CCuspNeighborhood;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy_CCuspNeighborhood) < 0) __PYX_ERR(11, 3, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy_CCuspNeighborhood->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6SnapPy_CCuspNeighborhood->tp_dictoffset && __pyx_ptype_6SnapPy_CCuspNeighborhood->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy_CCuspNeighborhood->tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CCuspNeighborhood, (PyObject *) __pyx_ptype_6SnapPy_CCuspNeighborhood) < 0) __PYX_ERR(11, 3, __pyx_L1_error)
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_6SnapPy_CCuspNeighborhood) < 0) __PYX_ERR(11, 3, __pyx_L1_error)
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6SnapPy___pyx_scope_struct__genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy___pyx_scope_struct__genexpr_spec, NULL); if (unlikely(!__pyx_ptype_6SnapPy___pyx_scope_struct__genexpr)) __PYX_ERR(0, 551, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy___pyx_scope_struct__genexpr_spec, __pyx_ptype_6SnapPy___pyx_scope_struct__genexpr) < 0) __PYX_ERR(0, 551, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy___pyx_scope_struct__genexpr = &__pyx_type_6SnapPy___pyx_scope_struct__genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy___pyx_scope_struct__genexpr) < 0) __PYX_ERR(0, 551, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy___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_6SnapPy___pyx_scope_struct__genexpr->tp_dictoffset && __pyx_ptype_6SnapPy___pyx_scope_struct__genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy___pyx_scope_struct__genexpr->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation_spec, NULL); if (unlikely(!__pyx_ptype_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation)) __PYX_ERR(3, 1320, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation_spec, __pyx_ptype_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation) < 0) __PYX_ERR(3, 1320, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation = &__pyx_type_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation) < 0) __PYX_ERR(3, 1320, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation->tp_dictoffset && __pyx_ptype_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy___pyx_scope_struct_1__unsimplified_filled_triangulation->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6SnapPy___pyx_scope_struct_2_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy___pyx_scope_struct_2_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_6SnapPy___pyx_scope_struct_2_genexpr)) __PYX_ERR(3, 1360, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy___pyx_scope_struct_2_genexpr_spec, __pyx_ptype_6SnapPy___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(3, 1360, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy___pyx_scope_struct_2_genexpr = &__pyx_type_6SnapPy___pyx_scope_struct_2_genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(3, 1360, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy___pyx_scope_struct_2_genexpr->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6SnapPy___pyx_scope_struct_2_genexpr->tp_dictoffset && __pyx_ptype_6SnapPy___pyx_scope_struct_2_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy___pyx_scope_struct_2_genexpr->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6SnapPy___pyx_scope_struct_3_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy___pyx_scope_struct_3_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_6SnapPy___pyx_scope_struct_3_genexpr)) __PYX_ERR(3, 2429, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy___pyx_scope_struct_3_genexpr_spec, __pyx_ptype_6SnapPy___pyx_scope_struct_3_genexpr) < 0) __PYX_ERR(3, 2429, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy___pyx_scope_struct_3_genexpr = &__pyx_type_6SnapPy___pyx_scope_struct_3_genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy___pyx_scope_struct_3_genexpr) < 0) __PYX_ERR(3, 2429, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy___pyx_scope_struct_3_genexpr->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6SnapPy___pyx_scope_struct_3_genexpr->tp_dictoffset && __pyx_ptype_6SnapPy___pyx_scope_struct_3_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy___pyx_scope_struct_3_genexpr->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6SnapPy___pyx_scope_struct_4_list_as_word = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy___pyx_scope_struct_4_list_as_word_spec, NULL); if (unlikely(!__pyx_ptype_6SnapPy___pyx_scope_struct_4_list_as_word)) __PYX_ERR(8, 98, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy___pyx_scope_struct_4_list_as_word_spec, __pyx_ptype_6SnapPy___pyx_scope_struct_4_list_as_word) < 0) __PYX_ERR(8, 98, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy___pyx_scope_struct_4_list_as_word = &__pyx_type_6SnapPy___pyx_scope_struct_4_list_as_word;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy___pyx_scope_struct_4_list_as_word) < 0) __PYX_ERR(8, 98, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy___pyx_scope_struct_4_list_as_word->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6SnapPy___pyx_scope_struct_4_list_as_word->tp_dictoffset && __pyx_ptype_6SnapPy___pyx_scope_struct_4_list_as_word->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy___pyx_scope_struct_4_list_as_word->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6SnapPy___pyx_scope_struct_5_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy___pyx_scope_struct_5_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_6SnapPy___pyx_scope_struct_5_genexpr)) __PYX_ERR(8, 100, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy___pyx_scope_struct_5_genexpr_spec, __pyx_ptype_6SnapPy___pyx_scope_struct_5_genexpr) < 0) __PYX_ERR(8, 100, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy___pyx_scope_struct_5_genexpr = &__pyx_type_6SnapPy___pyx_scope_struct_5_genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy___pyx_scope_struct_5_genexpr) < 0) __PYX_ERR(8, 100, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy___pyx_scope_struct_5_genexpr->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6SnapPy___pyx_scope_struct_5_genexpr->tp_dictoffset && __pyx_ptype_6SnapPy___pyx_scope_struct_5_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy___pyx_scope_struct_5_genexpr->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6SnapPy___pyx_scope_struct_6_face_list = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy___pyx_scope_struct_6_face_list_spec, NULL); if (unlikely(!__pyx_ptype_6SnapPy___pyx_scope_struct_6_face_list)) __PYX_ERR(10, 380, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy___pyx_scope_struct_6_face_list_spec, __pyx_ptype_6SnapPy___pyx_scope_struct_6_face_list) < 0) __PYX_ERR(10, 380, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy___pyx_scope_struct_6_face_list = &__pyx_type_6SnapPy___pyx_scope_struct_6_face_list;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy___pyx_scope_struct_6_face_list) < 0) __PYX_ERR(10, 380, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy___pyx_scope_struct_6_face_list->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6SnapPy___pyx_scope_struct_6_face_list->tp_dictoffset && __pyx_ptype_6SnapPy___pyx_scope_struct_6_face_list->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy___pyx_scope_struct_6_face_list->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6SnapPy___pyx_scope_struct_7_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy___pyx_scope_struct_7_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_6SnapPy___pyx_scope_struct_7_genexpr)) __PYX_ERR(10, 434, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy___pyx_scope_struct_7_genexpr_spec, __pyx_ptype_6SnapPy___pyx_scope_struct_7_genexpr) < 0) __PYX_ERR(10, 434, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy___pyx_scope_struct_7_genexpr = &__pyx_type_6SnapPy___pyx_scope_struct_7_genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy___pyx_scope_struct_7_genexpr) < 0) __PYX_ERR(10, 434, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy___pyx_scope_struct_7_genexpr->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6SnapPy___pyx_scope_struct_7_genexpr->tp_dictoffset && __pyx_ptype_6SnapPy___pyx_scope_struct_7_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy___pyx_scope_struct_7_genexpr->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_6SnapPy___pyx_scope_struct_8_genexpr = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6SnapPy___pyx_scope_struct_8_genexpr_spec, NULL); if (unlikely(!__pyx_ptype_6SnapPy___pyx_scope_struct_8_genexpr)) __PYX_ERR(10, 636, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6SnapPy___pyx_scope_struct_8_genexpr_spec, __pyx_ptype_6SnapPy___pyx_scope_struct_8_genexpr) < 0) __PYX_ERR(10, 636, __pyx_L1_error)
  #else
  __pyx_ptype_6SnapPy___pyx_scope_struct_8_genexpr = &__pyx_type_6SnapPy___pyx_scope_struct_8_genexpr;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_6SnapPy___pyx_scope_struct_8_genexpr) < 0) __PYX_ERR(10, 636, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_6SnapPy___pyx_scope_struct_8_genexpr->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_6SnapPy___pyx_scope_struct_8_genexpr->tp_dictoffset && __pyx_ptype_6SnapPy___pyx_scope_struct_8_genexpr->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_6SnapPy___pyx_scope_struct_8_genexpr->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

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_SnapPy(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_SnapPy},
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "SnapPy",
      0, /* 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 initSnapPy(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initSnapPy(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_SnapPy(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_SnapPy(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_SnapPy(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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  Py_ssize_t __pyx_t_14;
  PyObject *(*__pyx_t_15)(PyObject *);
  long __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *(*__pyx_t_22)(PyObject *);
  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 'SnapPy' 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("SnapPy", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  if (unlikely(!__pyx_m)) __PYX_ERR(6, 1, __pyx_L1_error)
  #elif CYTHON_USE_MODULE_STATE
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 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 "SnapPy" pseudovariable */
    if (unlikely((add_module_result < 0))) __PYX_ERR(6, 1, __pyx_L1_error)
    pystate_addmodule_run = 1;
  }
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  if (unlikely(!__pyx_m)) __PYX_ERR(6, 1, __pyx_L1_error)
  #endif
  #endif
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(6, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(6, 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_SnapPy(void)", 0);
  if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(6, 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(6, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(6, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(6, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(6, 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(6, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(6, 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(6, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_SnapPy) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(6, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "SnapPy")) {
      if (unlikely((PyDict_SetItemString(modules, "SnapPy", __pyx_m) < 0))) __PYX_ERR(6, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(6, 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(6, 1, __pyx_L1_error)
  (void)__Pyx_modinit_type_import_code();
  (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(6, 1, __pyx_L1_error)
  #endif

  /* "cython/numbers/double.pyx":1
 * from .number import Number as RawNumber             # <<<<<<<<<<<<<<
 * 
 * class Number(RawNumber):
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Number);
  __Pyx_GIVEREF(__pyx_n_s_Number);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Number)) __PYX_ERR(5, 1, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_number, __pyx_t_2, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Number); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RawNumber, __pyx_t_2) < 0) __PYX_ERR(5, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/numbers/double.pyx":3
 * from .number import Number as RawNumber
 * 
 * class Number(RawNumber):             # <<<<<<<<<<<<<<
 *     _default_precision=53
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RawNumber); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(5, 3, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_3, __pyx_n_s_Number, __pyx_n_s_Number, (PyObject *) NULL, __pyx_n_s_SnapPy, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_3 != __pyx_t_2) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(5, 3, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/numbers/double.pyx":4
 * 
 * class Number(RawNumber):
 *     _default_precision=53             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "double_SnapPy.h":
 */
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_default_precision, __pyx_int_53) < 0) __PYX_ERR(5, 4, __pyx_L1_error)

  /* "cython/numbers/double.pyx":3
 * from .number import Number as RawNumber
 * 
 * class Number(RawNumber):             # <<<<<<<<<<<<<<
 *     _default_precision=53
 * 
 */
  __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_Number, __pyx_t_3, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Number, __pyx_t_2) < 0) __PYX_ERR(5, 3, __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_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":2
 * # Python modules
 * import os             # <<<<<<<<<<<<<<
 * import sys
 * import operator
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_os, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_3) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":3
 * # Python modules
 * import os
 * import sys             # <<<<<<<<<<<<<<
 * import operator
 * import types
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_3) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":4
 * import os
 * import sys
 * import operator             # <<<<<<<<<<<<<<
 * import types
 * import re
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_operator, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_operator, __pyx_t_3) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":5
 * import sys
 * import operator
 * import types             # <<<<<<<<<<<<<<
 * import re
 * import gzip
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_types, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_types, __pyx_t_3) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":6
 * import operator
 * import types
 * import re             # <<<<<<<<<<<<<<
 * import gzip
 * import struct
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_re, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_3) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":7
 * import types
 * import re
 * import gzip             # <<<<<<<<<<<<<<
 * import struct
 * import tempfile
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_gzip, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gzip, __pyx_t_3) < 0) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":8
 * import re
 * import gzip
 * import struct             # <<<<<<<<<<<<<<
 * import tempfile
 * import tarfile
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_struct, __pyx_t_3) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":9
 * import gzip
 * import struct
 * import tempfile             # <<<<<<<<<<<<<<
 * import tarfile
 * import atexit
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_tempfile, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tempfile, __pyx_t_3) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":10
 * import struct
 * import tempfile
 * import tarfile             # <<<<<<<<<<<<<<
 * import atexit
 * import math
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_tarfile, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tarfile, __pyx_t_3) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":11
 * import tempfile
 * import tarfile
 * import atexit             # <<<<<<<<<<<<<<
 * import math
 * import string
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_atexit, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_atexit, __pyx_t_3) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":12
 * import tarfile
 * import atexit
 * import math             # <<<<<<<<<<<<<<
 * import string
 * import time
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_math, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_3) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":13
 * import atexit
 * import math
 * import string             # <<<<<<<<<<<<<<
 * import time
 * python_major_version = sys.version_info.major
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_string, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_string, __pyx_t_3) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":14
 * import math
 * import string
 * import time             # <<<<<<<<<<<<<<
 * python_major_version = sys.version_info.major
 * 
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_time, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_3) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":15
 * import string
 * import time
 * python_major_version = sys.version_info.major             # <<<<<<<<<<<<<<
 * 
 * # Sage interaction
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_version_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15, __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_major); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_python_major_version, __pyx_t_3) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":18
 * 
 * # Sage interaction
 * from .sage_helper import _within_sage, SageNotAvailable             # <<<<<<<<<<<<<<
 * from .pari import pari as pari
 * try:
 */
  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_within_sage);
  __Pyx_GIVEREF(__pyx_n_s_within_sage);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_within_sage)) __PYX_ERR(0, 18, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_SageNotAvailable);
  __Pyx_GIVEREF(__pyx_n_s_SageNotAvailable);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_SageNotAvailable)) __PYX_ERR(0, 18, __pyx_L1_error);
  __pyx_t_4 = __Pyx_Import(__pyx_n_s_sage_helper, __pyx_t_3, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_within_sage); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_within_sage, __pyx_t_3) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_SageNotAvailable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SageNotAvailable, __pyx_t_3) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":19
 * # Sage interaction
 * from .sage_helper import _within_sage, SageNotAvailable
 * from .pari import pari as pari             # <<<<<<<<<<<<<<
 * try:
 *     import sage.all
 */
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_s_pari);
  __Pyx_GIVEREF(__pyx_n_s_pari);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_pari)) __PYX_ERR(0, 19, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_pari, __pyx_t_4, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_pari); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pari, __pyx_t_4) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":20
 * from .sage_helper import _within_sage, SageNotAvailable
 * from .pari import pari as pari
 * try:             # <<<<<<<<<<<<<<
 *     import sage.all
 *     import sage.structure.sage_object
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "cython/core/basic.pyx":21
 * from .pari import pari as pari
 * try:
 *     import sage.all             # <<<<<<<<<<<<<<
 *     import sage.structure.sage_object
 *     from sage.groups.perm_gps.permgroup_element import is_PermutationGroupElement
 */
      __pyx_t_3 = __Pyx_Import(__pyx_n_s_sage_all, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 21, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_sage, __pyx_t_3) < 0) __PYX_ERR(0, 21, __pyx_L2_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cython/core/basic.pyx":22
 * try:
 *     import sage.all
 *     import sage.structure.sage_object             # <<<<<<<<<<<<<<
 *     from sage.groups.perm_gps.permgroup_element import is_PermutationGroupElement
 *     from sage.groups.perm_gps.permgroup import PermutationGroup
 */
      __pyx_t_3 = __Pyx_Import(__pyx_n_s_sage_structure_sage_object, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_sage, __pyx_t_3) < 0) __PYX_ERR(0, 22, __pyx_L2_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cython/core/basic.pyx":23
 *     import sage.all
 *     import sage.structure.sage_object
 *     from sage.groups.perm_gps.permgroup_element import is_PermutationGroupElement             # <<<<<<<<<<<<<<
 *     from sage.groups.perm_gps.permgroup import PermutationGroup
 *     from sage.groups.free_group import FreeGroup
 */
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_n_s_is_PermutationGroupElement);
      __Pyx_GIVEREF(__pyx_n_s_is_PermutationGroupElement);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_is_PermutationGroupElement)) __PYX_ERR(0, 23, __pyx_L2_error);
      __pyx_t_4 = __Pyx_Import(__pyx_n_s_sage_groups_perm_gps_permgroup_e, __pyx_t_3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 23, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_is_PermutationGroupElement); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_PermutationGroupElement, __pyx_t_3) < 0) __PYX_ERR(0, 23, __pyx_L2_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/basic.pyx":24
 *     import sage.structure.sage_object
 *     from sage.groups.perm_gps.permgroup_element import is_PermutationGroupElement
 *     from sage.groups.perm_gps.permgroup import PermutationGroup             # <<<<<<<<<<<<<<
 *     from sage.groups.free_group import FreeGroup
 *     from sage.interfaces.gap import gap
 */
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 24, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_n_s_PermutationGroup);
      __Pyx_GIVEREF(__pyx_n_s_PermutationGroup);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_PermutationGroup)) __PYX_ERR(0, 24, __pyx_L2_error);
      __pyx_t_3 = __Pyx_Import(__pyx_n_s_sage_groups_perm_gps_permgroup, __pyx_t_4, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PermutationGroup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 24, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_PermutationGroup, __pyx_t_4) < 0) __PYX_ERR(0, 24, __pyx_L2_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cython/core/basic.pyx":25
 *     from sage.groups.perm_gps.permgroup_element import is_PermutationGroupElement
 *     from sage.groups.perm_gps.permgroup import PermutationGroup
 *     from sage.groups.free_group import FreeGroup             # <<<<<<<<<<<<<<
 *     from sage.interfaces.gap import gap
 *     from sage.interfaces.magma import magma
 */
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_n_s_FreeGroup);
      __Pyx_GIVEREF(__pyx_n_s_FreeGroup);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_FreeGroup)) __PYX_ERR(0, 25, __pyx_L2_error);
      __pyx_t_4 = __Pyx_Import(__pyx_n_s_sage_groups_free_group, __pyx_t_3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 25, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_FreeGroup); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 25, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_FreeGroup, __pyx_t_3) < 0) __PYX_ERR(0, 25, __pyx_L2_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/basic.pyx":26
 *     from sage.groups.perm_gps.permgroup import PermutationGroup
 *     from sage.groups.free_group import FreeGroup
 *     from sage.interfaces.gap import gap             # <<<<<<<<<<<<<<
 *     from sage.interfaces.magma import magma
 *     try:
 */
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_n_s_gap);
      __Pyx_GIVEREF(__pyx_n_s_gap);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_gap)) __PYX_ERR(0, 26, __pyx_L2_error);
      __pyx_t_3 = __Pyx_Import(__pyx_n_s_sage_interfaces_gap, __pyx_t_4, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_gap); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_gap, __pyx_t_4) < 0) __PYX_ERR(0, 26, __pyx_L2_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cython/core/basic.pyx":27
 *     from sage.groups.free_group import FreeGroup
 *     from sage.interfaces.gap import gap
 *     from sage.interfaces.magma import magma             # <<<<<<<<<<<<<<
 *     try:
 *         from sage.interfaces.abc import GapElement, MagmaElement
 */
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_n_s_magma);
      __Pyx_GIVEREF(__pyx_n_s_magma);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_magma)) __PYX_ERR(0, 27, __pyx_L2_error);
      __pyx_t_4 = __Pyx_Import(__pyx_n_s_sage_interfaces_magma, __pyx_t_3, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 27, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_magma); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 27, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_magma, __pyx_t_3) < 0) __PYX_ERR(0, 27, __pyx_L2_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/basic.pyx":28
 *     from sage.interfaces.gap import gap
 *     from sage.interfaces.magma import magma
 *     try:             # <<<<<<<<<<<<<<
 *         from sage.interfaces.abc import GapElement, MagmaElement
 * 
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
        __Pyx_XGOTREF(__pyx_t_8);
        __Pyx_XGOTREF(__pyx_t_9);
        __Pyx_XGOTREF(__pyx_t_10);
        /*try:*/ {

          /* "cython/core/basic.pyx":29
 *     from sage.interfaces.magma import magma
 *     try:
 *         from sage.interfaces.abc import GapElement, MagmaElement             # <<<<<<<<<<<<<<
 * 
 *         def is_GapElement(elt):
 */
          __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_n_s_GapElement);
          __Pyx_GIVEREF(__pyx_n_s_GapElement);
          if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_GapElement)) __PYX_ERR(0, 29, __pyx_L8_error);
          __Pyx_INCREF(__pyx_n_s_MagmaElement);
          __Pyx_GIVEREF(__pyx_n_s_MagmaElement);
          if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_MagmaElement)) __PYX_ERR(0, 29, __pyx_L8_error);
          __pyx_t_3 = __Pyx_Import(__pyx_n_s_sage_interfaces_abc, __pyx_t_4, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_GapElement); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (PyDict_SetItem(__pyx_d, __pyx_n_s_GapElement, __pyx_t_4) < 0) __PYX_ERR(0, 29, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_MagmaElement); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (PyDict_SetItem(__pyx_d, __pyx_n_s_MagmaElement, __pyx_t_4) < 0) __PYX_ERR(0, 29, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "cython/core/basic.pyx":31
 *         from sage.interfaces.abc import GapElement, MagmaElement
 * 
 *         def is_GapElement(elt):             # <<<<<<<<<<<<<<
 *             return isinstance(elt, GapElement)
 * 
 */
          __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_1is_GapElement, 0, __pyx_n_s_is_GapElement, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 31, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_GapElement, __pyx_t_3) < 0) __PYX_ERR(0, 31, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "cython/core/basic.pyx":34
 *             return isinstance(elt, GapElement)
 * 
 *         def is_MagmaElement(elt):             # <<<<<<<<<<<<<<
 *             return isinstance(elt, MagmaElement)
 *     except:
 */
          __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_3is_MagmaElement, 0, __pyx_n_s_is_MagmaElement, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__175)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_MagmaElement, __pyx_t_3) < 0) __PYX_ERR(0, 34, __pyx_L8_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "cython/core/basic.pyx":28
 *     from sage.interfaces.gap import gap
 *     from sage.interfaces.magma import magma
 *     try:             # <<<<<<<<<<<<<<
 *         from sage.interfaces.abc import GapElement, MagmaElement
 * 
 */
        }
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L13_try_end;
        __pyx_L8_error:;
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "cython/core/basic.pyx":36
 *         def is_MagmaElement(elt):
 *             return isinstance(elt, MagmaElement)
 *     except:             # <<<<<<<<<<<<<<
 *         from sage.interfaces.gap import is_GapElement
 *         from sage.interfaces.magma import is_MagmaElement
 */
        /*except:*/ {
          __Pyx_AddTraceback("SnapPy", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 36, __pyx_L10_except_error)
          __Pyx_XGOTREF(__pyx_t_3);
          __Pyx_XGOTREF(__pyx_t_4);
          __Pyx_XGOTREF(__pyx_t_5);

          /* "cython/core/basic.pyx":37
 *             return isinstance(elt, MagmaElement)
 *     except:
 *         from sage.interfaces.gap import is_GapElement             # <<<<<<<<<<<<<<
 *         from sage.interfaces.magma import is_MagmaElement
 *     # for testing:
 */
          __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_INCREF(__pyx_n_s_is_GapElement);
          __Pyx_GIVEREF(__pyx_n_s_is_GapElement);
          if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_is_GapElement)) __PYX_ERR(0, 37, __pyx_L10_except_error);
          __pyx_t_11 = __Pyx_Import(__pyx_n_s_sage_interfaces_gap, __pyx_t_2, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 37, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_11, __pyx_n_s_is_GapElement); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_GapElement, __pyx_t_2) < 0) __PYX_ERR(0, 37, __pyx_L10_except_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

          /* "cython/core/basic.pyx":38
 *     except:
 *         from sage.interfaces.gap import is_GapElement
 *         from sage.interfaces.magma import is_MagmaElement             # <<<<<<<<<<<<<<
 *     # for testing:
 *     from sage.matrix.constructor import matrix as sage_matrix
 */
          __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 38, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_INCREF(__pyx_n_s_is_MagmaElement);
          __Pyx_GIVEREF(__pyx_n_s_is_MagmaElement);
          if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 0, __pyx_n_s_is_MagmaElement)) __PYX_ERR(0, 38, __pyx_L10_except_error);
          __pyx_t_2 = __Pyx_Import(__pyx_n_s_sage_interfaces_magma, __pyx_t_11, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_is_MagmaElement); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 38, __pyx_L10_except_error)
          __Pyx_GOTREF(__pyx_t_11);
          if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_MagmaElement, __pyx_t_11) < 0) __PYX_ERR(0, 38, __pyx_L10_except_error)
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          goto __pyx_L9_exception_handled;
        }

        /* "cython/core/basic.pyx":28
 *     from sage.interfaces.gap import gap
 *     from sage.interfaces.magma import magma
 *     try:             # <<<<<<<<<<<<<<
 *         from sage.interfaces.abc import GapElement, MagmaElement
 * 
 */
        __pyx_L10_except_error:;
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
        goto __pyx_L2_error;
        __pyx_L9_exception_handled:;
        __Pyx_XGIVEREF(__pyx_t_8);
        __Pyx_XGIVEREF(__pyx_t_9);
        __Pyx_XGIVEREF(__pyx_t_10);
        __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
        __pyx_L13_try_end:;
      }

      /* "cython/core/basic.pyx":40
 *         from sage.interfaces.magma import is_MagmaElement
 *     # for testing:
 *     from sage.matrix.constructor import matrix as sage_matrix             # <<<<<<<<<<<<<<
 * except ImportError:
 *     pass
 */
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 40, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_n_s_matrix);
      __Pyx_GIVEREF(__pyx_n_s_matrix);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_matrix)) __PYX_ERR(0, 40, __pyx_L2_error);
      __pyx_t_4 = __Pyx_Import(__pyx_n_s_sage_matrix_constructor, __pyx_t_5, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 40, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_matrix); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 40, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_sage_matrix, __pyx_t_5) < 0) __PYX_ERR(0, 40, __pyx_L2_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/basic.pyx":20
 * from .sage_helper import _within_sage, SageNotAvailable
 * from .pari import pari as pari
 * try:             # <<<<<<<<<<<<<<
 *     import sage.all
 *     import sage.structure.sage_object
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L7_try_end;
    __pyx_L2_error:;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/basic.pyx":41
 *     # for testing:
 *     from sage.matrix.constructor import matrix as sage_matrix
 * except ImportError:             # <<<<<<<<<<<<<<
 *     pass
 * 
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_12) {
      __Pyx_ErrRestore(0,0,0);
      goto __pyx_L3_exception_handled;
    }
    goto __pyx_L4_except_error;

    /* "cython/core/basic.pyx":20
 * from .sage_helper import _within_sage, SageNotAvailable
 * from .pari import pari as pari
 * try:             # <<<<<<<<<<<<<<
 *     import sage.all
 *     import sage.structure.sage_object
 */
    __pyx_L4_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L3_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_6, __pyx_t_7);
    __pyx_L7_try_end:;
  }

  /* "cython/core/basic.pyx":44
 *     pass
 * 
 * from .matrix import matrix             # <<<<<<<<<<<<<<
 * from . import number
 * 
 */
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_s_matrix);
  __Pyx_GIVEREF(__pyx_n_s_matrix);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_matrix)) __PYX_ERR(0, 44, __pyx_L1_error);
  __pyx_t_5 = __Pyx_Import(__pyx_n_s_matrix, __pyx_t_4, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_matrix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_matrix, __pyx_t_4) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":45
 * 
 * from .matrix import matrix
 * from . import number             # <<<<<<<<<<<<<<
 * 
 * # SnapPy components
 */
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_number);
  __Pyx_GIVEREF(__pyx_n_s_number);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_number)) __PYX_ERR(0, 45, __pyx_L1_error);
  __pyx_t_4 = __Pyx_Import(__pyx_kp_s__9, __pyx_t_5, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_number); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_number, __pyx_t_5) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":48
 * 
 * # SnapPy components
 * import spherogram             # <<<<<<<<<<<<<<
 * from .manifolds import __path__ as manifold_paths
 * from . import database
 */
  __pyx_t_4 = __Pyx_ImportDottedModule(__pyx_n_s_spherogram, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_spherogram, __pyx_t_4) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":49
 * # SnapPy components
 * import spherogram
 * from .manifolds import __path__ as manifold_paths             # <<<<<<<<<<<<<<
 * from . import database
 * from . import twister
 */
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_s_path_2);
  __Pyx_GIVEREF(__pyx_n_s_path_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_path_2)) __PYX_ERR(0, 49, __pyx_L1_error);
  __pyx_t_5 = __Pyx_Import(__pyx_n_s_manifolds, __pyx_t_4, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_path_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_manifold_paths, __pyx_t_4) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":50
 * import spherogram
 * from .manifolds import __path__ as manifold_paths
 * from . import database             # <<<<<<<<<<<<<<
 * from . import twister
 * from . import snap
 */
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_database);
  __Pyx_GIVEREF(__pyx_n_s_database);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_database)) __PYX_ERR(0, 50, __pyx_L1_error);
  __pyx_t_4 = __Pyx_Import(__pyx_kp_s__9, __pyx_t_5, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_database); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_database, __pyx_t_5) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":51
 * from .manifolds import __path__ as manifold_paths
 * from . import database
 * from . import twister             # <<<<<<<<<<<<<<
 * from . import snap
 * from . import verify
 */
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_s_twister);
  __Pyx_GIVEREF(__pyx_n_s_twister);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_twister)) __PYX_ERR(0, 51, __pyx_L1_error);
  __pyx_t_5 = __Pyx_Import(__pyx_kp_s__9, __pyx_t_4, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_twister); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_twister, __pyx_t_4) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":52
 * from . import database
 * from . import twister
 * from . import snap             # <<<<<<<<<<<<<<
 * from . import verify
 * from .verify import complex_volume as verify_complex_volume
 */
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_snap);
  __Pyx_GIVEREF(__pyx_n_s_snap);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_snap)) __PYX_ERR(0, 52, __pyx_L1_error);
  __pyx_t_4 = __Pyx_Import(__pyx_kp_s__9, __pyx_t_5, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_snap); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_snap, __pyx_t_5) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":53
 * from . import twister
 * from . import snap
 * from . import verify             # <<<<<<<<<<<<<<
 * from .verify import complex_volume as verify_complex_volume
 * from . import decorated_isosig
 */
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_s_verify);
  __Pyx_GIVEREF(__pyx_n_s_verify);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_verify)) __PYX_ERR(0, 53, __pyx_L1_error);
  __pyx_t_5 = __Pyx_Import(__pyx_kp_s__9, __pyx_t_4, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_verify); 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_verify, __pyx_t_4) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":54
 * from . import snap
 * from . import verify
 * from .verify import complex_volume as verify_complex_volume             # <<<<<<<<<<<<<<
 * from . import decorated_isosig
 * from .ptolemy import manifoldMethods as ptolemyManifoldMethods
 */
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_complex_volume);
  __Pyx_GIVEREF(__pyx_n_s_complex_volume);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_complex_volume)) __PYX_ERR(0, 54, __pyx_L1_error);
  __pyx_t_4 = __Pyx_Import(__pyx_n_s_verify, __pyx_t_5, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_complex_volume); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_verify_complex_volume, __pyx_t_5) < 0) __PYX_ERR(0, 54, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":55
 * from . import verify
 * from .verify import complex_volume as verify_complex_volume
 * from . import decorated_isosig             # <<<<<<<<<<<<<<
 * from .ptolemy import manifoldMethods as ptolemyManifoldMethods
 * from .export_stl import stl
 */
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_s_decorated_isosig);
  __Pyx_GIVEREF(__pyx_n_s_decorated_isosig);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_decorated_isosig)) __PYX_ERR(0, 55, __pyx_L1_error);
  __pyx_t_5 = __Pyx_Import(__pyx_kp_s__9, __pyx_t_4, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_decorated_isosig); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_decorated_isosig, __pyx_t_4) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":56
 * from .verify import complex_volume as verify_complex_volume
 * from . import decorated_isosig
 * from .ptolemy import manifoldMethods as ptolemyManifoldMethods             # <<<<<<<<<<<<<<
 * from .export_stl import stl
 * from .exceptions import SnapPeaFatalError
 */
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_manifoldMethods);
  __Pyx_GIVEREF(__pyx_n_s_manifoldMethods);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_manifoldMethods)) __PYX_ERR(0, 56, __pyx_L1_error);
  __pyx_t_4 = __Pyx_Import(__pyx_n_s_ptolemy, __pyx_t_5, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_manifoldMethods); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ptolemyManifoldMethods, __pyx_t_5) < 0) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":57
 * from . import decorated_isosig
 * from .ptolemy import manifoldMethods as ptolemyManifoldMethods
 * from .export_stl import stl             # <<<<<<<<<<<<<<
 * from .exceptions import SnapPeaFatalError
 * try:
 */
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_s_stl);
  __Pyx_GIVEREF(__pyx_n_s_stl);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_stl)) __PYX_ERR(0, 57, __pyx_L1_error);
  __pyx_t_5 = __Pyx_Import(__pyx_n_s_export_stl, __pyx_t_4, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_stl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_stl, __pyx_t_4) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":58
 * from .ptolemy import manifoldMethods as ptolemyManifoldMethods
 * from .export_stl import stl
 * from .exceptions import SnapPeaFatalError             # <<<<<<<<<<<<<<
 * try:
 *     from plink import LinkEditor, LinkManager
 */
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_SnapPeaFatalError);
  __Pyx_GIVEREF(__pyx_n_s_SnapPeaFatalError);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_SnapPeaFatalError)) __PYX_ERR(0, 58, __pyx_L1_error);
  __pyx_t_4 = __Pyx_Import(__pyx_n_s_exceptions, __pyx_t_5, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_SnapPeaFatalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SnapPeaFatalError, __pyx_t_5) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":59
 * from .export_stl import stl
 * from .exceptions import SnapPeaFatalError
 * try:             # <<<<<<<<<<<<<<
 *     from plink import LinkEditor, LinkManager
 * except ImportError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_1);
    /*try:*/ {

      /* "cython/core/basic.pyx":60
 * from .exceptions import SnapPeaFatalError
 * try:
 *     from plink import LinkEditor, LinkManager             # <<<<<<<<<<<<<<
 * except ImportError:
 *     LinkEditor, LinkManager = None, None
 */
      __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_n_s_LinkEditor);
      __Pyx_GIVEREF(__pyx_n_s_LinkEditor);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_LinkEditor)) __PYX_ERR(0, 60, __pyx_L16_error);
      __Pyx_INCREF(__pyx_n_s_LinkManager);
      __Pyx_GIVEREF(__pyx_n_s_LinkManager);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_LinkManager)) __PYX_ERR(0, 60, __pyx_L16_error);
      __pyx_t_5 = __Pyx_Import(__pyx_n_s_plink, __pyx_t_4, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_LinkEditor); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinkEditor, __pyx_t_4) < 0) __PYX_ERR(0, 60, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_LinkManager); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinkManager, __pyx_t_4) < 0) __PYX_ERR(0, 60, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cython/core/basic.pyx":59
 * from .export_stl import stl
 * from .exceptions import SnapPeaFatalError
 * try:             # <<<<<<<<<<<<<<
 *     from plink import LinkEditor, LinkManager
 * except ImportError:
 */
    }
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L21_try_end;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/basic.pyx":61
 * try:
 *     from plink import LinkEditor, LinkManager
 * except ImportError:             # <<<<<<<<<<<<<<
 *     LinkEditor, LinkManager = None, None
 * try:
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_12) {
      __Pyx_AddTraceback("SnapPy", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 61, __pyx_L18_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_3);

      /* "cython/core/basic.pyx":62
 *     from plink import LinkEditor, LinkManager
 * except ImportError:
 *     LinkEditor, LinkManager = None, None             # <<<<<<<<<<<<<<
 * try:
 *     from .gui import ViewerWindow
 */
      __pyx_t_2 = Py_None;
      __Pyx_INCREF(__pyx_t_2);
      __pyx_t_11 = Py_None;
      __Pyx_INCREF(__pyx_t_11);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinkEditor, __pyx_t_2) < 0) __PYX_ERR(0, 62, __pyx_L18_except_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinkManager, __pyx_t_11) < 0) __PYX_ERR(0, 62, __pyx_L18_except_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L17_exception_handled;
    }
    goto __pyx_L18_except_error;

    /* "cython/core/basic.pyx":59
 * from .export_stl import stl
 * from .exceptions import SnapPeaFatalError
 * try:             # <<<<<<<<<<<<<<
 *     from plink import LinkEditor, LinkManager
 * except ImportError:
 */
    __pyx_L18_except_error:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_1);
    goto __pyx_L1_error;
    __pyx_L17_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_1);
    __pyx_L21_try_end:;
  }

  /* "cython/core/basic.pyx":63
 * except ImportError:
 *     LinkEditor, LinkManager = None, None
 * try:             # <<<<<<<<<<<<<<
 *     from .gui import ViewerWindow
 * except ImportError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "cython/core/basic.pyx":64
 *     LinkEditor, LinkManager = None, None
 * try:
 *     from .gui import ViewerWindow             # <<<<<<<<<<<<<<
 * except ImportError:
 *     ViewerWindow = None
 */
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_n_s_ViewerWindow);
      __Pyx_GIVEREF(__pyx_n_s_ViewerWindow);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_ViewerWindow)) __PYX_ERR(0, 64, __pyx_L24_error);
      __pyx_t_4 = __Pyx_Import(__pyx_n_s_gui, __pyx_t_3, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_ViewerWindow); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_ViewerWindow, __pyx_t_3) < 0) __PYX_ERR(0, 64, __pyx_L24_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/basic.pyx":63
 * except ImportError:
 *     LinkEditor, LinkManager = None, None
 * try:             # <<<<<<<<<<<<<<
 *     from .gui import ViewerWindow
 * except ImportError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L29_try_end;
    __pyx_L24_error:;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/basic.pyx":65
 * try:
 *     from .gui import ViewerWindow
 * except ImportError:             # <<<<<<<<<<<<<<
 *     ViewerWindow = None
 * try:
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_12) {
      __Pyx_AddTraceback("SnapPy", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 65, __pyx_L26_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_5);

      /* "cython/core/basic.pyx":66
 *     from .gui import ViewerWindow
 * except ImportError:
 *     ViewerWindow = None             # <<<<<<<<<<<<<<
 * try:
 *     from .polyviewer import PolyhedronViewer
 */
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_ViewerWindow, Py_None) < 0) __PYX_ERR(0, 66, __pyx_L26_except_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L25_exception_handled;
    }
    goto __pyx_L26_except_error;

    /* "cython/core/basic.pyx":63
 * except ImportError:
 *     LinkEditor, LinkManager = None, None
 * try:             # <<<<<<<<<<<<<<
 *     from .gui import ViewerWindow
 * except ImportError:
 */
    __pyx_L26_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L25_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_6, __pyx_t_7);
    __pyx_L29_try_end:;
  }

  /* "cython/core/basic.pyx":67
 * except ImportError:
 *     ViewerWindow = None
 * try:             # <<<<<<<<<<<<<<
 *     from .polyviewer import PolyhedronViewer
 * except ImportError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_1);
    /*try:*/ {

      /* "cython/core/basic.pyx":68
 *     ViewerWindow = None
 * try:
 *     from .polyviewer import PolyhedronViewer             # <<<<<<<<<<<<<<
 * except ImportError:
 *     PolyhedronViewer = None
 */
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 68, __pyx_L32_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_n_s_PolyhedronViewer);
      __Pyx_GIVEREF(__pyx_n_s_PolyhedronViewer);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_PolyhedronViewer)) __PYX_ERR(0, 68, __pyx_L32_error);
      __pyx_t_3 = __Pyx_Import(__pyx_n_s_polyviewer, __pyx_t_5, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L32_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PolyhedronViewer); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 68, __pyx_L32_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_PolyhedronViewer, __pyx_t_5) < 0) __PYX_ERR(0, 68, __pyx_L32_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cython/core/basic.pyx":67
 * except ImportError:
 *     ViewerWindow = None
 * try:             # <<<<<<<<<<<<<<
 *     from .polyviewer import PolyhedronViewer
 * except ImportError:
 */
    }
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L37_try_end;
    __pyx_L32_error:;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/basic.pyx":69
 * try:
 *     from .polyviewer import PolyhedronViewer
 * except ImportError:             # <<<<<<<<<<<<<<
 *     PolyhedronViewer = None
 * try:
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_12) {
      __Pyx_AddTraceback("SnapPy", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 69, __pyx_L34_except_error)
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_4);

      /* "cython/core/basic.pyx":70
 *     from .polyviewer import PolyhedronViewer
 * except ImportError:
 *     PolyhedronViewer = None             # <<<<<<<<<<<<<<
 * try:
 *     from .horoviewer import HoroballViewer
 */
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_PolyhedronViewer, Py_None) < 0) __PYX_ERR(0, 70, __pyx_L34_except_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L33_exception_handled;
    }
    goto __pyx_L34_except_error;

    /* "cython/core/basic.pyx":67
 * except ImportError:
 *     ViewerWindow = None
 * try:             # <<<<<<<<<<<<<<
 *     from .polyviewer import PolyhedronViewer
 * except ImportError:
 */
    __pyx_L34_except_error:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_1);
    goto __pyx_L1_error;
    __pyx_L33_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_1);
    __pyx_L37_try_end:;
  }

  /* "cython/core/basic.pyx":71
 * except ImportError:
 *     PolyhedronViewer = None
 * try:             # <<<<<<<<<<<<<<
 *     from .horoviewer import HoroballViewer
 * except ImportError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "cython/core/basic.pyx":72
 *     PolyhedronViewer = None
 * try:
 *     from .horoviewer import HoroballViewer             # <<<<<<<<<<<<<<
 * except ImportError:
 *     HoroballViewer = None
 */
      __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L40_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_n_s_HoroballViewer);
      __Pyx_GIVEREF(__pyx_n_s_HoroballViewer);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_HoroballViewer)) __PYX_ERR(0, 72, __pyx_L40_error);
      __pyx_t_5 = __Pyx_Import(__pyx_n_s_horoviewer, __pyx_t_4, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 72, __pyx_L40_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_5, __pyx_n_s_HoroballViewer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L40_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_HoroballViewer, __pyx_t_4) < 0) __PYX_ERR(0, 72, __pyx_L40_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "cython/core/basic.pyx":71
 * except ImportError:
 *     PolyhedronViewer = None
 * try:             # <<<<<<<<<<<<<<
 *     from .horoviewer import HoroballViewer
 * except ImportError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L45_try_end;
    __pyx_L40_error:;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/basic.pyx":73
 * try:
 *     from .horoviewer import HoroballViewer
 * except ImportError:             # <<<<<<<<<<<<<<
 *     HoroballViewer = None
 * try:
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_12) {
      __Pyx_AddTraceback("SnapPy", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 73, __pyx_L42_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_3);

      /* "cython/core/basic.pyx":74
 *     from .horoviewer import HoroballViewer
 * except ImportError:
 *     HoroballViewer = None             # <<<<<<<<<<<<<<
 * try:
 *     from .browser import Browser
 */
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_HoroballViewer, Py_None) < 0) __PYX_ERR(0, 74, __pyx_L42_except_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      goto __pyx_L41_exception_handled;
    }
    goto __pyx_L42_except_error;

    /* "cython/core/basic.pyx":71
 * except ImportError:
 *     PolyhedronViewer = None
 * try:             # <<<<<<<<<<<<<<
 *     from .horoviewer import HoroballViewer
 * except ImportError:
 */
    __pyx_L42_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L41_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_6, __pyx_t_7);
    __pyx_L45_try_end:;
  }

  /* "cython/core/basic.pyx":75
 * except ImportError:
 *     HoroballViewer = None
 * try:             # <<<<<<<<<<<<<<
 *     from .browser import Browser
 * except ImportError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_1);
    /*try:*/ {

      /* "cython/core/basic.pyx":76
 *     HoroballViewer = None
 * try:
 *     from .browser import Browser             # <<<<<<<<<<<<<<
 * except ImportError:
 *     Browser = None
 */
      __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L48_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_n_s_Browser);
      __Pyx_GIVEREF(__pyx_n_s_Browser);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_Browser)) __PYX_ERR(0, 76, __pyx_L48_error);
      __pyx_t_4 = __Pyx_Import(__pyx_n_s_browser, __pyx_t_3, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L48_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_Browser); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 76, __pyx_L48_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_Browser, __pyx_t_3) < 0) __PYX_ERR(0, 76, __pyx_L48_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "cython/core/basic.pyx":75
 * except ImportError:
 *     HoroballViewer = None
 * try:             # <<<<<<<<<<<<<<
 *     from .browser import Browser
 * except ImportError:
 */
    }
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    goto __pyx_L53_try_end;
    __pyx_L48_error:;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/basic.pyx":77
 * try:
 *     from .browser import Browser
 * except ImportError:             # <<<<<<<<<<<<<<
 *     Browser = None
 * try:
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_12) {
      __Pyx_AddTraceback("SnapPy", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 77, __pyx_L50_except_error)
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_5);

      /* "cython/core/basic.pyx":78
 *     from .browser import Browser
 * except ImportError:
 *     Browser = None             # <<<<<<<<<<<<<<
 * try:
 *     from .filedialog import asksaveasfile
 */
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_Browser, Py_None) < 0) __PYX_ERR(0, 78, __pyx_L50_except_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L49_exception_handled;
    }
    goto __pyx_L50_except_error;

    /* "cython/core/basic.pyx":75
 * except ImportError:
 *     HoroballViewer = None
 * try:             # <<<<<<<<<<<<<<
 *     from .browser import Browser
 * except ImportError:
 */
    __pyx_L50_except_error:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_1);
    goto __pyx_L1_error;
    __pyx_L49_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_1);
    __pyx_L53_try_end:;
  }

  /* "cython/core/basic.pyx":79
 * except ImportError:
 *     Browser = None
 * try:             # <<<<<<<<<<<<<<
 *     from .filedialog import asksaveasfile
 * except ImportError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "cython/core/basic.pyx":80
 *     Browser = None
 * try:
 *     from .filedialog import asksaveasfile             # <<<<<<<<<<<<<<
 * except ImportError:
 *     asksaveasfile = None
 */
      __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L56_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_n_s_asksaveasfile);
      __Pyx_GIVEREF(__pyx_n_s_asksaveasfile);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_asksaveasfile)) __PYX_ERR(0, 80, __pyx_L56_error);
      __pyx_t_3 = __Pyx_Import(__pyx_n_s_filedialog, __pyx_t_5, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L56_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_asksaveasfile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L56_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_asksaveasfile, __pyx_t_5) < 0) __PYX_ERR(0, 80, __pyx_L56_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "cython/core/basic.pyx":79
 * except ImportError:
 *     Browser = None
 * try:             # <<<<<<<<<<<<<<
 *     from .filedialog import asksaveasfile
 * except ImportError:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L61_try_end;
    __pyx_L56_error:;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cython/core/basic.pyx":81
 * try:
 *     from .filedialog import asksaveasfile
 * except ImportError:             # <<<<<<<<<<<<<<
 *     asksaveasfile = None
 * 
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
    if (__pyx_t_12) {
      __Pyx_AddTraceback("SnapPy", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 81, __pyx_L58_except_error)
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_4);

      /* "cython/core/basic.pyx":82
 *     from .filedialog import asksaveasfile
 * except ImportError:
 *     asksaveasfile = None             # <<<<<<<<<<<<<<
 * 
 * # This is part of the UCS2 hack.
 */
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_asksaveasfile, Py_None) < 0) __PYX_ERR(0, 82, __pyx_L58_except_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L57_exception_handled;
    }
    goto __pyx_L58_except_error;

    /* "cython/core/basic.pyx":79
 * except ImportError:
 *     Browser = None
 * try:             # <<<<<<<<<<<<<<
 *     from .filedialog import asksaveasfile
 * except ImportError:
 */
    __pyx_L58_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L57_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_6, __pyx_t_7);
    __pyx_L61_try_end:;
  }

  /* "cython/core/basic.pyx":89
 * 
 * 
 * def valid_index(i, n, format_str):             # <<<<<<<<<<<<<<
 *     """
 *     Return range(n)[i] or raises a nicely formatted IndexError
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_5valid_index, 0, __pyx_n_s_valid_index, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_valid_index, __pyx_t_4) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":112
 * 
 * # A stream for asynchronous messages
 * class MsgIO():             # <<<<<<<<<<<<<<
 *     def __init__(self):
 *         if sys.stdout is None:
 */
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_MsgIO, __pyx_n_s_MsgIO, (PyObject *) NULL, __pyx_n_s_SnapPy, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "cython/core/basic.pyx":113
 * # A stream for asynchronous messages
 * class MsgIO():
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         if sys.stdout is None:
 *             self.write = None
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_5MsgIO_1__init__, 0, __pyx_n_s_MsgIO___init, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":112
 * 
 * # A stream for asynchronous messages
 * class MsgIO():             # <<<<<<<<<<<<<<
 *     def __init__(self):
 *         if sys.stdout is None:
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_n_s_MsgIO, __pyx_empty_tuple, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MsgIO, __pyx_t_5) < 0) __PYX_ERR(0, 112, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":122
 * 
 * 
 * msg_stream = MsgIO()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MsgIO); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_msg_stream, __pyx_t_5) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":125
 * 
 * 
 * def to_str(s):             # <<<<<<<<<<<<<<
 *     return s.decode()
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_7to_str, 0, __pyx_n_s_to_str, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__181)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_to_str, __pyx_t_5) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":129
 * 
 * 
 * def bytearray_to_bytes(x):             # <<<<<<<<<<<<<<
 *     return bytes(x)
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_9bytearray_to_bytes, 0, __pyx_n_s_bytearray_to_bytes, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__183)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bytearray_to_bytes, __pyx_t_5) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":133
 * 
 * 
 * def to_byte_str(s):             # <<<<<<<<<<<<<<
 *     return s.encode('utf-8') if type(s) != bytes else s
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_11to_byte_str, 0, __pyx_n_s_to_byte_str, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__184)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_to_byte_str, __pyx_t_5) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":138
 * 
 * # Types of covering spaces
 * cover_types = {1: "irregular", 2: "regular", 3: "cyclic"}             # <<<<<<<<<<<<<<
 * 
 * # Paths
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_1, __pyx_n_s_irregular) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_2, __pyx_n_s_regular) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_int_3, __pyx_n_s_cyclic) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cover_types, __pyx_t_5) < 0) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":141
 * 
 * # Paths
 * manifold_path = manifold_paths[0] + os.sep             # <<<<<<<<<<<<<<
 * 
 * # Obsolete data
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_manifold_paths); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sep); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_manifold_path, __pyx_t_5) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":144
 * 
 * # Obsolete data
 * closed_census_directory = os.path.join(manifold_path, 'ClosedCensusData')             # <<<<<<<<<<<<<<
 * link_directory = os.path.join(manifold_path, 'ChristyLinks')
 * link_archive = os.path.join(manifold_path, 'ChristyLinks.tgz')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_join); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_manifold_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_ClosedCensusData);
  __Pyx_GIVEREF(__pyx_n_s_ClosedCensusData);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_ClosedCensusData)) __PYX_ERR(0, 144, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_closed_census_directory, __pyx_t_3) < 0) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":145
 * # Obsolete data
 * closed_census_directory = os.path.join(manifold_path, 'ClosedCensusData')
 * link_directory = os.path.join(manifold_path, 'ChristyLinks')             # <<<<<<<<<<<<<<
 * link_archive = os.path.join(manifold_path, 'ChristyLinks.tgz')
 * census_knot_archive = os.path.join(manifold_path, 'CensusKnots.tgz')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __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, 145, __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_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_manifold_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 145, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_ChristyLinks);
  __Pyx_GIVEREF(__pyx_n_s_ChristyLinks);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_ChristyLinks)) __PYX_ERR(0, 145, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_link_directory, __pyx_t_4) < 0) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":146
 * closed_census_directory = os.path.join(manifold_path, 'ClosedCensusData')
 * link_directory = os.path.join(manifold_path, 'ChristyLinks')
 * link_archive = os.path.join(manifold_path, 'ChristyLinks.tgz')             # <<<<<<<<<<<<<<
 * census_knot_archive = os.path.join(manifold_path, 'CensusKnots.tgz')
 * # Still in use
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_join); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_manifold_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __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(0, 146, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_ChristyLinks_tgz);
  __Pyx_GIVEREF(__pyx_kp_s_ChristyLinks_tgz);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_ChristyLinks_tgz)) __PYX_ERR(0, 146, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_link_archive, __pyx_t_5) < 0) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":147
 * link_directory = os.path.join(manifold_path, 'ChristyLinks')
 * link_archive = os.path.join(manifold_path, 'ChristyLinks.tgz')
 * census_knot_archive = os.path.join(manifold_path, 'CensusKnots.tgz')             # <<<<<<<<<<<<<<
 * # Still in use
 * table_directory = os.path.join(manifold_path, 'HTWKnots')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_join); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_manifold_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_CensusKnots_tgz);
  __Pyx_GIVEREF(__pyx_kp_s_CensusKnots_tgz);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_s_CensusKnots_tgz)) __PYX_ERR(0, 147, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_census_knot_archive, __pyx_t_3) < 0) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":149
 * census_knot_archive = os.path.join(manifold_path, 'CensusKnots.tgz')
 * # Still in use
 * table_directory = os.path.join(manifold_path, 'HTWKnots')             # <<<<<<<<<<<<<<
 * morwen_link_directory = os.path.join(manifold_path, 'MTLinks')
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __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, 149, __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_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_manifold_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_HTWKnots);
  __Pyx_GIVEREF(__pyx_n_s_HTWKnots);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_HTWKnots)) __PYX_ERR(0, 149, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_table_directory, __pyx_t_4) < 0) __PYX_ERR(0, 149, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":150
 * # Still in use
 * table_directory = os.path.join(manifold_path, 'HTWKnots')
 * morwen_link_directory = os.path.join(manifold_path, 'MTLinks')             # <<<<<<<<<<<<<<
 * 
 * # These are the gzipped files holding the knot tables.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_join); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_manifold_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __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(0, 150, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_MTLinks);
  __Pyx_GIVEREF(__pyx_n_s_MTLinks);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_MTLinks)) __PYX_ERR(0, 150, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_morwen_link_directory, __pyx_t_5) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":153
 * 
 * # These are the gzipped files holding the knot tables.
 * Alternating_table = gzip.open(os.path.join(table_directory, 'alternating.gz') )             # <<<<<<<<<<<<<<
 * Nonalternating_table = gzip.open(os.path.join(table_directory, 'nonalternating.gz') )
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_gzip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_open); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __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_join); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_table_directory); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_alternating_gz);
  __Pyx_GIVEREF(__pyx_kp_s_alternating_gz);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_kp_s_alternating_gz)) __PYX_ERR(0, 153, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Alternating_table, __pyx_t_11) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/basic.pyx":154
 * # These are the gzipped files holding the knot tables.
 * Alternating_table = gzip.open(os.path.join(table_directory, 'alternating.gz') )
 * Nonalternating_table = gzip.open(os.path.join(table_directory, 'nonalternating.gz') )             # <<<<<<<<<<<<<<
 * 
 * # This flag can be used when testing algorithms in extension
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_gzip); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_open); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_os); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_join); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_table_directory); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 154, __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, 154, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_nonalternating_gz);
  __Pyx_GIVEREF(__pyx_kp_s_nonalternating_gz);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_kp_s_nonalternating_gz)) __PYX_ERR(0, 154, __pyx_L1_error);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Nonalternating_table, __pyx_t_5) < 0) __PYX_ERR(0, 154, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":160
 * # extern int SnapPy_test_flag
 * 
 * cdef public int SnapPy_test_flag = 0             # <<<<<<<<<<<<<<
 * 
 * 
 */
  SnapPy_test_flag = 0;

  /* "cython/core/basic.pyx":163
 * 
 * 
 * def set_test_flag(int value):             # <<<<<<<<<<<<<<
 *     cdef int old
 *     global SnapPy_test_flag
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13set_test_flag, 0, __pyx_n_s_set_test_flag, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__186)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_test_flag, __pyx_t_5) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":187
 * # If not None, this will be called in gLongComputationContinues.
 * # This enables a GUI to do updates during long computations.
 * UI_callback = None             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_UI_callback, Py_None) < 0) __PYX_ERR(0, 187, __pyx_L1_error)

  /* "cython/core/basic.pyx":190
 * 
 * 
 * def SnapPea_interrupt():             # <<<<<<<<<<<<<<
 *     """
 *     The UI can call this to stop SnapPea.  Returns True if SnapPea s busy.
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_15SnapPea_interrupt, 0, __pyx_n_s_SnapPea_interrupt, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SnapPea_interrupt, __pyx_t_5) < 0) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":236
 * 
 * 
 * show_uAcknowledge = False             # <<<<<<<<<<<<<<
 * 
 * cdef public void uAcknowledge(const_char_ptr message):
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_show_uAcknowledge, Py_False) < 0) __PYX_ERR(0, 236, __pyx_L1_error)

  /* "cython/core/basic.pyx":260
 * 
 * 
 * def cy_eval(s):             # <<<<<<<<<<<<<<
 *     return eval(s)
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17cy_eval, 0, __pyx_n_s_cy_eval, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__188)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_cy_eval, __pyx_t_5) < 0) __PYX_ERR(0, 260, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":264
 * 
 * 
 * def smith_form(M):             # <<<<<<<<<<<<<<
 *     if _within_sage:
 *         if not hasattr(M, 'elementary_divisors'):
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_19smith_form, 0, __pyx_n_s_smith_form, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__190)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_smith_form, __pyx_t_5) < 0) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":293
 * 
 * # Enum conversions
 * CuspTopology = ['torus cusp', 'Klein bottle cusp', 'unknown']             # <<<<<<<<<<<<<<
 * MatrixParity = ['orientation-reversing', 'orientation-preserving']
 * Orientability = ['orientable', 'nonorientable', 'unknown']
 */
  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_kp_s_torus_cusp);
  __Pyx_GIVEREF(__pyx_kp_s_torus_cusp);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_kp_s_torus_cusp)) __PYX_ERR(0, 293, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_Klein_bottle_cusp);
  __Pyx_GIVEREF(__pyx_kp_s_Klein_bottle_cusp);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_kp_s_Klein_bottle_cusp)) __PYX_ERR(0, 293, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_unknown);
  __Pyx_GIVEREF(__pyx_n_s_unknown);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_n_s_unknown)) __PYX_ERR(0, 293, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CuspTopology, __pyx_t_5) < 0) __PYX_ERR(0, 293, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":294
 * # Enum conversions
 * CuspTopology = ['torus cusp', 'Klein bottle cusp', 'unknown']
 * MatrixParity = ['orientation-reversing', 'orientation-preserving']             # <<<<<<<<<<<<<<
 * Orientability = ['orientable', 'nonorientable', 'unknown']
 * Orbifold1 = ['unknown', 'circle', 'mirrored arc']
 */
  __pyx_t_5 = PyList_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_kp_s_orientation_reversing);
  __Pyx_GIVEREF(__pyx_kp_s_orientation_reversing);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_kp_s_orientation_reversing)) __PYX_ERR(0, 294, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_orientation_preserving);
  __Pyx_GIVEREF(__pyx_kp_s_orientation_preserving);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_kp_s_orientation_preserving)) __PYX_ERR(0, 294, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MatrixParity, __pyx_t_5) < 0) __PYX_ERR(0, 294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":295
 * CuspTopology = ['torus cusp', 'Klein bottle cusp', 'unknown']
 * MatrixParity = ['orientation-reversing', 'orientation-preserving']
 * Orientability = ['orientable', 'nonorientable', 'unknown']             # <<<<<<<<<<<<<<
 * Orbifold1 = ['unknown', 'circle', 'mirrored arc']
 * FuncResult = ['func_OK', 'func_cancelled', 'func_failed', 'func_bad_input']
 */
  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_orientable);
  __Pyx_GIVEREF(__pyx_n_s_orientable);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_orientable)) __PYX_ERR(0, 295, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_nonorientable);
  __Pyx_GIVEREF(__pyx_n_s_nonorientable);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_nonorientable)) __PYX_ERR(0, 295, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_unknown);
  __Pyx_GIVEREF(__pyx_n_s_unknown);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_n_s_unknown)) __PYX_ERR(0, 295, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Orientability, __pyx_t_5) < 0) __PYX_ERR(0, 295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":296
 * MatrixParity = ['orientation-reversing', 'orientation-preserving']
 * Orientability = ['orientable', 'nonorientable', 'unknown']
 * Orbifold1 = ['unknown', 'circle', 'mirrored arc']             # <<<<<<<<<<<<<<
 * FuncResult = ['func_OK', 'func_cancelled', 'func_failed', 'func_bad_input']
 * SolutionType = ['not attempted', 'all tetrahedra positively oriented',
 */
  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_unknown);
  __Pyx_GIVEREF(__pyx_n_s_unknown);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_unknown)) __PYX_ERR(0, 296, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_circle);
  __Pyx_GIVEREF(__pyx_n_s_circle);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_circle)) __PYX_ERR(0, 296, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_mirrored_arc);
  __Pyx_GIVEREF(__pyx_kp_s_mirrored_arc);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_kp_s_mirrored_arc)) __PYX_ERR(0, 296, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Orbifold1, __pyx_t_5) < 0) __PYX_ERR(0, 296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":297
 * Orientability = ['orientable', 'nonorientable', 'unknown']
 * Orbifold1 = ['unknown', 'circle', 'mirrored arc']
 * FuncResult = ['func_OK', 'func_cancelled', 'func_failed', 'func_bad_input']             # <<<<<<<<<<<<<<
 * SolutionType = ['not attempted', 'all tetrahedra positively oriented',
 *                 'contains negatively oriented tetrahedra',
 */
  __pyx_t_5 = PyList_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_n_s_func_OK);
  __Pyx_GIVEREF(__pyx_n_s_func_OK);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_n_s_func_OK)) __PYX_ERR(0, 297, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_func_cancelled);
  __Pyx_GIVEREF(__pyx_n_s_func_cancelled);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_func_cancelled)) __PYX_ERR(0, 297, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_func_failed);
  __Pyx_GIVEREF(__pyx_n_s_func_failed);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_n_s_func_failed)) __PYX_ERR(0, 297, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_func_bad_input);
  __Pyx_GIVEREF(__pyx_n_s_func_bad_input);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 3, __pyx_n_s_func_bad_input)) __PYX_ERR(0, 297, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FuncResult, __pyx_t_5) < 0) __PYX_ERR(0, 297, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":298
 * Orbifold1 = ['unknown', 'circle', 'mirrored arc']
 * FuncResult = ['func_OK', 'func_cancelled', 'func_failed', 'func_bad_input']
 * SolutionType = ['not attempted', 'all tetrahedra positively oriented',             # <<<<<<<<<<<<<<
 *                 'contains negatively oriented tetrahedra',
 *                 'contains flat tetrahedra', 'contains degenerate tetrahedra',
 */
  __pyx_t_5 = PyList_New(8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_kp_s_not_attempted);
  __Pyx_GIVEREF(__pyx_kp_s_not_attempted);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_kp_s_not_attempted)) __PYX_ERR(0, 298, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_all_tetrahedra_positively_orient);
  __Pyx_GIVEREF(__pyx_kp_s_all_tetrahedra_positively_orient);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_kp_s_all_tetrahedra_positively_orient)) __PYX_ERR(0, 298, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_contains_negatively_oriented_tet);
  __Pyx_GIVEREF(__pyx_kp_s_contains_negatively_oriented_tet);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_kp_s_contains_negatively_oriented_tet)) __PYX_ERR(0, 298, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_contains_flat_tetrahedra);
  __Pyx_GIVEREF(__pyx_kp_s_contains_flat_tetrahedra);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 3, __pyx_kp_s_contains_flat_tetrahedra)) __PYX_ERR(0, 298, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_contains_degenerate_tetrahedra);
  __Pyx_GIVEREF(__pyx_kp_s_contains_degenerate_tetrahedra);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 4, __pyx_kp_s_contains_degenerate_tetrahedra)) __PYX_ERR(0, 298, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_unrecognized_solution_type);
  __Pyx_GIVEREF(__pyx_kp_s_unrecognized_solution_type);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 5, __pyx_kp_s_unrecognized_solution_type)) __PYX_ERR(0, 298, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_no_solution_found);
  __Pyx_GIVEREF(__pyx_kp_s_no_solution_found);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 6, __pyx_kp_s_no_solution_found)) __PYX_ERR(0, 298, __pyx_L1_error);
  __Pyx_INCREF(__pyx_kp_s_tetrahedra_shapes_were_inserted);
  __Pyx_GIVEREF(__pyx_kp_s_tetrahedra_shapes_were_inserted);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 7, __pyx_kp_s_tetrahedra_shapes_were_inserted)) __PYX_ERR(0, 298, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SolutionType, __pyx_t_5) < 0) __PYX_ERR(0, 298, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":306
 * 
 * # SnapPea memory usage
 * def check_SnapPea_memory():             # <<<<<<<<<<<<<<
 *     verify_my_malloc_usage()
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_21check_SnapPea_memory, 0, __pyx_n_s_check_SnapPea_memory, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_check_SnapPea_memory, __pyx_t_5) < 0) __PYX_ERR(0, 306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":310
 * 
 * 
 * def set_rand_seed(seed):             # <<<<<<<<<<<<<<
 *     """
 *     Set seed of the random number generator used for choosing
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_23set_rand_seed, 0, __pyx_n_s_set_rand_seed, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__193)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_rand_seed, __pyx_t_5) < 0) __PYX_ERR(0, 310, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":365
 * 
 * 
 * class MatrixWithExplanations():             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, mat, explain_rows, explain_columns):
 */
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_MatrixWithExplanations, __pyx_n_s_MatrixWithExplanations, (PyObject *) NULL, __pyx_n_s_SnapPy, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cython/core/basic.pyx":367
 * class MatrixWithExplanations():
 * 
 *     def __init__(self, mat, explain_rows, explain_columns):             # <<<<<<<<<<<<<<
 * 
 *         self.matrix = mat
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_22MatrixWithExplanations_1__init__, 0, __pyx_n_s_MatrixWithExplanations___init, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__195)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_init, __pyx_t_3) < 0) __PYX_ERR(0, 367, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":373
 *         self.explain_columns = explain_columns
 * 
 *     def __repr__(self, _type_str = "MatrixWithExplanations"):             # <<<<<<<<<<<<<<
 * 
 *         def format_explain_list(l):
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_22MatrixWithExplanations_3__repr__, 0, __pyx_n_s_MatrixWithExplanations___repr_2, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__197)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__198);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_repr_2, __pyx_t_3) < 0) __PYX_ERR(0, 373, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":365
 * 
 * 
 * class MatrixWithExplanations():             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, mat, explain_rows, explain_columns):
 */
  __pyx_t_3 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_n_s_MatrixWithExplanations, __pyx_empty_tuple, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MatrixWithExplanations, __pyx_t_3) < 0) __PYX_ERR(0, 365, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":394
 * 
 * 
 * class NeumannZagierTypeEquations(MatrixWithExplanations):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, mat, explain_rows, explain_columns):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_MatrixWithExplanations); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __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(0, 394, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_5, __pyx_n_s_NeumannZagierTypeEquations, __pyx_n_s_NeumannZagierTypeEquations, (PyObject *) NULL, __pyx_n_s_SnapPy, (PyObject *) NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__pyx_t_5 != __pyx_t_3) {
    if (unlikely((PyDict_SetItemString(__pyx_t_11, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 394, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":396
 * class NeumannZagierTypeEquations(MatrixWithExplanations):
 * 
 *     def __init__(self, mat, explain_rows, explain_columns):             # <<<<<<<<<<<<<<
 *         MatrixWithExplanations.__init__(self,
 *                                         mat, explain_rows, explain_columns)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_26NeumannZagierTypeEquations_1__init__, 0, __pyx_n_s_NeumannZagierTypeEquations___ini, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__199)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_init, __pyx_t_3) < 0) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":400
 *                                         mat, explain_rows, explain_columns)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return MatrixWithExplanations.__repr__(self,
 *                                                "NeumannZagierTypeEquations")
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_26NeumannZagierTypeEquations_3__repr__, 0, __pyx_n_s_NeumannZagierTypeEquations___rep, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_repr_2, __pyx_t_3) < 0) __PYX_ERR(0, 400, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":394
 * 
 * 
 * class NeumannZagierTypeEquations(MatrixWithExplanations):             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, mat, explain_rows, explain_columns):
 */
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_NeumannZagierTypeEquations, __pyx_t_5, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NeumannZagierTypeEquations, __pyx_t_3) < 0) __PYX_ERR(0, 394, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":410
 * cdef func_real_to_obj Real2gen
 * 
 * if hasattr(pari, '_real_coerced_to_bits_prec'):  # Cypari             # <<<<<<<<<<<<<<
 *     Real2gen = Real2gen_direct
 * else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pari); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_13 = __Pyx_HasAttr(__pyx_t_5, __pyx_n_s_real_coerced_to_bits_prec); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 410, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_13) {

    /* "cython/core/basic.pyx":411
 * 
 * if hasattr(pari, '_real_coerced_to_bits_prec'):  # Cypari
 *     Real2gen = Real2gen_direct             # <<<<<<<<<<<<<<
 * else:
 *     Real2gen = Real2gen_string
 */
    __pyx_v_6SnapPy_Real2gen = __pyx_f_6SnapPy_Real2gen_direct;

    /* "cython/core/basic.pyx":410
 * cdef func_real_to_obj Real2gen
 * 
 * if hasattr(pari, '_real_coerced_to_bits_prec'):  # Cypari             # <<<<<<<<<<<<<<
 *     Real2gen = Real2gen_direct
 * else:
 */
    goto __pyx_L64;
  }

  /* "cython/core/basic.pyx":413
 *     Real2gen = Real2gen_direct
 * else:
 *     Real2gen = Real2gen_string             # <<<<<<<<<<<<<<
 * 
 * cdef Complex2gen(Complex C):
 */
  /*else*/ {
    __pyx_v_6SnapPy_Real2gen = __pyx_f_6SnapPy_Real2gen_string;
  }
  __pyx_L64:;

  /* "cython/core/basic.pyx":497
 * 
 * 
 * class Info(dict):             # <<<<<<<<<<<<<<
 *     """
 *     Immutable dictionary whose data can be accessed either as
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF((PyObject *)(&PyDict_Type));
  __Pyx_GIVEREF((PyObject *)(&PyDict_Type));
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)(&PyDict_Type)))) __PYX_ERR(0, 497, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_4, __pyx_n_s_Info, __pyx_n_s_Info, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_Immutable_dictionary_whose_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 497, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":503
 *     Initialize with keyword arguments, or **dict.
 *     """
 *     def __init__(self, **kwargs):             # <<<<<<<<<<<<<<
 *         # Hack to support obsolete keys
 *         content = dict(kwargs)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_4Info_1__init__, 0, __pyx_n_s_Info___init, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":514
 *         self.__dict__.update(kwargs)
 * 
 *     def _immutable(self, *args):             # <<<<<<<<<<<<<<
 *         raise AttributeError('Info objects are immutable.')
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_4Info_3_immutable, 0, __pyx_n_s_Info__immutable, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_immutable, __pyx_t_5) < 0) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":517
 *         raise AttributeError('Info objects are immutable.')
 * 
 *     def keys(self):             # <<<<<<<<<<<<<<
 *         return self.__dict__.keys()
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_4Info_5keys, 0, __pyx_n_s_Info_keys, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__205)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_keys, __pyx_t_5) < 0) __PYX_ERR(0, 517, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":520
 *         return self.__dict__.keys()
 * 
 *     __setattr__ = __delattr__ = __setitem__ = __delitem__ = _immutable             # <<<<<<<<<<<<<<
 *     pop = popitem = clear = update = _immutable
 *     _obsolete = {}
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_immutable);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_immutable);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_setattr, __pyx_t_5) < 0) __PYX_ERR(0, 520, __pyx_L1_error)
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_delattr, __pyx_t_5) < 0) __PYX_ERR(0, 520, __pyx_L1_error)
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_setitem, __pyx_t_5) < 0) __PYX_ERR(0, 520, __pyx_L1_error)
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_delitem, __pyx_t_5) < 0) __PYX_ERR(0, 520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":521
 * 
 *     __setattr__ = __delattr__ = __setitem__ = __delitem__ = _immutable
 *     pop = popitem = clear = update = _immutable             # <<<<<<<<<<<<<<
 *     _obsolete = {}
 * 
 */
  __pyx_t_5 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_immutable);
  if (unlikely(!__pyx_t_5)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_immutable);
  }
  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_pop, __pyx_t_5) < 0) __PYX_ERR(0, 521, __pyx_L1_error)
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_popitem, __pyx_t_5) < 0) __PYX_ERR(0, 521, __pyx_L1_error)
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_clear, __pyx_t_5) < 0) __PYX_ERR(0, 521, __pyx_L1_error)
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_update, __pyx_t_5) < 0) __PYX_ERR(0, 521, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":522
 *     __setattr__ = __delattr__ = __setitem__ = __delitem__ = _immutable
 *     pop = popitem = clear = update = _immutable
 *     _obsolete = {}             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_obsolete, __pyx_t_5) < 0) __PYX_ERR(0, 522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":497
 * 
 * 
 * class Info(dict):             # <<<<<<<<<<<<<<
 *     """
 *     Immutable dictionary whose data can be accessed either as
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_n_s_Info, __pyx_t_4, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Info, __pyx_t_5) < 0) __PYX_ERR(0, 497, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":525
 * 
 * 
 * class CuspInfo(Info):             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self.is_complete:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4)) __PYX_ERR(0, 525, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __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, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_4, __pyx_n_s_CuspInfo, __pyx_n_s_CuspInfo, (PyObject *) NULL, __pyx_n_s_SnapPy, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_4 != __pyx_t_11) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_11) < 0))) __PYX_ERR(0, 525, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/basic.pyx":526
 * 
 * class CuspInfo(Info):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if self.is_complete:
 *             if 'shape' in self:
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8CuspInfo_1__repr__, 0, __pyx_n_s_CuspInfo___repr, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_repr_2, __pyx_t_11) < 0) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/basic.pyx":537
 *             return ('Cusp %-2d: %s with Dehn filling coefficients (M, L) = %s'%
 *                     (self.index, self.topology, self.filling) )
 *     _obsolete = {'complete?'          : 'is_complete',             # <<<<<<<<<<<<<<
 *                  'holonomy precision' : 'holonomy_accuracy',
 *                  'shape precision'    : 'shape_accuracy'}
 */
  __pyx_t_11 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_t_11, __pyx_kp_s_complete_2, __pyx_n_s_is_complete) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_kp_s_holonomy_precision, __pyx_n_s_holonomy_accuracy) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_11, __pyx_kp_s_shape_precision, __pyx_n_s_shape_accuracy) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_obsolete, __pyx_t_11) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/basic.pyx":525
 * 
 * 
 * class CuspInfo(Info):             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if self.is_complete:
 */
  __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_CuspInfo, __pyx_t_4, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CuspInfo, __pyx_t_11) < 0) __PYX_ERR(0, 525, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 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;

  /* "cython/core/basic.pyx":542
 * 
 * 
 * class DualCurveInfo(Info):             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         return ('%3d: %s curve of length %s'%
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 542, __pyx_L1_error);
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_4, __pyx_n_s_DualCurveInfo, __pyx_n_s_DualCurveInfo, (PyObject *) NULL, __pyx_n_s_SnapPy, (PyObject *) NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__pyx_t_4 != __pyx_t_3) {
    if (unlikely((PyDict_SetItemString(__pyx_t_11, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 542, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":543
 * 
 * class DualCurveInfo(Info):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return ('%3d: %s curve of length %s'%
 *                 (self.index, MatrixParity[self.parity], self.filled_length))
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13DualCurveInfo_1__repr__, 0, __pyx_n_s_DualCurveInfo___repr, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_repr_2, __pyx_t_3) < 0) __PYX_ERR(0, 543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":546
 *         return ('%3d: %s curve of length %s'%
 *                 (self.index, MatrixParity[self.parity], self.filled_length))
 *     _obsolete = {'complete length' : 'complete_length',             # <<<<<<<<<<<<<<
 *                  'filled length' : 'filled_length'}
 * 
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_complete_length_2, __pyx_n_s_complete_length) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_kp_s_filled_length_2, __pyx_n_s_filled_length) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_obsolete, __pyx_t_3) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":542
 * 
 * 
 * class DualCurveInfo(Info):             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         return ('%3d: %s curve of length %s'%
 */
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_DualCurveInfo, __pyx_t_4, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DualCurveInfo, __pyx_t_3) < 0) __PYX_ERR(0, 542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":550
 * 
 * 
 * def _StrLongestLen(l):             # <<<<<<<<<<<<<<
 *     return str(max(len(e) for e in l))
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_25_StrLongestLen, 0, __pyx_n_s_StrLongestLen, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_StrLongestLen, __pyx_t_4) < 0) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":557
 *     '%-4s '                                   # Multiplicity
 *     '%-40s '                                  # Length
 *     '%-' + _StrLongestLen(Orbifold1) + 's ')  # Topology             # <<<<<<<<<<<<<<
 * 
 * LengthSpectrumFormatString = (
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_StrLongestLen); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Orbifold1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_kp_s_4s_40s, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = PyNumber_Add(__pyx_t_5, __pyx_kp_s_s_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LengthSpectrumFormatStringBase, __pyx_t_11) < 0) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/basic.pyx":560
 * 
 * LengthSpectrumFormatString = (
 *     LengthSpectrumFormatStringBase +             # <<<<<<<<<<<<<<
 *     '%s')                                     # Parity
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_LengthSpectrumFormatStringBase); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_5 = PyNumber_Add(__pyx_t_11, __pyx_kp_s_s_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LengthSpectrumFormatString, __pyx_t_5) < 0) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":564
 * 
 * LengthSpectrumFormatStringWithWord = (
 *     LengthSpectrumFormatStringBase +             # <<<<<<<<<<<<<<
 *     '%-6s '                                   # Parity
 *     '%s')                                     # Word
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_LengthSpectrumFormatStringBase); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = PyNumber_Add(__pyx_t_5, __pyx_kp_s_6s_s); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LengthSpectrumFormatStringWithWo, __pyx_t_11) < 0) __PYX_ERR(0, 563, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/basic.pyx":568
 *     '%s')                                     # Word
 * 
 * ShortMatrixParity = { MatrixParity[0] : '-', MatrixParity[1] : '+' }             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_11 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_MatrixParity); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_11, __pyx_t_4, __pyx_kp_s__32) < 0) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_MatrixParity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_t_11, __pyx_t_5, __pyx_kp_s__33) < 0) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ShortMatrixParity, __pyx_t_11) < 0) __PYX_ERR(0, 568, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/basic.pyx":571
 * 
 * 
 * class LengthSpectrumInfo(Info):             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         lenStr = "%17.14f" % self.length.real()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_11);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_11)) __PYX_ERR(0, 571, __pyx_L1_error);
  __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_11, __pyx_n_s_LengthSpectrumInfo, __pyx_n_s_LengthSpectrumInfo, (PyObject *) NULL, __pyx_n_s_SnapPy, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__pyx_t_11 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 571, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":572
 * 
 * class LengthSpectrumInfo(Info):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         lenStr = "%17.14f" % self.length.real()
 *         absImag = abs(self.length.imag())
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_18LengthSpectrumInfo_1__repr__, 0, __pyx_n_s_LengthSpectrumInfo___repr, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_repr_2, __pyx_t_5) < 0) __PYX_ERR(0, 572, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":571
 * 
 * 
 * class LengthSpectrumInfo(Info):             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         lenStr = "%17.14f" % self.length.real()
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_LengthSpectrumInfo, __pyx_t_11, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LengthSpectrumInfo, __pyx_t_5) < 0) __PYX_ERR(0, 571, __pyx_L1_error)
  __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;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/basic.pyx":597
 * 
 * 
 * class ShapeInfo(Info):             # <<<<<<<<<<<<<<
 *     _obsolete = {'precision' : 'accuracies'}
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_11);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_11)) __PYX_ERR(0, 597, __pyx_L1_error);
  __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_11, __pyx_n_s_ShapeInfo, __pyx_n_s_ShapeInfo, (PyObject *) NULL, __pyx_n_s_SnapPy, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_11 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 597, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":598
 * 
 * class ShapeInfo(Info):
 *     _obsolete = {'precision' : 'accuracies'}             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_precision, __pyx_n_s_accuracies) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_obsolete, __pyx_t_4) < 0) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":600
 *     _obsolete = {'precision' : 'accuracies'}
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(self.__dict__)
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_9ShapeInfo_1__repr__, 0, __pyx_n_s_ShapeInfo___repr, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__212)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_repr_2, __pyx_t_4) < 0) __PYX_ERR(0, 600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":597
 * 
 * 
 * class ShapeInfo(Info):             # <<<<<<<<<<<<<<
 *     _obsolete = {'precision' : 'accuracies'}
 * 
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_ShapeInfo, __pyx_t_11, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ShapeInfo, __pyx_t_4) < 0) __PYX_ERR(0, 597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/basic.pyx":604
 * 
 * 
 * class NormalSurfaceInfo(Info):             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         orient = 'Orientable' if self.orientable else 'Non-orientable'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Info); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_11);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11)) __PYX_ERR(0, 604, __pyx_L1_error);
  __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_11, __pyx_n_s_NormalSurfaceInfo, __pyx_n_s_NormalSurfaceInfo, (PyObject *) NULL, __pyx_n_s_SnapPy, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_11 != __pyx_t_3) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 604, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":605
 * 
 * class NormalSurfaceInfo(Info):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         orient = 'Orientable' if self.orientable else 'Non-orientable'
 *         sided = 'two-sided' if self.two_sided else 'one-sided'
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17NormalSurfaceInfo_1__repr__, 0, __pyx_n_s_NormalSurfaceInfo___repr, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__214)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_repr_2, __pyx_t_3) < 0) __PYX_ERR(0, 605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":604
 * 
 * 
 * class NormalSurfaceInfo(Info):             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         orient = 'Orientable' if self.orientable else 'Non-orientable'
 */
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_NormalSurfaceInfo, __pyx_t_11, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 604, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NormalSurfaceInfo, __pyx_t_3) < 0) __PYX_ERR(0, 604, __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_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/basic.pyx":611
 * 
 * 
 * class LengthSpectrum(list):             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if len(self) > 0 and 'word' in self[0]:
 */
  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_INCREF((PyObject *)(&PyList_Type));
  __Pyx_GIVEREF((PyObject *)(&PyList_Type));
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)(&PyList_Type)))) __PYX_ERR(0, 611, __pyx_L1_error);
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_5, __pyx_n_s_LengthSpectrum, __pyx_n_s_LengthSpectrum, (PyObject *) NULL, __pyx_n_s_SnapPy, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__pyx_t_5 != __pyx_t_11) {
    if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_t_11) < 0))) __PYX_ERR(0, 611, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/basic.pyx":612
 * 
 * class LengthSpectrum(list):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         if len(self) > 0 and 'word' in self[0]:
 *             base = LengthSpectrumFormatStringWithWord % (
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_14LengthSpectrum_1__repr__, 0, __pyx_n_s_LengthSpectrum___repr, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__216)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_repr_2, __pyx_t_11) < 0) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/basic.pyx":611
 * 
 * 
 * class LengthSpectrum(list):             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         if len(self) > 0 and 'word' in self[0]:
 */
  __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_LengthSpectrum, __pyx_t_5, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LengthSpectrum, __pyx_t_11) < 0) __PYX_ERR(0, 611, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":622
 * 
 * 
 * class ListOnePerLine(list):             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         return '[' + ',\n '.join([repr(s) for s in self]) + ']'
 */
  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF((PyObject *)(&PyList_Type));
  __Pyx_GIVEREF((PyObject *)(&PyList_Type));
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)(&PyList_Type)))) __PYX_ERR(0, 622, __pyx_L1_error);
  __pyx_t_4 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 622, __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, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_4, __pyx_n_s_ListOnePerLine, __pyx_n_s_ListOnePerLine, (PyObject *) NULL, __pyx_n_s_SnapPy, (PyObject *) NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__pyx_t_4 != __pyx_t_5) {
    if (unlikely((PyDict_SetItemString(__pyx_t_11, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 622, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":623
 * 
 * class ListOnePerLine(list):
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return '[' + ',\n '.join([repr(s) for s in self]) + ']'
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_14ListOnePerLine_1__repr__, 0, __pyx_n_s_ListOnePerLine___repr, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__218)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_repr_2, __pyx_t_5) < 0) __PYX_ERR(0, 623, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/basic.pyx":622
 * 
 * 
 * class ListOnePerLine(list):             # <<<<<<<<<<<<<<
 *     def __repr__(self):
 *         return '[' + ',\n '.join([repr(s) for s in self]) + ']'
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_ListOnePerLine, __pyx_t_4, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ListOnePerLine, __pyx_t_5) < 0) __PYX_ERR(0, 622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":629
 * # Isometry
 * 
 * def format_two_by_two(mat):             # <<<<<<<<<<<<<<
 *     a,b,c,d = ['%d' % x for x in [mat[0,0], mat[0,1], mat[1,0], mat[1,1]]]
 *     w0 = max(len(a), len(c))
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_27format_two_by_two, 0, __pyx_n_s_format_two_by_two, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__220)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_format_two_by_two, __pyx_t_4) < 0) __PYX_ERR(0, 629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":637
 * 
 * 
 * class Isometry():             # <<<<<<<<<<<<<<
 *     """
 *     Represents an isometry from one manifold to another.
 */
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Isometry, __pyx_n_s_Isometry, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_Represents_an_isometry_from_one); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "cython/core/basic.pyx":641
 *     Represents an isometry from one manifold to another.
 *     """
 *     def __init__(self, cusp_images, cusp_maps, extends_to_link):             # <<<<<<<<<<<<<<
 *         self._cusp_images, self._cusp_maps = cusp_images, cusp_maps
 *         self._extends_to_link = extends_to_link
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Isometry_1__init__, 0, __pyx_n_s_Isometry___init, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__222)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_3) < 0) __PYX_ERR(0, 641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":645
 *         self._extends_to_link = extends_to_link
 * 
 *     def cusp_images(self):             # <<<<<<<<<<<<<<
 *         return self._cusp_images
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Isometry_3cusp_images, 0, __pyx_n_s_Isometry_cusp_images, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__223)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_cusp_images, __pyx_t_3) < 0) __PYX_ERR(0, 645, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":648
 *         return self._cusp_images
 * 
 *     def cusp_maps(self):             # <<<<<<<<<<<<<<
 *         return self._cusp_maps
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Isometry_5cusp_maps, 0, __pyx_n_s_Isometry_cusp_maps, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__224)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_cusp_maps, __pyx_t_3) < 0) __PYX_ERR(0, 648, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":651
 *         return self._cusp_maps
 * 
 *     def extends_to_link(self):             # <<<<<<<<<<<<<<
 *         return self._extends_to_link
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Isometry_7extends_to_link, 0, __pyx_n_s_Isometry_extends_to_link, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__225)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_extends_to_link, __pyx_t_3) < 0) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":654
 *         return self._extends_to_link
 * 
 *     def num_cusps(self):             # <<<<<<<<<<<<<<
 *         return len(self.cusp_images())
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Isometry_9num_cusps, 0, __pyx_n_s_Isometry_num_cusps, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__226)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_num_cusps, __pyx_t_3) < 0) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":657
 *         return len(self.cusp_images())
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         images = self.cusp_images()
 *         maps = self.cusp_maps()
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Isometry_11__repr__, 0, __pyx_n_s_Isometry___repr, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__228)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_repr_2, __pyx_t_3) < 0) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/basic.pyx":637
 * 
 * 
 * class Isometry():             # <<<<<<<<<<<<<<
 *     """
 *     Represents an isometry from one manifold to another.
 */
  __pyx_t_3 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_n_s_Isometry, __pyx_empty_tuple, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Isometry, __pyx_t_3) < 0) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":697
 * # PLink communication
 * 
 * def _plink_callback(LE):             # <<<<<<<<<<<<<<
 *     cdef Manifold manifold
 *     cdef c_Triangulation* c_triangulation = NULL
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_29_plink_callback, 0, __pyx_n_s_plink_callback_2, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__230)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_plink_callback_2, __pyx_t_4) < 0) __PYX_ERR(0, 697, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":723
 * # Conversion functions Manifold <-> Triangulation
 * 
 * def Manifold_from_Triangulation(Triangulation T, recompute=True,             # <<<<<<<<<<<<<<
 *                                 manifold_class=None):
 *     cdef c_Triangulation *c_triangulation
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_31Manifold_from_Triangulation, 0, __pyx_n_s_Manifold_from_Triangulation, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__232)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__233);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Manifold_from_Triangulation, __pyx_t_4) < 0) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/basic.pyx":749
 * 
 * 
 * def Triangulation_from_Manifold(Manifold M):             # <<<<<<<<<<<<<<
 *     cdef c_Triangulation *c_triangulation
 *     cdef Triangulation T
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_33Triangulation_from_Manifold, 0, __pyx_n_s_Triangulation_from_Manifold, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__235)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Triangulation_from_Manifold, __pyx_t_4) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/triangulation.pyx":1
 * from .cache import SnapPyCache             # <<<<<<<<<<<<<<
 * import low_index
 * 
 */
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_n_s_SnapPyCache);
  __Pyx_GIVEREF(__pyx_n_s_SnapPyCache);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_SnapPyCache)) __PYX_ERR(3, 1, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_cache, __pyx_t_4, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_SnapPyCache); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SnapPyCache, __pyx_t_4) < 0) __PYX_ERR(3, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/triangulation.pyx":2
 * from .cache import SnapPyCache
 * import low_index             # <<<<<<<<<<<<<<
 * 
 * _low_index_version = [int(n) for n in low_index.version().split('.')]
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_low_index, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_low_index, __pyx_t_3) < 0) __PYX_ERR(3, 2, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/triangulation.pyx":4
 * import low_index
 * 
 * _low_index_version = [int(n) for n in low_index.version().split('.')]             # <<<<<<<<<<<<<<
 * 
 * cdef class Triangulation():
 */
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 4, __pyx_L67_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_low_index); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 4, __pyx_L67_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4, __pyx_L67_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 4, __pyx_L67_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4, __pyx_L67_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = NULL;
    __pyx_t_12 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_11)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_11);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_12 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_kp_s__170};
      __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4, __pyx_L67_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
      __pyx_t_2 = __pyx_t_4; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_14 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_14 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 4, __pyx_L67_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_15)) __PYX_ERR(3, 4, __pyx_L67_error)
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    for (;;) {
      if (likely(!__pyx_t_15)) {
        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(3, 4, __pyx_L67_error)
            #endif
            if (__pyx_t_14 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(3, 4, __pyx_L67_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4, __pyx_L67_error)
          __Pyx_GOTREF(__pyx_t_4);
          #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(3, 4, __pyx_L67_error)
            #endif
            if (__pyx_t_14 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely((0 < 0))) __PYX_ERR(3, 4, __pyx_L67_error)
          #else
          __pyx_t_4 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4, __pyx_L67_error)
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_15(__pyx_t_2);
        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(3, 4, __pyx_L67_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XGOTREF(__pyx_9genexpr10__pyx_v_6SnapPy_n);
      __Pyx_DECREF_SET(__pyx_9genexpr10__pyx_v_6SnapPy_n, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_9genexpr10__pyx_v_6SnapPy_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 4, __pyx_L67_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) __PYX_ERR(3, 4, __pyx_L67_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_9genexpr10__pyx_v_6SnapPy_n);
    __Pyx_DECREF_SET(__pyx_9genexpr10__pyx_v_6SnapPy_n, Py_None);
    goto __pyx_L71_exit_scope;
    __pyx_L67_error:;
    __Pyx_GOTREF(__pyx_9genexpr10__pyx_v_6SnapPy_n);
    __Pyx_DECREF_SET(__pyx_9genexpr10__pyx_v_6SnapPy_n, Py_None);
    goto __pyx_L1_error;
    __pyx_L71_exit_scope:;
  } /* exit inner scope */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_low_index_version, __pyx_t_3) < 0) __PYX_ERR(3, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/triangulation.pyx":255
 *         free_LR_factorization(gluing)
 * 
 *     def _get_from_link_data(self, data, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         if self.c_triangulation != NULL:
 *             free_triangulation(self.c_triangulation)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_3_get_from_link_data, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__get_from_link_dat, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__237)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__238);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_get_from_link_data, __pyx_t_3) < 0) __PYX_ERR(3, 255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":290
 *                 self._remove_finite_vertices()
 * 
 *     def _remove_finite_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Removing any finite vertices by simplification and drilling.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_5_remove_finite_vertices, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__remove_finite_ver, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__239)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_remove_finite_vertices_2, __pyx_t_3) < 0) __PYX_ERR(3, 290, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":310
 *                 count_cusps(self.c_triangulation)
 * 
 *     def cover_info(self):             # <<<<<<<<<<<<<<
 *         """
 *         If this is a manifold or triangulation which was constructed as
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_7cover_info, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_cover_info, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__240)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_cover_info, __pyx_t_3) < 0) __PYX_ERR(3, 310, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":319
 *             return dict(self._cover_info)
 * 
 *     def plink(self):             # <<<<<<<<<<<<<<
 *         """
 *         Brings up a link editor window if the manifold is stored
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_9plink, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_plink, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__242)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_plink, __pyx_t_3) < 0) __PYX_ERR(3, 319, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":345
 *             raise ValueError('No associated link known.')
 * 
 *     def link(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the manifold is stored as a link complement in your
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_11link, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_link, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__243)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_link, __pyx_t_3) < 0) __PYX_ERR(3, 345, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":363
 *         self.c_triangulation = c_triangulation
 * 
 *     def num_cusps(self, cusp_type='all'):             # <<<<<<<<<<<<<<
 *         """
 *         Return the total number of cusps.  By giving the optional argument
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_13num_cusps, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_num_cusps, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__245)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__246);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_num_cusps, __pyx_t_3) < 0) __PYX_ERR(3, 363, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":382
 *                              "['all', 'orientable', 'nonorientable'].")
 * 
 *     def _num_fake_cusps(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the number of "fake" cusps, which is typically the number
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_15_num_fake_cusps, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__num_fake_cusps, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__247)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_num_fake_cusps, __pyx_t_3) < 0) __PYX_ERR(3, 382, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":398
 *         return get_num_fake_cusps(self.c_triangulation)
 * 
 *     def orientation_cover(self):             # <<<<<<<<<<<<<<
 *         """
 *         For a non-orientable Triangulation, returns the 2-fold cover which
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_17orientation_cover, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_orientation_cover, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__249)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_orientation_cover, __pyx_t_3) < 0) __PYX_ERR(3, 398, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":427
 *         return new_tri
 * 
 *     def is_orientable(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the underlying 3-manifold is orientable.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_19is_orientable, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_is_orientable, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__251)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 427, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_is_orientable, __pyx_t_3) < 0) __PYX_ERR(3, 427, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":442
 *         return None
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a copy of the triangulation.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_21copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_copy, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__253)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_copy, __pyx_t_3) < 0) __PYX_ERR(3, 442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":459
 *         return new_tri
 * 
 *     def randomize(self, blowup_multiple=4, passes_at_fours=6):             # <<<<<<<<<<<<<<
 *         """
 *         Perform random Pachner moves on the underlying triangulation,
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_23randomize, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_randomize, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__255)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__256);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_randomize, __pyx_t_3) < 0) __PYX_ERR(3, 459, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":473
 *         self._cache.clear(message='randomize')
 * 
 *     def simplify(self, passes_at_fours=6):             # <<<<<<<<<<<<<<
 *         """
 *         Try to simplify the triangulation by doing Pachner moves.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_25simplify, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_simplify, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__258)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__259);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_simplify, __pyx_t_3) < 0) __PYX_ERR(3, 473, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":504
 *         self._cache.clear(message='simplify')
 * 
 *     def _two_to_three(self, tet_num, face_index):             # <<<<<<<<<<<<<<
 *         """
 *         Performs a 2-3 move which removes a given face.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_27_two_to_three, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__two_to_three, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__261)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_two_to_three, __pyx_t_3) < 0) __PYX_ERR(3, 504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":539
 *         return result
 * 
 *     def _three_to_two(self, tet_num, edge_index):             # <<<<<<<<<<<<<<
 *         r"""
 *         Perform a 3-2 move which removes a given 3-valent edge.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_29_three_to_two, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__three_to_two, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__263)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 539, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_three_to_two, __pyx_t_3) < 0) __PYX_ERR(3, 539, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":590
 *         return result
 * 
 *     def with_hyperbolic_structure(self):             # <<<<<<<<<<<<<<
 *         """
 *         Add a (possibly degenerate) hyperbolic structure, turning the
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_31with_hyperbolic_structure, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_with_hyperbolic_st, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__264)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_with_hyperbolic_structure, __pyx_t_3) < 0) __PYX_ERR(3, 590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":602
 *         return Manifold_from_Triangulation(self)
 * 
 *     def _polish_hyperbolic_structures(self):             # <<<<<<<<<<<<<<
 *         """
 *         This function does nothing for Triangulation. It is overloaded in
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_33_polish_hyperbolic_structures, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__polish_hyperbolic, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__265)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_polish_hyperbolic_structures, __pyx_t_3) < 0) __PYX_ERR(3, 602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":609
 *         pass
 * 
 *     def _empty_save(self):             # <<<<<<<<<<<<<<
 *         """
 *         Called by save when no file name is specified, so that in
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_35_empty_save, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__empty_save, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__267)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_empty_save, __pyx_t_3) < 0) __PYX_ERR(3, 609, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":629
 *         raise ValueError('Please specify a file name.')
 * 
 *     def save(self, file_name=None):             # <<<<<<<<<<<<<<
 *         """
 *         Save the triangulation as a SnapPea triangulation file.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_37save, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_save, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__269)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__270);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_save, __pyx_t_3) < 0) __PYX_ERR(3, 629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":653
 *             write_triangulation(self.c_triangulation, b_file_name)
 * 
 *     def _to_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a string containing the contents of a SnapPea triangulation
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_39_to_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__to_string, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__272)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_to_string, __pyx_t_3) < 0) __PYX_ERR(3, 653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":675
 *             return to_str(result)
 * 
 *     def _from_string(self, string, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         """
 *         WARNING: Users should not use this function directly.  To
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_41_from_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__from_string, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__274)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__238);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_from_string, __pyx_t_3) < 0) __PYX_ERR(3, 675, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":699
 *             self._remove_finite_vertices()
 * 
 *     def _to_bytes(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a reasonably short byte sequence which encodes the
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_43_to_bytes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__to_bytes, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__276)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_to_bytes, __pyx_t_3) < 0) __PYX_ERR(3, 699, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":737
 *         return bytearray_to_bytes(byteseq)
 * 
 *     def _from_bytes(self, bytestring, *args):             # <<<<<<<<<<<<<<
 *         """
 *         Fill an empty triangulation from a byte sequence generated by
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_45_from_bytes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__from_bytes, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__278)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_from_bytes, __pyx_t_3) < 0) __PYX_ERR(3, 737, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":756
 *         self.set_c_triangulation(c_triangulation)
 * 
 *     def _from_pickle(self, bytestring, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         """
 *         """
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_47_from_pickle, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__from_pickle, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__280)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__238);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_from_pickle, __pyx_t_3) < 0) __PYX_ERR(3, 756, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":767
 *             self._remove_finite_vertices()
 * 
 *     def _from_tetrahedra_gluing_data(self, tetrahedra_data,             # <<<<<<<<<<<<<<
 *                                      num_or_cusps=0,
 *                                      num_nonor_cusps=0,
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_49_from_tetrahedra_gluing_data, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__from_tetrahedra_g, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__282)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__283);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_from_tetrahedra_gluing_data, __pyx_t_3) < 0) __PYX_ERR(3, 767, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":821
 *             self._remove_finite_vertices()
 * 
 *     def _from_isosig(self, isosig, remove_finite_vertices=True):             # <<<<<<<<<<<<<<
 *         """
 *         WARNING: Users should not use this function directly.  To
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_51_from_isosig, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__from_isosig, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__285)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 821, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__238);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_from_isosig, __pyx_t_3) < 0) __PYX_ERR(3, 821, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":862
 *             decorated_isosig.set_peripheral_from_decoration(self, decoration)
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Used by pickle.dumps.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_53__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation___reduce, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__286)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_reduce, __pyx_t_3) < 0) __PYX_ERR(3, 862, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":897
 *         return (self.__class__, (self.pickle(),))
 * 
 *     def pickle(self):             # <<<<<<<<<<<<<<
 *         try:
 *             return pickle_triangulation(self.c_triangulation)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_55pickle, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_pickle, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__287)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_pickle_2, __pyx_t_3) < 0) __PYX_ERR(3, 897, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":906
 *             return self._to_string()
 * 
 *     def _reindex_cusps(self, permutation):             # <<<<<<<<<<<<<<
 *         """
 *         >>> import itertools
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_57_reindex_cusps, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__reindex_cusps, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__289)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 906, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_reindex_cusps, __pyx_t_3) < 0) __PYX_ERR(3, 906, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":932
 *         free(indices)
 * 
 *     def _get_cusp_indices_and_peripheral_curve_data(self):             # <<<<<<<<<<<<<<
 *         cdef int i, j, k, v, f
 *         cdef TriangulationData* data
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_59_get_cusp_indices_and_peripheral_curve_data, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__get_cusp_indices, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__291)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_get_cusp_indices_and_peripheral, __pyx_t_3) < 0) __PYX_ERR(3, 932, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":954
 *         return (result_cusp_indices, result_curves)
 * 
 *     def _get_tetrahedra_gluing_data(self):             # <<<<<<<<<<<<<<
 *         cdef int i, j, k
 *         cdef TriangulationData* data
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_61_get_tetrahedra_gluing_data, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__get_tetrahedra_gl, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__293)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_get_tetrahedra_gluing_data, __pyx_t_3) < 0) __PYX_ERR(3, 954, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":969
 *         return result
 * 
 *     def isomorphisms_to(self, Triangulation other not None):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a complete list of combinatorial isomorphisms between
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_63isomorphisms_to, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_isomorphisms_to, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__295)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_isomorphisms_to, __pyx_t_3) < 0) __PYX_ERR(3, 969, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1049
 *             return repr
 * 
 *     def name(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the name of the triangulation.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_71name, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_name, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__296)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_name, __pyx_t_3) < 0) __PYX_ERR(3, 1049, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1061
 *         return to_str(get_triangulation_name(self.c_triangulation))
 * 
 *     def set_name(self, new_name):             # <<<<<<<<<<<<<<
 *         """
 *         Give the triangulation a new name.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_73set_name, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_set_name, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__298)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_set_name, __pyx_t_3) < 0) __PYX_ERR(3, 1061, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1076
 *         set_triangulation_name(self.c_triangulation, c_new_name)
 * 
 *     def DT_code(self, alpha=False, flips=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return the Dowker-Thistlethwaite code of this link complement,
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_75DT_code, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_DT_code, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__300)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__301);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_DT_code, __pyx_t_3) < 0) __PYX_ERR(3, 1076, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1108
 *                 return codec.code
 * 
 *     def _set_DTcode(self, code, lazy=True):             # <<<<<<<<<<<<<<
 *         if not lazy and not isinstance(code, spherogram.DTcodec):
 *             code = spherogram.DTcodec(code)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_77_set_DTcode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__set_DTcode, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__303)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__238);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_set_DTcode, __pyx_t_3) < 0) __PYX_ERR(3, 1108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1113
 *         self._DTcode = code
 * 
 *     def _set_PDcode(self, code):             # <<<<<<<<<<<<<<
 *         self._PDcode = code
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_79_set_PDcode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__set_PDcode, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__305)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_set_PDcode, __pyx_t_3) < 0) __PYX_ERR(3, 1113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1116
 *         self._PDcode = code
 * 
 *     def num_tetrahedra(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of tetrahedra in the triangulation.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_81num_tetrahedra, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_num_tetrahedra, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__306)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1116, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_num_tetrahedra, __pyx_t_3) < 0) __PYX_ERR(3, 1116, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1128
 *         return get_num_tetrahedra(self.c_triangulation)
 * 
 *     def dehn_fill(self, filling_data, which_cusp=None):             # <<<<<<<<<<<<<<
 *         """
 *         Set the Dehn filling coefficients of the cusps.  This can be
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_83dehn_fill, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_dehn_fill, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__308)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__270);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_dehn_fill, __pyx_t_3) < 0) __PYX_ERR(3, 1128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1198
 *     # When doctesting, the M,L coefficients acquire an accuracy of 8.
 *     # So we have to include the zeros in the doctest string.
 *     def cusp_info(self, data_spec=None):             # <<<<<<<<<<<<<<
 *         """
 *         Returns an info object containing information about the given
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_85cusp_info, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_cusp_info, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__310)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__270);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_cusp_info, __pyx_t_3) < 0) __PYX_ERR(3, 1198, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1254
 *         return CuspInfo(**info)
 * 
 *     def reverse_orientation(self):             # <<<<<<<<<<<<<<
 *         """
 *         Reverses the orientation of the Triangulation, presuming that
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_87reverse_orientation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_reverse_orientatio, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__311)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_reverse_orientation, __pyx_t_3) < 0) __PYX_ERR(3, 1254, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1271
 *         self._cache.clear(message='reverse_orientation')
 * 
 *     def filled_triangulation(self, cusps_to_fill='all'):             # <<<<<<<<<<<<<<
 *         """
 *         Return a new manifold where the specified cusps have been
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_89filled_triangulation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_filled_triangulati, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__313)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1271, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__246);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_filled_triangulation, __pyx_t_3) < 0) __PYX_ERR(3, 1271, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1320
 *         return filled_tri
 * 
 *     def _unsimplified_filled_triangulation(self, method='fold'):             # <<<<<<<<<<<<<<
 *         """
 *         For a Triangulation that describes a closed manifold, returns
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_91_unsimplified_filled_triangulation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__unsimplified_fill, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__315)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__316);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_unsimplified_filled_triangulati_2, __pyx_t_3) < 0) __PYX_ERR(3, 1320, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1392
 *         return filled_tri
 * 
 *     def _marked_tetrahedra(self, clear_marks=False):             # <<<<<<<<<<<<<<
 *         cdef int *marked = NULL
 *         n = self.num_tetrahedra()
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_93_marked_tetrahedra, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__marked_tetrahedra, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__318)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1392, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__319);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_marked_tetrahedra, __pyx_t_3) < 0) __PYX_ERR(3, 1392, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1403
 *         return ans
 * 
 *     def edge_valences(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a dictionary whose keys are the valences of the edges
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_95edge_valences, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_edge_valences, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__321)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_edge_valences, __pyx_t_3) < 0) __PYX_ERR(3, 1403, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1424
 *         return ans
 * 
 *     def gluing_equations_pgl(self, N=2, equation_type='all'):             # <<<<<<<<<<<<<<
 * 
 *         """
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_97gluing_equations_pgl, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_gluing_equations_p, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__323)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__324);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_gluing_equations_pgl, __pyx_t_3) < 0) __PYX_ERR(3, 1424, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1602
 *                                           explain_cols)
 * 
 *     def _ptolemy_equations_identified_face_classes(self):             # <<<<<<<<<<<<<<
 *         """
 *         This function returns an identification structure where s_f_t gets
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_99_ptolemy_equations_identified_face_classes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__ptolemy_equations, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__326)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_ptolemy_equations_identified_fa, __pyx_t_3) < 0) __PYX_ERR(3, 1602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1629
 *         return convert_and_free_identification_of_variables(c_vars)
 * 
 *     def _ptolemy_equations_identified_coordinates(self, N,             # <<<<<<<<<<<<<<
 *                                                   obstruction_class = None):
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_101_ptolemy_equations_identified_coordinates, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__ptolemy_equations_2, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__328)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__270);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_ptolemy_equations_identified_co, __pyx_t_3) < 0) __PYX_ERR(3, 1629, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1664
 *         return convert_and_free_identification_of_variables(c_vars)
 * 
 *     def _ptolemy_equations_action_by_decoration_change(self, int N):             # <<<<<<<<<<<<<<
 *         """
 *         We can change a decoration by multiplying a coset of a cusp by a
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_103_ptolemy_equations_action_by_decoration_change, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__ptolemy_equations_3, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__330)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_ptolemy_equations_action_by_dec, __pyx_t_3) < 0) __PYX_ERR(3, 1664, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1688
 *         return m, explain_rows, explain_cols
 * 
 *     def _ptolemy_equations_boundary_map_3(self):             # <<<<<<<<<<<<<<
 *         """
 *         Boundary map C_3 -> C_2 in cellular homology represented as matrix
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_105_ptolemy_equations_boundary_map_3, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__ptolemy_equations_4, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__332)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_ptolemy_equations_boundary_map, __pyx_t_3) < 0) __PYX_ERR(3, 1688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1717
 *         return m, explain_rows, explain_cols
 * 
 *     def _ptolemy_equations_boundary_map_2(self):             # <<<<<<<<<<<<<<
 *         """
 *         Boundary map C_2 -> C_1 in cellular homology represented as matrix.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_107_ptolemy_equations_boundary_map_2, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__ptolemy_equations_5, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__333)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_ptolemy_equations_boundary_map_2, __pyx_t_3) < 0) __PYX_ERR(3, 1717, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1738
 *         return m, explain_rows, explain_cols
 * 
 *     def _ptolemy_equations_boundary_map_1(self):             # <<<<<<<<<<<<<<
 *         """
 *         Boundary map C_1 -> C_0 in cellular homology represented as matrix.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_109_ptolemy_equations_boundary_map_1, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__ptolemy_equations_6, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__334)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_ptolemy_equations_boundary_map_3, __pyx_t_3) < 0) __PYX_ERR(3, 1738, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1761
 *         return m, explain_rows, explain_cols
 * 
 *     def ptolemy_obstruction_classes(self):             # <<<<<<<<<<<<<<
 * 
 *         """
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_111ptolemy_obstruction_classes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_ptolemy_obstructio, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__335)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_ptolemy_obstruction_classes, __pyx_t_3) < 0) __PYX_ERR(3, 1761, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1823
 *         return ptolemyManifoldMethods.get_ptolemy_obstruction_classes(self)
 * 
 *     def ptolemy_generalized_obstruction_classes(self, N):             # <<<<<<<<<<<<<<
 * 
 *         """
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_113ptolemy_generalized_obstruction_classes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_ptolemy_generalize, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__337)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_ptolemy_generalized_obstruction, __pyx_t_3) < 0) __PYX_ERR(3, 1823, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":1890
 *                 self, N))
 * 
 *     def ptolemy_variety(self, N, obstruction_class = None,             # <<<<<<<<<<<<<<
 *                         simplify = True, eliminate_fixed_ptolemys = False):
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_115ptolemy_variety, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_ptolemy_variety, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__339)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__340);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_ptolemy_variety, __pyx_t_3) < 0) __PYX_ERR(3, 1890, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":2075
 *             eliminate_fixed_ptolemys = eliminate_fixed_ptolemys)
 * 
 *     def gluing_equations(self,form='log'):             # <<<<<<<<<<<<<<
 *         """
 *         In the default mode, this function returns a matrix with rows
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_117gluing_equations, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_gluing_equations, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__342)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__343);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_gluing_equations, __pyx_t_3) < 0) __PYX_ERR(3, 2075, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":2238
 *         return relation_matrix
 * 
 *     def _presentation_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Computes the presentation matrix for the first integral
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_119_presentation_matrix, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__presentation_matr, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__344)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_presentation_matrix, __pyx_t_3) < 0) __PYX_ERR(3, 2238, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":2278
 *         return AbelianGroup(relations)
 * 
 *     def homology(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns an AbelianGroup representing the first integral
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_121homology, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_homology, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__346)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_homology, __pyx_t_3) < 0) __PYX_ERR(3, 2278, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":2313
 *         return self._cache.save(result, 'homology')
 * 
 *     def fundamental_group(self,             # <<<<<<<<<<<<<<
 *                           simplify_presentation = True,
 *                           fillings_may_affect_generators = True,
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_123fundamental_group, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_fundamental_group, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__348)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__349);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_fundamental_group, __pyx_t_3) < 0) __PYX_ERR(3, 2313, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":2360
 *                                 'fundamental_group', *args)
 * 
 *     def cover(self, permutation_rep):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Triangulation representing the finite cover
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_125cover, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_cover, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__351)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_cover, __pyx_t_3) < 0) __PYX_ERR(3, 2360, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":2460
 *         return cover
 * 
 *     def covers(self, degree, method=None, cover_type='all'):             # <<<<<<<<<<<<<<
 *         """
 *         M.covers(degree, method=None, cover_type='all')
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_127covers, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_covers, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__353)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__354);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_covers, __pyx_t_3) < 0) __PYX_ERR(3, 2460, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":2524
 *                          "and 'snappea'")
 * 
 *     def _covers_low_index(self, degree, num_threads=0):             # <<<<<<<<<<<<<<
 *         """
 *         Compute all covers using low_index.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_129_covers_low_index, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__covers_low_index, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__356)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__357);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_covers_low_index, __pyx_t_3) < 0) __PYX_ERR(3, 2524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":2556
 *         return [self.cover(H) for H in reps if index(H) == degree]
 * 
 *     def _covers_gap(self, degree):             # <<<<<<<<<<<<<<
 *         """
 *         Compute all covers using gap.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_131_covers_gap, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__covers_gap, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__359)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_covers_gap, __pyx_t_3) < 0) __PYX_ERR(3, 2556, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":2568
 *                 if G.Index(H) == degree]
 * 
 *     def _covers_magma(self, degree):             # <<<<<<<<<<<<<<
 *         """
 *         Compute all covers using magma.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_133_covers_magma, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__covers_magma, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__360)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2568, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_covers_magma, __pyx_t_3) < 0) __PYX_ERR(3, 2568, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":2580
 *                                              (degree, degree))]
 * 
 *     def _covers_snappea(self, degree, cover_type):             # <<<<<<<<<<<<<<
 *         """
 *         Compute cyclic or all covers using SnapPea kernel.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_135_covers_snappea, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__covers_snappea, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__362)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_covers_snappea, __pyx_t_3) < 0) __PYX_ERR(3, 2580, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":2727
 *         return c_repn_in_original_gens
 * 
 *     def set_peripheral_curves(self, peripheral_data,             # <<<<<<<<<<<<<<
 *                               which_cusp=None, return_matrices=False):
 *         """
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_137set_peripheral_curves, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_set_peripheral_cur, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__364)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__365);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_set_peripheral_curves, __pyx_t_3) < 0) __PYX_ERR(3, 2727, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":2862
 *                                  peripheral_data)
 * 
 *     def has_finite_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns True if and only if the triangulation has finite (non-ideal)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_139has_finite_vertices, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_has_finite_vertice, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__366)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2862, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_has_finite_vertices, __pyx_t_3) < 0) __PYX_ERR(3, 2862, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":2889
 *         return get_num_fake_cusps(self.c_triangulation) > 0
 * 
 *     def triangulation_isosig(self,             # <<<<<<<<<<<<<<
 *                              decorated=True,
 *                              ignore_cusp_ordering = False,
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_141triangulation_isosig, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_triangulation_isos, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__368)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 2889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__369);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_triangulation_isosig, __pyx_t_3) < 0) __PYX_ERR(3, 2889, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":3034
 *         return self._cache.save(result, 'triangulation_isosig', *args)
 * 
 *     def _symplectic_form(self, u, v):             # <<<<<<<<<<<<<<
 *         return sum([u[2 * i] * v[2 * i + 1] - u[2 * i + 1] * v[2 * i] for i in range(len(u) // 2)])
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_143_symplectic_form, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__symplectic_form, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__371)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_symplectic_form, __pyx_t_3) < 0) __PYX_ERR(3, 3034, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":3037
 *         return sum([u[2 * i] * v[2 * i + 1] - u[2 * i + 1] * v[2 * i] for i in range(len(u) // 2)])
 * 
 *     def _is_symplectic(self, M):             # <<<<<<<<<<<<<<
 *         """
 *         Test if the matrix M is symplectic
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_145_is_symplectic, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation__is_symplectic, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__373)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_is_symplectic, __pyx_t_3) < 0) __PYX_ERR(3, 3037, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/triangulation.pyx":3057
 *         return True
 * 
 *     def symplectic_basis(self, verify=False):             # <<<<<<<<<<<<<<
 *         """
 *         Extend the Neumann-Zagier Matrix to one which is symplectic
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13Triangulation_147symplectic_basis, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Triangulation_symplectic_basis, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__375)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 3057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__319);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Triangulation, __pyx_n_s_symplectic_basis, __pyx_t_3) < 0) __PYX_ERR(3, 3057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Triangulation);

  /* "cython/core/manifold.pyx":84
 *             do_Dehn_filling(self.c_triangulation)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _number_(n):
 *         return number.number_to_native_number(n)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_3_number_, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold__number, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__377)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_number_2, __pyx_t_3) < 0) __PYX_ERR(1, 84, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);
  __Pyx_GetNameInClass(__pyx_t_3, (PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_number_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_number_2, __pyx_t_2) < 0) __PYX_ERR(1, 84, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":88
 *         return number.number_to_native_number(n)
 * 
 *     @classmethod             # <<<<<<<<<<<<<<
 *     def use_field_conversion(cls, func):
 *         """
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_5use_field_conversion, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_use_field_conversion, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__379)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_use_field_conversion, __pyx_t_2) < 0) __PYX_ERR(1, 88, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_use_field_conversion); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_use_field_conversion, __pyx_t_3) < 0) __PYX_ERR(1, 88, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":136
 *         number.use_field_conversion(func)
 * 
 *     def init_hyperbolic_structure(self, force_recompute = False):             # <<<<<<<<<<<<<<
 *         if not self.c_triangulation:
 *             return
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_7init_hyperbolic_structure, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_init_hyperbolic_structu, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__381)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__319);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_init_hyperbolic_structure, __pyx_t_3) < 0) __PYX_ERR(1, 136, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":145
 *         self.hyperbolic_structure_initialized = True
 * 
 *     def canonize(self):             # <<<<<<<<<<<<<<
 *         """
 *         Change the triangulation to an arbitrary retriangulation of
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_9canonize, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_canonize, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__383)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_canonize, __pyx_t_3) < 0) __PYX_ERR(1, 145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":167
 *         self._cache.clear(message='canonize')
 * 
 *     def _canonical_retriangulation(self, opacities = None):             # <<<<<<<<<<<<<<
 *         """
 *         If this triangulation is a subdivision of the canonical cell
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_11_canonical_retriangulation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold__canonical_retriangulat, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__385)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__270);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_canonical_retriangulation, __pyx_t_3) < 0) __PYX_ERR(1, 167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":238
 *         return new_tri
 * 
 *     def _canonical_cells_are_tetrahedra(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns True if and only if the canonical
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_13_canonical_cells_are_tetrahedra, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold__canonical_cells_are_te, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__387)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 238, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_canonical_cells_are_tetrahedra, __pyx_t_3) < 0) __PYX_ERR(1, 238, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":256
 *         return get_num_fake_cusps(M.c_triangulation) == 0
 * 
 *     def _from_string(self, string, initialize_structure=True):             # <<<<<<<<<<<<<<
 *         """
 *         WARNING: Users should not use this function directly.  To create a
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_15_from_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold__from_string, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__389)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__238);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_from_string, __pyx_t_3) < 0) __PYX_ERR(1, 256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":272
 *             self.init_hyperbolic_structure()
 * 
 *     def _from_bytes(self, bytestring, initialize_structure=True):             # <<<<<<<<<<<<<<
 *         """
 *         Fill an empty manifold from a byte sequence generated by
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_17_from_bytes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold__from_bytes, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__391)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__238);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_from_bytes, __pyx_t_3) < 0) __PYX_ERR(1, 272, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":286
 *             self.init_hyperbolic_structure()
 * 
 *     def _from_isosig(self, isosig, initialize_structure=True):             # <<<<<<<<<<<<<<
 *         """
 *         Fill an empty manifold from an isosig generated by
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_19_from_isosig, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold__from_isosig, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__393)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__238);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_from_isosig, __pyx_t_3) < 0) __PYX_ERR(1, 286, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":297
 *             self.init_hyperbolic_structure()
 * 
 *     def copy(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a copy of the manifold
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_21copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_copy, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__395)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_copy, __pyx_t_3) < 0) __PYX_ERR(1, 297, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":309
 *         return Manifold_from_Triangulation(self, manifold_class=self.__class__)
 * 
 *     def cusp_neighborhood(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns information about the cusp neighborhoods of the
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_23cusp_neighborhood, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_cusp_neighborhood, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__396)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_cusp_neighborhood, __pyx_t_3) < 0) __PYX_ERR(1, 309, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":326
 * 
 *     def dirichlet_domain(self,
 *                          vertex_epsilon=default_vertex_epsilon,             # <<<<<<<<<<<<<<
 *                          displacement = (0.0, 0.0, 0.0),
 *                          centroid_at_origin=True,
 */
  __pyx_t_3 = PyFloat_FromDouble(default_vertex_epsilon); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__85 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cython/core/manifold.pyx":325
 *         return CuspNeighborhood(self)
 * 
 *     def dirichlet_domain(self,             # <<<<<<<<<<<<<<
 *                          vertex_epsilon=default_vertex_epsilon,
 *                          displacement = (0.0, 0.0, 0.0),
 */
  __pyx_t_3 = PyFloat_FromDouble(default_vertex_epsilon); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);

  /* "cython/core/manifold.pyx":330
 *                          centroid_at_origin=True,
 *                          maximize_injectivity_radius=True,
 *                          include_words=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a DirichletDomain object representing a Dirichlet
 */
  __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(1, 325, __pyx_L1_error);
  __Pyx_INCREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_tuple__86)) __PYX_ERR(1, 325, __pyx_L1_error);
  __Pyx_INCREF(Py_True);
  __Pyx_GIVEREF(Py_True);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, Py_True)) __PYX_ERR(1, 325, __pyx_L1_error);
  __Pyx_INCREF(Py_True);
  __Pyx_GIVEREF(Py_True);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 3, Py_True)) __PYX_ERR(1, 325, __pyx_L1_error);
  __Pyx_INCREF(Py_False);
  __Pyx_GIVEREF(Py_False);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 4, Py_False)) __PYX_ERR(1, 325, __pyx_L1_error);
  __pyx_t_3 = 0;

  /* "cython/core/manifold.pyx":325
 *         return CuspNeighborhood(self)
 * 
 *     def dirichlet_domain(self,             # <<<<<<<<<<<<<<
 *                          vertex_epsilon=default_vertex_epsilon,
 *                          displacement = (0.0, 0.0, 0.0),
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_25dirichlet_domain, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_dirichlet_domain, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__398)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_dirichlet_domain, __pyx_t_3) < 0) __PYX_ERR(1, 325, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":375
 *                                 'dirichlet_domain', *args)
 * 
 *     def browse(self):             # <<<<<<<<<<<<<<
 *         """
 *         Opens browser window with a graphical interface, which allows to
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_27browse, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_browse, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__399)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_browse, __pyx_t_3) < 0) __PYX_ERR(1, 375, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":391
 *         return Browser(self)
 * 
 *     def filled_triangulation(self, cusps_to_fill='all'):             # <<<<<<<<<<<<<<
 *         """
 *         Return a new Manifold where the specified cusps have been
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_29filled_triangulation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_filled_triangulation, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__401)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__246);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_filled_triangulation, __pyx_t_3) < 0) __PYX_ERR(1, 391, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":418
 *         return filled
 * 
 *     def fundamental_group(self,             # <<<<<<<<<<<<<<
 *                           simplify_presentation = True,
 *                           fillings_may_affect_generators = True,
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_31fundamental_group, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_fundamental_group, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__403)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__349);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_fundamental_group, __pyx_t_3) < 0) __PYX_ERR(1, 418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":468
 *         return self._cache.save(result, 'fundamental_group', *args)
 * 
 *     def symmetry_group(self, of_link=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the symmetry group of the Manifold.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_33symmetry_group, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_symmetry_group, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__405)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__319);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_symmetry_group, __pyx_t_3) < 0) __PYX_ERR(1, 468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":514
 *         return self._cache.save(symmetry_group, 'symmetry_group', of_link)
 * 
 *     def symmetric_triangulation(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Dehn filling description of the manifold realizing
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_35symmetric_triangulation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_symmetric_triangulation, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__406)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_symmetric_triangulation, __pyx_t_3) < 0) __PYX_ERR(1, 514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":535
 *             return self._cache.lookup('symmetric_triangulation')
 * 
 *     def cover(self, permutation_rep):             # <<<<<<<<<<<<<<
 *         """
 *         M.cover(permutation_rep)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_37cover, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_cover, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__408)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_cover, __pyx_t_3) < 0) __PYX_ERR(1, 535, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":607
 *                                            manifold_class=self.__class__)
 * 
 *     def covers(self, degree, method=None, cover_type='all'):             # <<<<<<<<<<<<<<
 *         """
 *         M.covers(degree, method=None, cover_type='all')
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_39covers, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_covers, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__410)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__354);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_covers, __pyx_t_3) < 0) __PYX_ERR(1, 607, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":700
 *         raise ValueError(err_msg)
 * 
 *     def _complex_volume(self):             # <<<<<<<<<<<<<<
 *         cdef Complex volume
 *         cdef int accuracy
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_41_complex_volume, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold__complex_volume, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__412)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 700, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_complex_volume_2, __pyx_t_3) < 0) __PYX_ERR(1, 700, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":714
 *         return self._number_(result)
 * 
 *     def volume(self, accuracy=False, verified = False, bits_prec = None):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the volume of the current solution to the hyperbolic
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_43volume, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_volume, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__414)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 714, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__415);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_volume, __pyx_t_3) < 0) __PYX_ERR(1, 714, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":807
 *         return result
 * 
 *     def chern_simons(self, accuracy = False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the Chern-Simons invariant of the manifold, if it is known.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_45chern_simons, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_chern_simons, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__417)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__319);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_chern_simons, __pyx_t_3) < 0) __PYX_ERR(1, 807, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":848
 *             return self._number_(cs)
 * 
 *     def without_hyperbolic_structure(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns self as a Triangulation, forgetting the hyperbolic
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_47without_hyperbolic_structure, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_without_hyperbolic_stru, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__418)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_without_hyperbolic_structure, __pyx_t_3) < 0) __PYX_ERR(1, 848, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":860
 *         return Triangulation_from_Manifold(self)
 * 
 *     def _polish_hyperbolic_structures(self):             # <<<<<<<<<<<<<<
 *         polish_hyperbolic_structures(self.c_triangulation)
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_49_polish_hyperbolic_structures, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold__polish_hyperbolic_stru, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__419)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_polish_hyperbolic_structures, __pyx_t_3) < 0) __PYX_ERR(1, 860, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":863
 *         polish_hyperbolic_structures(self.c_triangulation)
 * 
 *     def tetrahedra_shapes(self, part=None, fixed_alignment=True,             # <<<<<<<<<<<<<<
 *                           bits_prec=None, dec_prec=None,
 *                           intervals=False):
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_51tetrahedra_shapes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_tetrahedra_shapes, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__421)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__422);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_tetrahedra_shapes, __pyx_t_3) < 0) __PYX_ERR(1, 863, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":982
 *             return ListOnePerLine(result)
 * 
 *     def _get_tetrahedra_shapes(self, which_solution):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of the tetrahedra shapes from one of the two
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_53_get_tetrahedra_shapes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold__get_tetrahedra_shapes, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__424)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 982, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_get_tetrahedra_shapes, __pyx_t_3) < 0) __PYX_ERR(1, 982, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":1010
 *         return result
 * 
 *     def set_tetrahedra_shapes(self,             # <<<<<<<<<<<<<<
 *                               filled_shapes=None,
 *                               complete_shapes=None,
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_55set_tetrahedra_shapes, __Pyx_CYFUNCTION_CCLASS, __pyx_kp_s_Manifold_set_tetrahedra_shapes, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__426)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__131);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_set_tetrahedra_shapes, __pyx_t_3) < 0) __PYX_ERR(1, 1010, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":1048
 *         self._cache.clear(message='Manifold.set_tetrahedra_shapes')
 * 
 *     def solution_type(self, enum=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the type of the current solution to the gluing
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_57solution_type, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_solution_type, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__428)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__319);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_solution_type, __pyx_t_3) < 0) __PYX_ERR(1, 1048, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":1093
 *             return SolutionType[solution_type]
 * 
 *     def set_target_holonomy(self, target, which_cusp=0, recompute=True):             # <<<<<<<<<<<<<<
 *         """
 *         M.set_target_holonomy(target, which_cusp=0, recompute=True)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_59set_target_holonomy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_set_target_holonomy, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__430)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__431);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_set_target_holonomy, __pyx_t_3) < 0) __PYX_ERR(1, 1093, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":1108
 *                             which_cusp, c_target, recompute)
 * 
 *     def cusp_info(self, data_spec=None, verified = False, bits_prec = None):             # <<<<<<<<<<<<<<
 *         """
 *         Returns an info object containing information about the given
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_61cusp_info, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_cusp_info, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__433)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__434);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_cusp_info, __pyx_t_3) < 0) __PYX_ERR(1, 1108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":1231
 *         return CuspInfo(**info)
 * 
 *     def dehn_fill(self, filling_data, which_cusp=None):             # <<<<<<<<<<<<<<
 *         """
 *         Set the Dehn filling coefficients of the cusps.  This can be
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_63dehn_fill, __Pyx_CYFUNCTION_CCLASS, __pyx_kp_s_Manifold_dehn_fill, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__436)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__270);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_dehn_fill, __pyx_t_3) < 0) __PYX_ERR(1, 1231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":1269
 *         self._cache.clear(message='Manifold.dehn_fill')
 * 
 *     def set_peripheral_curves(self, peripheral_data,             # <<<<<<<<<<<<<<
 *                               which_cusp=None, return_matrices=False):
 *         """
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_65set_peripheral_curves, __Pyx_CYFUNCTION_CCLASS, __pyx_kp_s_Manifold_set_peripheral_curves, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__438)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__365);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_set_peripheral_curves, __pyx_t_3) < 0) __PYX_ERR(1, 1269, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":1383
 *                 self, peripheral_data, which_cusp,return_matrices)
 * 
 *     def dual_curves(self, max_segments=6):             # <<<<<<<<<<<<<<
 *         """
 *         Constructs a *reasonable* selection of simple closed curves in
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_67dual_curves, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_dual_curves, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__440)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__259);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_dual_curves, __pyx_t_3) < 0) __PYX_ERR(1, 1383, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":1449
 *         return ListOnePerLine(result)
 * 
 *     def length_spectrum(self,             # <<<<<<<<<<<<<<
 *                         cutoff=1.0,
 *                         full_rigor=True,
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_69length_spectrum, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_length_spectrum, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__442)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__443);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_length_spectrum, __pyx_t_3) < 0) __PYX_ERR(1, 1449, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":1485
 *             *args)
 * 
 *     def drill(self, which_curve, max_segments=6):             # <<<<<<<<<<<<<<
 *         """
 *         Drills out the specified dual curve from among all dual curves
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_71drill, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_drill, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__445)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__259);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_drill, __pyx_t_3) < 0) __PYX_ERR(1, 1485, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":1532
 *             return result
 * 
 *     def is_isometric_to(self, Manifold other, return_isometries=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns True if M and N are isometric, False if they not.  A
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_73is_isometric_to, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_is_isometric_to, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__447)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__319);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_is_isometric_to, __pyx_t_3) < 0) __PYX_ERR(1, 1532, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":1616
 *         return ans
 * 
 *     def is_two_bridge(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the manifold is the complement of a two-bridge knot or link
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_75is_two_bridge, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_is_two_bridge, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__449)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_is_two_bridge, __pyx_t_3) < 0) __PYX_ERR(1, 1616, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":1649
 *             return False
 * 
 *     def _choose_generators(self, compute_corners, centroid_at_origin):             # <<<<<<<<<<<<<<
 *         choose_generators(self.c_triangulation,
 *                           compute_corners,
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_77_choose_generators, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold__choose_generators, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__451)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_choose_generators, __pyx_t_3) < 0) __PYX_ERR(1, 1649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":1654
 *                           centroid_at_origin)
 * 
 *     def _choose_generators_info(self):             # <<<<<<<<<<<<<<
 *         """
 *         Extracts, from the bowels of SnapPea, the information about the
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_79_choose_generators_info, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold__choose_generators_info, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__453)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_choose_generators_info, __pyx_t_3) < 0) __PYX_ERR(1, 1654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":1692
 *         return ans
 * 
 *     def splitting_surfaces(self):             # <<<<<<<<<<<<<<
 *         """
 *         Searches for connected closed normal surfaces of nonnegative Euler
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_81splitting_surfaces, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_splitting_surfaces, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__455)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_splitting_surfaces, __pyx_t_3) < 0) __PYX_ERR(1, 1692, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":1736
 *         return ListOnePerLine(ans)
 * 
 *     def split(self, which_surface):             # <<<<<<<<<<<<<<
 *         """
 *         Split the manifold open along a surface of positive characteristic found
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_83split, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold_split, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__457)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_split, __pyx_t_3) < 0) __PYX_ERR(1, 1736, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":1801
 *         return ans
 * 
 *     def _identify(self, extends_to_link=False):             # <<<<<<<<<<<<<<
 *         ans = []
 *         for table in database.__all_tables__.values():
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_85_identify, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold__identify, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__459)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__319);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_identify_2, __pyx_t_3) < 0) __PYX_ERR(1, 1801, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/manifold.pyx":1809
 *         return ans
 * 
 *     def _cusp_cross_section_info(self):             # <<<<<<<<<<<<<<
 *         cdef c_Tetrahedron *tet
 *         allocate_cross_sections(self.c_triangulation)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_8Manifold_87_cusp_cross_section_info, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Manifold__cusp_cross_section_inf, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__461)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_Manifold, __pyx_n_s_cusp_cross_section_info, __pyx_t_3) < 0) __PYX_ERR(1, 1809, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_Manifold);

  /* "cython/core/abelian_group.pyx":41
 *     cdef public coefficients
 * 
 *     def __init__(self, presentation=None, elementary_divisors=[]):             # <<<<<<<<<<<<<<
 *         if presentation is not None:
 *             self.divisors = smith_form(presentation)
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__108 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cython/core/abelian_group.pyx":80
 *         return self.divisors[i]
 * 
 *     def __reduce__(self):             # <<<<<<<<<<<<<<
 *         """
 *         Used by the pickle module to pickle an Abelian Group.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_12AbelianGroup_9__reduce__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbelianGroup___reduce, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__462)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_AbelianGroup, __pyx_n_s_reduce, __pyx_t_3) < 0) __PYX_ERR(4, 80, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_AbelianGroup);

  /* "cython/core/abelian_group.pyx":111
 *         return self
 * 
 *     def elementary_divisors(self):             # <<<<<<<<<<<<<<
 *         """
 *         The elementary divisors of this finitely generated abelian group.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_12AbelianGroup_15elementary_divisors, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbelianGroup_elementary_divisors, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__463)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_AbelianGroup, __pyx_n_s_elementary_divisors, __pyx_t_3) < 0) __PYX_ERR(4, 111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_AbelianGroup);

  /* "cython/core/abelian_group.pyx":117
 *         return self.divisors
 * 
 *     def rank(self):             # <<<<<<<<<<<<<<
 *         """
 *         The rank of the group.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_12AbelianGroup_17rank, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbelianGroup_rank, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__464)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_AbelianGroup, __pyx_n_s_rank, __pyx_t_3) < 0) __PYX_ERR(4, 117, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_AbelianGroup);

  /* "cython/core/abelian_group.pyx":123
 *         return len(self.divisors)
 * 
 *     def betti_number(self):             # <<<<<<<<<<<<<<
 *         """
 *         The rank of the maximal free abelian subgroup.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_12AbelianGroup_19betti_number, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbelianGroup_betti_number, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__466)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_AbelianGroup, __pyx_n_s_betti_number, __pyx_t_3) < 0) __PYX_ERR(4, 123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_AbelianGroup);

  /* "cython/core/abelian_group.pyx":129
 *         return len([1 for n in self.divisors if n == 0])
 * 
 *     def order(self):             # <<<<<<<<<<<<<<
 *         """
 *         The order of the group.  Returns the string 'infinite' if the
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_12AbelianGroup_21order, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_AbelianGroup_order, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__468)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_AbelianGroup, __pyx_n_s_order, __pyx_t_3) < 0) __PYX_ERR(4, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_AbelianGroup);

  /* "cython/core/abelian_group.pyx":157
 *         self.dead_columns = set()
 * 
 *     def get_data(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a triple (number of rows, number of columns, entries)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_18PresentationMatrix_3get_data, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PresentationMatrix_get_data, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__469)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_PresentationMatrix, __pyx_n_s_get_data, __pyx_t_3) < 0) __PYX_ERR(4, 157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_PresentationMatrix);

  /* "cython/core/abelian_group.pyx":211
 *         return repr(self.explode())
 * 
 *     def add_rows(self, n):             # <<<<<<<<<<<<<<
 *         self.rows += n
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_18PresentationMatrix_11add_rows, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PresentationMatrix_add_rows, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__470)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_PresentationMatrix, __pyx_n_s_add_rows, __pyx_t_3) < 0) __PYX_ERR(4, 211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_PresentationMatrix);

  /* "cython/core/abelian_group.pyx":214
 *         self.rows += n
 * 
 *     def row_op(self, i, j, m):             # <<<<<<<<<<<<<<
 *         """
 *         Subtract m * row_i from row_j
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_18PresentationMatrix_13row_op, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PresentationMatrix_row_op, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__472)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_PresentationMatrix, __pyx_n_s_row_op, __pyx_t_3) < 0) __PYX_ERR(4, 214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_PresentationMatrix);

  /* "cython/core/abelian_group.pyx":221
 *             self[j,k] -= m*self[i,k]
 * 
 *     def explode(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the full matrix, including dead columns, as a list of lists.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_18PresentationMatrix_15explode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PresentationMatrix_explode, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__474)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_PresentationMatrix, __pyx_n_s_explode, __pyx_t_3) < 0) __PYX_ERR(4, 221, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_PresentationMatrix);

  /* "cython/core/abelian_group.pyx":228
 *                 for i in range(self.rows)]
 * 
 *     def simplify(self):             # <<<<<<<<<<<<<<
 *         """
 *         If any entry is a unit, eliminate the corresponding generator.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_18PresentationMatrix_17simplify, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PresentationMatrix_simplify, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__476)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_PresentationMatrix, __pyx_n_s_simplify, __pyx_t_3) < 0) __PYX_ERR(4, 228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_PresentationMatrix);

  /* "cython/core/abelian_group.pyx":252
 *             self.dead_columns.add(j)
 * 
 *     def simplified_matrix(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the simplified presentation as a matrix.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_18PresentationMatrix_19simplified_matrix, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PresentationMatrix_simplified_ma, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__478)); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_PresentationMatrix, __pyx_n_s_simplified_matrix, __pyx_t_3) < 0) __PYX_ERR(4, 252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_PresentationMatrix);

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_18PresentationMatrix_21__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PresentationMatrix___reduce_cyth, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__480)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_PresentationMatrix, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_PresentationMatrix);

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_PresentationMatrix, (type(self), 0x59cf8a3, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_PresentationMatrix__set_state(self, __pyx_state)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_18PresentationMatrix_23__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PresentationMatrix___setstate_cy, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__482)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_PresentationMatrix, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(7, 16, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_PresentationMatrix);

  /* "cython/core/fundamental_group.pyx":4
 * # Fundamental Groups
 * 
 * Alphabet = '$abcdefghijklmnopqrstuvwxyzZYXWVUTSRQPONMLKJIHGFEDCBA'             # <<<<<<<<<<<<<<
 * 
 * # Helper functions for manipulating fg. words
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Alphabet, __pyx_kp_s_abcdefghijklmnopqrstuvwxyzZYXWV) < 0) __PYX_ERR(8, 4, __pyx_L1_error)

  /* "cython/core/fundamental_group.pyx":9
 * 
 * 
 * def inverse_list_word(word):             # <<<<<<<<<<<<<<
 *     return [ -x for x in word[::-1] ]
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_35inverse_list_word, 0, __pyx_n_s_inverse_list_word, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__484)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_inverse_list_word, __pyx_t_3) < 0) __PYX_ERR(8, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/fundamental_group.pyx":13
 * 
 * 
 * def reduce_list_word(word):             # <<<<<<<<<<<<<<
 *     """
 *     Cancels inverse generators.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_37reduce_list_word, 0, __pyx_n_s_reduce_list_word, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__486)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_list_word, __pyx_t_3) < 0) __PYX_ERR(8, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/fundamental_group.pyx":59
 * 
 * 
 * def _letter_seperator(verbose_form):             # <<<<<<<<<<<<<<
 *     return '*' if verbose_form else ''
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_39_letter_seperator, 0, __pyx_n_s_letter_seperator, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__488)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_letter_seperator, __pyx_t_3) < 0) __PYX_ERR(8, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/fundamental_group.pyx":73
 * 
 * 
 * def word_as_list(word, int num_generators):             # <<<<<<<<<<<<<<
 *     if not isinstance(word, str):
 *         raise TypeError('Words must be represented as Python strings.')
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_41word_as_list, 0, __pyx_n_s_word_as_list, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__490)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 73, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_word_as_list, __pyx_t_3) < 0) __PYX_ERR(8, 73, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/fundamental_group.pyx":98
 *     return word_list
 * 
 * def list_as_word(int_list, int num_generators, verbose_form):             # <<<<<<<<<<<<<<
 *     return _letter_seperator(verbose_form).join(
 *         int_to_gen_string(g, num_generators, verbose_form)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_43list_as_word, 0, __pyx_n_s_list_as_word, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__492)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_list_as_word, __pyx_t_3) < 0) __PYX_ERR(8, 98, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/fundamental_group.pyx":134
 *             '\n   '.join(self.relators()))
 * 
 *     def num_generators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of generators for the presentation.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_7num_generators, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup_num_generators, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__493)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup, __pyx_n_s_num_generators, __pyx_t_3) < 0) __PYX_ERR(8, 134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CFundamentalGroup);

  /* "cython/core/fundamental_group.pyx":140
 *         return fg_get_num_generators(self.c_group_presentation)
 * 
 *     def num_relators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of generators for the presentation.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_9num_relators, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup_num_relators, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__494)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup, __pyx_n_s_num_relators, __pyx_t_3) < 0) __PYX_ERR(8, 140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CFundamentalGroup);

  /* "cython/core/fundamental_group.pyx":146
 *         return fg_get_num_relations(self.c_group_presentation)
 * 
 *     def num_original_generators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of geometric generators (before simplification).
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_11num_original_generators, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup_num_original_g, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__495)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup, __pyx_n_s_num_original_generators, __pyx_t_3) < 0) __PYX_ERR(8, 146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CFundamentalGroup);

  /* "cython/core/fundamental_group.pyx":152
 *         return fg_get_num_orig_gens(self.c_group_presentation)
 * 
 *     def original_generators(self, verbose_form=False, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return the original geometric generators (before
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_13original_generators, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup_original_gener, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__497)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__301);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup, __pyx_n_s_original_generators, __pyx_t_3) < 0) __PYX_ERR(8, 152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CFundamentalGroup);

  /* "cython/core/fundamental_group.pyx":177
 *         return orig_gens
 * 
 *     def generators_in_originals(self, verbose_form=False, raw_form=False, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return the current generators in terms of the original
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_15generators_in_originals, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup_generators_in, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__499)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 177, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__500);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup, __pyx_n_s_generators_in_originals, __pyx_t_3) < 0) __PYX_ERR(8, 177, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CFundamentalGroup);

  /* "cython/core/fundamental_group.pyx":232
 *             return [ list_as_word(word, n, verbose_form) for word in words[1:]]
 * 
 *     def _word_moves(self):             # <<<<<<<<<<<<<<
 *         cdef int *c_moves
 *         c_moves = fg_get_word_moves(self.c_group_presentation)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_17_word_moves, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup__word_moves, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__502)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup, __pyx_n_s_word_moves, __pyx_t_3) < 0) __PYX_ERR(8, 232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CFundamentalGroup);

  /* "cython/core/fundamental_group.pyx":239
 *         return moves
 * 
 *     def generators(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the letters representing the generators in the presentation.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_19generators, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup_generators, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__504)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup, __pyx_n_s_generators, __pyx_t_3) < 0) __PYX_ERR(8, 239, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CFundamentalGroup);

  /* "cython/core/fundamental_group.pyx":283
 *                  for i in range(1, 1+n) ]
 * 
 *     def relators(self, verbose_form = False, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of words representing the relators in the presentation.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_21relators, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup_relators, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__506)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 283, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__301);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup, __pyx_n_s_relators, __pyx_t_3) < 0) __PYX_ERR(8, 283, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CFundamentalGroup);

  /* "cython/core/fundamental_group.pyx":306
 *         return relation_list
 * 
 *     def meridian(self, int which_cusp=0, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a word representing a conjugate of the current
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_23meridian, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup_meridian, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__508)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__509);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup, __pyx_n_s_meridian, __pyx_t_3) < 0) __PYX_ERR(8, 306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CFundamentalGroup);

  /* "cython/core/fundamental_group.pyx":331
 *                verbose_form = False)
 * 
 *     def longitude(self, int which_cusp=0, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a word representing a conjugate of the current
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_25longitude, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup_longitude, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__510)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__509);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup, __pyx_n_s_longitude, __pyx_t_3) < 0) __PYX_ERR(8, 331, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CFundamentalGroup);

  /* "cython/core/fundamental_group.pyx":357
 *                verbose_form = False)
 * 
 *     def peripheral_curves(self, as_int_list=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of meridian-longitude pairs for all cusps.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_27peripheral_curves, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup_peripheral_cur, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__512)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__319);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup, __pyx_n_s_peripheral_curves, __pyx_t_3) < 0) __PYX_ERR(8, 357, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CFundamentalGroup);

  /* "cython/core/fundamental_group.pyx":369
 *                  for n in range(self.num_cusps) ]
 * 
 *     def magma_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a string which will define this group within MAGMA.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_29magma_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup_magma_string, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__513)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup, __pyx_n_s_magma_string, __pyx_t_3) < 0) __PYX_ERR(8, 369, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CFundamentalGroup);

  /* "cython/core/fundamental_group.pyx":376
 *                 ', '.join(self.relators(verbose_form=True)) + '>')
 * 
 *     def gap_string(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a string which will define this group within GAP:
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_31gap_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup_gap_string, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__515)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup, __pyx_n_s_gap_string, __pyx_t_3) < 0) __PYX_ERR(8, 376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CFundamentalGroup);

  /* "cython/core/fundamental_group.pyx":404
 *                 )
 * 
 *     def _gap_init_(self):             # <<<<<<<<<<<<<<
 *         return self.gap_string()
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_33_gap_init_, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup__gap_init, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__516)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup, __pyx_n_s_gap_init, __pyx_t_3) < 0) __PYX_ERR(8, 404, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CFundamentalGroup);

  /* "cython/core/fundamental_group.pyx":407
 *         return self.gap_string()
 * 
 *     def _magma_init_(self, magma):             # <<<<<<<<<<<<<<
 *         return self.magma_string()
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_35_magma_init_, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup__magma_init, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__518)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup, __pyx_n_s_magma_init, __pyx_t_3) < 0) __PYX_ERR(8, 407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CFundamentalGroup);

  /* "cython/core/fundamental_group.pyx":410
 *         return self.magma_string()
 * 
 *     def sage(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the corresponding Sage FinitelyPresentedGroup
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_37sage, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup_sage, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__520)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup, __pyx_n_s_sage, __pyx_t_3) < 0) __PYX_ERR(8, 410, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CFundamentalGroup);

  /* "cython/core/fundamental_group.pyx":420
 *         return F/rels
 * 
 *     def character_variety_vars_and_polys(self, as_ideal=False):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of variables and a list polynomials where the
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_39character_variety_vars_and_polys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup_character_vari, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__522)); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__319);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup, __pyx_n_s_character_variety_vars_and_polys, __pyx_t_3) < 0) __PYX_ERR(8, 420, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CFundamentalGroup);

  /* "(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_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_41__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup___reduce_cytho, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__523)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 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_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CFundamentalGroup_43__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CFundamentalGroup___setstate_cyt, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__524)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/fundamental_group.pyx":459
 * 
 * 
 * class FundamentalGroup(CFundamentalGroup):             # <<<<<<<<<<<<<<
 *     """
 *     A FundamentalGroup represents a presentation of the fundamental
 */
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_6SnapPy_CFundamentalGroup))) __PYX_ERR(8, 459, __pyx_L1_error);
  __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_FundamentalGroup, __pyx_n_s_FundamentalGroup, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_A_FundamentalGroup_represents_a); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__pyx_t_2 != __pyx_t_3) {
    if (unlikely((PyDict_SetItemString(__pyx_t_11, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(8, 459, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_FundamentalGroup, __pyx_t_2, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FundamentalGroup, __pyx_t_3) < 0) __PYX_ERR(8, 459, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/fundamental_group.pyx":479
 * 
 * 
 * if _within_sage:             # <<<<<<<<<<<<<<
 *     FundamentalGroup.__bases__ += (sage.structure.sage_object.SageObject,)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_within_sage); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 479, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(8, 479, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_13) {

    /* "cython/core/fundamental_group.pyx":480
 * 
 * if _within_sage:
 *     FundamentalGroup.__bases__ += (sage.structure.sage_object.SageObject,)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FundamentalGroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_bases); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sage); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_structure); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_sage_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SageObject); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_11);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11)) __PYX_ERR(8, 480, __pyx_L1_error);
    __pyx_t_11 = 0;
    __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_FundamentalGroup); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 480, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_bases, __pyx_t_11) < 0) __PYX_ERR(8, 480, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cython/core/fundamental_group.pyx":479
 * 
 * 
 * if _within_sage:             # <<<<<<<<<<<<<<
 *     FundamentalGroup.__bases__ += (sage.structure.sage_object.SageObject,)
 * 
 */
  }

  /* "cython/core/fundamental_group.pyx":485
 * # Holonomy Groups
 * cdef class CHolonomyGroup(CFundamentalGroup):
 *     def _matrices(self, word):             # <<<<<<<<<<<<<<
 *         """
 *         Returns (M,O,L) where M = SL2C(word), O = O31(word), and L is
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_14CHolonomyGroup_1_matrices, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CHolonomyGroup__matrices, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__526)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CHolonomyGroup, __pyx_n_s_matrices, __pyx_t_2) < 0) __PYX_ERR(8, 485, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CHolonomyGroup);

  /* "cython/core/fundamental_group.pyx":510
 *             return None
 * 
 *     def SL2C(self, word):             # <<<<<<<<<<<<<<
 *         """
 *         Return the image of the element represented by the input word
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_14CHolonomyGroup_3SL2C, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CHolonomyGroup_SL2C, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__528)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CHolonomyGroup, __pyx_n_s_SL2C, __pyx_t_2) < 0) __PYX_ERR(8, 510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CHolonomyGroup);

  /* "cython/core/fundamental_group.pyx":519
 *         return self._matrices(word)[0]
 * 
 *     def O31(self, word):             # <<<<<<<<<<<<<<
 *         """
 *         Return the image of the element represented by the input word
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_14CHolonomyGroup_5O31, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CHolonomyGroup_O31, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__529)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 519, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CHolonomyGroup, __pyx_n_s_O31, __pyx_t_2) < 0) __PYX_ERR(8, 519, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CHolonomyGroup);

  /* "cython/core/fundamental_group.pyx":527
 *         return self._matrices(word)[1]
 * 
 *     def complex_length(self, word):             # <<<<<<<<<<<<<<
 *         """
 *         Return the complex length of the isometry represented by the
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_14CHolonomyGroup_7complex_length, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CHolonomyGroup_complex_length, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__530)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CHolonomyGroup, __pyx_n_s_complex_length, __pyx_t_2) < 0) __PYX_ERR(8, 527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CHolonomyGroup);

  /* "(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_2 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_14CHolonomyGroup_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CHolonomyGroup___reduce_cython, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__531)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_2 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_14CHolonomyGroup_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CHolonomyGroup___setstate_cython, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__532)); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/fundamental_group.pyx":535
 * 
 * 
 * class HolonomyGroup(CHolonomyGroup):             # <<<<<<<<<<<<<<
 *     """
 *     A FundamentalGroup represents a presentation of the fundamental
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF((PyObject *)__pyx_ptype_6SnapPy_CHolonomyGroup);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_6SnapPy_CHolonomyGroup);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_6SnapPy_CHolonomyGroup))) __PYX_ERR(8, 535, __pyx_L1_error);
  __pyx_t_11 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_11, __pyx_n_s_HolonomyGroup, __pyx_n_s_HolonomyGroup, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_A_FundamentalGroup_represents_a_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__pyx_t_11 != __pyx_t_2) {
    if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(8, 535, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cython/core/fundamental_group.pyx":589
 *     """
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _number_(n):
 *         return number.number_to_native_number(n)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13HolonomyGroup_1_number_, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_HolonomyGroup__number, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__533)); if (unlikely(!__pyx_t_2)) __PYX_ERR(8, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_number_2, __pyx_t_5) < 0) __PYX_ERR(8, 589, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/fundamental_group.pyx":535
 * 
 * 
 * class HolonomyGroup(CHolonomyGroup):             # <<<<<<<<<<<<<<
 *     """
 *     A FundamentalGroup represents a presentation of the fundamental
 */
  __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_HolonomyGroup, __pyx_t_11, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(8, 535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HolonomyGroup, __pyx_t_5) < 0) __PYX_ERR(8, 535, __pyx_L1_error)
  __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;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/fundamental_group.pyx":594
 * 
 * 
 * if _within_sage:             # <<<<<<<<<<<<<<
 *     HolonomyGroup.__bases__ += (sage.structure.sage_object.SageObject,)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_within_sage); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(8, 594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__pyx_t_13) {

    /* "cython/core/fundamental_group.pyx":595
 * 
 * if _within_sage:
 *     HolonomyGroup.__bases__ += (sage.structure.sage_object.SageObject,)             # <<<<<<<<<<<<<<
 */
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_HolonomyGroup); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_bases); if (unlikely(!__pyx_t_4)) __PYX_ERR(8, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_sage); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_structure); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sage_object); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_SageObject); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3)) __PYX_ERR(8, 595, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(8, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_HolonomyGroup); if (unlikely(!__pyx_t_11)) __PYX_ERR(8, 595, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_11, __pyx_n_s_bases, __pyx_t_3) < 0) __PYX_ERR(8, 595, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "cython/core/fundamental_group.pyx":594
 * 
 * 
 * if _within_sage:             # <<<<<<<<<<<<<<
 *     HolonomyGroup.__bases__ += (sage.structure.sage_object.SageObject,)
 */
  }

  /* "cython/core/symmetry_group.pyx":30
 *         self.c_symmetry_group = c_symmetry_group
 * 
 *     def is_full_group(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the full symmetry group has been found.
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_5is_full_group, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup_is_full_group, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__534)); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_n_s_is_full_group, __pyx_t_11) < 0) __PYX_ERR(9, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_SymmetryGroup);

  /* "cython/core/symmetry_group.pyx":62
 *         return thePretext + theText
 * 
 *     def order(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the order of the symmetry group
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_9order, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup_order, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__535)); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 62, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_n_s_order, __pyx_t_11) < 0) __PYX_ERR(9, 62, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_SymmetryGroup);

  /* "cython/core/symmetry_group.pyx":72
 *         return symmetry_group_order(self.c_symmetry_group)
 * 
 *     def is_abelian(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the symmetry group is abelian.
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_11is_abelian, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup_is_abelian, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__537)); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 72, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_n_s_is_abelian, __pyx_t_11) < 0) __PYX_ERR(9, 72, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_SymmetryGroup);

  /* "cython/core/symmetry_group.pyx":84
 *             self.c_symmetry_group, &abelian_description))
 * 
 *     def abelian_description(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the symmetry group is abelian, return it as an AbelianGroup
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_13abelian_description, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup_abelian_descriptio, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__539)); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_n_s_abelian_description, __pyx_t_11) < 0) __PYX_ERR(9, 84, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_SymmetryGroup);

  /* "cython/core/symmetry_group.pyx":105
 *         return AbelianGroup(elementary_divisors=coeffs)
 * 
 *     def is_dihedral(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the symmetry group is dihedral.
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_15is_dihedral, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup_is_dihedral, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__540)); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_n_s_is_dihedral, __pyx_t_11) < 0) __PYX_ERR(9, 105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_SymmetryGroup);

  /* "cython/core/symmetry_group.pyx":115
 *         return B2B(symmetry_group_is_dihedral(self.c_symmetry_group))
 * 
 *     def is_polyhedral(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns whether the symmetry group is a (possibly binary)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_17is_polyhedral, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup_is_polyhedral, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__541)); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_n_s_is_polyhedral, __pyx_t_11) < 0) __PYX_ERR(9, 115, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_SymmetryGroup);

  /* "cython/core/symmetry_group.pyx":123
 *                                                 NULL, NULL, NULL, NULL))
 * 
 *     def polyhedral_description(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the symmetry group is a (possibly binary)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_19polyhedral_description, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup_polyhedral_descrip, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__543)); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_n_s_polyhedral_description, __pyx_t_11) < 0) __PYX_ERR(9, 123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_SymmetryGroup);

  /* "cython/core/symmetry_group.pyx":150
 *         return name
 * 
 *     def is_S5(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns whether the group is the symmetric group on five things.
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_21is_S5, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup_is_S5, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__544)); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 150, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_n_s_is_S5, __pyx_t_11) < 0) __PYX_ERR(9, 150, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_SymmetryGroup);

  /* "cython/core/symmetry_group.pyx":156
 *         return B2B(symmetry_group_is_S5(self.c_symmetry_group))
 * 
 *     def is_direct_product(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the SymmetryGroup is a nontrivial direct
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_23is_direct_product, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup_is_direct_product, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__545)); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_n_s_is_direct_product, __pyx_t_11) < 0) __PYX_ERR(9, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_SymmetryGroup);

  /* "cython/core/symmetry_group.pyx":169
 *         return B2B(symmetry_group_is_direct_product(self.c_symmetry_group))
 * 
 *     def direct_product_description(self):             # <<<<<<<<<<<<<<
 *         """
 *         If the SymmetryGroup is a nontrivial direct product with at
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_25direct_product_description, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup_direct_product_des, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__547)); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_n_s_direct_product_description, __pyx_t_11) < 0) __PYX_ERR(9, 169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_SymmetryGroup);

  /* "cython/core/symmetry_group.pyx":197
 *         return (factor_0, factor_1)
 * 
 *     def is_amphicheiral(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether the manifold has an orientation reversing symmetry.
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_27is_amphicheiral, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup_is_amphicheiral, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__548)); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_n_s_is_amphicheiral, __pyx_t_11) < 0) __PYX_ERR(9, 197, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_SymmetryGroup);

  /* "cython/core/symmetry_group.pyx":207
 *         return B2B(symmetry_group_is_amphicheiral(self.c_symmetry_group))
 * 
 *     def is_invertible_knot(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return whether a one-cusped has a symmetry that acts on the
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_29is_invertible_knot, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup_is_invertible_knot, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__549)); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 207, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_n_s_is_invertible_knot, __pyx_t_11) < 0) __PYX_ERR(9, 207, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_SymmetryGroup);

  /* "cython/core/symmetry_group.pyx":218
 *         return B2B(symmetry_group_invertible_knot(self.c_symmetry_group))
 * 
 *     def commutator_subgroup(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the commutator subgroup of the SymmetryGroup
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_31commutator_subgroup, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup_commutator_subgrou, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__551)); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_n_s_commutator_subgroup, __pyx_t_11) < 0) __PYX_ERR(9, 218, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_SymmetryGroup);

  /* "cython/core/symmetry_group.pyx":236
 *         return comm_subgroup
 * 
 *     def abelianization(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the abelianization of the symmetry group
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_33abelianization, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup_abelianization, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__553)); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_n_s_abelianization, __pyx_t_11) < 0) __PYX_ERR(9, 236, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_SymmetryGroup);

  /* "cython/core/symmetry_group.pyx":256
 *         return abelianization.abelian_description()
 * 
 *     def center(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the center of the symmetry group
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_35center, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup_center, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__555)); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_n_s_center, __pyx_t_11) < 0) __PYX_ERR(9, 256, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_SymmetryGroup);

  /* "cython/core/symmetry_group.pyx":276
 *         return center.abelian_description()
 * 
 *     def multiply_elements(self, i, j):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the product of group elements i and j.  The convention
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_37multiply_elements, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup_multiply_elements, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__557)); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_n_s_multiply_elements, __pyx_t_11) < 0) __PYX_ERR(9, 276, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_SymmetryGroup);

  /* "cython/core/symmetry_group.pyx":295
 *         return symmetry_group_product(self.c_symmetry_group, i, j)
 * 
 *     def isometries(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a detailed list of all the isometries in the symmetry group.
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_39isometries, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup_isometries, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__559)); if (unlikely(!__pyx_t_11)) __PYX_ERR(9, 295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_SymmetryGroup, __pyx_n_s_isometries, __pyx_t_11) < 0) __PYX_ERR(9, 295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_SymmetryGroup);

  /* "(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_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_41__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup___reduce_cython, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__560)); if (unlikely(!__pyx_t_11)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_11) < 0) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 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_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13SymmetryGroup_43__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_SymmetryGroup___setstate_cython, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__561)); if (unlikely(!__pyx_t_11)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_11) < 0) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/dirichlet.pyx":102
 *     cdef int c_num_generators
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _number_(n):
 *         return number.number_to_native_number(n)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_1_number_, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain__number, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__562)); if (unlikely(!__pyx_t_11)) __PYX_ERR(10, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_number_2, __pyx_t_11) < 0) __PYX_ERR(10, 102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);
  __Pyx_GetNameInClass(__pyx_t_11, (PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_number_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(10, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_number_2, __pyx_t_3) < 0) __PYX_ERR(10, 102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":108
 *     def __cinit__(self,
 *                   Manifold manifold=None,
 *                   vertex_epsilon=default_vertex_epsilon,             # <<<<<<<<<<<<<<
 *                   displacement=None,
 *                   centroid_at_origin=True,
 */
  __pyx_t_3 = PyFloat_FromDouble(default_vertex_epsilon); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_k__130 = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cython/core/dirichlet.pyx":184
 *             )
 * 
 *     def num_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of vertices.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_9num_vertices, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_num_vertices, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__563)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_num_vertices, __pyx_t_3) < 0) __PYX_ERR(10, 184, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":190
 *         return self.c_dirichlet_domain.num_vertices
 * 
 *     def num_finite_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of finite (non-ideal) vertices.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_11num_finite_vertices, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_num_finite_vert, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__564)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_num_finite_vertices, __pyx_t_3) < 0) __PYX_ERR(10, 190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":196
 *         return self.c_dirichlet_domain.num_finite_vertices
 * 
 *     def num_ideal_vertices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of ideal vertices.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_13num_ideal_vertices, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_num_ideal_verti, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__565)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_num_ideal_vertices, __pyx_t_3) < 0) __PYX_ERR(10, 196, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":202
 *         return self.c_dirichlet_domain.num_ideal_vertices
 * 
 *     def num_edges(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of edges.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_15num_edges, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_num_edges, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__566)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_num_edges, __pyx_t_3) < 0) __PYX_ERR(10, 202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":208
 *         return self.c_dirichlet_domain.num_edges
 * 
 *     def num_faces(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of faces.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_17num_faces, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_num_faces, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__567)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_num_faces, __pyx_t_3) < 0) __PYX_ERR(10, 208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":214
 *         return self.c_dirichlet_domain.num_faces
 * 
 *     def in_radius(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the radius of the largest inscribed sphere.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_19in_radius, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_in_radius, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__569)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_in_radius, __pyx_t_3) < 0) __PYX_ERR(10, 214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":221
 *         return self._number_(radius)
 * 
 *     def out_radius(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the radius of the smallest circubscribed sphere.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_21out_radius, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_out_radius, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__570)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_out_radius, __pyx_t_3) < 0) __PYX_ERR(10, 221, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":228
 *         return self._number_(radius)
 * 
 *     def spine_radius(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the infimum of the radii (measured from the origin) of all
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_23spine_radius, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_spine_radius, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__571)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 228, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_spine_radius, __pyx_t_3) < 0) __PYX_ERR(10, 228, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":236
 *         return self._number_(radius)
 * 
 *     def length_spectrum_dicts(self, cutoff_length=1.0,             # <<<<<<<<<<<<<<
 *                               full_rigor=True,
 *                               multiplicities=True,
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_25length_spectrum_dicts, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_length_spectrum, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__573)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__574);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_length_spectrum_dicts, __pyx_t_3) < 0) __PYX_ERR(10, 236, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":303
 *         return LengthSpectrum(spectrum)
 * 
 *     def vertex_list(self, details = False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of the coordinates of the vertices.  These are
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_27vertex_list, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_vertex_list, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__576)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__319);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_vertex_list_2, __pyx_t_3) < 0) __PYX_ERR(10, 303, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":323
 *             return self._vertex_list()
 * 
 *     def _vertex_list(self):             # <<<<<<<<<<<<<<
 *         cdef WEVertex *vertex = &self.c_dirichlet_domain.vertex_list_begin
 *         vertices = []
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_29_vertex_list, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain__vertex_list, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__578)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_vertex_list, __pyx_t_3) < 0) __PYX_ERR(10, 323, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":335
 *         return vertices
 * 
 *     def _vertex_data_list(self):             # <<<<<<<<<<<<<<
 *         cdef WEVertex *vertex = &self.c_dirichlet_domain.vertex_list_begin
 *         vertices = []
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_31_vertex_data_list, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain__vertex_data_li, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__579)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_vertex_data_list, __pyx_t_3) < 0) __PYX_ERR(10, 335, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":350
 *         return vertices
 * 
 *     def _vertex_to_index_dict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns dictionary from WEVertex pointer to index of vertex.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_33_vertex_to_index_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain__vertex_to_inde, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__581)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_vertex_to_index_dict, __pyx_t_3) < 0) __PYX_ERR(10, 350, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":365
 *         return result
 * 
 *     def _edge_to_index_dict(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns dictionary from WEEdge pointer to index of edge.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_35_edge_to_index_dict, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain__edge_to_index, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__583)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 365, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_edge_to_index_dict, __pyx_t_3) < 0) __PYX_ERR(10, 365, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":380
 *         return result
 * 
 *     def face_list(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of faces, each represented as a dictionary with
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_37face_list, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_face_list, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__585)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_face_list, __pyx_t_3) < 0) __PYX_ERR(10, 380, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":474
 *         return faces
 * 
 *     def edge_list(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of edges, each represented as a dictionar with keys
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_39edge_list, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_edge_list, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__587)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_edge_list, __pyx_t_3) < 0) __PYX_ERR(10, 474, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":502
 *         return edges
 * 
 *     def view(self):             # <<<<<<<<<<<<<<
 *         if PolyhedronViewer:
 *             return ViewerWindow(PolyhedronViewer, facedicts=self.face_list(),
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_41view, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_view, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__588)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_view, __pyx_t_3) < 0) __PYX_ERR(10, 502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":509
 *                            'was not imported.')
 * 
 *     def manifold(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Manifold computed directly from the Dirichlet
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_43manifold, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_manifold, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__589)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_manifold, __pyx_t_3) < 0) __PYX_ERR(10, 509, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":524
 *         return self.triangulate(_manifold_class)
 * 
 *     def triangulation(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a Triangulation computed directly from the Dirichlet
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_45triangulation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_triangulation, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__590)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_triangulation, __pyx_t_3) < 0) __PYX_ERR(10, 524, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":552
 *         return M
 * 
 *     def volume(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the approximate volume of the DirichletDomain.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_47volume, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_volume, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__592)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_volume, __pyx_t_3) < 0) __PYX_ERR(10, 552, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":564
 *         return self._number_(volume)
 * 
 *     def pairing_matrices(self):             # <<<<<<<<<<<<<<
 *         """
 *         Returns a list of the O31Matrices which pair the faces of
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_49pairing_matrices, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_pairing_matrice, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__594)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 564, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_pairing_matrices, __pyx_t_3) < 0) __PYX_ERR(10, 564, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":593
 *         return matrices
 * 
 *     def pairing_words(self):             # <<<<<<<<<<<<<<
 *         """
 *         Group elements which pair the faces of this DirichletDomain
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_51pairing_words, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_pairing_words, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__596)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_pairing_words, __pyx_t_3) < 0) __PYX_ERR(10, 593, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":631
 *         return words
 * 
 *     def _to_string(self):             # <<<<<<<<<<<<<<
 *         matrices = self.pairing_matrices()
 *         result = '%% Generators\n%s\n' % len(matrices)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_53_to_string, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain__to_string, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__598)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_to_string, __pyx_t_3) < 0) __PYX_ERR(10, 631, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":640
 *         return result
 * 
 *     def __reduce_ex__(self, protocol):             # <<<<<<<<<<<<<<
 *         return (_unpickle_dirichlet_domain, (self._to_string(), self.manifold_name))
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_55__reduce_ex__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain___reduce_ex, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__600)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_reduce_ex, __pyx_t_3) < 0) __PYX_ERR(10, 640, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":643
 *         return (_unpickle_dirichlet_domain, (self._to_string(), self.manifold_name))
 * 
 *     def save(self, filename):             # <<<<<<<<<<<<<<
 *         """
 *         Save the Dirichlet domain as a text file in "% Generators" format.
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_57save, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_save, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__602)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_save, __pyx_t_3) < 0) __PYX_ERR(10, 643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":666
 *             output.write(self._to_string().encode('ascii'))
 * 
 *     def export_stl(self, filename, model='klein', cutout=False, num_subdivisions=3,             # <<<<<<<<<<<<<<
 *                    shrink_factor=0.9, cutoff_radius=0.9, callback=None):
 *         """
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16CDirichletDomain_59export_stl, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CDirichletDomain_export_stl, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__604)); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__605);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain, __pyx_n_s_export_stl, __pyx_t_3) < 0) __PYX_ERR(10, 666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CDirichletDomain);

  /* "cython/core/dirichlet.pyx":703
 * 
 * 
 * class DirichletDomain(CDirichletDomain):             # <<<<<<<<<<<<<<
 *     """
 *     A DirichletDomain object represents a Dirichlet Domain of
 */
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_ptype_6SnapPy_CDirichletDomain))) __PYX_ERR(10, 703, __pyx_L1_error);
  __pyx_t_11 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(10, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(10, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_11, __pyx_n_s_DirichletDomain, __pyx_n_s_DirichletDomain, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_A_DirichletDomain_object_repres); if (unlikely(!__pyx_t_5)) __PYX_ERR(10, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__pyx_t_11 != __pyx_t_3) {
    if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(10, 703, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_DirichletDomain, __pyx_t_11, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(10, 703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DirichletDomain, __pyx_t_3) < 0) __PYX_ERR(10, 703, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/dirichlet.pyx":741
 * 
 * 
 * def _unpickle_dirichlet_domain(string, name):             # <<<<<<<<<<<<<<
 *     return DirichletDomain(generator_bytes=string.encode('ascii'), manifold_name=name)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_45_unpickle_dirichlet_domain, 0, __pyx_n_s_unpickle_dirichlet_domain, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__607)); if (unlikely(!__pyx_t_11)) __PYX_ERR(10, 741, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_unpickle_dirichlet_domain, __pyx_t_11) < 0) __PYX_ERR(10, 741, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":9
 *     cdef original_indices
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def _number_(n):
 *         return number.number_to_native_number(n)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_1_number_, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood__number, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__608)); if (unlikely(!__pyx_t_11)) __PYX_ERR(11, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_number_2, __pyx_t_11) < 0) __PYX_ERR(11, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);
  __Pyx_GetNameInClass(__pyx_t_11, (PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_number_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(11, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_number_2, __pyx_t_4) < 0) __PYX_ERR(11, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":39
 *             N, N != 1 and 's' or '')
 * 
 *     def manifold(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return a Manifold built from the current canonical triangulation.
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_9manifold, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_manifold, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__610)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_manifold, __pyx_t_4) < 0) __PYX_ERR(11, 39, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":53
 *         return M
 * 
 *     def original_index(self, which_cusp):             # <<<<<<<<<<<<<<
 *         """
 *         Returns the index by which the Manifold identifies this cusp.
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_11original_index, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_original_index, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__612)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_original_index, __pyx_t_4) < 0) __PYX_ERR(11, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":59
 *         return self.original_indices[which_cusp]
 * 
 *     def check_index(self, which_cusp):             # <<<<<<<<<<<<<<
 *         """
 *         Raises an IndexError if the cusp index is invalid.
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_13check_index, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_check_index, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__614)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_check_index, __pyx_t_4) < 0) __PYX_ERR(11, 59, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":70
 *                              'exist.' % which_cusp)
 * 
 *     def num_cusps(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the number of cusps.
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_15num_cusps, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_num_cusps, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__615)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 70, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_num_cusps, __pyx_t_4) < 0) __PYX_ERR(11, 70, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":76
 *         return self._num_cusps
 * 
 *     def topology(self, which_cusp = 0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the topological type of the specified cusp.
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_17topology, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_topology, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__617)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 76, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__357);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_topology, __pyx_t_4) < 0) __PYX_ERR(11, 76, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":84
 *         return CuspTopology[topology]
 * 
 *     def get_displacement(self, which_cusp = 0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the displacement of the horospherical boundary of the
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_19get_displacement, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_get_displaceme, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__619)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 84, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__357);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_get_displacement, __pyx_t_4) < 0) __PYX_ERR(11, 84, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":99
 *         return self._number_(disp)
 * 
 *     def set_displacement(self, new_displacement, which_cusp=0):             # <<<<<<<<<<<<<<
 *         """
 *         Set the displacement of the specified cusp.
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_21set_displacement, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_set_displaceme, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__621)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__357);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_set_displacement, __pyx_t_4) < 0) __PYX_ERR(11, 99, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":107
 *                                            N, Object2Real(new_displacement))
 * 
 *     def stopping_displacement(self, which_cusp=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the displacement at which the specified cusp
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_23stopping_displacement, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_stopping_displ, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__622)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__357);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_stopping_displacement, __pyx_t_4) < 0) __PYX_ERR(11, 107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":118
 *         return self._number_(disp)
 * 
 *     def stopper(self, which_cusp):             # <<<<<<<<<<<<<<
 *         """
 *         Return the index of the cusp which will be the first one that
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_25stopper, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_stopper, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__623)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_stopper, __pyx_t_4) < 0) __PYX_ERR(11, 118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":128
 *             self.c_cusp_neighborhood, N)
 * 
 *     def reach(self, which_cusp=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the displacement at which the specified cusp
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_27reach, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_reach, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__625)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__357);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_reach, __pyx_t_4) < 0) __PYX_ERR(11, 128, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":139
 *         return self._number_(reach)
 * 
 *     def max_reach(self):             # <<<<<<<<<<<<<<
 *         """
 *         Return the maximum reach over all cusps.
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_29max_reach, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_max_reach, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__627)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_max_reach, __pyx_t_4) < 0) __PYX_ERR(11, 139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":147
 *         return self._number_(reach)
 * 
 *     def get_tie(self, which_cusp):             # <<<<<<<<<<<<<<
 *         """
 *         Return True if the specified cusp is a member of the tied group.
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_31get_tie, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_get_tie, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__628)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_get_tie, __pyx_t_4) < 0) __PYX_ERR(11, 147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":155
 *         return get_cusp_neighborhood_tie(self.c_cusp_neighborhood, N)
 * 
 *     def set_tie(self, which_cusp, new_tie):             # <<<<<<<<<<<<<<
 *         """
 *         Mark the specified cusp as a member of the tied group.
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_33set_tie, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_set_tie, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__630)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 155, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_set_tie, __pyx_t_4) < 0) __PYX_ERR(11, 155, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":162
 *         set_cusp_neighborhood_tie(self.c_cusp_neighborhood, N, new_tie)
 * 
 *     def volume(self, which_cusp=0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the volume of the horoball neighborhood of the specified
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_35volume, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_volume, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__632)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__357);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_volume, __pyx_t_4) < 0) __PYX_ERR(11, 162, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":172
 *         return self._number_(volume)
 * 
 *     def translations(self, which_cusp = 0):             # <<<<<<<<<<<<<<
 *         """
 *         Return the (complex) Euclidean translations of the meridian
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_37translations, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_translations, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__634)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__357);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_translations, __pyx_t_4) < 0) __PYX_ERR(11, 172, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":190
 *         return self._number_(M), self._number_(L)
 * 
 *     def horoballs(self, cutoff=0.1, which_cusp=0, full_list=True,             # <<<<<<<<<<<<<<
 *                   high_precision=False):
 *         """
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_39horoballs, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_horoballs, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__636)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__637);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_horoballs, __pyx_t_4) < 0) __PYX_ERR(11, 190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":225
 *         return result
 * 
 *     def Ford_domain(self, which_cusp=0, high_precision=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of pairs of complex numbers describing the
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_41Ford_domain, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_Ford_domain, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__639)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__509);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_Ford_domain, __pyx_t_4) < 0) __PYX_ERR(11, 225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":257
 *         return result
 * 
 *     def triangulation(self, which_cusp=0, high_precision=False):             # <<<<<<<<<<<<<<
 *         """
 *         Return a list of dictionaries describing the endpoints of the
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_43triangulation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_triangulation, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__641)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__509);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_triangulation, __pyx_t_4) < 0) __PYX_ERR(11, 257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "cython/core/cusp_neighborhoods.pyx":289
 *         return result
 * 
 *     def view(self, which_cusp=0, cutoff=None):             # <<<<<<<<<<<<<<
 *         """
 *         Create a 3D picture of the horoball packing.  One can specify
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_45view, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood_view, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__643)); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__644);
  if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood, __pyx_n_s_view, __pyx_t_4) < 0) __PYX_ERR(11, 289, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  PyType_Modified(__pyx_ptype_6SnapPy_CCuspNeighborhood);

  /* "(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_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_47__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood___reduce_cytho, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__645)); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_4) < 0) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_17CCuspNeighborhood_49__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_CCuspNeighborhood___setstate_cyt, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__646)); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_4) < 0) __PYX_ERR(7, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/cusp_neighborhoods.pyx":309
 * 
 * 
 * class CuspNeighborhood(CCuspNeighborhood):             # <<<<<<<<<<<<<<
 *     """
 *     A CuspNeighborhood object represents an equivariant collection of
 */
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood);
  __Pyx_GIVEREF((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_ptype_6SnapPy_CCuspNeighborhood))) __PYX_ERR(11, 309, __pyx_L1_error);
  __pyx_t_11 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(11, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(11, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_11, __pyx_n_s_CuspNeighborhood, __pyx_n_s_CuspNeighborhood, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_A_CuspNeighborhood_object_repre); if (unlikely(!__pyx_t_3)) __PYX_ERR(11, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__pyx_t_11 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(11, 309, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_CuspNeighborhood, __pyx_t_11, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(11, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CuspNeighborhood, __pyx_t_4) < 0) __PYX_ERR(11, 309, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/pickle.pyx":27
 * from libc.math cimport floor
 * 
 * cdef IS_HUGE = <unsigned char> 1 << 7             # <<<<<<<<<<<<<<
 * cdef IS_BIG = <unsigned char> 1 << 6
 * cdef IS_COMPLETE = <unsigned char> 1 << 5
 */
  __pyx_t_11 = __Pyx_PyInt_From_long((((unsigned char)1) << 7)); if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_XGOTREF(__pyx_v_6SnapPy_IS_HUGE);
  __Pyx_DECREF_SET(__pyx_v_6SnapPy_IS_HUGE, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;

  /* "cython/core/pickle.pyx":28
 * 
 * cdef IS_HUGE = <unsigned char> 1 << 7
 * cdef IS_BIG = <unsigned char> 1 << 6             # <<<<<<<<<<<<<<
 * cdef IS_COMPLETE = <unsigned char> 1 << 5
 * 
 */
  __pyx_t_11 = __Pyx_PyInt_From_long((((unsigned char)1) << 6)); if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_XGOTREF(__pyx_v_6SnapPy_IS_BIG);
  __Pyx_DECREF_SET(__pyx_v_6SnapPy_IS_BIG, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;

  /* "cython/core/pickle.pyx":29
 * cdef IS_HUGE = <unsigned char> 1 << 7
 * cdef IS_BIG = <unsigned char> 1 << 6
 * cdef IS_COMPLETE = <unsigned char> 1 << 5             # <<<<<<<<<<<<<<
 * 
 * cdef pickle_triangulation(c_Triangulation *tri):
 */
  __pyx_t_11 = __Pyx_PyInt_From_long((((unsigned char)1) << 5)); if (unlikely(!__pyx_t_11)) __PYX_ERR(12, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_XGOTREF(__pyx_v_6SnapPy_IS_COMPLETE);
  __Pyx_DECREF_SET(__pyx_v_6SnapPy_IS_COMPLETE, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_11);
  __pyx_t_11 = 0;

  /* "cython/core/tail.pyx":3
 * # get_triangulation
 * 
 * split_filling_info = re.compile(r'(.*?)((?:\([0-9 .+-]+,[0-9 .+-]+\))*$)')             # <<<<<<<<<<<<<<
 * is_torus_bundle = re.compile('b([+-no])([+-])([lLrR]+)$')
 * is_link_complement1_pat = r'(?P<crossings>[0-9]+)[\^](?P<components>[0-9]+)[_](?P<index>[0-9]+)$'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_re); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_compile); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__647, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_split_filling_info, __pyx_t_11) < 0) __PYX_ERR(2, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/tail.pyx":4
 * 
 * split_filling_info = re.compile(r'(.*?)((?:\([0-9 .+-]+,[0-9 .+-]+\))*$)')
 * is_torus_bundle = re.compile('b([+-no])([+-])([lLrR]+)$')             # <<<<<<<<<<<<<<
 * is_link_complement1_pat = r'(?P<crossings>[0-9]+)[\^](?P<components>[0-9]+)[_](?P<index>[0-9]+)$'
 * is_link_complement2_pat = r'(?P<crossings>[0-9]+)[_](?P<index>[0-9]+)[\^](?P<components>[0-9]+)$'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_re); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_compile); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__648, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_torus_bundle, __pyx_t_11) < 0) __PYX_ERR(2, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/tail.pyx":5
 * split_filling_info = re.compile(r'(.*?)((?:\([0-9 .+-]+,[0-9 .+-]+\))*$)')
 * is_torus_bundle = re.compile('b([+-no])([+-])([lLrR]+)$')
 * is_link_complement1_pat = r'(?P<crossings>[0-9]+)[\^](?P<components>[0-9]+)[_](?P<index>[0-9]+)$'             # <<<<<<<<<<<<<<
 * is_link_complement2_pat = r'(?P<crossings>[0-9]+)[_](?P<index>[0-9]+)[\^](?P<components>[0-9]+)$'
 * is_link_complement3_pat = '[lL](?P<components>[0-9]{1})(?P<crossings>[0-9]{2})(?P<index>[0-9]+)$'
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_link_complement1_pat, __pyx_kp_s_P_crossings_0_9_P_components_0) < 0) __PYX_ERR(2, 5, __pyx_L1_error)

  /* "cython/core/tail.pyx":6
 * is_torus_bundle = re.compile('b([+-no])([+-])([lLrR]+)$')
 * is_link_complement1_pat = r'(?P<crossings>[0-9]+)[\^](?P<components>[0-9]+)[_](?P<index>[0-9]+)$'
 * is_link_complement2_pat = r'(?P<crossings>[0-9]+)[_](?P<index>[0-9]+)[\^](?P<components>[0-9]+)$'             # <<<<<<<<<<<<<<
 * is_link_complement3_pat = '[lL](?P<components>[0-9]{1})(?P<crossings>[0-9]{2})(?P<index>[0-9]+)$'
 * is_link_complement1 = re.compile(is_link_complement1_pat)
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_link_complement2_pat, __pyx_kp_s_P_crossings_0_9___P_index_0_9_P) < 0) __PYX_ERR(2, 6, __pyx_L1_error)

  /* "cython/core/tail.pyx":7
 * is_link_complement1_pat = r'(?P<crossings>[0-9]+)[\^](?P<components>[0-9]+)[_](?P<index>[0-9]+)$'
 * is_link_complement2_pat = r'(?P<crossings>[0-9]+)[_](?P<index>[0-9]+)[\^](?P<components>[0-9]+)$'
 * is_link_complement3_pat = '[lL](?P<components>[0-9]{1})(?P<crossings>[0-9]{2})(?P<index>[0-9]+)$'             # <<<<<<<<<<<<<<
 * is_link_complement1 = re.compile(is_link_complement1_pat)
 * is_link_complement2 = re.compile(is_link_complement2_pat)
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_link_complement3_pat, __pyx_kp_s_lL_P_components_0_9_1_P_crossin) < 0) __PYX_ERR(2, 7, __pyx_L1_error)

  /* "cython/core/tail.pyx":8
 * is_link_complement2_pat = r'(?P<crossings>[0-9]+)[_](?P<index>[0-9]+)[\^](?P<components>[0-9]+)$'
 * is_link_complement3_pat = '[lL](?P<components>[0-9]{1})(?P<crossings>[0-9]{2})(?P<index>[0-9]+)$'
 * is_link_complement1 = re.compile(is_link_complement1_pat)             # <<<<<<<<<<<<<<
 * is_link_complement2 = re.compile(is_link_complement2_pat)
 * is_link_complement3 = re.compile(is_link_complement3_pat)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_re); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_compile); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_is_link_complement1_pat); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_link_complement1, __pyx_t_3) < 0) __PYX_ERR(2, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":9
 * is_link_complement3_pat = '[lL](?P<components>[0-9]{1})(?P<crossings>[0-9]{2})(?P<index>[0-9]+)$'
 * is_link_complement1 = re.compile(is_link_complement1_pat)
 * is_link_complement2 = re.compile(is_link_complement2_pat)             # <<<<<<<<<<<<<<
 * is_link_complement3 = re.compile(is_link_complement3_pat)
 * rolfsen_link_regexs = [is_link_complement1, is_link_complement2, is_link_complement3]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_re); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_compile); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_is_link_complement2_pat); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_link_complement2, __pyx_t_5) < 0) __PYX_ERR(2, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":10
 * is_link_complement1 = re.compile(is_link_complement1_pat)
 * is_link_complement2 = re.compile(is_link_complement2_pat)
 * is_link_complement3 = re.compile(is_link_complement3_pat)             # <<<<<<<<<<<<<<
 * rolfsen_link_regexs = [is_link_complement1, is_link_complement2, is_link_complement3]
 * is_HT_knot = re.compile('(?P<crossings>[0-9]+)(?P<alternation>[an])(?P<index>[0-9]+)$')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_compile); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_is_link_complement3_pat); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_link_complement3, __pyx_t_11) < 0) __PYX_ERR(2, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/tail.pyx":11
 * is_link_complement2 = re.compile(is_link_complement2_pat)
 * is_link_complement3 = re.compile(is_link_complement3_pat)
 * rolfsen_link_regexs = [is_link_complement1, is_link_complement2, is_link_complement3]             # <<<<<<<<<<<<<<
 * is_HT_knot = re.compile('(?P<crossings>[0-9]+)(?P<alternation>[an])(?P<index>[0-9]+)$')
 * is_braid_complement = re.compile(r'[Bb]raid[:]?(\[[0-9, \-]+\])$')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_is_link_complement1); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_is_link_complement2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_is_link_complement3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_11);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_11)) __PYX_ERR(2, 11, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_5)) __PYX_ERR(2, 11, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(2, 11, __pyx_L1_error);
  __pyx_t_11 = 0;
  __pyx_t_5 = 0;
  __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_rolfsen_link_regexs, __pyx_t_4) < 0) __PYX_ERR(2, 11, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":12
 * is_link_complement3 = re.compile(is_link_complement3_pat)
 * rolfsen_link_regexs = [is_link_complement1, is_link_complement2, is_link_complement3]
 * is_HT_knot = re.compile('(?P<crossings>[0-9]+)(?P<alternation>[an])(?P<index>[0-9]+)$')             # <<<<<<<<<<<<<<
 * is_braid_complement = re.compile(r'[Bb]raid[:]?(\[[0-9, \-]+\])$')
 * is_int_DT_exterior = re.compile(r'DT[:]? *(\[[0-9, \-\(\)]+\](?: *, *\[[01, ]+\])?)$')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_compile); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__649, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_HT_knot, __pyx_t_4) < 0) __PYX_ERR(2, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":13
 * rolfsen_link_regexs = [is_link_complement1, is_link_complement2, is_link_complement3]
 * is_HT_knot = re.compile('(?P<crossings>[0-9]+)(?P<alternation>[an])(?P<index>[0-9]+)$')
 * is_braid_complement = re.compile(r'[Bb]raid[:]?(\[[0-9, \-]+\])$')             # <<<<<<<<<<<<<<
 * is_int_DT_exterior = re.compile(r'DT[:]? *(\[[0-9, \-\(\)]+\](?: *, *\[[01, ]+\])?)$')
 * is_alpha_DT_exterior = re.compile(r'DT[:\[] *([a-zA-Z]+(?:\.[01]+)?)[\]]?$')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_compile); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__650, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_braid_complement, __pyx_t_4) < 0) __PYX_ERR(2, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":14
 * is_HT_knot = re.compile('(?P<crossings>[0-9]+)(?P<alternation>[an])(?P<index>[0-9]+)$')
 * is_braid_complement = re.compile(r'[Bb]raid[:]?(\[[0-9, \-]+\])$')
 * is_int_DT_exterior = re.compile(r'DT[:]? *(\[[0-9, \-\(\)]+\](?: *, *\[[01, ]+\])?)$')             # <<<<<<<<<<<<<<
 * is_alpha_DT_exterior = re.compile(r'DT[:\[] *([a-zA-Z]+(?:\.[01]+)?)[\]]?$')
 * twister_word = r'\[*([abcABC_\d!*]*|[abcABC_\d!,]*)\]*'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_compile); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__651, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_int_DT_exterior, __pyx_t_4) < 0) __PYX_ERR(2, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":15
 * is_braid_complement = re.compile(r'[Bb]raid[:]?(\[[0-9, \-]+\])$')
 * is_int_DT_exterior = re.compile(r'DT[:]? *(\[[0-9, \-\(\)]+\](?: *, *\[[01, ]+\])?)$')
 * is_alpha_DT_exterior = re.compile(r'DT[:\[] *([a-zA-Z]+(?:\.[01]+)?)[\]]?$')             # <<<<<<<<<<<<<<
 * twister_word = r'\[*([abcABC_\d!*]*|[abcABC_\d!,]*)\]*'
 * is_twister_bundle = re.compile(r'Bundle\(S_\{(\d+),(\d+)\},'+twister_word+r'\)')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_compile); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__652, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_alpha_DT_exterior, __pyx_t_4) < 0) __PYX_ERR(2, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":16
 * is_int_DT_exterior = re.compile(r'DT[:]? *(\[[0-9, \-\(\)]+\](?: *, *\[[01, ]+\])?)$')
 * is_alpha_DT_exterior = re.compile(r'DT[:\[] *([a-zA-Z]+(?:\.[01]+)?)[\]]?$')
 * twister_word = r'\[*([abcABC_\d!*]*|[abcABC_\d!,]*)\]*'             # <<<<<<<<<<<<<<
 * is_twister_bundle = re.compile(r'Bundle\(S_\{(\d+),(\d+)\},'+twister_word+r'\)')
 * is_twister_splitting = re.compile(r'Splitting\(S_\{(\d+),(\d+)\},'+twister_word+','+twister_word+r'\)')
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_twister_word, __pyx_kp_s_abcABC__d_abcABC__d) < 0) __PYX_ERR(2, 16, __pyx_L1_error)

  /* "cython/core/tail.pyx":17
 * is_alpha_DT_exterior = re.compile(r'DT[:\[] *([a-zA-Z]+(?:\.[01]+)?)[\]]?$')
 * twister_word = r'\[*([abcABC_\d!*]*|[abcABC_\d!,]*)\]*'
 * is_twister_bundle = re.compile(r'Bundle\(S_\{(\d+),(\d+)\},'+twister_word+r'\)')             # <<<<<<<<<<<<<<
 * is_twister_splitting = re.compile(r'Splitting\(S_\{(\d+),(\d+)\},'+twister_word+','+twister_word+r'\)')
 * is_isosig = re.compile(r'([a-zA-Z0-9\+\-]+)$')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_compile); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_twister_word); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyNumber_Add(__pyx_kp_s_Bundle_S__d_d, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__653); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_twister_bundle, __pyx_t_5) < 0) __PYX_ERR(2, 17, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":18
 * twister_word = r'\[*([abcABC_\d!*]*|[abcABC_\d!,]*)\]*'
 * is_twister_bundle = re.compile(r'Bundle\(S_\{(\d+),(\d+)\},'+twister_word+r'\)')
 * is_twister_splitting = re.compile(r'Splitting\(S_\{(\d+),(\d+)\},'+twister_word+','+twister_word+r'\)')             # <<<<<<<<<<<<<<
 * is_isosig = re.compile(r'([a-zA-Z0-9\+\-]+)$')
 * is_decorated_isosig = decorated_isosig.isosig_pattern
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_re); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_compile); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_twister_word); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyNumber_Add(__pyx_kp_s_Splitting_S__d_d, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_kp_s__114); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_twister_word); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = PyNumber_Add(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_11, __pyx_kp_s__653); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_twister_splitting, __pyx_t_11) < 0) __PYX_ERR(2, 18, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/tail.pyx":19
 * is_twister_bundle = re.compile(r'Bundle\(S_\{(\d+),(\d+)\},'+twister_word+r'\)')
 * is_twister_splitting = re.compile(r'Splitting\(S_\{(\d+),(\d+)\},'+twister_word+','+twister_word+r'\)')
 * is_isosig = re.compile(r'([a-zA-Z0-9\+\-]+)$')             # <<<<<<<<<<<<<<
 * is_decorated_isosig = decorated_isosig.isosig_pattern
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_re); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_compile); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__654, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_isosig, __pyx_t_11) < 0) __PYX_ERR(2, 19, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/tail.pyx":20
 * is_twister_splitting = re.compile(r'Splitting\(S_\{(\d+),(\d+)\},'+twister_word+','+twister_word+r'\)')
 * is_isosig = re.compile(r'([a-zA-Z0-9\+\-]+)$')
 * is_decorated_isosig = decorated_isosig.isosig_pattern             # <<<<<<<<<<<<<<
 * 
 * # Hooks so that global module can monkey patch in modified versions
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_decorated_isosig); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_isosig_pattern); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_decorated_isosig, __pyx_t_3) < 0) __PYX_ERR(2, 20, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":25
 * # of the Triangulation and Manifold classes.
 * 
 * _triangulation_class = Triangulation             # <<<<<<<<<<<<<<
 * _manifold_class = Manifold
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_triangulation_class, ((PyObject *)__pyx_ptype_6SnapPy_Triangulation)) < 0) __PYX_ERR(2, 25, __pyx_L1_error)

  /* "cython/core/tail.pyx":26
 * 
 * _triangulation_class = Triangulation
 * _manifold_class = Manifold             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_manifold_class, ((PyObject *)__pyx_ptype_6SnapPy_Manifold)) < 0) __PYX_ERR(2, 26, __pyx_L1_error)

  /* "cython/core/tail.pyx":29
 * 
 * 
 * def bundle_from_string(desc):             # <<<<<<<<<<<<<<
 *     desc = desc.replace(' ', '')
 *     m = is_twister_bundle.match(desc)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_47bundle_from_string, 0, __pyx_n_s_bundle_from_string, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__656)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bundle_from_string, __pyx_t_3) < 0) __PYX_ERR(2, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":40
 * 
 * 
 * def splitting_from_string(desc):             # <<<<<<<<<<<<<<
 *     desc = desc.replace(' ', '')
 *     m = is_twister_splitting.match(desc)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_49splitting_from_string, 0, __pyx_n_s_splitting_from_string, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__658)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_splitting_from_string, __pyx_t_3) < 0) __PYX_ERR(2, 40, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":53
 * 
 * # Orientability.orientable = 0
 * rev_spec_dict = {(5, 0) : 'm',             # <<<<<<<<<<<<<<
 *                  (5, 1) : 'm',
 *                  (6, 0) : 's',
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_tuple__659, __pyx_n_s_m) < 0) __PYX_ERR(2, 53, __pyx_L1_error)

  /* "cython/core/tail.pyx":54
 * # Orientability.orientable = 0
 * rev_spec_dict = {(5, 0) : 'm',
 *                  (5, 1) : 'm',             # <<<<<<<<<<<<<<
 *                  (6, 0) : 's',
 *                  (7, 0) : 'v',
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_tuple__660, __pyx_n_s_m) < 0) __PYX_ERR(2, 53, __pyx_L1_error)

  /* "cython/core/tail.pyx":55
 * rev_spec_dict = {(5, 0) : 'm',
 *                  (5, 1) : 'm',
 *                  (6, 0) : 's',             # <<<<<<<<<<<<<<
 *                  (7, 0) : 'v',
 *                  (6, 1) : 'x',
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_tuple__661, __pyx_n_s_s) < 0) __PYX_ERR(2, 53, __pyx_L1_error)

  /* "cython/core/tail.pyx":56
 *                  (5, 1) : 'm',
 *                  (6, 0) : 's',
 *                  (7, 0) : 'v',             # <<<<<<<<<<<<<<
 *                  (6, 1) : 'x',
 *                  (7, 1) : 'y'}
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_tuple__662, __pyx_n_s_v) < 0) __PYX_ERR(2, 53, __pyx_L1_error)

  /* "cython/core/tail.pyx":57
 *                  (6, 0) : 's',
 *                  (7, 0) : 'v',
 *                  (6, 1) : 'x',             # <<<<<<<<<<<<<<
 *                  (7, 1) : 'y'}
 * 
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_tuple__663, __pyx_n_s_x) < 0) __PYX_ERR(2, 53, __pyx_L1_error)

  /* "cython/core/tail.pyx":58
 *                  (7, 0) : 'v',
 *                  (6, 1) : 'x',
 *                  (7, 1) : 'y'}             # <<<<<<<<<<<<<<
 * 
 * triangulation_help = """
 */
  if (PyDict_SetItem(__pyx_t_3, __pyx_tuple__664, __pyx_n_s_y) < 0) __PYX_ERR(2, 53, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_rev_spec_dict, __pyx_t_3) < 0) __PYX_ERR(2, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":60
 *                  (7, 1) : 'y'}
 * 
 * triangulation_help = """             # <<<<<<<<<<<<<<
 *     A %s is specified by a string or a byte sequence, according to the
 *     conventions detailed in its docstring.
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_triangulation_help, __pyx_kp_s_A_s_is_specified_by_a_string_or) < 0) __PYX_ERR(2, 60, __pyx_L1_error)

  /* "cython/core/tail.pyx":117
 * 
 * # Testing code for get_triangulation
 * def get_triangulation_tester():             # <<<<<<<<<<<<<<
 *     """
 *     >>> get_triangulation_tester() # doctest: +NUMERIC6
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_51get_triangulation_tester, 0, __pyx_n_s_get_triangulation_tester, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__666)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_triangulation_tester, __pyx_t_3) < 0) __PYX_ERR(2, 117, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":203
 * # crossings.
 * 
 * Alternating_numbers = {3: 1, 4: 1, 5: 2, 6: 3, 7: 7, 8: 18,             # <<<<<<<<<<<<<<
 *                        9: 41, 10: 123, 11: 367,
 *                        12: 1288, 13: 4878, 14: 19536, 15: 85263,
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(14); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_3, __pyx_int_1) < 0) __PYX_ERR(2, 203, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_4, __pyx_int_1) < 0) __PYX_ERR(2, 203, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_5, __pyx_int_2) < 0) __PYX_ERR(2, 203, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_6, __pyx_int_3) < 0) __PYX_ERR(2, 203, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_7, __pyx_int_7) < 0) __PYX_ERR(2, 203, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_8, __pyx_int_18) < 0) __PYX_ERR(2, 203, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_9, __pyx_int_41) < 0) __PYX_ERR(2, 203, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_10, __pyx_int_123) < 0) __PYX_ERR(2, 203, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_11, __pyx_int_367) < 0) __PYX_ERR(2, 203, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_12, __pyx_int_1288) < 0) __PYX_ERR(2, 203, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_13, __pyx_int_4878) < 0) __PYX_ERR(2, 203, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_14, __pyx_int_19536) < 0) __PYX_ERR(2, 203, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_15, __pyx_int_85263) < 0) __PYX_ERR(2, 203, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_16, __pyx_int_379799) < 0) __PYX_ERR(2, 203, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Alternating_numbers, __pyx_t_3) < 0) __PYX_ERR(2, 203, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":208
 *                        16: 379799}
 * 
 * Nonalternating_numbers = {8: 3, 9: 8, 10: 42, 11: 185, 12: 888,             # <<<<<<<<<<<<<<
 *                           13: 5110,
 *                           14: 27436, 15: 168030, 16: 1008906}
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_8, __pyx_int_3) < 0) __PYX_ERR(2, 208, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_9, __pyx_int_8) < 0) __PYX_ERR(2, 208, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_10, __pyx_int_42) < 0) __PYX_ERR(2, 208, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_11, __pyx_int_185) < 0) __PYX_ERR(2, 208, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_12, __pyx_int_888) < 0) __PYX_ERR(2, 208, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_13, __pyx_int_5110) < 0) __PYX_ERR(2, 208, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_14, __pyx_int_27436) < 0) __PYX_ERR(2, 208, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_15, __pyx_int_168030) < 0) __PYX_ERR(2, 208, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_int_16, __pyx_int_1008906) < 0) __PYX_ERR(2, 208, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Nonalternating_numbers, __pyx_t_3) < 0) __PYX_ERR(2, 208, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":212
 *                           14: 27436, 15: 168030, 16: 1008906}
 * 
 * Alternating_offsets = {}             # <<<<<<<<<<<<<<
 * offset = 0
 * for i in range(3, 17):
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Alternating_offsets, __pyx_t_3) < 0) __PYX_ERR(2, 212, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":213
 * 
 * Alternating_offsets = {}
 * offset = 0             # <<<<<<<<<<<<<<
 * for i in range(3, 17):
 *     Alternating_offsets[i] = offset
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_offset, __pyx_int_0) < 0) __PYX_ERR(2, 213, __pyx_L1_error)

  /* "cython/core/tail.pyx":214
 * Alternating_offsets = {}
 * offset = 0
 * for i in range(3, 17):             # <<<<<<<<<<<<<<
 *     Alternating_offsets[i] = offset
 *     offset += Alternating_numbers[i]
 */
  for (__pyx_t_16 = 3; __pyx_t_16 < 17; __pyx_t_16+=1) {
    __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_i, __pyx_t_3) < 0) __PYX_ERR(2, 214, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/tail.pyx":215
 * offset = 0
 * for i in range(3, 17):
 *     Alternating_offsets[i] = offset             # <<<<<<<<<<<<<<
 *     offset += Alternating_numbers[i]
 * Num_Alternating = offset
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Alternating_offsets); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely((PyObject_SetItem(__pyx_t_11, __pyx_t_4, __pyx_t_3) < 0))) __PYX_ERR(2, 215, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "cython/core/tail.pyx":216
 * for i in range(3, 17):
 *     Alternating_offsets[i] = offset
 *     offset += Alternating_numbers[i]             # <<<<<<<<<<<<<<
 * Num_Alternating = offset
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Alternating_numbers); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_i); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_offset, __pyx_t_11) < 0) __PYX_ERR(2, 216, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }

  /* "cython/core/tail.pyx":217
 *     Alternating_offsets[i] = offset
 *     offset += Alternating_numbers[i]
 * Num_Alternating = offset             # <<<<<<<<<<<<<<
 * 
 * Nonalternating_offsets = {}
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_offset); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Num_Alternating, __pyx_t_11) < 0) __PYX_ERR(2, 217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/tail.pyx":219
 * Num_Alternating = offset
 * 
 * Nonalternating_offsets = {}             # <<<<<<<<<<<<<<
 * offset = 0
 * for i in range(8, 17):
 */
  __pyx_t_11 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Nonalternating_offsets, __pyx_t_11) < 0) __PYX_ERR(2, 219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/tail.pyx":220
 * 
 * Nonalternating_offsets = {}
 * offset = 0             # <<<<<<<<<<<<<<
 * for i in range(8, 17):
 *     Nonalternating_offsets[i] = offset
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_offset, __pyx_int_0) < 0) __PYX_ERR(2, 220, __pyx_L1_error)

  /* "cython/core/tail.pyx":221
 * Nonalternating_offsets = {}
 * offset = 0
 * for i in range(8, 17):             # <<<<<<<<<<<<<<
 *     Nonalternating_offsets[i] = offset
 *     offset += Nonalternating_numbers[i]
 */
  for (__pyx_t_16 = 8; __pyx_t_16 < 17; __pyx_t_16+=1) {
    __pyx_t_11 = __Pyx_PyInt_From_long(__pyx_t_16); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_i, __pyx_t_11) < 0) __PYX_ERR(2, 221, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "cython/core/tail.pyx":222
 * offset = 0
 * for i in range(8, 17):
 *     Nonalternating_offsets[i] = offset             # <<<<<<<<<<<<<<
 *     offset += Nonalternating_numbers[i]
 * Num_Nonalternating = offset
 */
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_offset); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Nonalternating_offsets); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 222, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely((PyObject_SetItem(__pyx_t_5, __pyx_t_3, __pyx_t_11) < 0))) __PYX_ERR(2, 222, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "cython/core/tail.pyx":223
 * for i in range(8, 17):
 *     Nonalternating_offsets[i] = offset
 *     offset += Nonalternating_numbers[i]             # <<<<<<<<<<<<<<
 * Num_Nonalternating = offset
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_offset); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Nonalternating_numbers); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_11, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (PyDict_SetItem(__pyx_d, __pyx_n_s_offset, __pyx_t_5) < 0) __PYX_ERR(2, 223, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }

  /* "cython/core/tail.pyx":224
 *     Nonalternating_offsets[i] = offset
 *     offset += Nonalternating_numbers[i]
 * Num_Nonalternating = offset             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_offset); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Num_Nonalternating, __pyx_t_5) < 0) __PYX_ERR(2, 224, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":227
 * 
 * 
 * def extract_HT_knot(record, crossings, alternation):             # <<<<<<<<<<<<<<
 *     DT = []
 *     size = (1+crossings)//2
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_53extract_HT_knot, 0, __pyx_n_s_extract_HT_knot, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__668)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_extract_HT_knot, __pyx_t_5) < 0) __PYX_ERR(2, 227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":248
 * 
 * 
 * def get_HT_knot_DT(crossings, alternation, index):             # <<<<<<<<<<<<<<
 *     size = (1 + crossings) // 2
 *     index -= 1
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_55get_HT_knot_DT, 0, __pyx_n_s_get_HT_knot_DT, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__670)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_HT_knot_DT, __pyx_t_5) < 0) __PYX_ERR(2, 248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":274
 * 
 * 
 * def get_HT_knot_by_index(alternation, index, manifold_class):             # <<<<<<<<<<<<<<
 *     crossings = 16
 *     if alternation == 'a':
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_57get_HT_knot_by_index, 0, __pyx_n_s_get_HT_knot_by_index, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__672)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_HT_knot_by_index, __pyx_t_5) < 0) __PYX_ERR(2, 274, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":294
 * #   Iterators
 * 
 * class Census:             # <<<<<<<<<<<<<<
 *     """
 *     Base class for manifold Iterators/Sequences.
 */
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_Census, __pyx_n_s_Census, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_Base_class_for_manifold_Iterato); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cython/core/tail.pyx":299
 *     """
 *     # subclasses redefine this
 *     length = 0             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, indices=(0, 0, 0)):
 */
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_length, __pyx_int_0) < 0) __PYX_ERR(2, 299, __pyx_L1_error)

  /* "cython/core/tail.pyx":301
 *     length = 0
 * 
 *     def __init__(self, indices=(0, 0, 0)):             # <<<<<<<<<<<<<<
 *         myslice = slice(*indices)
 *         self.start, self.stop, self.step = myslice.indices(self.length)
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_6Census_1__init__, 0, __pyx_n_s_Census___init, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__674)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 301, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__675);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(2, 301, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":306
 *         self.index = self.start
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_6Census_3__iter__, 0, __pyx_n_s_Census___iter, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__676)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_iter, __pyx_t_4) < 0) __PYX_ERR(2, 306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":309
 *         return self
 * 
 *     def __contains__(self, item):             # <<<<<<<<<<<<<<
 *         raise NotImplementedError("This census does not support manifold lookup")
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_6Census_5__contains__, 0, __pyx_n_s_Census___contains, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__678)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_contains, __pyx_t_4) < 0) __PYX_ERR(2, 309, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":312
 *         raise NotImplementedError("This census does not support manifold lookup")
 * 
 *     def next(self):             # <<<<<<<<<<<<<<
 *         if self.index >= self.stop:
 *             raise StopIteration
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_6Census_7next, 0, __pyx_n_s_Census_next, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__679)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_next, __pyx_t_4) < 0) __PYX_ERR(2, 312, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":318
 *         return self[self.index-self.step]
 * 
 *     __next__ = next             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __pyx_t_4 = PyObject_GetItem(__pyx_t_5, __pyx_n_s_next);
  if (unlikely(!__pyx_t_4)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_next);
  }
  if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_next_2, __pyx_t_4) < 0) __PYX_ERR(2, 318, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":320
 *     __next__ = next
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.length
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_6Census_9__len__, 0, __pyx_n_s_Census___len, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__680)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_len_2, __pyx_t_4) < 0) __PYX_ERR(2, 320, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":324
 * 
 *     # subclasses override this
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */
  __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_6Census_11__getitem__, 0, __pyx_n_s_Census___getitem, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__681)); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_getitem, __pyx_t_4) < 0) __PYX_ERR(2, 324, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":294
 * #   Iterators
 * 
 * class Census:             # <<<<<<<<<<<<<<
 *     """
 *     Base class for manifold Iterators/Sequences.
 */
  __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_n_s_Census, __pyx_empty_tuple, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Census, __pyx_t_4) < 0) __PYX_ERR(2, 294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":330
 * #  Cusped Census
 * 
 * Orientable_lengths = (301, 962, 3552, 12846, 301+962+3552+12846)             # <<<<<<<<<<<<<<
 * Nonorientable_lengths = (114, 259, 887, 114+259+887)
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Orientable_lengths, __pyx_tuple__682) < 0) __PYX_ERR(2, 330, __pyx_L1_error)

  /* "cython/core/tail.pyx":331
 * 
 * Orientable_lengths = (301, 962, 3552, 12846, 301+962+3552+12846)
 * Nonorientable_lengths = (114, 259, 887, 114+259+887)             # <<<<<<<<<<<<<<
 * 
 * five_tet_orientable = (
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Nonorientable_lengths, __pyx_tuple__683) < 0) __PYX_ERR(2, 331, __pyx_L1_error)

  /* "cython/core/tail.pyx":334
 * 
 * five_tet_orientable = (
 *    3, 4, 6, 7, 9, 10, 11, 15, 16, 17, 19, 22, 23, 26, 27, 29, 30, 32, 33,             # <<<<<<<<<<<<<<
 *    34, 35, 36, 37, 38, 39, 40, 43, 44, 45, 46, 47, 49, 52, 53, 54, 55, 58,
 *    59, 60, 61, 62, 64, 66, 67, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80,
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_five_tet_orientable, __pyx_tuple__684) < 0) __PYX_ERR(2, 333, __pyx_L1_error)

  /* "cython/core/tail.pyx":357
 * 
 * five_tet_nonorientable = (
 *    0, 1, 2, 5, 8, 12, 13, 14, 18, 20, 21, 24, 25, 28, 31, 41, 42, 48, 50,             # <<<<<<<<<<<<<<
 *    51, 56, 57, 63, 65, 68, 75, 86, 88, 91, 92, 97, 101, 107, 109, 114, 124,
 *    126, 127, 128, 131, 132, 133, 134, 138, 152, 153, 156, 158, 174, 176,
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_five_tet_nonorientable, __pyx_tuple__685) < 0) __PYX_ERR(2, 356, __pyx_L1_error)

  /* "cython/core/tail.pyx":367
 * 
 * 
 * class CuspedCensus(Census):             # <<<<<<<<<<<<<<
 *     """
 *     Base class for Iterators/Sequences for manifolds in the SnapPea
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Census); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(2, 367, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_5, __pyx_n_s_CuspedCensus, __pyx_n_s_CuspedCensus, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_Base_class_for_Iterators_Sequen); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__pyx_t_5 != __pyx_t_4) {
    if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(2, 367, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":372
 *     Cusped Census.
 *     """
 *     five_length, six_length, seven_length, eight_length, length = Orientable_lengths             # <<<<<<<<<<<<<<
 *     orientability = Orientability.index('orientable')
 *     path = str(manifold_path)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Orientable_lengths); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 372, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
    PyObject* sequence = __pyx_t_4;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 5)) {
      if (size > 5) __Pyx_RaiseTooManyValuesError(5);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(2, 372, __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_17 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_18 = PyTuple_GET_ITEM(sequence, 2); 
      __pyx_t_19 = PyTuple_GET_ITEM(sequence, 3); 
      __pyx_t_20 = PyTuple_GET_ITEM(sequence, 4); 
    } else {
      __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_17 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_18 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_19 = PyList_GET_ITEM(sequence, 3); 
      __pyx_t_20 = PyList_GET_ITEM(sequence, 4); 
    }
    __Pyx_INCREF(__pyx_t_2);
    __Pyx_INCREF(__pyx_t_17);
    __Pyx_INCREF(__pyx_t_18);
    __Pyx_INCREF(__pyx_t_19);
    __Pyx_INCREF(__pyx_t_20);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_17,&__pyx_t_18,&__pyx_t_19,&__pyx_t_20};
      for (i=0; i < 5; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(2, 372, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else {
    Py_ssize_t index = -1;
    PyObject** temps[5] = {&__pyx_t_2,&__pyx_t_17,&__pyx_t_18,&__pyx_t_19,&__pyx_t_20};
    __pyx_t_21 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_21);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_22 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_21);
    for (index=0; index < 5; index++) {
      PyObject* item = __pyx_t_22(__pyx_t_21); if (unlikely(!item)) goto __pyx_L78_unpacking_failed;
      __Pyx_GOTREF(item);
      *(temps[index]) = item;
    }
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_22(__pyx_t_21), 5) < 0) __PYX_ERR(2, 372, __pyx_L1_error)
    __pyx_t_22 = NULL;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    goto __pyx_L79_unpacking_done;
    __pyx_L78_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
    __pyx_t_22 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(2, 372, __pyx_L1_error)
    __pyx_L79_unpacking_done:;
  }
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_five_length, __pyx_t_2) < 0) __PYX_ERR(2, 372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_six_length, __pyx_t_17) < 0) __PYX_ERR(2, 372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_seven_length, __pyx_t_18) < 0) __PYX_ERR(2, 372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_eight_length, __pyx_t_19) < 0) __PYX_ERR(2, 372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_length, __pyx_t_20) < 0) __PYX_ERR(2, 372, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;

  /* "cython/core/tail.pyx":373
 *     """
 *     five_length, six_length, seven_length, eight_length, length = Orientable_lengths
 *     orientability = Orientability.index('orientable')             # <<<<<<<<<<<<<<
 *     path = str(manifold_path)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_20, __pyx_n_s_Orientability); if (unlikely(!__pyx_t_20)) __PYX_ERR(2, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_20, __pyx_n_s_index); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  __pyx_t_20 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_19))) {
    __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_19);
    if (likely(__pyx_t_20)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
      __Pyx_INCREF(__pyx_t_20);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_19, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_20, __pyx_n_s_orientable};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_19, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 373, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  }
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_orientability, __pyx_t_4) < 0) __PYX_ERR(2, 373, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cython/core/tail.pyx":374
 *     five_length, six_length, seven_length, eight_length, length = Orientable_lengths
 *     orientability = Orientability.index('orientable')
 *     path = str(manifold_path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, indices=(0, length, 1)):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_manifold_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_19 = __Pyx_PyObject_Str(__pyx_t_4); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_path, __pyx_t_19) < 0) __PYX_ERR(2, 374, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "cython/core/tail.pyx":376
 *     path = str(manifold_path)
 * 
 *     def __init__(self, indices=(0, length, 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 *         self.Census_Morwen8 = tarfile.open(os.path.join(manifold_path, 'morwen8.tgz'), 'r:*')
 */
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_12CuspedCensus_1__init__, 0, __pyx_n_s_CuspedCensus___init, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__687)); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_19, sizeof(__pyx_defaults), 1)) __PYX_ERR(2, 376, __pyx_L1_error)
  __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_n_s_length);
  if (unlikely(!__pyx_t_4)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_length);
  }
  if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_20 = PyTuple_New(3); if (unlikely(!__pyx_t_20)) __PYX_ERR(2, 376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_int_0)) __PYX_ERR(2, 376, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_20, 1, __pyx_t_4)) __PYX_ERR(2, 376, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_20, 2, __pyx_int_1)) __PYX_ERR(2, 376, __pyx_L1_error);
  __pyx_t_4 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_19)->__pyx_arg_indices = __pyx_t_20;
  __Pyx_GIVEREF(__pyx_t_20);
  __pyx_t_20 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_19, __pyx_pf_6SnapPy_62__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_19) < 0) __PYX_ERR(2, 376, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "cython/core/tail.pyx":381
 * 
 *     # Override
 *     def lookup(self, n):             # <<<<<<<<<<<<<<
 *         return five_tet_orientable[n]
 * 
 */
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_12CuspedCensus_3lookup, 0, __pyx_n_s_CuspedCensus_lookup, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__688)); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_lookup, __pyx_t_19) < 0) __PYX_ERR(2, 381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "cython/core/tail.pyx":384
 *         return five_tet_orientable[n]
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 */
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_12CuspedCensus_5__getitem__, 0, __pyx_n_s_CuspedCensus___getitem, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__690)); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_getitem, __pyx_t_19) < 0) __PYX_ERR(2, 384, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "cython/core/tail.pyx":367
 * 
 * 
 * class CuspedCensus(Census):             # <<<<<<<<<<<<<<
 *     """
 *     Base class for Iterators/Sequences for manifolds in the SnapPea
 */
  __pyx_t_19 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_n_s_CuspedCensus, __pyx_t_5, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CuspedCensus, __pyx_t_19) < 0) __PYX_ERR(2, 367, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":431
 * 
 * 
 * class ObsOrientableCuspedCensus(CuspedCensus):             # <<<<<<<<<<<<<<
 *     """
 *     Obsolete.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CuspedCensus); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5)) __PYX_ERR(2, 431, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_19 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_5, __pyx_n_s_ObsOrientableCuspedCensus, __pyx_n_s_ObsOrientableCuspedCensus, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_Obsolete); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (__pyx_t_5 != __pyx_t_11) {
    if (unlikely((PyDict_SetItemString(__pyx_t_19, "__orig_bases__", __pyx_t_11) < 0))) __PYX_ERR(2, 431, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_ObsOrientableCuspedCensus, __pyx_t_5, __pyx_t_19, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 431, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ObsOrientableCuspedCensus, __pyx_t_11) < 0) __PYX_ERR(2, 431, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":437
 * 
 * 
 * class ObsNonorientableCuspedCensus(CuspedCensus):             # <<<<<<<<<<<<<<
 *     """
 *     Obsolete.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_CuspedCensus); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 437, __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(2, 437, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_19 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_19, __pyx_t_5, __pyx_n_s_ObsNonorientableCuspedCensus, __pyx_n_s_ObsNonorientableCuspedCensus, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_Obsolete); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__pyx_t_5 != __pyx_t_3) {
    if (unlikely((PyDict_SetItemString(__pyx_t_11, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(2, 437, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":441
 *     Obsolete.
 *     """
 *     five_length, six_length, seven_length, length = Nonorientable_lengths             # <<<<<<<<<<<<<<
 *     orientability = Orientability.index('nonorientable')
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Nonorientable_lengths); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  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 != 4)) {
      if (size > 4) __Pyx_RaiseTooManyValuesError(4);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(2, 441, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_20 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
      __pyx_t_18 = PyTuple_GET_ITEM(sequence, 2); 
      __pyx_t_17 = PyTuple_GET_ITEM(sequence, 3); 
    } else {
      __pyx_t_20 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
      __pyx_t_18 = PyList_GET_ITEM(sequence, 2); 
      __pyx_t_17 = PyList_GET_ITEM(sequence, 3); 
    }
    __Pyx_INCREF(__pyx_t_20);
    __Pyx_INCREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_t_18);
    __Pyx_INCREF(__pyx_t_17);
    #else
    {
      Py_ssize_t i;
      PyObject** temps[4] = {&__pyx_t_20,&__pyx_t_4,&__pyx_t_18,&__pyx_t_17};
      for (i=0; i < 4; i++) {
        PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(2, 441, __pyx_L1_error)
        __Pyx_GOTREF(item);
        *(temps[i]) = item;
      }
    }
    #endif
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    Py_ssize_t index = -1;
    PyObject** temps[4] = {&__pyx_t_20,&__pyx_t_4,&__pyx_t_18,&__pyx_t_17};
    __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 441, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_22 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
    for (index=0; index < 4; index++) {
      PyObject* item = __pyx_t_22(__pyx_t_2); if (unlikely(!item)) goto __pyx_L80_unpacking_failed;
      __Pyx_GOTREF(item);
      *(temps[index]) = item;
    }
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_22(__pyx_t_2), 4) < 0) __PYX_ERR(2, 441, __pyx_L1_error)
    __pyx_t_22 = NULL;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L81_unpacking_done;
    __pyx_L80_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_22 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(2, 441, __pyx_L1_error)
    __pyx_L81_unpacking_done:;
  }
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_five_length, __pyx_t_20) < 0) __PYX_ERR(2, 441, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_six_length, __pyx_t_4) < 0) __PYX_ERR(2, 441, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_seven_length, __pyx_t_18) < 0) __PYX_ERR(2, 441, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_length, __pyx_t_17) < 0) __PYX_ERR(2, 441, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

  /* "cython/core/tail.pyx":442
 *     """
 *     five_length, six_length, seven_length, length = Nonorientable_lengths
 *     orientability = Orientability.index('nonorientable')             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, indices=(0, length, 1)):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_Orientability); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_index); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 442, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __pyx_t_17 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_18))) {
    __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_18);
    if (likely(__pyx_t_17)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
      __Pyx_INCREF(__pyx_t_17);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_18, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_n_s_nonorientable};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_18, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 442, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  }
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_orientability, __pyx_t_3) < 0) __PYX_ERR(2, 442, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":444
 *     orientability = Orientability.index('nonorientable')
 * 
 *     def __init__(self, indices=(0, length, 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_28ObsNonorientableCuspedCensus_1__init__, 0, __pyx_n_s_ObsNonorientableCuspedCensus___i, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__691)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_3, sizeof(__pyx_defaults1), 1)) __PYX_ERR(2, 444, __pyx_L1_error)
  __pyx_t_18 = PyObject_GetItem(__pyx_t_11, __pyx_n_s_length);
  if (unlikely(!__pyx_t_18)) {
    PyErr_Clear();
    __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_length);
  }
  if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_17 = PyTuple_New(3); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_int_0)) __PYX_ERR(2, 444, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_18);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_18)) __PYX_ERR(2, 444, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_int_1)) __PYX_ERR(2, 444, __pyx_L1_error);
  __pyx_t_18 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults1, __pyx_t_3)->__pyx_arg_indices = __pyx_t_17;
  __Pyx_GIVEREF(__pyx_t_17);
  __pyx_t_17 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_3, __pyx_pf_6SnapPy_64__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_init, __pyx_t_3) < 0) __PYX_ERR(2, 444, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":447
 *         Census.__init__(self, indices)
 * 
 *     def lookup(self, n):             # <<<<<<<<<<<<<<
 *         return five_tet_nonorientable[n]
 * 
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_28ObsNonorientableCuspedCensus_3lookup, 0, __pyx_n_s_ObsNonorientableCuspedCensus_loo, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__692)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_lookup, __pyx_t_3) < 0) __PYX_ERR(2, 447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":437
 * 
 * 
 * class ObsNonorientableCuspedCensus(CuspedCensus):             # <<<<<<<<<<<<<<
 *     """
 *     Obsolete.
 */
  __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_19, __pyx_n_s_ObsNonorientableCuspedCensus, __pyx_t_5, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ObsNonorientableCuspedCensus, __pyx_t_3) < 0) __PYX_ERR(2, 437, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":453
 * # Closed Census (Obsolete)
 * 
 * class ObsOrientableClosedCensus(Census):             # <<<<<<<<<<<<<<
 *     """
 *     Obsolete.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Census); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_5)) __PYX_ERR(2, 453, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_19); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_5, __pyx_n_s_ObsOrientableClosedCensus, __pyx_n_s_ObsOrientableClosedCensus, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_Obsolete); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (__pyx_t_5 != __pyx_t_19) {
    if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_t_19) < 0))) __PYX_ERR(2, 453, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "cython/core/tail.pyx":457
 *     Obsolete.
 *     """
 *     data = None             # <<<<<<<<<<<<<<
 *     orientability = Orientability.index('orientable')
 *     path = str(manifold_path)
 */
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_data, Py_None) < 0) __PYX_ERR(2, 457, __pyx_L1_error)

  /* "cython/core/tail.pyx":458
 *     """
 *     data = None
 *     orientability = Orientability.index('orientable')             # <<<<<<<<<<<<<<
 *     path = str(manifold_path)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_Orientability); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_index); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __pyx_t_17 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_18))) {
    __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_18);
    if (likely(__pyx_t_17)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
      __Pyx_INCREF(__pyx_t_17);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_18, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_n_s_orientable};
    __pyx_t_19 = __Pyx_PyObject_FastCall(__pyx_t_18, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
    if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 458, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_19);
    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  }
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_orientability, __pyx_t_19) < 0) __PYX_ERR(2, 458, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "cython/core/tail.pyx":459
 *     data = None
 *     orientability = Orientability.index('orientable')
 *     path = str(manifold_path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, indices=(0, 11031, 1)):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_manifold_path); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_18 = __Pyx_PyObject_Str(__pyx_t_19); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_path, __pyx_t_18) < 0) __PYX_ERR(2, 459, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "cython/core/tail.pyx":461
 *     path = str(manifold_path)
 * 
 *     def __init__(self, indices=(0, 11031, 1)):             # <<<<<<<<<<<<<<
 *         if ObsOrientableClosedCensus.data is None:
 *             datafile = os.path.join(closed_census_directory,
 */
  __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_25ObsOrientableClosedCensus_1__init__, 0, __pyx_n_s_ObsOrientableClosedCensus___init, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__694)); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_18, __pyx_tuple__695);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_18) < 0) __PYX_ERR(2, 461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "cython/core/tail.pyx":471
 *         Census.__init__(self, indices)
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 */
  __pyx_t_18 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_25ObsOrientableClosedCensus_3__getitem__, 0, __pyx_n_s_ObsOrientableClosedCensus___geti, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__697)); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 471, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_getitem, __pyx_t_18) < 0) __PYX_ERR(2, 471, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "cython/core/tail.pyx":453
 * # Closed Census (Obsolete)
 * 
 * class ObsOrientableClosedCensus(Census):             # <<<<<<<<<<<<<<
 *     """
 *     Obsolete.
 */
  __pyx_t_18 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_n_s_ObsOrientableClosedCensus, __pyx_t_5, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ObsOrientableClosedCensus, __pyx_t_18) < 0) __PYX_ERR(2, 453, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":488
 * 
 * 
 * class ObsNonorientableClosedCensus(Census):             # <<<<<<<<<<<<<<
 *     """
 *     Obsolete.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Census); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5)) __PYX_ERR(2, 488, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_18 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_5, __pyx_n_s_ObsNonorientableClosedCensus, __pyx_n_s_ObsNonorientableClosedCensus, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_Obsolete); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (__pyx_t_5 != __pyx_t_11) {
    if (unlikely((PyDict_SetItemString(__pyx_t_18, "__orig_bases__", __pyx_t_11) < 0))) __PYX_ERR(2, 488, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/tail.pyx":492
 *     Obsolete.
 *     """
 *     data = None             # <<<<<<<<<<<<<<
 *     orientability = Orientability.index('nonorientable')
 *     path = str(manifold_path)
 */
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_data, Py_None) < 0) __PYX_ERR(2, 492, __pyx_L1_error)

  /* "cython/core/tail.pyx":493
 *     """
 *     data = None
 *     orientability = Orientability.index('nonorientable')             # <<<<<<<<<<<<<<
 *     path = str(manifold_path)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_Orientability); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __pyx_t_19 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_17))) {
    __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_17);
    if (likely(__pyx_t_19)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
      __Pyx_INCREF(__pyx_t_19);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_17, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_n_s_nonorientable};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_17, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 493, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  }
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_orientability, __pyx_t_11) < 0) __PYX_ERR(2, 493, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/tail.pyx":494
 *     data = None
 *     orientability = Orientability.index('nonorientable')
 *     path = str(manifold_path)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, indices=(0, 17, 1)):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_manifold_path); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_17 = __Pyx_PyObject_Str(__pyx_t_11); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_path, __pyx_t_17) < 0) __PYX_ERR(2, 494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

  /* "cython/core/tail.pyx":496
 *     path = str(manifold_path)
 * 
 *     def __init__(self, indices=(0, 17, 1)):             # <<<<<<<<<<<<<<
 *         if ObsNonorientableClosedCensus.data is None:
 *             datafile = os.path.join(closed_census_directory,
 */
  __pyx_t_17 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_28ObsNonorientableClosedCensus_1__init__, 0, __pyx_n_s_ObsNonorientableClosedCensus___i, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__699)); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_17, __pyx_tuple__700);
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_init, __pyx_t_17) < 0) __PYX_ERR(2, 496, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

  /* "cython/core/tail.pyx":506
 *         Census.__init__(self, indices)
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         cdef c_Triangulation* c_triangulation
 *         cdef Manifold result
 */
  __pyx_t_17 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_28ObsNonorientableClosedCensus_3__getitem__, 0, __pyx_n_s_ObsNonorientableClosedCensus___g, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__701)); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_getitem, __pyx_t_17) < 0) __PYX_ERR(2, 506, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

  /* "cython/core/tail.pyx":488
 * 
 * 
 * class ObsNonorientableClosedCensus(Census):             # <<<<<<<<<<<<<<
 *     """
 *     Obsolete.
 */
  __pyx_t_17 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_ObsNonorientableClosedCensus, __pyx_t_5, __pyx_t_18, NULL, 0, 0); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ObsNonorientableClosedCensus, __pyx_t_17) < 0) __PYX_ERR(2, 488, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":525
 * # Knot tables
 * 
 * class KnotExteriors(Census):             # <<<<<<<<<<<<<<
 *     """
 *     Base class for Iterators/Sequences for knots from the
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Census); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 525, __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(2, 525, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_18 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_17 = __Pyx_Py3MetaclassPrepare(__pyx_t_18, __pyx_t_5, __pyx_n_s_KnotExteriors, __pyx_n_s_KnotExteriors, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_Base_class_for_Iterators_Sequen_2); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  if (__pyx_t_5 != __pyx_t_3) {
    if (unlikely((PyDict_SetItemString(__pyx_t_17, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(2, 525, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cython/core/tail.pyx":530
 *     Hoste-Thistlethwaite tables.
 *     """
 *     length = sum(Alternating_numbers.values())             # <<<<<<<<<<<<<<
 *     alternation = 'a'
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Alternating_numbers); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_values); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_19))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_19);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_19, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_19, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 530, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  }
  __pyx_t_19 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_3); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_n_s_length, __pyx_t_19) < 0) __PYX_ERR(2, 530, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "cython/core/tail.pyx":531
 *     """
 *     length = sum(Alternating_numbers.values())
 *     alternation = 'a'             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, indices=(0, sum(Alternating_numbers.values()), 1)):
 */
  if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_n_s_alternation, __pyx_n_s_a_2) < 0) __PYX_ERR(2, 531, __pyx_L1_error)

  /* "cython/core/tail.pyx":533
 *     alternation = 'a'
 * 
 *     def __init__(self, indices=(0, sum(Alternating_numbers.values()), 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 * 
 */
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13KnotExteriors_1__init__, 0, __pyx_n_s_KnotExteriors___init, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__702)); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_19, sizeof(__pyx_defaults2), 1)) __PYX_ERR(2, 533, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Alternating_numbers); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0)) __PYX_ERR(2, 533, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_11);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_11)) __PYX_ERR(2, 533, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_1)) __PYX_ERR(2, 533, __pyx_L1_error);
  __pyx_t_11 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults2, __pyx_t_19)->__pyx_arg_indices = __pyx_t_3;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_19, __pyx_pf_6SnapPy_66__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_n_s_init, __pyx_t_19) < 0) __PYX_ERR(2, 533, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "cython/core/tail.pyx":536
 *         Census.__init__(self, indices)
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         if isinstance(n, slice):
 *             return self.__class__(n.indices(self.length))
 */
  __pyx_t_19 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_13KnotExteriors_3__getitem__, 0, __pyx_n_s_KnotExteriors___getitem, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__703)); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_n_s_getitem, __pyx_t_19) < 0) __PYX_ERR(2, 536, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "cython/core/tail.pyx":525
 * # Knot tables
 * 
 * class KnotExteriors(Census):             # <<<<<<<<<<<<<<
 *     """
 *     Base class for Iterators/Sequences for knots from the
 */
  __pyx_t_19 = __Pyx_Py3ClassCreate(__pyx_t_18, __pyx_n_s_KnotExteriors, __pyx_t_5, __pyx_t_17, NULL, 0, 0); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KnotExteriors, __pyx_t_19) < 0) __PYX_ERR(2, 525, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":543
 * 
 * 
 * class AlternatingKnotExteriors(KnotExteriors):             # <<<<<<<<<<<<<<
 *     """
 *     Iterator/Sequence for Alternating knot exteriors from the
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_KnotExteriors); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_5)) __PYX_ERR(2, 543, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_18); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_17 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_19 = __Pyx_Py3MetaclassPrepare(__pyx_t_17, __pyx_t_5, __pyx_n_s_AlternatingKnotExteriors, __pyx_n_s_AlternatingKnotExteriors, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_Iterator_Sequence_for_Alternati); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  if (__pyx_t_5 != __pyx_t_18) {
    if (unlikely((PyDict_SetItemString(__pyx_t_19, "__orig_bases__", __pyx_t_18) < 0))) __PYX_ERR(2, 543, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __pyx_t_18 = __Pyx_Py3ClassCreate(__pyx_t_17, __pyx_n_s_AlternatingKnotExteriors, __pyx_t_5, __pyx_t_19, NULL, 0, 0); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 543, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_AlternatingKnotExteriors, __pyx_t_18) < 0) __PYX_ERR(2, 543, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":550
 * 
 * 
 * class NonalternatingKnotExteriors(KnotExteriors):             # <<<<<<<<<<<<<<
 *     """
 *     Iterator/Sequence for nonAlternating knot exteriors from the
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_KnotExteriors); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_5)) __PYX_ERR(2, 550, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_17); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_19 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_18 = __Pyx_Py3MetaclassPrepare(__pyx_t_19, __pyx_t_5, __pyx_n_s_NonalternatingKnotExteriors, __pyx_n_s_NonalternatingKnotExteriors, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_Iterator_Sequence_for_nonAltern); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  if (__pyx_t_5 != __pyx_t_17) {
    if (unlikely((PyDict_SetItemString(__pyx_t_18, "__orig_bases__", __pyx_t_17) < 0))) __PYX_ERR(2, 550, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

  /* "cython/core/tail.pyx":555
 *     Hoste-Thistlethwaite tables.  Goes through 16 crossings.
 *     """
 *     length = sum(Nonalternating_numbers.values())             # <<<<<<<<<<<<<<
 *     alternation = 'n'
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Nonalternating_numbers); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_values); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_12 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_12 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_17 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_12, 0+__pyx_t_12);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 555, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_17);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_17); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 555, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_length, __pyx_t_11) < 0) __PYX_ERR(2, 555, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/tail.pyx":556
 *     """
 *     length = sum(Nonalternating_numbers.values())
 *     alternation = 'n'             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, indices=(0, sum(Nonalternating_numbers.values()), 1)):
 */
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_alternation, __pyx_n_s_n) < 0) __PYX_ERR(2, 556, __pyx_L1_error)

  /* "cython/core/tail.pyx":558
 *     alternation = 'n'
 * 
 *     def __init__(self, indices=(0, sum(Nonalternating_numbers.values()), 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 * 
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_27NonalternatingKnotExteriors_1__init__, 0, __pyx_n_s_NonalternatingKnotExteriors___in, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__704)); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_11, sizeof(__pyx_defaults3), 1)) __PYX_ERR(2, 558, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_17, __pyx_n_s_Nonalternating_numbers); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __pyx_t_17 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_17); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __pyx_t_17 = PyTuple_New(3); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_int_0)) __PYX_ERR(2, 558, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_3)) __PYX_ERR(2, 558, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_int_1)) __PYX_ERR(2, 558, __pyx_L1_error);
  __pyx_t_3 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults3, __pyx_t_11)->__pyx_arg_indices = __pyx_t_17;
  __Pyx_GIVEREF(__pyx_t_17);
  __pyx_t_17 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_11, __pyx_pf_6SnapPy_68__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_18, __pyx_n_s_init, __pyx_t_11) < 0) __PYX_ERR(2, 558, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/tail.pyx":550
 * 
 * 
 * class NonalternatingKnotExteriors(KnotExteriors):             # <<<<<<<<<<<<<<
 *     """
 *     Iterator/Sequence for nonAlternating knot exteriors from the
 */
  __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_19, __pyx_n_s_NonalternatingKnotExteriors, __pyx_t_5, __pyx_t_18, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NonalternatingKnotExteriors, __pyx_t_11) < 0) __PYX_ERR(2, 550, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":562
 * 
 * 
 * census_knot_numbers = [0, 0, 1, 2, 4, 22, 43, 129]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_5 = PyList_New(8); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_0)) __PYX_ERR(2, 562, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_0)) __PYX_ERR(2, 562, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_int_1)) __PYX_ERR(2, 562, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 3, __pyx_int_2)) __PYX_ERR(2, 562, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_4);
  __Pyx_GIVEREF(__pyx_int_4);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 4, __pyx_int_4)) __PYX_ERR(2, 562, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_22);
  __Pyx_GIVEREF(__pyx_int_22);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 5, __pyx_int_22)) __PYX_ERR(2, 562, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_43);
  __Pyx_GIVEREF(__pyx_int_43);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 6, __pyx_int_43)) __PYX_ERR(2, 562, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_129);
  __Pyx_GIVEREF(__pyx_int_129);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 7, __pyx_int_129)) __PYX_ERR(2, 562, __pyx_L1_error);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_census_knot_numbers, __pyx_t_5) < 0) __PYX_ERR(2, 562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":565
 * 
 * 
 * class ObsCensusKnots(Census):             # <<<<<<<<<<<<<<
 *     """
 *     Obsolete
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Census); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_19 = PyTuple_New(1); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_5)) __PYX_ERR(2, 565, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_19); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_18 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_11 = __Pyx_Py3MetaclassPrepare(__pyx_t_18, __pyx_t_5, __pyx_n_s_ObsCensusKnots, __pyx_n_s_ObsCensusKnots, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_Obsolete_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__pyx_t_5 != __pyx_t_19) {
    if (unlikely((PyDict_SetItemString(__pyx_t_11, "__orig_bases__", __pyx_t_19) < 0))) __PYX_ERR(2, 565, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;

  /* "cython/core/tail.pyx":569
 *     Obsolete
 *     """
 *     length = sum(census_knot_numbers)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, indices=(0, sum(census_knot_numbers), 1)):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_census_knot_numbers); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_17 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_19); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_length, __pyx_t_17) < 0) __PYX_ERR(2, 569, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

  /* "cython/core/tail.pyx":571
 *     length = sum(census_knot_numbers)
 * 
 *     def __init__(self, indices=(0, sum(census_knot_numbers), 1)):             # <<<<<<<<<<<<<<
 *         Census.__init__(self, indices)
 *         self.Census_Knots = tarfile.open(census_knot_archive, 'r:*')
 */
  __pyx_t_17 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_14ObsCensusKnots_1__init__, 0, __pyx_n_s_ObsCensusKnots___init, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__705)); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_17, sizeof(__pyx_defaults4), 1)) __PYX_ERR(2, 571, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_19, __pyx_n_s_census_knot_numbers); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_19); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
  __pyx_t_19 = PyTuple_New(3); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_int_0)) __PYX_ERR(2, 571, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_3)) __PYX_ERR(2, 571, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_int_1)) __PYX_ERR(2, 571, __pyx_L1_error);
  __pyx_t_3 = 0;
  __Pyx_CyFunction_Defaults(__pyx_defaults4, __pyx_t_17)->__pyx_arg_indices = __pyx_t_19;
  __Pyx_GIVEREF(__pyx_t_19);
  __pyx_t_19 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_17, __pyx_pf_6SnapPy_70__defaults__);
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_init, __pyx_t_17) < 0) __PYX_ERR(2, 571, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

  /* "cython/core/tail.pyx":575
 *         self.Census_Knots = tarfile.open(census_knot_archive, 'r:*')
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return 'Knots in S^3 which appear in the SnapPea Census'
 * 
 */
  __pyx_t_17 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_14ObsCensusKnots_3__repr__, 0, __pyx_n_s_ObsCensusKnots___repr, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__706)); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 575, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_repr_2, __pyx_t_17) < 0) __PYX_ERR(2, 575, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

  /* "cython/core/tail.pyx":578
 *         return 'Knots in S^3 which appear in the SnapPea Census'
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         if isinstance(n, slice):
 *             return self.__class__(n.indices(self.length))
 */
  __pyx_t_17 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_14ObsCensusKnots_5__getitem__, 0, __pyx_n_s_ObsCensusKnots___getitem, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__708)); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  if (__Pyx_SetNameInClass(__pyx_t_11, __pyx_n_s_getitem, __pyx_t_17) < 0) __PYX_ERR(2, 578, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;

  /* "cython/core/tail.pyx":565
 * 
 * 
 * class ObsCensusKnots(Census):             # <<<<<<<<<<<<<<
 *     """
 *     Obsolete
 */
  __pyx_t_17 = __Pyx_Py3ClassCreate(__pyx_t_18, __pyx_n_s_ObsCensusKnots, __pyx_t_5, __pyx_t_11, NULL, 0, 0); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ObsCensusKnots, __pyx_t_17) < 0) __PYX_ERR(2, 565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":605
 * 
 * 
 * class ObsLinkExteriors(Census):             # <<<<<<<<<<<<<<
 *     """
 *     Obsolete.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Census); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_5)) __PYX_ERR(2, 605, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_18); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_17 = __Pyx_Py3MetaclassPrepare(__pyx_t_11, __pyx_t_5, __pyx_n_s_ObsLinkExteriors, __pyx_n_s_ObsLinkExteriors, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_Obsolete); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  if (__pyx_t_5 != __pyx_t_18) {
    if (unlikely((PyDict_SetItemString(__pyx_t_17, "__orig_bases__", __pyx_t_18) < 0))) __PYX_ERR(2, 605, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;

  /* "cython/core/tail.pyx":611
 *     # num_links[component][crossings] is the number of links with
 *     # specified number of components and crossings.
 *     num_links= [[], [0, 0, 0, 1, 1, 2, 3, 7, 21, 49, 166, 552],             # <<<<<<<<<<<<<<
 *                 [0, 0, 0, 0, 1, 1, 3, 8, 16, 61, 183],
 *                 [0, 0, 0, 0, 0, 0, 3, 1, 10, 21, 74],
 */
  __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) __PYX_ERR(2, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_18);
  __pyx_t_19 = PyList_New(12); if (unlikely(!__pyx_t_19)) __PYX_ERR(2, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_19);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_19, 0, __pyx_int_0)) __PYX_ERR(2, 611, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_19, 1, __pyx_int_0)) __PYX_ERR(2, 611, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_19, 2, __pyx_int_0)) __PYX_ERR(2, 611, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_19, 3, __pyx_int_1)) __PYX_ERR(2, 611, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_19, 4, __pyx_int_1)) __PYX_ERR(2, 611, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_2);
  __Pyx_GIVEREF(__pyx_int_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_19, 5, __pyx_int_2)) __PYX_ERR(2, 611, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_19, 6, __pyx_int_3)) __PYX_ERR(2, 611, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_7);
  __Pyx_GIVEREF(__pyx_int_7);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_19, 7, __pyx_int_7)) __PYX_ERR(2, 611, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_21);
  __Pyx_GIVEREF(__pyx_int_21);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_19, 8, __pyx_int_21)) __PYX_ERR(2, 611, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_49);
  __Pyx_GIVEREF(__pyx_int_49);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_19, 9, __pyx_int_49)) __PYX_ERR(2, 611, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_166);
  __Pyx_GIVEREF(__pyx_int_166);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_19, 10, __pyx_int_166)) __PYX_ERR(2, 611, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_552);
  __Pyx_GIVEREF(__pyx_int_552);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_19, 11, __pyx_int_552)) __PYX_ERR(2, 611, __pyx_L1_error);

  /* "cython/core/tail.pyx":612
 *     # specified number of components and crossings.
 *     num_links= [[], [0, 0, 0, 1, 1, 2, 3, 7, 21, 49, 166, 552],
 *                 [0, 0, 0, 0, 1, 1, 3, 8, 16, 61, 183],             # <<<<<<<<<<<<<<
 *                 [0, 0, 0, 0, 0, 0, 3, 1, 10, 21, 74],
 *                 [0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 24],
 */
  __pyx_t_3 = PyList_New(11); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_0)) __PYX_ERR(2, 612, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0)) __PYX_ERR(2, 612, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_int_0)) __PYX_ERR(2, 612, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_int_0)) __PYX_ERR(2, 612, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_int_1)) __PYX_ERR(2, 612, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_int_1)) __PYX_ERR(2, 612, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 6, __pyx_int_3)) __PYX_ERR(2, 612, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_8);
  __Pyx_GIVEREF(__pyx_int_8);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 7, __pyx_int_8)) __PYX_ERR(2, 612, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_16);
  __Pyx_GIVEREF(__pyx_int_16);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 8, __pyx_int_16)) __PYX_ERR(2, 612, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_61);
  __Pyx_GIVEREF(__pyx_int_61);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 9, __pyx_int_61)) __PYX_ERR(2, 612, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_183);
  __Pyx_GIVEREF(__pyx_int_183);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 10, __pyx_int_183)) __PYX_ERR(2, 612, __pyx_L1_error);

  /* "cython/core/tail.pyx":613
 *     num_links= [[], [0, 0, 0, 1, 1, 2, 3, 7, 21, 49, 166, 552],
 *                 [0, 0, 0, 0, 1, 1, 3, 8, 16, 61, 183],
 *                 [0, 0, 0, 0, 0, 0, 3, 1, 10, 21, 74],             # <<<<<<<<<<<<<<
 *                 [0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 24],
 *                 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3]]
 */
  __pyx_t_4 = PyList_New(11); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_0)) __PYX_ERR(2, 613, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_0)) __PYX_ERR(2, 613, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_int_0)) __PYX_ERR(2, 613, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_int_0)) __PYX_ERR(2, 613, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 4, __pyx_int_0)) __PYX_ERR(2, 613, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 5, __pyx_int_0)) __PYX_ERR(2, 613, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 6, __pyx_int_3)) __PYX_ERR(2, 613, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 7, __pyx_int_1)) __PYX_ERR(2, 613, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_10);
  __Pyx_GIVEREF(__pyx_int_10);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 8, __pyx_int_10)) __PYX_ERR(2, 613, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_21);
  __Pyx_GIVEREF(__pyx_int_21);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 9, __pyx_int_21)) __PYX_ERR(2, 613, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_74);
  __Pyx_GIVEREF(__pyx_int_74);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 10, __pyx_int_74)) __PYX_ERR(2, 613, __pyx_L1_error);

  /* "cython/core/tail.pyx":614
 *                 [0, 0, 0, 0, 1, 1, 3, 8, 16, 61, 183],
 *                 [0, 0, 0, 0, 0, 0, 3, 1, 10, 21, 74],
 *                 [0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 24],             # <<<<<<<<<<<<<<
 *                 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3]]
 * 
 */
  __pyx_t_20 = PyList_New(11); if (unlikely(!__pyx_t_20)) __PYX_ERR(2, 614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_20);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_20, 0, __pyx_int_0)) __PYX_ERR(2, 614, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_20, 1, __pyx_int_0)) __PYX_ERR(2, 614, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_20, 2, __pyx_int_0)) __PYX_ERR(2, 614, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_20, 3, __pyx_int_0)) __PYX_ERR(2, 614, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_20, 4, __pyx_int_0)) __PYX_ERR(2, 614, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_20, 5, __pyx_int_0)) __PYX_ERR(2, 614, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_20, 6, __pyx_int_0)) __PYX_ERR(2, 614, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_20, 7, __pyx_int_0)) __PYX_ERR(2, 614, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_20, 8, __pyx_int_3)) __PYX_ERR(2, 614, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_1);
  __Pyx_GIVEREF(__pyx_int_1);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_20, 9, __pyx_int_1)) __PYX_ERR(2, 614, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_24);
  __Pyx_GIVEREF(__pyx_int_24);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_20, 10, __pyx_int_24)) __PYX_ERR(2, 614, __pyx_L1_error);

  /* "cython/core/tail.pyx":615
 *                 [0, 0, 0, 0, 0, 0, 3, 1, 10, 21, 74],
 *                 [0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 24],
 *                 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3]]             # <<<<<<<<<<<<<<
 * 
 *     max_crossings = 11
 */
  __pyx_t_2 = PyList_New(11); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_0)) __PYX_ERR(2, 615, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_0)) __PYX_ERR(2, 615, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_0)) __PYX_ERR(2, 615, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_int_0)) __PYX_ERR(2, 615, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_int_0)) __PYX_ERR(2, 615, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_int_0)) __PYX_ERR(2, 615, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 6, __pyx_int_0)) __PYX_ERR(2, 615, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 7, __pyx_int_0)) __PYX_ERR(2, 615, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 8, __pyx_int_0)) __PYX_ERR(2, 615, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 9, __pyx_int_0)) __PYX_ERR(2, 615, __pyx_L1_error);
  __Pyx_INCREF(__pyx_int_3);
  __Pyx_GIVEREF(__pyx_int_3);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 10, __pyx_int_3)) __PYX_ERR(2, 615, __pyx_L1_error);

  /* "cython/core/tail.pyx":611
 *     # num_links[component][crossings] is the number of links with
 *     # specified number of components and crossings.
 *     num_links= [[], [0, 0, 0, 1, 1, 2, 3, 7, 21, 49, 166, 552],             # <<<<<<<<<<<<<<
 *                 [0, 0, 0, 0, 1, 1, 3, 8, 16, 61, 183],
 *                 [0, 0, 0, 0, 0, 0, 3, 1, 10, 21, 74],
 */
  __pyx_t_21 = PyList_New(6); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 611, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_GIVEREF(__pyx_t_18);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_21, 0, __pyx_t_18)) __PYX_ERR(2, 611, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_19);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_21, 1, __pyx_t_19)) __PYX_ERR(2, 611, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_3);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_21, 2, __pyx_t_3)) __PYX_ERR(2, 611, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_21, 3, __pyx_t_4)) __PYX_ERR(2, 611, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_20);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_21, 4, __pyx_t_20)) __PYX_ERR(2, 611, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_21, 5, __pyx_t_2)) __PYX_ERR(2, 611, __pyx_L1_error);
  __pyx_t_18 = 0;
  __pyx_t_19 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_20 = 0;
  __pyx_t_2 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_n_s_num_links, __pyx_t_21) < 0) __PYX_ERR(2, 611, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "cython/core/tail.pyx":617
 *                 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3]]
 * 
 *     max_crossings = 11             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, components, indices=(0, 10000, 1)):
 */
  if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_n_s_max_crossings, __pyx_int_11) < 0) __PYX_ERR(2, 617, __pyx_L1_error)

  /* "cython/core/tail.pyx":619
 *     max_crossings = 11
 * 
 *     def __init__(self, components, indices=(0, 10000, 1)):             # <<<<<<<<<<<<<<
 *         self.Christy_links = tarfile.open(link_archive, 'r:*')
 * 
 */
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16ObsLinkExteriors_1__init__, 0, __pyx_n_s_ObsLinkExteriors___init, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__710)); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 619, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_21, __pyx_tuple__711);
  if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_n_s_init, __pyx_t_21) < 0) __PYX_ERR(2, 619, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "cython/core/tail.pyx":634
 *                                indices[2]))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return ('Christy census of %s-component link complements '
 *                 'in S^3' % self.components)
 */
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16ObsLinkExteriors_3__repr__, 0, __pyx_n_s_ObsLinkExteriors___repr, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__712)); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_n_s_repr_2, __pyx_t_21) < 0) __PYX_ERR(2, 634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "cython/core/tail.pyx":638
 *                 'in S^3' % self.components)
 * 
 *     def __getitem__(self, j):             # <<<<<<<<<<<<<<
 *         if isinstance(j, slice):
 *             return self.__class__(j.indices(self.length))
 */
  __pyx_t_21 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_16ObsLinkExteriors_5__getitem__, 0, __pyx_n_s_ObsLinkExteriors___getitem, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__714)); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (__Pyx_SetNameInClass(__pyx_t_17, __pyx_n_s_getitem, __pyx_t_21) < 0) __PYX_ERR(2, 638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;

  /* "cython/core/tail.pyx":605
 * 
 * 
 * class ObsLinkExteriors(Census):             # <<<<<<<<<<<<<<
 *     """
 *     Obsolete.
 */
  __pyx_t_21 = __Pyx_Py3ClassCreate(__pyx_t_11, __pyx_n_s_ObsLinkExteriors, __pyx_t_5, __pyx_t_17, NULL, 0, 0); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ObsLinkExteriors, __pyx_t_21) < 0) __PYX_ERR(2, 605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":671
 * # ----------------------------------------------------------------
 * 
 * class MorwenLinks:             # <<<<<<<<<<<<<<
 *     def __init__(self, num_components, num_crossings = None):
 *         raise ValueError(
 */
  __pyx_t_5 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_MorwenLinks, __pyx_n_s_MorwenLinks, (PyObject *) NULL, __pyx_n_s_SnapPy, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);

  /* "cython/core/tail.pyx":672
 * 
 * class MorwenLinks:
 *     def __init__(self, num_components, num_crossings = None):             # <<<<<<<<<<<<<<
 *         raise ValueError(
 *             'The MorwenLinks class has been replaced by HTLinkExteriors. '
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_11MorwenLinks_1__init__, 0, __pyx_n_s_MorwenLinks___init, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__716)); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_tuple__270);
  if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_init, __pyx_t_11) < 0) __PYX_ERR(2, 672, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/tail.pyx":671
 * # ----------------------------------------------------------------
 * 
 * class MorwenLinks:             # <<<<<<<<<<<<<<
 *     def __init__(self, num_components, num_crossings = None):
 *         raise ValueError(
 */
  __pyx_t_11 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_n_s_MorwenLinks, __pyx_empty_tuple, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MorwenLinks, __pyx_t_11) < 0) __PYX_ERR(2, 671, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":679
 * 
 * 
 * def left_pad_string(str,  length, pad=' '):             # <<<<<<<<<<<<<<
 *     return pad*(length - len(str)) + str
 * 
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_59left_pad_string, 0, __pyx_n_s_left_pad_string, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__718)); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__719);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_left_pad_string, __pyx_t_5) < 0) __PYX_ERR(2, 679, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":683
 * 
 * 
 * class ObsMorwenLinks(Census):             # <<<<<<<<<<<<<<
 *     """
 *     Obsolete.
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Census); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_5);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5)) __PYX_ERR(2, 683, __pyx_L1_error);
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PEP560_update_bases(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_17 = __Pyx_CalculateMetaclass(NULL, __pyx_t_5); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __pyx_t_21 = __Pyx_Py3MetaclassPrepare(__pyx_t_17, __pyx_t_5, __pyx_n_s_ObsMorwenLinks, __pyx_n_s_ObsMorwenLinks, (PyObject *) NULL, __pyx_n_s_SnapPy, __pyx_kp_s_Obsolete); if (unlikely(!__pyx_t_21)) __PYX_ERR(2, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_21);
  if (__pyx_t_5 != __pyx_t_11) {
    if (unlikely((PyDict_SetItemString(__pyx_t_21, "__orig_bases__", __pyx_t_11) < 0))) __PYX_ERR(2, 683, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/tail.pyx":687
 *     Obsolete.
 *     """
 *     def __init__(self, num_components, num_crossings = None):             # <<<<<<<<<<<<<<
 *         if num_components < 0:
 *             return
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_14ObsMorwenLinks_1__init__, 0, __pyx_n_s_ObsMorwenLinks___init, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__721)); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_11, __pyx_tuple__270);
  if (__Pyx_SetNameInClass(__pyx_t_21, __pyx_n_s_init, __pyx_t_11) < 0) __PYX_ERR(2, 687, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/tail.pyx":713
 *         Census.__init__(self, indices=(0, len(self.DT_codes), 1))
 * 
 *     def __getitem__(self, n):             # <<<<<<<<<<<<<<
 *         if isinstance(n, slice):
 *             SC = self.__class__(-1)
 */
  __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_14ObsMorwenLinks_3__getitem__, 0, __pyx_n_s_ObsMorwenLinks___getitem, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__723)); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (__Pyx_SetNameInClass(__pyx_t_21, __pyx_n_s_getitem, __pyx_t_11) < 0) __PYX_ERR(2, 713, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "cython/core/tail.pyx":683
 * 
 * 
 * class ObsMorwenLinks(Census):             # <<<<<<<<<<<<<<
 *     """
 *     Obsolete.
 */
  __pyx_t_11 = __Pyx_Py3ClassCreate(__pyx_t_17, __pyx_n_s_ObsMorwenLinks, __pyx_t_5, __pyx_t_21, NULL, 0, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(2, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ObsMorwenLinks, __pyx_t_11) < 0) __PYX_ERR(2, 683, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":753
 * # Link Editor support
 * 
 * strandtype = {'X': KLPStrandX, 'Y': KLPStrandY}             # <<<<<<<<<<<<<<
 * signtype = {'R': KLPHalfTwistCL, 'L': KLPHalfTwistCCL}
 * 
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_17 = __Pyx_PyInt_From_KLPStrandType(KLPStrandX); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_X, __pyx_t_17) < 0) __PYX_ERR(2, 753, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __pyx_t_17 = __Pyx_PyInt_From_KLPStrandType(KLPStrandY); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_Y, __pyx_t_17) < 0) __PYX_ERR(2, 753, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_strandtype, __pyx_t_5) < 0) __PYX_ERR(2, 753, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cython/core/tail.pyx":754
 * 
 * strandtype = {'X': KLPStrandX, 'Y': KLPStrandY}
 * signtype = {'R': KLPHalfTwistCL, 'L': KLPHalfTwistCCL}             # <<<<<<<<<<<<<<
 * 
 * cdef c_Triangulation* get_triangulation_from_PythonKLP(pythonklp, remove_finite_vertices=True) except *:
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_17 = __Pyx_PyInt_From_KLPCrossingType(KLPHalfTwistCL); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_R, __pyx_t_17) < 0) __PYX_ERR(2, 754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __pyx_t_17 = __Pyx_PyInt_From_KLPCrossingType(KLPHalfTwistCCL); if (unlikely(!__pyx_t_17)) __PYX_ERR(2, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_L, __pyx_t_17) < 0) __PYX_ERR(2, 754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_signtype, __pyx_t_5) < 0) __PYX_ERR(2, 754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_PresentationMatrix(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6SnapPy_61__pyx_unpickle_PresentationMatrix, 0, __pyx_n_s_pyx_unpickle_PresentationMatri, NULL, __pyx_n_s_SnapPy, __pyx_d, ((PyObject *)__pyx_codeobj__725)); if (unlikely(!__pyx_t_5)) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_PresentationMatri, __pyx_t_5) < 0) __PYX_ERR(7, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "SnapPy.pyx":1
 * # cython: language_level=3str             # <<<<<<<<<<<<<<
 * 
 * ctypedef double Real
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(103); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation__remove_finite_ver_2, __pyx_kp_u_Removing_any_finite_vertices_by) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_plink_line_319, __pyx_kp_u_Brings_up_a_link_editor_window) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_num_cusps_line_363, __pyx_kp_u_Return_the_total_number_of_cusp) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation__num_fake_cusps_li, __pyx_kp_u_Returns_the_number_of_fake_cusp) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_orientation_cover_2, __pyx_kp_u_For_a_non_orientable_Triangulat) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_is_orientable_line, __pyx_kp_u_Return_whether_the_underlying_3) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_copy_line_442, __pyx_kp_u_Returns_a_copy_of_the_triangula) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_randomize_line_459, __pyx_kp_u_Perform_random_Pachner_moves_on) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_simplify_line_473, __pyx_kp_u_Try_to_simplify_the_triangulati) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_with_hyperbolic_st_2, __pyx_kp_u_Add_a_possibly_degenerate_hyper) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_save_line_629, __pyx_kp_u_Save_the_triangulation_as_a_Sna) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation__to_string_line_65, __pyx_kp_u_Return_a_string_containing_the) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation__from_string_line, __pyx_kp_u_WARNING_Users_should_not_use_th) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation__to_bytes_line_699, __pyx_kp_u_Return_a_reasonably_short_byte) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation__from_bytes_line_7, __pyx_kp_u_Fill_an_empty_triangulation_fro) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation__from_tetrahedra_g_2, __pyx_kp_u_data_1_1_2_2_0_1_3_2_2_3_1_0_0) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation__from_isosig_line, __pyx_kp_u_WARNING_Users_should_not_use_th_2) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation___reduce___line_86, __pyx_kp_u_Used_by_pickle_dumps_from_pickl) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation__reindex_cusps_lin, __pyx_kp_u_import_itertools_M_Manifold_L14) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_isomorphisms_to_li, __pyx_kp_u_Returns_a_complete_list_of_comb) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_name_line_1049, __pyx_kp_u_Return_the_name_of_the_triangul) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_set_name_line_1061, __pyx_kp_u_Give_the_triangulation_a_new_na) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_DT_code_line_1076, __pyx_kp_u_Return_the_Dowker_Thistlethwait) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_num_tetrahedra_lin, __pyx_kp_u_Return_the_number_of_tetrahedra) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_dehn_fill_line_112, __pyx_kp_u_Set_the_Dehn_filling_coefficien) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_cusp_info_line_119, __pyx_kp_u_Returns_an_info_object_containi) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_reverse_orientatio_2, __pyx_kp_u_Reverses_the_orientation_of_the) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_filled_triangulati_2, __pyx_kp_u_Return_a_new_manifold_where_the) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation__unsimplified_fill_2, __pyx_kp_u_For_a_Triangulation_that_descri) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_edge_valences_line, __pyx_kp_u_Returns_a_dictionary_whose_keys) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_gluing_equations_p_2, __pyx_kp_u_M_gluing_equations_pgl_N_2_equa) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_ptolemy_obstructio_2, __pyx_kp_u_Returns_the_obstruction_classes) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_ptolemy_generalize_2, __pyx_kp_u_M_ptolemy_generalized_obstructi) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_ptolemy_variety_li, __pyx_kp_u_M_ptolemy_variety_N_obstruction) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_gluing_equations_l, __pyx_kp_u_In_the_default_mode_this_functi) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_homology_line_2278, __pyx_kp_u_Returns_an_AbelianGroup_represe) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_fundamental_group_2, __pyx_kp_u_Returns_a_FundamentalGroup_obje) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_cover_line_2360, __pyx_kp_u_Returns_a_Triangulation_represe) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_covers_line_2460, __pyx_kp_u_M_covers_degree_method_None_cov) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_has_finite_vertice_2, __pyx_kp_u_Returns_True_if_and_only_if_the) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_triangulation_isos_2, __pyx_kp_u_Returns_a_compact_text_represen) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Triangulation_symplectic_basis_l, __pyx_kp_u_Extend_the_Neumann_Zagier_Matri) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_canonize_line_145, __pyx_kp_u_Change_the_triangulation_to_an) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold__canonical_retriangulat_2, __pyx_kp_u_If_this_triangulation_is_a_subd) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold__canonical_cells_are_te_2, __pyx_kp_u_Returns_True_if_and_only_if_the_2) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold__from_string_line_256, __pyx_kp_u_WARNING_Users_should_not_use_th_3) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold__from_bytes_line_272, __pyx_kp_u_Fill_an_empty_manifold_from_a_b) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_copy_line_297, __pyx_kp_u_Returns_a_copy_of_the_manifold) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_cusp_neighborhood_line, __pyx_kp_u_Returns_information_about_the_c) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_dirichlet_domain_line_3, __pyx_kp_u_Returns_a_DirichletDomain_objec) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_browse_line_375, __pyx_kp_u_Opens_browser_window_with_a_gra) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_filled_triangulation_li, __pyx_kp_u_Return_a_new_Manifold_where_the) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_fundamental_group_line, __pyx_kp_u_Return_a_HolonomyGroup_represen) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_symmetric_triangulation_2, __pyx_kp_u_Returns_a_Dehn_filling_descript) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_cover_line_535, __pyx_kp_u_M_cover_permutation_rep_Returns) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_covers_line_607, __pyx_kp_u_M_covers_degree_method_None_cov_2) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_volume_line_714, __pyx_kp_u_Returns_the_volume_of_the_curre) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_chern_simons_line_807, __pyx_kp_u_Returns_the_Chern_Simons_invari) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_without_hyperbolic_stru_2, __pyx_kp_u_Returns_self_as_a_Triangulation) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_tetrahedra_shapes_line, __pyx_kp_u_Gives_the_shapes_of_the_tetrahe) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_solution_type_line_1048, __pyx_kp_u_Returns_the_type_of_the_current) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_cusp_info_line_1108, __pyx_kp_u_Returns_an_info_object_containi_2) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_dehn_fill_line_1231, __pyx_kp_u_Set_the_Dehn_filling_coefficien_2) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_set_peripheral_curves_l, __pyx_kp_u_Each_cusp_has_a_preferred_marki) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_dual_curves_line_1383, __pyx_kp_u_Constructs_a_reasonable_selecti) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_length_spectrum_line_14, __pyx_kp_u_Returns_a_list_of_geodesics_wit) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_drill_line_1485, __pyx_kp_u_Drills_out_the_specified_dual_c) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_is_isometric_to_line_15, __pyx_kp_u_Returns_True_if_M_and_N_are_iso) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_is_two_bridge_line_1616, __pyx_kp_u_If_the_manifold_is_the_compleme) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_splitting_surfaces_line, __pyx_kp_u_Searches_for_connected_closed_n) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_Manifold_split_line_1736, __pyx_kp_u_Split_the_manifold_open_along_a) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_AbelianGroup___reduce___line_80, __pyx_kp_u_Used_by_the_pickle_module_to_pi) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_CFundamentalGroup_original_gener_2, __pyx_kp_u_Return_the_original_geometric_g) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_CFundamentalGroup_generators_in_2, __pyx_kp_u_Return_the_current_generators_i) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_CFundamentalGroup_generators_lin, __pyx_kp_u_Return_the_letters_representing) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_CFundamentalGroup_meridian_line, __pyx_kp_u_Returns_a_word_representing_a_c) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_CFundamentalGroup_longitude_line, __pyx_kp_u_Returns_a_word_representing_a_c_2) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_CFundamentalGroup_peripheral_cur_2, __pyx_kp_u_Returns_a_list_of_meridian_long) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_CFundamentalGroup_gap_string_lin, __pyx_kp_u_Returns_a_string_which_will_def) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_CFundamentalGroup_character_vari_2, __pyx_kp_u_Returns_a_list_of_variables_and) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_SymmetryGroup_is_full_group_line, __pyx_kp_u_Return_whether_the_full_symmetr) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_SymmetryGroup_order_line_62, __pyx_kp_u_Return_the_order_of_the_symmetr) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_SymmetryGroup_is_abelian_line_72, __pyx_kp_u_Return_whether_the_symmetry_gro) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_SymmetryGroup_abelian_descriptio_2, __pyx_kp_u_If_the_symmetry_group_is_abelia) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_SymmetryGroup_is_dihedral_line_1, __pyx_kp_u_Return_whether_the_symmetry_gro_2) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_SymmetryGroup_is_direct_product_2, __pyx_kp_u_Return_whether_the_SymmetryGrou) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_SymmetryGroup_direct_product_des_2, __pyx_kp_u_If_the_SymmetryGroup_is_a_nontr) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_SymmetryGroup_is_amphicheiral_li, __pyx_kp_u_Return_whether_the_manifold_has) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_SymmetryGroup_is_invertible_knot_2, __pyx_kp_u_Return_whether_a_one_cusped_has) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_SymmetryGroup_commutator_subgrou_2, __pyx_kp_u_Return_the_commutator_subgroup) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_SymmetryGroup_abelianization_lin, __pyx_kp_u_Return_the_abelianization_of_th) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_SymmetryGroup_center_line_256, __pyx_kp_u_Return_the_center_of_the_symmet) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_SymmetryGroup_multiply_elements_2, __pyx_kp_u_Returns_the_product_of_group_el) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_SymmetryGroup_isometries_line_29, __pyx_kp_u_Return_a_detailed_list_of_all_t) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_CDirichletDomain_length_spectrum_2, __pyx_kp_u_Return_a_list_of_info_objects_d) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_CDirichletDomain_manifold_line_5, __pyx_kp_u_Returns_a_Manifold_computed_dir) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_CDirichletDomain_triangulation_l, __pyx_kp_u_Returns_a_Triangulation_compute) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_CDirichletDomain_pairing_matrice_2, __pyx_kp_u_Returns_a_list_of_the_O31Matric) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_CDirichletDomain_pairing_words_l, __pyx_kp_u_Group_elements_which_pair_the_f) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_CDirichletDomain_save_line_643, __pyx_kp_u_Save_the_Dirichlet_domain_as_a) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_CDirichletDomain_export_stl_line, __pyx_kp_u_Export_the_Dirichlet_domain_as) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_CCuspNeighborhood_view_line_289, __pyx_kp_u_Create_a_3D_picture_of_the_horo) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_kp_u_get_triangulation_tester_line_11, __pyx_kp_u_get_triangulation_tester_doctes) < 0) __PYX_ERR(6, 1, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_5) < 0) __PYX_ERR(6, 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);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_XDECREF(__pyx_t_21);
  if (__pyx_m) {
    if (__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init SnapPy", __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 SnapPy");
  }
  __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;
}

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

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

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

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

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

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

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
    PyObject *runerr = NULL;
    Py_ssize_t key_value;
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index));
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError,
            "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
        __Pyx_DECREF_TypeName(index_type_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
    __Pyx_TypeName obj_type_name;
    if (likely(PyType_Check(obj))) {
        PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem);
        if (!meth) {
            PyErr_Clear();
        } else {
            PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
            Py_DECREF(meth);
            return result;
        }
    }
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
    PyTypeObject *tp = Py_TYPE(obj);
    PyMappingMethods *mm = tp->tp_as_mapping;
    PySequenceMethods *sm = tp->tp_as_sequence;
    if (likely(mm && mm->mp_subscript)) {
        return mm->mp_subscript(obj, key);
    }
    if (likely(sm && sm->sq_item)) {
        return __Pyx_PyObject_GetIndex(obj, key);
    }
    return __Pyx_PyObject_GetItem_Slow(obj, key);
}
#endif

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

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

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

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

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

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

/* PyIntCompare */
static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        return 1;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        return (a == b);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            return (__Pyx_PyLong_IsZero(op1) == 1);
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                return 0;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                return 0;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        return (unequal == 0);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
        return ((double)a == (double)b);
    }
    return __Pyx_PyObject_IsTrueAndDecref(
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* PyIntCompare */
static CYTHON_INLINE int __Pyx_PyInt_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        return 0;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        return (a != b);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            return (__Pyx_PyLong_IsZero(op1) != 1);
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                return 1;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                return 1;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        return (unequal != 0);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
        return ((double)a != (double)b);
    }
    return __Pyx_PyObject_IsTrueAndDecref(
        PyObject_RichCompare(op1, op2, Py_NE));
}

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

/* SliceObject */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, int wraparound) {
    __Pyx_TypeName obj_type_name;
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#else
    CYTHON_UNUSED_VAR(wraparound);
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#else
    CYTHON_UNUSED_VAR(wraparound);
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
bad:
    return NULL;
}

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

/* pybytes_as_double */
static double __Pyx_SlowPyString_AsDouble(PyObject *obj) {
    PyObject *float_value;
#if PY_MAJOR_VERSION >= 3
    float_value = PyFloat_FromString(obj);
#else
    float_value = PyFloat_FromString(obj, 0);
#endif
    if (likely(float_value)) {
#if CYTHON_ASSUME_SAFE_MACROS
        double value = PyFloat_AS_DOUBLE(float_value);
#else
        double value = PyFloat_AsDouble(float_value);
#endif
        Py_DECREF(float_value);
        return value;
    }
    return (double)-1;
}
static const char* __Pyx__PyBytes_AsDouble_Copy(const char* start, char* buffer, Py_ssize_t length) {
    int last_was_punctuation = 1;
    Py_ssize_t i;
    for (i=0; i < length; i++) {
        char chr = start[i];
        int is_punctuation = (chr == '_') | (chr == '.') | (chr == 'e') | (chr == 'E');
        *buffer = chr;
        buffer += (chr != '_');
        if (unlikely(last_was_punctuation & is_punctuation)) goto parse_failure;
        last_was_punctuation = is_punctuation;
    }
    if (unlikely(last_was_punctuation)) goto parse_failure;
    *buffer = '\0';
    return buffer;
parse_failure:
    return NULL;
}
static double __Pyx__PyBytes_AsDouble_inf_nan(const char* start, Py_ssize_t length) {
    int matches = 1;
    char sign = start[0];
    int is_signed = (sign == '+') | (sign == '-');
    start += is_signed;
    length -= is_signed;
    switch (start[0]) {
        #ifdef Py_NAN
        case 'n':
        case 'N':
            if (unlikely(length != 3)) goto parse_failure;
            matches &= (start[1] == 'a' || start[1] == 'A');
            matches &= (start[2] == 'n' || start[2] == 'N');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_NAN : Py_NAN;
        #endif
        case 'i':
        case 'I':
            if (unlikely(length < 3)) goto parse_failure;
            matches &= (start[1] == 'n' || start[1] == 'N');
            matches &= (start[2] == 'f' || start[2] == 'F');
            if (likely(length == 3 && matches))
                return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
            if (unlikely(length != 8)) goto parse_failure;
            matches &= (start[3] == 'i' || start[3] == 'I');
            matches &= (start[4] == 'n' || start[4] == 'N');
            matches &= (start[5] == 'i' || start[5] == 'I');
            matches &= (start[6] == 't' || start[6] == 'T');
            matches &= (start[7] == 'y' || start[7] == 'Y');
            if (unlikely(!matches)) goto parse_failure;
            return (sign == '-') ? -Py_HUGE_VAL : Py_HUGE_VAL;
        case '.': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
            break;
        default:
            goto parse_failure;
    }
    return 0.0;
parse_failure:
    return -1.0;
}
static CYTHON_INLINE int __Pyx__PyBytes_AsDouble_IsSpace(char ch) {
    return (ch == 0x20) | !((ch < 0x9) | (ch > 0xd));
}
CYTHON_UNUSED static double __Pyx__PyBytes_AsDouble(PyObject *obj, const char* start, Py_ssize_t length) {
    double value;
    Py_ssize_t i, digits;
    const char *last = start + length;
    char *end;
    while (__Pyx__PyBytes_AsDouble_IsSpace(*start))
        start++;
    while (start < last - 1 && __Pyx__PyBytes_AsDouble_IsSpace(last[-1]))
        last--;
    length = last - start;
    if (unlikely(length <= 0)) goto fallback;
    value = __Pyx__PyBytes_AsDouble_inf_nan(start, length);
    if (unlikely(value == -1.0)) goto fallback;
    if (value != 0.0) return value;
    digits = 0;
    for (i=0; i < length; digits += start[i++] != '_');
    if (likely(digits == length)) {
        value = PyOS_string_to_double(start, &end, NULL);
    } else if (digits < 40) {
        char number[40];
        last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
        if (unlikely(!last)) goto fallback;
        value = PyOS_string_to_double(number, &end, NULL);
    } else {
        char *number = (char*) PyMem_Malloc((digits + 1) * sizeof(char));
        if (unlikely(!number)) goto fallback;
        last = __Pyx__PyBytes_AsDouble_Copy(start, number, length);
        if (unlikely(!last)) {
            PyMem_Free(number);
            goto fallback;
        }
        value = PyOS_string_to_double(number, &end, NULL);
        PyMem_Free(number);
    }
    if (likely(end == last) || (value == (double)-1 && PyErr_Occurred())) {
        return value;
    }
fallback:
    return __Pyx_SlowPyString_AsDouble(obj);
}

/* pyobject_as_double */
static double __Pyx__PyObject_AsDouble(PyObject* obj) {
    if (PyUnicode_CheckExact(obj)) {
        return __Pyx_PyUnicode_AsDouble(obj);
    } else if (PyBytes_CheckExact(obj)) {
        return __Pyx_PyBytes_AsDouble(obj);
    } else if (PyByteArray_CheckExact(obj)) {
        return __Pyx_PyByteArray_AsDouble(obj);
    } else {
        PyObject* float_value;
#if !CYTHON_USE_TYPE_SLOTS
        float_value = PyNumber_Float(obj);  if ((0)) goto bad;
        (void)__Pyx_PyObject_CallOneArg;
#else
        PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number;
        if (likely(nb) && likely(nb->nb_float)) {
            float_value = nb->nb_float(obj);
            if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) {
                __Pyx_TypeName float_value_type_name = __Pyx_PyType_GetName(Py_TYPE(float_value));
                PyErr_Format(PyExc_TypeError,
                    "__float__ returned non-float (type " __Pyx_FMT_TYPENAME ")",
                    float_value_type_name);
                __Pyx_DECREF_TypeName(float_value_type_name);
                Py_DECREF(float_value);
                goto bad;
            }
        } else {
            float_value = __Pyx_PyObject_CallOneArg((PyObject*)&PyFloat_Type, obj);
        }
#endif
        if (likely(float_value)) {
            double value = PyFloat_AS_DOUBLE(float_value);
            Py_DECREF(float_value);
            return value;
        }
    }
bad:
    return (double)-1;
}

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

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

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

/* py_abs */
#if CYTHON_USE_PYLONG_INTERNALS
static PyObject *__Pyx_PyLong_AbsNeg(PyObject *n) {
#if PY_VERSION_HEX >= 0x030C00A7
    if (likely(__Pyx_PyLong_IsCompact(n))) {
        return PyLong_FromSize_t(__Pyx_PyLong_CompactValueUnsigned(n));
    }
#else
    if (likely(Py_SIZE(n) == -1)) {
        return PyLong_FromUnsignedLong(__Pyx_PyLong_Digits(n)[0]);
    }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
    {
        PyObject *copy = _PyLong_Copy((PyLongObject*)n);
        if (likely(copy)) {
            #if PY_VERSION_HEX >= 0x030C00A7
            ((PyLongObject*)copy)->long_value.lv_tag = ((PyLongObject*)copy)->long_value.lv_tag & ~_PyLong_SIGN_MASK;
            #else
            __Pyx_SET_SIZE(copy, -Py_SIZE(copy));
            #endif
        }
        return copy;
    }
#else
    return PyNumber_Negative(n);
#endif
}
#endif

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

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

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
        
            x = (long)((unsigned long)a + (unsigned long)b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
            return __Pyx_NewRef(op2);
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

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

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

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_RemainderObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
        
            x = a % b;
            x += ((x != 0) & ((x ^ b) < 0)) * b;
            return PyInt_FromLong(x);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
            return __Pyx_NewRef(op1);
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_remainder(op1, op2);
            }
        }
                x = a % b;
                x += ((x != 0) & ((x ^ b) < 0)) * b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla % llb;
                llx += ((llx != 0) & ((llx ^ llb) < 0)) * llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceRemainder : PyNumber_Remainder)(op1, op2);
}
#endif

/* ByteArrayAppend */
static CYTHON_INLINE int __Pyx_PyByteArray_Append(PyObject* bytearray, int value) {
    PyObject *pyval, *retval;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(__Pyx_is_valid_index(value, 256))) {
        Py_ssize_t n = Py_SIZE(bytearray);
        if (likely(n != PY_SSIZE_T_MAX)) {
            if (unlikely(PyByteArray_Resize(bytearray, n + 1) < 0))
                return -1;
            PyByteArray_AS_STRING(bytearray)[n] = value;
            return 0;
        }
    } else {
        PyErr_SetString(PyExc_ValueError, "byte must be in range(0, 256)");
        return -1;
    }
#endif
    pyval = PyInt_FromLong(value);
    if (unlikely(!pyval))
        return -1;
    retval = __Pyx_PyObject_CallMethod1(bytearray, __pyx_n_s_append, pyval);
    Py_DECREF(pyval);
    if (unlikely(!retval))
        return -1;
    Py_DECREF(retval);
    return 0;
}

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

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

/* PyIntCompare */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            if (__Pyx_PyLong_IsZero(op1) == 1) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                Py_RETURN_FALSE;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                Py_RETURN_FALSE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
        if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* RaiseClosureNameError */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
        
            x = (long)((unsigned long)a - (unsigned long)b);
            if (likely((x^a) >= 0 || (x^~b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
            return PyLong_FromLong(-intval);
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
            }
        }
                x = a - b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla - llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("subtract", return NULL)
            result = ((double)a) - (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_MultiplyCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        const long a = intval;
        long b = PyInt_AS_LONG(op2);
        
#ifdef HAVE_LONG_LONG
            if (sizeof(PY_LONG_LONG) > sizeof(long)) {
                PY_LONG_LONG result = (PY_LONG_LONG)a * (PY_LONG_LONG)b;
                return (result >= LONG_MIN && result <= LONG_MAX) ?
                    PyInt_FromLong((long)result) : PyLong_FromLongLong(result);
            }
#endif
#if CYTHON_USE_TYPE_SLOTS
            return PyInt_Type.tp_as_number->nb_multiply(op1, op2);
#else
            return PyNumber_Multiply(op1, op2);
#endif
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op2))) {
        const long a = intval;
        long b, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG lla = intval;
        PY_LONG_LONG llb, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op2))) {
            return __Pyx_NewRef(op2);
        }
        if (likely(__Pyx_PyLong_IsCompact(op2))) {
            b = __Pyx_PyLong_CompactValue(op2);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op2);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op2);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                        b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                        llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                        b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                        llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                        b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                        llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                        b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                        llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                        b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                        llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                        b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                        llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
            }
        }
                CYTHON_UNUSED_VAR(a);
                CYTHON_UNUSED_VAR(b);
                #ifdef HAVE_LONG_LONG
                llb = b;
                goto long_long;
                #else
                return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
                #endif
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla * llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op2)) {
        const long a = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double b = __pyx_PyFloat_AsDouble(op2);
#else
        double b = PyFloat_AS_DOUBLE(op2);
#endif
            double result;
            
            PyFPE_START_PROTECT("multiply", return NULL)
            result = ((double)a) * (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2);
}
#endif

/* DivInt[Py_ssize_t] */
static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
    Py_ssize_t q = a / b;
    Py_ssize_t r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

/* ModInt[Py_ssize_t] */
static CYTHON_INLINE Py_ssize_t __Pyx_mod_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
    Py_ssize_t r = a % b;
    r += ((r != 0) & ((r ^ b) < 0)) * b;
    return r;
}

/* append */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

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

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

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

/* py_set_discard_unhashable */
static int __Pyx_PySet_DiscardUnhashable(PyObject *set, PyObject *key) {
    PyObject *tmpkey;
    int rv;
    if (likely(!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError)))
        return -1;
    PyErr_Clear();
    tmpkey = __Pyx_PyFrozenSet_New(key);
    if (tmpkey == NULL)
        return -1;
    rv = PySet_Discard(set, tmpkey);
    Py_DECREF(tmpkey);
    return rv;
}

/* py_set_remove */
static int __Pyx_PySet_RemoveNotFound(PyObject *set, PyObject *key, int found) {
    if (unlikely(found < 0)) {
        found = __Pyx_PySet_DiscardUnhashable(set, key);
    }
    if (likely(found == 0)) {
        PyObject *tup;
        tup = PyTuple_Pack(1, key);
        if (!tup)
            return -1;
        PyErr_SetObject(PyExc_KeyError, tup);
        Py_DECREF(tup);
        return -1;
    }
    return found;
}
static CYTHON_INLINE int __Pyx_PySet_Remove(PyObject *set, PyObject *key) {
    int found = PySet_Discard(set, key);
    if (unlikely(found != 1)) {
        return __Pyx_PySet_RemoveNotFound(set, key, found);
    }
    return 0;
}

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

/* py_dict_pop */
static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B3 & PY_VERSION_HEX < 0x030d0000
    if ((1)) {
        return _PyDict_Pop(d, key, default_value);
    } else
#endif
    if (default_value) {
        return __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_pop, d, key, default_value);
    } else {
        return __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_pop, d, key);
    }
}

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

/* set_iter */
static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set,
                                                  Py_ssize_t* p_orig_length, int* p_source_is_set) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
    is_set = is_set || likely(PySet_CheckExact(iterable) || PyFrozenSet_CheckExact(iterable));
    *p_source_is_set = is_set;
    if (likely(is_set)) {
        *p_orig_length = PySet_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
    }
#else
    CYTHON_UNUSED_VAR(is_set);
    *p_source_is_set = 0;
#endif
    *p_orig_length = 0;
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_set_iter_next(
        PyObject* iter_obj, Py_ssize_t orig_length,
        Py_ssize_t* ppos, PyObject **value,
        int source_is_set) {
    if (!CYTHON_COMPILING_IN_CPYTHON || PY_VERSION_HEX >= 0x030d0000 || unlikely(!source_is_set)) {
        *value = PyIter_Next(iter_obj);
        if (unlikely(!*value)) {
            return __Pyx_IterFinish();
        }
        CYTHON_UNUSED_VAR(orig_length);
        CYTHON_UNUSED_VAR(ppos);
        return 1;
    }
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
    if (unlikely(PySet_GET_SIZE(iter_obj) != orig_length)) {
        PyErr_SetString(
            PyExc_RuntimeError,
            "set changed size during iteration");
        return -1;
    }
    {
        Py_hash_t hash;
        int ret = _PySet_NextEntry(iter_obj, ppos, value, &hash);
        assert (ret != -1);
        if (likely(ret)) {
            Py_INCREF(*value);
            return 1;
        }
    }
#endif
    return 0;
}

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

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

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

/* pop */
static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L) {
    if (__Pyx_IS_TYPE(L, &PySet_Type)) {
        return PySet_Pop(L);
    }
    return __Pyx_PyObject_CallMethod0(L, __pyx_n_s_pop);
}
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L) {
    if (likely(PyList_GET_SIZE(L) > (((PyListObject*)L)->allocated >> 1))) {
        __Pyx_SET_SIZE(L, Py_SIZE(L) - 1);
        return PyList_GET_ITEM(L, PyList_GET_SIZE(L));
    }
    return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyList_Type_pop, L);
}
#endif

/* UnicodeAsUCS4 */
static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) {
   Py_ssize_t length;
   #if CYTHON_PEP393_ENABLED
   length = PyUnicode_GET_LENGTH(x);
   if (likely(length == 1)) {
       return PyUnicode_READ_CHAR(x, 0);
   }
   #else
   length = PyUnicode_GET_SIZE(x);
   if (likely(length == 1)) {
       return PyUnicode_AS_UNICODE(x)[0];
   }
   #if Py_UNICODE_SIZE == 2
   else if (PyUnicode_GET_SIZE(x) == 2) {
       Py_UCS4 high_val = PyUnicode_AS_UNICODE(x)[0];
       if (high_val >= 0xD800 && high_val <= 0xDBFF) {
           Py_UCS4 low_val = PyUnicode_AS_UNICODE(x)[1];
           if (low_val >= 0xDC00 && low_val <= 0xDFFF) {
               return 0x10000 + (((high_val & ((1<<10)-1)) << 10) | (low_val & ((1<<10)-1)));
           }
       }
   }
   #endif
   #endif
   PyErr_Format(PyExc_ValueError,
                "only single character unicode strings can be converted to Py_UCS4, "
                "got length %" CYTHON_FORMAT_SSIZE_T "d", length);
   return (Py_UCS4)-1;
}

/* object_ord */
static long __Pyx__PyObject_Ord(PyObject* c) {
    Py_ssize_t size;
    if (PyBytes_Check(c)) {
        size = PyBytes_GET_SIZE(c);
        if (likely(size == 1)) {
            return (unsigned char) PyBytes_AS_STRING(c)[0];
        }
#if PY_MAJOR_VERSION < 3
    } else if (PyUnicode_Check(c)) {
        return (long)__Pyx_PyUnicode_AsPy_UCS4(c);
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    } else if (PyByteArray_Check(c)) {
        size = PyByteArray_GET_SIZE(c);
        if (likely(size == 1)) {
            return (unsigned char) PyByteArray_AS_STRING(c)[0];
        }
#endif
    } else {
        __Pyx_TypeName c_type_name = __Pyx_PyType_GetName(Py_TYPE(c));
        PyErr_Format(PyExc_TypeError,
            "ord() expected string of length 1, but " __Pyx_FMT_TYPENAME " found",
            c_type_name);
        __Pyx_DECREF_TypeName(c_type_name);
        return (long)(Py_UCS4)-1;
    }
    PyErr_Format(PyExc_TypeError,
        "ord() expected a character, but string of length %zd found", size);
    return (long)(Py_UCS4)-1;
}

/* pop_index */
static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix) {
    PyObject *r;
    if (unlikely(!py_ix)) return NULL;
    r = __Pyx__PyObject_PopIndex(L, py_ix);
    Py_DECREF(py_ix);
    return r;
}
static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix) {
    return __Pyx_PyObject_CallMethod1(L, __pyx_n_s_pop, py_ix);
}
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix) {
    Py_ssize_t size = PyList_GET_SIZE(L);
    if (likely(size > (((PyListObject*)L)->allocated >> 1))) {
        Py_ssize_t cix = ix;
        if (cix < 0) {
            cix += size;
        }
        if (likely(__Pyx_is_valid_index(cix, size))) {
            PyObject* v = PyList_GET_ITEM(L, cix);
            __Pyx_SET_SIZE(L, Py_SIZE(L) - 1);
            size -= 1;
            memmove(&PyList_GET_ITEM(L, cix), &PyList_GET_ITEM(L, cix+1), (size_t)(size-cix)*sizeof(PyObject*));
            return v;
        }
    }
    if (py_ix == Py_None) {
        return __Pyx__PyObject_PopNewIndex(L, PyInt_FromSsize_t(ix));
    } else {
        return __Pyx__PyObject_PopIndex(L, py_ix);
    }
}
#endif

/* SliceTupleAndList */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) {
    Py_ssize_t start = *_start, stop = *_stop, length = *_length;
    if (start < 0) {
        start += length;
        if (start < 0)
            start = 0;
    }
    if (stop < 0)
        stop += length;
    else if (stop > length)
        stop = length;
    *_length = stop - start;
    *_start = start;
    *_stop = stop;
}
static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    Py_ssize_t length = PyList_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    if (length <= 0) {
        return PyList_New(0);
    }
    return __Pyx_PyList_FromArray(((PyListObject*)src)->ob_item + start, length);
}
static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(
            PyObject* src, Py_ssize_t start, Py_ssize_t stop) {
    Py_ssize_t length = PyTuple_GET_SIZE(src);
    __Pyx_crop_slice(&start, &stop, &length);
    return __Pyx_PyTuple_FromArray(((PyTupleObject*)src)->ob_item + start, length);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddCObj(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        const long a = intval;
        long x;
        long b = PyInt_AS_LONG(op2);
        
            x = (long)((unsigned long)a + (unsigned long)b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op2))) {
        const long a = intval;
        long b, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG lla = intval;
        PY_LONG_LONG llb, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op2))) {
            return __Pyx_NewRef(op1);
        }
        if (likely(__Pyx_PyLong_IsCompact(op2))) {
            b = __Pyx_PyLong_CompactValue(op2);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op2);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op2);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        b = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        b = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        b = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        llb = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op2)) {
        const long a = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double b = __pyx_PyFloat_AsDouble(op2);
#else
        double b = PyFloat_AS_DOUBLE(op2);
#endif
            double result;
            
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_FloorDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
        
            if (unlikely(b == -1 && ((unsigned long)a) == 0-(unsigned long)a))
                return PyInt_Type.tp_as_number->nb_floor_divide(op1, op2);
            else {
                long q, r;
                q = a / b;
                r = a - q*b;
                q -= ((r != 0) & ((r ^ b) < 0));
                x = q;
            }
            return PyInt_FromLong(x);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
            return __Pyx_NewRef(op1);
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_floor_divide(op1, op2);
            }
        }
                {
                    long q, r;
                    q = a / b;
                    r = a - q*b;
                    q -= ((r != 0) & ((r ^ b) < 0));
                    x = q;
                }
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                {
                    PY_LONG_LONG q, r;
                    q = lla / llb;
                    r = lla - q*llb;
                    q -= ((r != 0) & ((r ^ llb) < 0));
                    llx = q;
                }
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceFloorDivide : PyNumber_FloorDivide)(op1, op2);
}
#endif

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

/* GetItemIntByteArray */
static CYTHON_INLINE int __Pyx_GetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i,
                                                         int wraparound, int boundscheck) {
    Py_ssize_t length;
    if (wraparound | boundscheck) {
        length = PyByteArray_GET_SIZE(string);
        if (wraparound & unlikely(i < 0)) i += length;
        if ((!boundscheck) || likely(__Pyx_is_valid_index(i, length))) {
            return (unsigned char) (PyByteArray_AS_STRING(string)[i]);
        } else {
            PyErr_SetString(PyExc_IndexError, "bytearray index out of range");
            return -1;
        }
    } else {
        return (unsigned char) (PyByteArray_AS_STRING(string)[i]);
    }
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_RshiftObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        
            return PyInt_FromLong(a >> b);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
            return __Pyx_NewRef(op1);
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_rshift(op1, op2);
            }
        }
                x = a >> b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla >> llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceRshift : PyNumber_Rshift)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AndObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        
            return PyInt_FromLong(a & b);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        if ((intval & PyLong_MASK) == intval) {
            long last_digit = (long) __Pyx_PyLong_Digits(op1)[0];
            long result = intval & (likely(__Pyx_PyLong_IsPos(op1)) ? last_digit : (PyLong_MASK - last_digit + 1));
            return PyLong_FromLong(result);
        }
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
            return __Pyx_NewRef(op1);
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_and(op1, op2);
            }
        }
                x = a & b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla & llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceAnd : PyNumber_And)(op1, op2);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_LshiftObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        
            if (likely(b < (long) (sizeof(long)*8) && a == (a << b) >> b) || !a) {
                return PyInt_FromLong(a << b);
            }
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
            return __Pyx_NewRef(op1);
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_lshift(op1, op2);
            }
        }
                x = a << b;
#ifdef HAVE_LONG_LONG
                if (unlikely(!(b < (long) (sizeof(long)*8) && a == x >> b)) && a) {
                    lla = a;
                    goto long_long;
                }
#else
                if (likely(b < (long) (sizeof(long)*8) && a == x >> b) || !a)
#endif
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla << llb;
                if (likely(lla == llx >> llb))
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    return (inplace ? PyNumber_InPlaceLshift : PyNumber_Lshift)(op1, op2);
}
#endif

/* PySequenceMultiply */
static PyObject* __Pyx_PySequence_Multiply_Generic(PyObject *seq, Py_ssize_t mul) {
    PyObject *result, *pymul = PyInt_FromSsize_t(mul);
    if (unlikely(!pymul))
        return NULL;
    result = PyNumber_Multiply(seq, pymul);
    Py_DECREF(pymul);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul) {
#if CYTHON_USE_TYPE_SLOTS
    PyTypeObject *type = Py_TYPE(seq);
    if (likely(type->tp_as_sequence && type->tp_as_sequence->sq_repeat)) {
        return type->tp_as_sequence->sq_repeat(seq, mul);
    } else
#endif
    {
        return __Pyx_PySequence_Multiply_Generic(seq, mul);
    }
}

/* UnicodeConcatInPlace */
# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
static int
__Pyx_unicode_modifiable(PyObject *unicode)
{
    if (Py_REFCNT(unicode) != 1)
        return 0;
    if (!PyUnicode_CheckExact(unicode))
        return 0;
    if (PyUnicode_CHECK_INTERNED(unicode))
        return 0;
    return 1;
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    ) {
    PyObject *left = *p_left;
    Py_ssize_t left_len, right_len, new_len;
    if (unlikely(__Pyx_PyUnicode_READY(left) == -1))
        return NULL;
    if (unlikely(__Pyx_PyUnicode_READY(right) == -1))
        return NULL;
    left_len = PyUnicode_GET_LENGTH(left);
    if (left_len == 0) {
        Py_INCREF(right);
        return right;
    }
    right_len = PyUnicode_GET_LENGTH(right);
    if (right_len == 0) {
        Py_INCREF(left);
        return left;
    }
    if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) {
        PyErr_SetString(PyExc_OverflowError,
                        "strings are too large to concat");
        return NULL;
    }
    new_len = left_len + right_len;
    if (__Pyx_unicode_modifiable(left)
            && PyUnicode_CheckExact(right)
            && PyUnicode_KIND(right) <= PyUnicode_KIND(left)
            && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) {
        int ret;
        __Pyx_GIVEREF(*p_left);
        ret = PyUnicode_Resize(p_left, new_len);
        __Pyx_GOTREF(*p_left);
        if (unlikely(ret != 0))
            return NULL;
        #if PY_VERSION_HEX >= 0x030d0000
        if (unlikely(PyUnicode_CopyCharacters(*p_left, left_len, right, 0, right_len) < 0)) return NULL;
        #else
        _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len);
        #endif
        __Pyx_INCREF(*p_left);
        __Pyx_GIVEREF(*p_left);
        return *p_left;
    } else {
        return __Pyx_PyUnicode_Concat(left, right);
    }
  }
#endif

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

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

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

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

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

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

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

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

/* GetNameInClass */
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    PyObject *dict;
    assert(PyType_Check(nmspace));
#if CYTHON_USE_TYPE_SLOTS
    dict = ((PyTypeObject*)nmspace)->tp_dict;
    Py_XINCREF(dict);
#else
    dict = PyObject_GetAttr(nmspace, __pyx_n_s_dict);
#endif
    if (likely(dict)) {
        result = PyObject_GetItem(dict, name);
        Py_DECREF(dict);
        if (result) {
            return result;
        }
    }
    PyErr_Clear();
    __Pyx_GetModuleGlobalNameUncached(result, name);
    return result;
}

/* ClassMethod */
static PyObject* __Pyx_Method_ClassMethod(PyObject *method) {
#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000
    if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) {
        return PyClassMethod_New(method);
    }
#else
#if CYTHON_COMPILING_IN_PYPY
    if (PyMethodDescr_Check(method))
#else
    #if PY_MAJOR_VERSION == 2
    static PyTypeObject *methoddescr_type = NULL;
    if (unlikely(methoddescr_type == NULL)) {
       PyObject *meth = PyObject_GetAttrString((PyObject*)&PyList_Type, "append");
       if (unlikely(!meth)) return NULL;
       methoddescr_type = Py_TYPE(meth);
       Py_DECREF(meth);
    }
    #else
    PyTypeObject *methoddescr_type = &PyMethodDescr_Type;
    #endif
    if (__Pyx_TypeCheck(method, methoddescr_type))
#endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject *)method;
        #if PY_VERSION_HEX < 0x03020000
        PyTypeObject *d_type = descr->d_type;
        #else
        PyTypeObject *d_type = descr->d_common.d_type;
        #endif
        return PyDescr_NewClassMethod(d_type, descr->d_method);
    }
#endif
    else if (PyMethod_Check(method)) {
        return PyClassMethod_New(PyMethod_GET_FUNCTION(method));
    }
    else {
        return PyClassMethod_New(method);
    }
}

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

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

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

/* FromPy */
static __pyx_t_double_complex __Pyx_PyComplex_As___pyx_t_double_complex(PyObject* o) {
    Py_complex cval;
#if !CYTHON_COMPILING_IN_PYPY
    if (PyComplex_CheckExact(o))
        cval = ((PyComplexObject *)o)->cval;
    else
#endif
        cval = PyComplex_AsCComplex(o);
    return __pyx_t_double_complex_from_parts(
               (double)cval.real,
               (double)cval.imag);
}

/* 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_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_KLPStrandType(KLPStrandType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const KLPStrandType neg_one = (KLPStrandType) -1, const_zero = (KLPStrandType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(KLPStrandType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(KLPStrandType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(KLPStrandType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(KLPStrandType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(KLPStrandType) <= 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(KLPStrandType),
                                     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(KLPStrandType));
        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_KLPCrossingType(KLPCrossingType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const KLPCrossingType neg_one = (KLPCrossingType) -1, const_zero = (KLPCrossingType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(KLPCrossingType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(KLPCrossingType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(KLPCrossingType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(KLPCrossingType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(KLPCrossingType) <= 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(KLPCrossingType),
                                     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(KLPCrossingType));
        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_Boolean(Boolean value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Boolean neg_one = (Boolean) -1, const_zero = (Boolean) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(Boolean) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(Boolean) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(Boolean) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(Boolean) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(Boolean) <= 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(Boolean),
                                     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(Boolean));
        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_Orientability(Orientability value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Orientability neg_one = (Orientability) -1, const_zero = (Orientability) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(Orientability) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(Orientability) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(Orientability) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(Orientability) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(Orientability) <= 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(Orientability),
                                     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(Orientability));
        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_FuncResult(FuncResult value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const FuncResult neg_one = (FuncResult) -1, const_zero = (FuncResult) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(FuncResult) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(FuncResult) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(FuncResult) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(FuncResult) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(FuncResult) <= 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(FuncResult),
                                     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(FuncResult));
        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_Permutation(Permutation value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Permutation neg_one = (Permutation) -1, const_zero = (Permutation) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(Permutation) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(Permutation) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(Permutation) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(Permutation) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(Permutation) <= 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(Permutation),
                                     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(Permutation));
        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 Boolean __Pyx_PyInt_As_Boolean(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Boolean neg_one = (Boolean) -1, const_zero = (Boolean) 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(Boolean) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(Boolean, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (Boolean) 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(Boolean, __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(Boolean) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Boolean, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Boolean) >= 2 * PyLong_SHIFT)) {
                                return (Boolean) (((((Boolean)digits[1]) << PyLong_SHIFT) | (Boolean)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(Boolean) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Boolean, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Boolean) >= 3 * PyLong_SHIFT)) {
                                return (Boolean) (((((((Boolean)digits[2]) << PyLong_SHIFT) | (Boolean)digits[1]) << PyLong_SHIFT) | (Boolean)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(Boolean) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Boolean, 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(Boolean) >= 4 * PyLong_SHIFT)) {
                                return (Boolean) (((((((((Boolean)digits[3]) << PyLong_SHIFT) | (Boolean)digits[2]) << PyLong_SHIFT) | (Boolean)digits[1]) << PyLong_SHIFT) | (Boolean)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 (Boolean) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(Boolean) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(Boolean, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(Boolean) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(Boolean, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(Boolean, __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(Boolean) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Boolean, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Boolean) - 1 > 2 * PyLong_SHIFT)) {
                                return (Boolean) (((Boolean)-1)*(((((Boolean)digits[1]) << PyLong_SHIFT) | (Boolean)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(Boolean) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Boolean, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Boolean) - 1 > 2 * PyLong_SHIFT)) {
                                return (Boolean) ((((((Boolean)digits[1]) << PyLong_SHIFT) | (Boolean)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(Boolean) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Boolean, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Boolean) - 1 > 3 * PyLong_SHIFT)) {
                                return (Boolean) (((Boolean)-1)*(((((((Boolean)digits[2]) << PyLong_SHIFT) | (Boolean)digits[1]) << PyLong_SHIFT) | (Boolean)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(Boolean) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Boolean, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Boolean) - 1 > 3 * PyLong_SHIFT)) {
                                return (Boolean) ((((((((Boolean)digits[2]) << PyLong_SHIFT) | (Boolean)digits[1]) << PyLong_SHIFT) | (Boolean)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(Boolean) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Boolean, 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(Boolean) - 1 > 4 * PyLong_SHIFT)) {
                                return (Boolean) (((Boolean)-1)*(((((((((Boolean)digits[3]) << PyLong_SHIFT) | (Boolean)digits[2]) << PyLong_SHIFT) | (Boolean)digits[1]) << PyLong_SHIFT) | (Boolean)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(Boolean) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Boolean, 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(Boolean) - 1 > 4 * PyLong_SHIFT)) {
                                return (Boolean) ((((((((((Boolean)digits[3]) << PyLong_SHIFT) | (Boolean)digits[2]) << PyLong_SHIFT) | (Boolean)digits[1]) << PyLong_SHIFT) | (Boolean)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(Boolean) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(Boolean, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(Boolean) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(Boolean, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            Boolean 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 (Boolean) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (Boolean) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (Boolean) -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 (Boolean) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (Boolean) 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(Boolean) * 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 |= ((Boolean) 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(Boolean) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((Boolean) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((Boolean) 1) << (sizeof(Boolean) * 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 (Boolean) -1;
        }
    } else {
        Boolean val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (Boolean) -1;
        val = __Pyx_PyInt_As_Boolean(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to Boolean");
    return (Boolean) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to Boolean");
    return (Boolean) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CuspTopology(CuspTopology value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const CuspTopology neg_one = (CuspTopology) -1, const_zero = (CuspTopology) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(CuspTopology) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(CuspTopology) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CuspTopology) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(CuspTopology) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CuspTopology) <= 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(CuspTopology),
                                     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(CuspTopology));
        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;
}

/* CIntFromPy */
static CYTHON_INLINE VertexIndex __Pyx_PyInt_As_VertexIndex(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const VertexIndex neg_one = (VertexIndex) -1, const_zero = (VertexIndex) 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(VertexIndex) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(VertexIndex, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (VertexIndex) 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(VertexIndex, __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(VertexIndex) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(VertexIndex, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(VertexIndex) >= 2 * PyLong_SHIFT)) {
                                return (VertexIndex) (((((VertexIndex)digits[1]) << PyLong_SHIFT) | (VertexIndex)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(VertexIndex) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(VertexIndex, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(VertexIndex) >= 3 * PyLong_SHIFT)) {
                                return (VertexIndex) (((((((VertexIndex)digits[2]) << PyLong_SHIFT) | (VertexIndex)digits[1]) << PyLong_SHIFT) | (VertexIndex)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(VertexIndex) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(VertexIndex, 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(VertexIndex) >= 4 * PyLong_SHIFT)) {
                                return (VertexIndex) (((((((((VertexIndex)digits[3]) << PyLong_SHIFT) | (VertexIndex)digits[2]) << PyLong_SHIFT) | (VertexIndex)digits[1]) << PyLong_SHIFT) | (VertexIndex)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 (VertexIndex) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(VertexIndex) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(VertexIndex, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(VertexIndex) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(VertexIndex, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(VertexIndex, __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(VertexIndex) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(VertexIndex, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(VertexIndex) - 1 > 2 * PyLong_SHIFT)) {
                                return (VertexIndex) (((VertexIndex)-1)*(((((VertexIndex)digits[1]) << PyLong_SHIFT) | (VertexIndex)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(VertexIndex) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(VertexIndex, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(VertexIndex) - 1 > 2 * PyLong_SHIFT)) {
                                return (VertexIndex) ((((((VertexIndex)digits[1]) << PyLong_SHIFT) | (VertexIndex)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(VertexIndex) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(VertexIndex, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(VertexIndex) - 1 > 3 * PyLong_SHIFT)) {
                                return (VertexIndex) (((VertexIndex)-1)*(((((((VertexIndex)digits[2]) << PyLong_SHIFT) | (VertexIndex)digits[1]) << PyLong_SHIFT) | (VertexIndex)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(VertexIndex) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(VertexIndex, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(VertexIndex) - 1 > 3 * PyLong_SHIFT)) {
                                return (VertexIndex) ((((((((VertexIndex)digits[2]) << PyLong_SHIFT) | (VertexIndex)digits[1]) << PyLong_SHIFT) | (VertexIndex)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(VertexIndex) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(VertexIndex, 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(VertexIndex) - 1 > 4 * PyLong_SHIFT)) {
                                return (VertexIndex) (((VertexIndex)-1)*(((((((((VertexIndex)digits[3]) << PyLong_SHIFT) | (VertexIndex)digits[2]) << PyLong_SHIFT) | (VertexIndex)digits[1]) << PyLong_SHIFT) | (VertexIndex)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(VertexIndex) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(VertexIndex, 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(VertexIndex) - 1 > 4 * PyLong_SHIFT)) {
                                return (VertexIndex) ((((((((((VertexIndex)digits[3]) << PyLong_SHIFT) | (VertexIndex)digits[2]) << PyLong_SHIFT) | (VertexIndex)digits[1]) << PyLong_SHIFT) | (VertexIndex)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(VertexIndex) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(VertexIndex, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(VertexIndex) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(VertexIndex, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            VertexIndex 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 (VertexIndex) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (VertexIndex) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (VertexIndex) -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 (VertexIndex) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (VertexIndex) 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(VertexIndex) * 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 |= ((VertexIndex) 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(VertexIndex) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((VertexIndex) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((VertexIndex) 1) << (sizeof(VertexIndex) * 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 (VertexIndex) -1;
        }
    } else {
        VertexIndex val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (VertexIndex) -1;
        val = __Pyx_PyInt_As_VertexIndex(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to VertexIndex");
    return (VertexIndex) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to VertexIndex");
    return (VertexIndex) -1;
}

/* CIntFromPy */
static CYTHON_INLINE FaceIndex __Pyx_PyInt_As_FaceIndex(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const FaceIndex neg_one = (FaceIndex) -1, const_zero = (FaceIndex) 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(FaceIndex) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(FaceIndex, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (FaceIndex) 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(FaceIndex, __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(FaceIndex) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(FaceIndex, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(FaceIndex) >= 2 * PyLong_SHIFT)) {
                                return (FaceIndex) (((((FaceIndex)digits[1]) << PyLong_SHIFT) | (FaceIndex)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(FaceIndex) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(FaceIndex, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(FaceIndex) >= 3 * PyLong_SHIFT)) {
                                return (FaceIndex) (((((((FaceIndex)digits[2]) << PyLong_SHIFT) | (FaceIndex)digits[1]) << PyLong_SHIFT) | (FaceIndex)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(FaceIndex) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(FaceIndex, 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(FaceIndex) >= 4 * PyLong_SHIFT)) {
                                return (FaceIndex) (((((((((FaceIndex)digits[3]) << PyLong_SHIFT) | (FaceIndex)digits[2]) << PyLong_SHIFT) | (FaceIndex)digits[1]) << PyLong_SHIFT) | (FaceIndex)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 (FaceIndex) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(FaceIndex) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(FaceIndex, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(FaceIndex) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(FaceIndex, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(FaceIndex, __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(FaceIndex) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(FaceIndex, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(FaceIndex) - 1 > 2 * PyLong_SHIFT)) {
                                return (FaceIndex) (((FaceIndex)-1)*(((((FaceIndex)digits[1]) << PyLong_SHIFT) | (FaceIndex)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(FaceIndex) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(FaceIndex, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(FaceIndex) - 1 > 2 * PyLong_SHIFT)) {
                                return (FaceIndex) ((((((FaceIndex)digits[1]) << PyLong_SHIFT) | (FaceIndex)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(FaceIndex) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(FaceIndex, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(FaceIndex) - 1 > 3 * PyLong_SHIFT)) {
                                return (FaceIndex) (((FaceIndex)-1)*(((((((FaceIndex)digits[2]) << PyLong_SHIFT) | (FaceIndex)digits[1]) << PyLong_SHIFT) | (FaceIndex)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(FaceIndex) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(FaceIndex, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(FaceIndex) - 1 > 3 * PyLong_SHIFT)) {
                                return (FaceIndex) ((((((((FaceIndex)digits[2]) << PyLong_SHIFT) | (FaceIndex)digits[1]) << PyLong_SHIFT) | (FaceIndex)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(FaceIndex) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(FaceIndex, 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(FaceIndex) - 1 > 4 * PyLong_SHIFT)) {
                                return (FaceIndex) (((FaceIndex)-1)*(((((((((FaceIndex)digits[3]) << PyLong_SHIFT) | (FaceIndex)digits[2]) << PyLong_SHIFT) | (FaceIndex)digits[1]) << PyLong_SHIFT) | (FaceIndex)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(FaceIndex) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(FaceIndex, 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(FaceIndex) - 1 > 4 * PyLong_SHIFT)) {
                                return (FaceIndex) ((((((((((FaceIndex)digits[3]) << PyLong_SHIFT) | (FaceIndex)digits[2]) << PyLong_SHIFT) | (FaceIndex)digits[1]) << PyLong_SHIFT) | (FaceIndex)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(FaceIndex) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(FaceIndex, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(FaceIndex) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(FaceIndex, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            FaceIndex 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 (FaceIndex) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (FaceIndex) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (FaceIndex) -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 (FaceIndex) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (FaceIndex) 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(FaceIndex) * 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 |= ((FaceIndex) 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(FaceIndex) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((FaceIndex) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((FaceIndex) 1) << (sizeof(FaceIndex) * 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 (FaceIndex) -1;
        }
    } else {
        FaceIndex val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (FaceIndex) -1;
        val = __Pyx_PyInt_As_FaceIndex(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to FaceIndex");
    return (FaceIndex) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to FaceIndex");
    return (FaceIndex) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Orientation(Orientation value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Orientation neg_one = (Orientation) -1, const_zero = (Orientation) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(Orientation) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(Orientation) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(Orientation) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(Orientation) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(Orientation) <= 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(Orientation),
                                     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(Orientation));
        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 Orientation __Pyx_PyInt_As_Orientation(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Orientation neg_one = (Orientation) -1, const_zero = (Orientation) 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(Orientation) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(Orientation, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (Orientation) 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(Orientation, __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(Orientation) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientation, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Orientation) >= 2 * PyLong_SHIFT)) {
                                return (Orientation) (((((Orientation)digits[1]) << PyLong_SHIFT) | (Orientation)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(Orientation) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientation, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Orientation) >= 3 * PyLong_SHIFT)) {
                                return (Orientation) (((((((Orientation)digits[2]) << PyLong_SHIFT) | (Orientation)digits[1]) << PyLong_SHIFT) | (Orientation)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(Orientation) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientation, 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(Orientation) >= 4 * PyLong_SHIFT)) {
                                return (Orientation) (((((((((Orientation)digits[3]) << PyLong_SHIFT) | (Orientation)digits[2]) << PyLong_SHIFT) | (Orientation)digits[1]) << PyLong_SHIFT) | (Orientation)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 (Orientation) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(Orientation) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(Orientation, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(Orientation) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(Orientation, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(Orientation, __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(Orientation) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientation, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Orientation) - 1 > 2 * PyLong_SHIFT)) {
                                return (Orientation) (((Orientation)-1)*(((((Orientation)digits[1]) << PyLong_SHIFT) | (Orientation)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(Orientation) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientation, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Orientation) - 1 > 2 * PyLong_SHIFT)) {
                                return (Orientation) ((((((Orientation)digits[1]) << PyLong_SHIFT) | (Orientation)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(Orientation) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientation, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Orientation) - 1 > 3 * PyLong_SHIFT)) {
                                return (Orientation) (((Orientation)-1)*(((((((Orientation)digits[2]) << PyLong_SHIFT) | (Orientation)digits[1]) << PyLong_SHIFT) | (Orientation)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(Orientation) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientation, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Orientation) - 1 > 3 * PyLong_SHIFT)) {
                                return (Orientation) ((((((((Orientation)digits[2]) << PyLong_SHIFT) | (Orientation)digits[1]) << PyLong_SHIFT) | (Orientation)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(Orientation) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientation, 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(Orientation) - 1 > 4 * PyLong_SHIFT)) {
                                return (Orientation) (((Orientation)-1)*(((((((((Orientation)digits[3]) << PyLong_SHIFT) | (Orientation)digits[2]) << PyLong_SHIFT) | (Orientation)digits[1]) << PyLong_SHIFT) | (Orientation)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(Orientation) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientation, 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(Orientation) - 1 > 4 * PyLong_SHIFT)) {
                                return (Orientation) ((((((((((Orientation)digits[3]) << PyLong_SHIFT) | (Orientation)digits[2]) << PyLong_SHIFT) | (Orientation)digits[1]) << PyLong_SHIFT) | (Orientation)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(Orientation) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(Orientation, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(Orientation) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(Orientation, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            Orientation 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 (Orientation) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (Orientation) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (Orientation) -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 (Orientation) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (Orientation) 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(Orientation) * 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 |= ((Orientation) 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(Orientation) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((Orientation) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((Orientation) 1) << (sizeof(Orientation) * 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 (Orientation) -1;
        }
    } else {
        Orientation val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (Orientation) -1;
        val = __Pyx_PyInt_As_Orientation(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to Orientation");
    return (Orientation) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to Orientation");
    return (Orientation) -1;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_MatrixEntry(MatrixEntry value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const MatrixEntry neg_one = (MatrixEntry) -1, const_zero = (MatrixEntry) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(MatrixEntry) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(MatrixEntry) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(MatrixEntry) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(MatrixEntry) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(MatrixEntry) <= 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(MatrixEntry),
                                     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(MatrixEntry));
        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_CoveringType(CoveringType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const CoveringType neg_one = (CoveringType) -1, const_zero = (CoveringType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(CoveringType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(CoveringType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CoveringType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(CoveringType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CoveringType) <= 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(CoveringType),
                                     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(CoveringType));
        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_SolutionType(SolutionType value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const SolutionType neg_one = (SolutionType) -1, const_zero = (SolutionType) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(SolutionType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(SolutionType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SolutionType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(SolutionType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(SolutionType) <= 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(SolutionType),
                                     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(SolutionType));
        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_MatrixParity(MatrixParity value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const MatrixParity neg_one = (MatrixParity) -1, const_zero = (MatrixParity) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(MatrixParity) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(MatrixParity) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(MatrixParity) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(MatrixParity) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(MatrixParity) <= 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(MatrixParity),
                                     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(MatrixParity));
        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_Orbifold1(Orbifold1 value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Orbifold1 neg_one = (Orbifold1) -1, const_zero = (Orbifold1) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(Orbifold1) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(Orbifold1) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(Orbifold1) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(Orbifold1) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(Orbifold1) <= 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(Orbifold1),
                                     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(Orbifold1));
        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_unsigned_char(unsigned char value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned char neg_one = (unsigned char) -1, const_zero = (unsigned char) 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 char) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned char) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned char) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned char) <= 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 char),
                                     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 char));
        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 Permutation __Pyx_PyInt_As_Permutation(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Permutation neg_one = (Permutation) -1, const_zero = (Permutation) 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(Permutation) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(Permutation, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (Permutation) 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(Permutation, __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(Permutation) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Permutation, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Permutation) >= 2 * PyLong_SHIFT)) {
                                return (Permutation) (((((Permutation)digits[1]) << PyLong_SHIFT) | (Permutation)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(Permutation) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Permutation, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Permutation) >= 3 * PyLong_SHIFT)) {
                                return (Permutation) (((((((Permutation)digits[2]) << PyLong_SHIFT) | (Permutation)digits[1]) << PyLong_SHIFT) | (Permutation)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(Permutation) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Permutation, 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(Permutation) >= 4 * PyLong_SHIFT)) {
                                return (Permutation) (((((((((Permutation)digits[3]) << PyLong_SHIFT) | (Permutation)digits[2]) << PyLong_SHIFT) | (Permutation)digits[1]) << PyLong_SHIFT) | (Permutation)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 (Permutation) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(Permutation) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(Permutation, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(Permutation) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(Permutation, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(Permutation, __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(Permutation) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Permutation, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Permutation) - 1 > 2 * PyLong_SHIFT)) {
                                return (Permutation) (((Permutation)-1)*(((((Permutation)digits[1]) << PyLong_SHIFT) | (Permutation)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(Permutation) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Permutation, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Permutation) - 1 > 2 * PyLong_SHIFT)) {
                                return (Permutation) ((((((Permutation)digits[1]) << PyLong_SHIFT) | (Permutation)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(Permutation) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Permutation, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Permutation) - 1 > 3 * PyLong_SHIFT)) {
                                return (Permutation) (((Permutation)-1)*(((((((Permutation)digits[2]) << PyLong_SHIFT) | (Permutation)digits[1]) << PyLong_SHIFT) | (Permutation)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(Permutation) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Permutation, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Permutation) - 1 > 3 * PyLong_SHIFT)) {
                                return (Permutation) ((((((((Permutation)digits[2]) << PyLong_SHIFT) | (Permutation)digits[1]) << PyLong_SHIFT) | (Permutation)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(Permutation) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Permutation, 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(Permutation) - 1 > 4 * PyLong_SHIFT)) {
                                return (Permutation) (((Permutation)-1)*(((((((((Permutation)digits[3]) << PyLong_SHIFT) | (Permutation)digits[2]) << PyLong_SHIFT) | (Permutation)digits[1]) << PyLong_SHIFT) | (Permutation)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(Permutation) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Permutation, 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(Permutation) - 1 > 4 * PyLong_SHIFT)) {
                                return (Permutation) ((((((((((Permutation)digits[3]) << PyLong_SHIFT) | (Permutation)digits[2]) << PyLong_SHIFT) | (Permutation)digits[1]) << PyLong_SHIFT) | (Permutation)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(Permutation) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(Permutation, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(Permutation) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(Permutation, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            Permutation 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 (Permutation) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (Permutation) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (Permutation) -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 (Permutation) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (Permutation) 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(Permutation) * 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 |= ((Permutation) 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(Permutation) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((Permutation) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((Permutation) 1) << (sizeof(Permutation) * 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 (Permutation) -1;
        }
    } else {
        Permutation val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (Permutation) -1;
        val = __Pyx_PyInt_As_Permutation(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to Permutation");
    return (Permutation) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to Permutation");
    return (Permutation) -1;
}

/* CIntFromPy */
static CYTHON_INLINE Orientability __Pyx_PyInt_As_Orientability(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const Orientability neg_one = (Orientability) -1, const_zero = (Orientability) 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(Orientability) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(Orientability, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (Orientability) 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(Orientability, __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(Orientability) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientability, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Orientability) >= 2 * PyLong_SHIFT)) {
                                return (Orientability) (((((Orientability)digits[1]) << PyLong_SHIFT) | (Orientability)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(Orientability) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientability, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Orientability) >= 3 * PyLong_SHIFT)) {
                                return (Orientability) (((((((Orientability)digits[2]) << PyLong_SHIFT) | (Orientability)digits[1]) << PyLong_SHIFT) | (Orientability)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(Orientability) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientability, 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(Orientability) >= 4 * PyLong_SHIFT)) {
                                return (Orientability) (((((((((Orientability)digits[3]) << PyLong_SHIFT) | (Orientability)digits[2]) << PyLong_SHIFT) | (Orientability)digits[1]) << PyLong_SHIFT) | (Orientability)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 (Orientability) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(Orientability) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(Orientability, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(Orientability) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(Orientability, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(Orientability, __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(Orientability) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientability, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Orientability) - 1 > 2 * PyLong_SHIFT)) {
                                return (Orientability) (((Orientability)-1)*(((((Orientability)digits[1]) << PyLong_SHIFT) | (Orientability)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(Orientability) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientability, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Orientability) - 1 > 2 * PyLong_SHIFT)) {
                                return (Orientability) ((((((Orientability)digits[1]) << PyLong_SHIFT) | (Orientability)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(Orientability) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientability, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Orientability) - 1 > 3 * PyLong_SHIFT)) {
                                return (Orientability) (((Orientability)-1)*(((((((Orientability)digits[2]) << PyLong_SHIFT) | (Orientability)digits[1]) << PyLong_SHIFT) | (Orientability)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(Orientability) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientability, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(Orientability) - 1 > 3 * PyLong_SHIFT)) {
                                return (Orientability) ((((((((Orientability)digits[2]) << PyLong_SHIFT) | (Orientability)digits[1]) << PyLong_SHIFT) | (Orientability)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(Orientability) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientability, 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(Orientability) - 1 > 4 * PyLong_SHIFT)) {
                                return (Orientability) (((Orientability)-1)*(((((((((Orientability)digits[3]) << PyLong_SHIFT) | (Orientability)digits[2]) << PyLong_SHIFT) | (Orientability)digits[1]) << PyLong_SHIFT) | (Orientability)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(Orientability) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(Orientability, 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(Orientability) - 1 > 4 * PyLong_SHIFT)) {
                                return (Orientability) ((((((((((Orientability)digits[3]) << PyLong_SHIFT) | (Orientability)digits[2]) << PyLong_SHIFT) | (Orientability)digits[1]) << PyLong_SHIFT) | (Orientability)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(Orientability) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(Orientability, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(Orientability) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(Orientability, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() not available, cannot convert large enums");
        return (Orientability) -1;
    } else {
        Orientability val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (Orientability) -1;
        val = __Pyx_PyInt_As_Orientability(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to Orientability");
    return (Orientability) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to Orientability");
    return (Orientability) -1;
}

/* CIntFromPy */
static CYTHON_INLINE KLPStrandType __Pyx_PyInt_As_KLPStrandType(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const KLPStrandType neg_one = (KLPStrandType) -1, const_zero = (KLPStrandType) 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(KLPStrandType) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(KLPStrandType, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (KLPStrandType) 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(KLPStrandType, __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(KLPStrandType) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPStrandType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(KLPStrandType) >= 2 * PyLong_SHIFT)) {
                                return (KLPStrandType) (((((KLPStrandType)digits[1]) << PyLong_SHIFT) | (KLPStrandType)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(KLPStrandType) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPStrandType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(KLPStrandType) >= 3 * PyLong_SHIFT)) {
                                return (KLPStrandType) (((((((KLPStrandType)digits[2]) << PyLong_SHIFT) | (KLPStrandType)digits[1]) << PyLong_SHIFT) | (KLPStrandType)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(KLPStrandType) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPStrandType, 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(KLPStrandType) >= 4 * PyLong_SHIFT)) {
                                return (KLPStrandType) (((((((((KLPStrandType)digits[3]) << PyLong_SHIFT) | (KLPStrandType)digits[2]) << PyLong_SHIFT) | (KLPStrandType)digits[1]) << PyLong_SHIFT) | (KLPStrandType)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 (KLPStrandType) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(KLPStrandType) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(KLPStrandType, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(KLPStrandType) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(KLPStrandType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(KLPStrandType, __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(KLPStrandType) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPStrandType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(KLPStrandType) - 1 > 2 * PyLong_SHIFT)) {
                                return (KLPStrandType) (((KLPStrandType)-1)*(((((KLPStrandType)digits[1]) << PyLong_SHIFT) | (KLPStrandType)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(KLPStrandType) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPStrandType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(KLPStrandType) - 1 > 2 * PyLong_SHIFT)) {
                                return (KLPStrandType) ((((((KLPStrandType)digits[1]) << PyLong_SHIFT) | (KLPStrandType)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(KLPStrandType) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPStrandType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(KLPStrandType) - 1 > 3 * PyLong_SHIFT)) {
                                return (KLPStrandType) (((KLPStrandType)-1)*(((((((KLPStrandType)digits[2]) << PyLong_SHIFT) | (KLPStrandType)digits[1]) << PyLong_SHIFT) | (KLPStrandType)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(KLPStrandType) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPStrandType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(KLPStrandType) - 1 > 3 * PyLong_SHIFT)) {
                                return (KLPStrandType) ((((((((KLPStrandType)digits[2]) << PyLong_SHIFT) | (KLPStrandType)digits[1]) << PyLong_SHIFT) | (KLPStrandType)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(KLPStrandType) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPStrandType, 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(KLPStrandType) - 1 > 4 * PyLong_SHIFT)) {
                                return (KLPStrandType) (((KLPStrandType)-1)*(((((((((KLPStrandType)digits[3]) << PyLong_SHIFT) | (KLPStrandType)digits[2]) << PyLong_SHIFT) | (KLPStrandType)digits[1]) << PyLong_SHIFT) | (KLPStrandType)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(KLPStrandType) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPStrandType, 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(KLPStrandType) - 1 > 4 * PyLong_SHIFT)) {
                                return (KLPStrandType) ((((((((((KLPStrandType)digits[3]) << PyLong_SHIFT) | (KLPStrandType)digits[2]) << PyLong_SHIFT) | (KLPStrandType)digits[1]) << PyLong_SHIFT) | (KLPStrandType)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(KLPStrandType) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(KLPStrandType, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(KLPStrandType) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(KLPStrandType, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() not available, cannot convert large enums");
        return (KLPStrandType) -1;
    } else {
        KLPStrandType val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (KLPStrandType) -1;
        val = __Pyx_PyInt_As_KLPStrandType(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to KLPStrandType");
    return (KLPStrandType) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to KLPStrandType");
    return (KLPStrandType) -1;
}

/* CIntFromPy */
static CYTHON_INLINE KLPCrossingType __Pyx_PyInt_As_KLPCrossingType(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const KLPCrossingType neg_one = (KLPCrossingType) -1, const_zero = (KLPCrossingType) 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(KLPCrossingType) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(KLPCrossingType, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (KLPCrossingType) 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(KLPCrossingType, __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(KLPCrossingType) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPCrossingType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(KLPCrossingType) >= 2 * PyLong_SHIFT)) {
                                return (KLPCrossingType) (((((KLPCrossingType)digits[1]) << PyLong_SHIFT) | (KLPCrossingType)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(KLPCrossingType) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPCrossingType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(KLPCrossingType) >= 3 * PyLong_SHIFT)) {
                                return (KLPCrossingType) (((((((KLPCrossingType)digits[2]) << PyLong_SHIFT) | (KLPCrossingType)digits[1]) << PyLong_SHIFT) | (KLPCrossingType)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(KLPCrossingType) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPCrossingType, 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(KLPCrossingType) >= 4 * PyLong_SHIFT)) {
                                return (KLPCrossingType) (((((((((KLPCrossingType)digits[3]) << PyLong_SHIFT) | (KLPCrossingType)digits[2]) << PyLong_SHIFT) | (KLPCrossingType)digits[1]) << PyLong_SHIFT) | (KLPCrossingType)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 (KLPCrossingType) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(KLPCrossingType) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(KLPCrossingType, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(KLPCrossingType) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(KLPCrossingType, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(KLPCrossingType, __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(KLPCrossingType) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPCrossingType, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(KLPCrossingType) - 1 > 2 * PyLong_SHIFT)) {
                                return (KLPCrossingType) (((KLPCrossingType)-1)*(((((KLPCrossingType)digits[1]) << PyLong_SHIFT) | (KLPCrossingType)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(KLPCrossingType) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPCrossingType, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(KLPCrossingType) - 1 > 2 * PyLong_SHIFT)) {
                                return (KLPCrossingType) ((((((KLPCrossingType)digits[1]) << PyLong_SHIFT) | (KLPCrossingType)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(KLPCrossingType) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPCrossingType, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(KLPCrossingType) - 1 > 3 * PyLong_SHIFT)) {
                                return (KLPCrossingType) (((KLPCrossingType)-1)*(((((((KLPCrossingType)digits[2]) << PyLong_SHIFT) | (KLPCrossingType)digits[1]) << PyLong_SHIFT) | (KLPCrossingType)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(KLPCrossingType) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPCrossingType, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(KLPCrossingType) - 1 > 3 * PyLong_SHIFT)) {
                                return (KLPCrossingType) ((((((((KLPCrossingType)digits[2]) << PyLong_SHIFT) | (KLPCrossingType)digits[1]) << PyLong_SHIFT) | (KLPCrossingType)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(KLPCrossingType) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPCrossingType, 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(KLPCrossingType) - 1 > 4 * PyLong_SHIFT)) {
                                return (KLPCrossingType) (((KLPCrossingType)-1)*(((((((((KLPCrossingType)digits[3]) << PyLong_SHIFT) | (KLPCrossingType)digits[2]) << PyLong_SHIFT) | (KLPCrossingType)digits[1]) << PyLong_SHIFT) | (KLPCrossingType)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(KLPCrossingType) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(KLPCrossingType, 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(KLPCrossingType) - 1 > 4 * PyLong_SHIFT)) {
                                return (KLPCrossingType) ((((((((((KLPCrossingType)digits[3]) << PyLong_SHIFT) | (KLPCrossingType)digits[2]) << PyLong_SHIFT) | (KLPCrossingType)digits[1]) << PyLong_SHIFT) | (KLPCrossingType)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(KLPCrossingType) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(KLPCrossingType, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(KLPCrossingType) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(KLPCrossingType, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        PyErr_SetString(PyExc_RuntimeError,
                        "_PyLong_AsByteArray() not available, cannot convert large enums");
        return (KLPCrossingType) -1;
    } else {
        KLPCrossingType val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (KLPCrossingType) -1;
        val = __Pyx_PyInt_As_KLPCrossingType(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to KLPCrossingType");
    return (KLPCrossingType) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to KLPCrossingType");
    return (KLPCrossingType) -1;
}

/* CIntFromPy */
static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const unsigned char neg_one = (unsigned char) -1, const_zero = (unsigned char) 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 char) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(unsigned char, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (unsigned char) 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 char, __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 char) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(unsigned char) >= 2 * PyLong_SHIFT)) {
                                return (unsigned char) (((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(unsigned char) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(unsigned char) >= 3 * PyLong_SHIFT)) {
                                return (unsigned char) (((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(unsigned char) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned char, 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 char) >= 4 * PyLong_SHIFT)) {
                                return (unsigned char) (((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)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 char) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if ((sizeof(unsigned char) <= sizeof(unsigned long))) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            if (__Pyx_PyLong_IsCompact(x)) {
                __PYX_VERIFY_RETURN_INT(unsigned char, __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 char) - 1 > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT)) {
                                return (unsigned char) (((unsigned char)-1)*(((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                            }
                        }
                        break;
                    case 2:
                        if ((8 * sizeof(unsigned char) > 1 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT)) {
                                return (unsigned char) ((((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                            }
                        }
                        break;
                    case -3:
                        if ((8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT)) {
                                return (unsigned char) (((unsigned char)-1)*(((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                            }
                        }
                        break;
                    case 3:
                        if ((8 * sizeof(unsigned char) > 2 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                            } else if ((8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT)) {
                                return (unsigned char) ((((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                            }
                        }
                        break;
                    case -4:
                        if ((8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned char, 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 char) - 1 > 4 * PyLong_SHIFT)) {
                                return (unsigned char) (((unsigned char)-1)*(((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                            }
                        }
                        break;
                    case 4:
                        if ((8 * sizeof(unsigned char) > 3 * PyLong_SHIFT)) {
                            if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                                __PYX_VERIFY_RETURN_INT(unsigned char, 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 char) - 1 > 4 * PyLong_SHIFT)) {
                                return (unsigned char) ((((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])));
                            }
                        }
                        break;
                }
            }
#endif
            if ((sizeof(unsigned char) <= sizeof(long))) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned char, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if ((sizeof(unsigned char) <= sizeof(PY_LONG_LONG))) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned char, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
            unsigned char 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 char) -1;
                }
#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
                if (Py_SIZE(x) == 0)
                    return (unsigned char) 0;
                is_negative = Py_SIZE(x) < 0;
#else
                {
                    int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                    if (unlikely(result < 0))
                        return (unsigned char) -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 char) -1;
                } else {
                    stepval = __Pyx_NewRef(v);
                }
                val = (unsigned char) 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 char) * 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 char) 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 char) * 8) - bits - (is_unsigned ? 0 : 1);
                if (unlikely(idigit >= (1L << remaining_bits)))
                    goto raise_overflow;
                val |= ((unsigned char) idigit) << bits;
            #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000
            unpacking_done:
            #endif
                if (!is_unsigned) {
                    if (unlikely(val & (((unsigned char) 1) << (sizeof(unsigned char) * 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 char) -1;
        }
    } else {
        unsigned char val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (unsigned char) -1;
        val = __Pyx_PyInt_As_unsigned_char(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned char");
    return (unsigned char) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned char");
    return (unsigned char) -1;
}

/* Globals */
static PyObject* __Pyx_Globals(void) {
    return __Pyx_NewRef(__pyx_d);
}

/* 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__726);
    }
    return name;
}
#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

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